diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..8cf5d53 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + "version": "0.2.0", + "configurations": [ + { + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md + "name": ".NET Core Launch (console)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/bin/Debug/net5.0-windows/Imposter's Ordeal.dll", + "args": [], + "cwd": "${workspaceFolder}", + // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console + "console": "internalConsole", + "stopAtEntry": false + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..2f10f5c --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,41 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/Imposter's Ordeal.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/Imposter's Ordeal.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "watch", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "--project", + "${workspaceFolder}/Imposter's Ordeal.csproj" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/Analyzer.cs b/Analyzer.cs index 9e06b9c..b99fa64 100644 --- a/Analyzer.cs +++ b/Analyzer.cs @@ -456,11 +456,13 @@ public static MainForm.RandomizerSetupConfig GetSetupConfig() instances[3]++; break; } - List affinities = new List(); - affinities.Add("0x"); - affinities.Add("1/2x"); - affinities.Add("1x"); - affinities.Add("2x"); + List affinities = new() + { + "0x", + "1/2x", + "1x", + "2x" + }; IDistribution[] affinityDistributions = new IDistribution[] { new Empirical(100, instances.ToList()), diff --git a/DataParser.cs b/DataParser.cs index 04c36f9..54c4371 100644 --- a/DataParser.cs +++ b/DataParser.cs @@ -9,7 +9,9 @@ using static ImpostersOrdeal.Wwise; using AssetsTools.NET.Extra; using SmartPoint.AssetAssistant; +using System.Diagnostics; using System.Threading; +using Newtonsoft.Json.Linq; namespace ImpostersOrdeal { @@ -45,6 +47,7 @@ public static void PrepareAnalysis() Task.Run(() => ParsePokemon()), Task.Run(() => ParseEncounterTables()), Task.Run(() => ParseTrainers()), + Task.Run(() => ParseBattleTowerTrainers()), Task.Run(() => ParseUgTables()), Task.Run(() => ParseAbilities()), Task.Run(() => ParseTypings()), @@ -327,7 +330,6 @@ private static async Task ParseTrainers() trainer.giftItem = trainerFields[trainerIdx].children[11].value.value.asUInt16; trainer.nameLabel = trainerFields[trainerIdx].children[12].GetValue().AsString(); trainer.aiBit = trainerFields[trainerIdx].children[19].value.value.asUInt32; - trainer.trainerID = trainerIdx; trainer.name = trainerNames[trainer.nameLabel]; @@ -372,2676 +374,2868 @@ private static async Task ParseTrainers() } /// - /// Overwrites GlobalData with parsed EncounterTables. + /// Overwrites GlobalData with a parsed Battle Tower Trainer table . /// - private static async Task ParseEncounterTables() + private static async Task ParseBattleTowerTrainers() { - gameData.encounterTableFiles = new EncounterTableFile[2]; - - List monoBehaviours = await monoBehaviourCollection[PathEnum.Gamesettings]; - AssetTypeValueField[] encounterTableMonoBehaviours = new AssetTypeValueField[2]; - encounterTableMonoBehaviours[0] = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "FieldEncountTable_d"); - encounterTableMonoBehaviours[1] = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "FieldEncountTable_p"); - for (int encounterTableFileIdx = 0; encounterTableFileIdx < encounterTableMonoBehaviours.Length; encounterTableFileIdx++) - { - EncounterTableFile encounterTableFile = new(); - encounterTableFile.mName = Encoding.Default.GetString(encounterTableMonoBehaviours[encounterTableFileIdx].children[3].value.value.asString); + gameData.battleTowerTrainers = new(); + gameData.battleTowerTrainersDouble = new(); + gameData.battleTowerTrainerPokemons = new(); + AssetTypeValueField monoBehaviour = (await monoBehaviourCollection[PathEnum.DprMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "TowerTrainerTable"); + AssetTypeValueField monoBehaviour2 = (await monoBehaviourCollection[PathEnum.DprMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "TowerSingleStockTable"); + AssetTypeValueField monoBehaviour3 = (await monoBehaviourCollection[PathEnum.DprMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "TowerDoubleStockTable"); + AssetTypeValueField nameData = (await monoBehaviourCollection[PathEnum.English]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "english_dp_trainers_name"); - //Parse wild encounter tables - encounterTableFile.encounterTables = new(); - AssetTypeValueField[] encounterTableFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[4].children[0].children; - for (int encounterTableIdx = 0; encounterTableIdx < encounterTableFields.Length; encounterTableIdx++) + AssetTypeValueField[] nameFields = nameData.children[8].children[0].children; + Dictionary trainerNames = new(); + gameData.trainerNames = trainerNames; + foreach (AssetTypeValueField label in nameFields) + if (label.children[6].children[0].childrenCount > 0) + trainerNames[label.children[2].GetValue().AsString()] = label.children[6].children[0].children[0].children[4].GetValue().AsString(); + AssetTypeValueField[] trainerFields = monoBehaviour2.children[4].children[0].children; + AssetTypeValueField[] trainerFieldsDouble = monoBehaviour3.children[4].children[0].children; + AssetTypeValueField[] pokemonFields = monoBehaviour.children[5].children[0].children; + AssetTypeValueField[] nameFieldsTower = monoBehaviour.children[4].children[0].children; + //Single battle parser + for (int trainerIdx = 0; trainerIdx < trainerFields.Length; trainerIdx++) + { + BattleTowerTrainer trainer = new(); + trainer.trainerID2 = trainerFields[trainerIdx].children[0].value.value.asUInt32; + trainer.trainerTypeID = trainerFields[trainerIdx].children[1].value.value.asInt32; + trainer.trainerTypeID2 = -1; ; + trainer.battleTowerPokemonID1 = trainerFields[trainerIdx].children[2].children[0].children[0].value.value.asUInt32; + trainer.battleTowerPokemonID2 = trainerFields[trainerIdx].children[2].children[0].children[1].value.value.asUInt32; + trainer.battleTowerPokemonID3 = trainerFields[trainerIdx].children[2].children[0].children[2].value.value.asUInt32; + trainer.battleTowerPokemonID4 = 0; + trainer.battleBGM = trainerFields[trainerIdx].children[3].value.value.ToString(); + trainer.winBGM = trainerFields[trainerIdx].children[4].value.value.ToString(); + trainer.nameLabel = nameFieldsTower[trainer.trainerTypeID].children[1].GetValue().AsString(); + trainer.name = trainerNames[trainer.nameLabel]; + trainer.nameLabel2 = null; + trainer.name2 = null; + trainer.isDouble = false; + gameData.battleTowerTrainers.Add(trainer); + } + //Double battle parser + for (int trainerIdx = 0; trainerIdx < trainerFieldsDouble.Length; trainerIdx++) + { + BattleTowerTrainer trainer = new(); + trainer.trainerID2 = trainerFieldsDouble[trainerIdx].children[0].value.value.asUInt32; + trainer.trainerTypeID = trainerFieldsDouble[trainerIdx].children[1].children[0].children[0].value.value.asInt32; ; + trainer.trainerTypeID2 = trainerFieldsDouble[trainerIdx].children[1].children[0].children[1].value.value.asInt32; ; + trainer.battleTowerPokemonID1 = trainerFieldsDouble[trainerIdx].children[2].children[0].children[0].value.value.asUInt32; + trainer.battleTowerPokemonID2 = trainerFieldsDouble[trainerIdx].children[2].children[0].children[1].value.value.asUInt32; + trainer.battleTowerPokemonID3 = trainerFieldsDouble[trainerIdx].children[2].children[0].children[2].value.value.asUInt32; + trainer.battleTowerPokemonID4 = trainerFieldsDouble[trainerIdx].children[2].children[0].children[3].value.value.asUInt32; + trainer.battleBGM = trainerFieldsDouble[trainerIdx].children[3].value.value.ToString(); + trainer.winBGM = trainerFieldsDouble[trainerIdx].children[4].value.value.ToString(); + trainer.nameLabel = nameFieldsTower[trainer.trainerTypeID].children[1].GetValue().AsString(); + trainer.name = trainerNames[trainer.nameLabel]; + if(trainer.trainerTypeID2 != -1) { + trainer.nameLabel2 = nameFieldsTower[trainer.trainerTypeID2].children[1].GetValue().AsString(); + trainer.name2 = trainerNames[trainer.nameLabel2]; + } + else { - EncounterTable encounterTable = new(); - encounterTable.zoneID = (ZoneID) encounterTableFields[encounterTableIdx].children[0].value.value.asInt32; - encounterTable.encRateGround = encounterTableFields[encounterTableIdx].children[1].value.value.asInt32; - encounterTable.formProb = encounterTableFields[encounterTableIdx].children[7].children[0].children[0].value.value.asInt32; - encounterTable.unownTable = encounterTableFields[encounterTableIdx].children[9].children[0].children[1].value.value.asInt32; - encounterTable.encRateWater = encounterTableFields[encounterTableIdx].children[15].value.value.asInt32; - encounterTable.encRateOldRod = encounterTableFields[encounterTableIdx].children[17].value.value.asInt32; - encounterTable.encRateGoodRod = encounterTableFields[encounterTableIdx].children[19].value.value.asInt32; - encounterTable.encRateSuperRod = encounterTableFields[encounterTableIdx].children[21].value.value.asInt32; + trainer.nameLabel2 = null; + trainer.name2 = null; + } + trainer.isDouble = true; + gameData.battleTowerTrainersDouble.Add(trainer); + } + + //Parse battle tower trainer pokemon + for (int pokemonIdx = 0; pokemonIdx < pokemonFields.Length && pokemonFields[pokemonIdx].children[0].value.value.asUInt32 != 0; pokemonIdx+=1) + { + BattleTowerTrainerPokemon pokemon = new(); + pokemon.pokemonID = pokemonFields[pokemonIdx].children[0].value.value.asUInt32; + pokemon.dexID = pokemonFields[pokemonIdx].children[1].value.value.asInt32; + pokemon.formID = pokemonFields[pokemonIdx].children[2].value.value.asUInt16; + pokemon.isRare = pokemonFields[pokemonIdx].children[3].value.value.asUInt8; + pokemon.level = pokemonFields[pokemonIdx].children[4].value.value.asUInt8; + pokemon.sex = pokemonFields[pokemonIdx].children[5].value.value.asUInt8; + pokemon.natureID = pokemonFields[pokemonIdx].children[6].value.value.asInt32; + pokemon.abilityID = pokemonFields[pokemonIdx].children[7].value.value.asInt32; + pokemon.moveID1 = pokemonFields[pokemonIdx].children[8].value.value.asInt32; + pokemon.moveID2 = pokemonFields[pokemonIdx].children[9].value.value.asInt32; + pokemon.moveID3 = pokemonFields[pokemonIdx].children[10].value.value.asInt32; + pokemon.moveID4 = pokemonFields[pokemonIdx].children[11].value.value.asInt32; + pokemon.itemID = pokemonFields[pokemonIdx].children[12].value.value.asUInt16; + pokemon.ballID = pokemonFields[pokemonIdx].children[13].value.value.asUInt8; + pokemon.seal = pokemonFields[pokemonIdx].children[14].value.value.asInt32; + pokemon.hpIV = pokemonFields[pokemonIdx].children[15].value.value.asUInt8; + pokemon.atkIV = pokemonFields[pokemonIdx].children[16].value.value.asUInt8; + pokemon.defIV = pokemonFields[pokemonIdx].children[17].value.value.asUInt8; + pokemon.spAtkIV = pokemonFields[pokemonIdx].children[18].value.value.asUInt8; + pokemon.spDefIV = pokemonFields[pokemonIdx].children[19].value.value.asUInt8; + pokemon.spdIV = pokemonFields[pokemonIdx].children[20].value.value.asUInt8; + pokemon.hpEV = pokemonFields[pokemonIdx].children[21].value.value.asUInt8; + pokemon.atkEV = pokemonFields[pokemonIdx].children[22].value.value.asUInt8; + pokemon.defEV = pokemonFields[pokemonIdx].children[23].value.value.asUInt8; + pokemon.spAtkEV = pokemonFields[pokemonIdx].children[ 24].value.value.asUInt8; + pokemon.spDefEV = pokemonFields[pokemonIdx].children[25].value.value.asUInt8; + pokemon.spdEV = pokemonFields[pokemonIdx].children[26].value.value.asUInt8; + gameData.battleTowerTrainerPokemons.Add(pokemon); + } + +} - //Parse ground tables - encounterTable.groundMons = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[2].children[0].children); +/// +/// Overwrites GlobalData with parsed EncounterTables. +/// +private static async Task ParseEncounterTables() +{ +gameData.encounterTableFiles = new EncounterTableFile[2]; - //Parse morning tables - encounterTable.tairyo = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[3].children[0].children); +List monoBehaviours = await monoBehaviourCollection[PathEnum.Gamesettings]; +AssetTypeValueField[] encounterTableMonoBehaviours = new AssetTypeValueField[2]; +encounterTableMonoBehaviours[0] = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "FieldEncountTable_d"); +encounterTableMonoBehaviours[1] = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "FieldEncountTable_p"); +for (int encounterTableFileIdx = 0; encounterTableFileIdx < encounterTableMonoBehaviours.Length; encounterTableFileIdx++) +{ +EncounterTableFile encounterTableFile = new(); +encounterTableFile.mName = Encoding.Default.GetString(encounterTableMonoBehaviours[encounterTableFileIdx].children[3].value.value.asString); - //Parse day tables - encounterTable.day = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[4].children[0].children); +//Parse wild encounter tables +encounterTableFile.encounterTables = new(); +AssetTypeValueField[] encounterTableFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[4].children[0].children; +for (int encounterTableIdx = 0; encounterTableIdx < encounterTableFields.Length; encounterTableIdx++) +{ + EncounterTable encounterTable = new(); + encounterTable.zoneID = (ZoneID) encounterTableFields[encounterTableIdx].children[0].value.value.asInt32; + encounterTable.encRateGround = encounterTableFields[encounterTableIdx].children[1].value.value.asInt32; + encounterTable.formProb = encounterTableFields[encounterTableIdx].children[7].children[0].children[0].value.value.asInt32; + encounterTable.unownTable = encounterTableFields[encounterTableIdx].children[9].children[0].children[1].value.value.asInt32; + encounterTable.encRateWater = encounterTableFields[encounterTableIdx].children[15].value.value.asInt32; + encounterTable.encRateOldRod = encounterTableFields[encounterTableIdx].children[17].value.value.asInt32; + encounterTable.encRateGoodRod = encounterTableFields[encounterTableIdx].children[19].value.value.asInt32; + encounterTable.encRateSuperRod = encounterTableFields[encounterTableIdx].children[21].value.value.asInt32; - //Parse night tables - encounterTable.night = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[5].children[0].children); + //Parse ground tables + encounterTable.groundMons = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[2].children[0].children); - //Parse pokefinder tables - encounterTable.swayGrass = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[6].children[0].children); + //Parse morning tables + encounterTable.tairyo = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[3].children[0].children); - //Parse ruby tables - encounterTable.gbaRuby = GetParsedEncounters(encounterTableFields[encounterTableIdx]["gbaRuby"].children[0].children); + //Parse day tables + encounterTable.day = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[4].children[0].children); - //Parse sapphire tables - encounterTable.gbaSapphire = GetParsedEncounters(encounterTableFields[encounterTableIdx]["gbaSapp"].children[0].children); + //Parse night tables + encounterTable.night = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[5].children[0].children); - //Parse emerald tables - encounterTable.gbaEmerald = GetParsedEncounters(encounterTableFields[encounterTableIdx]["gbaEme"].children[0].children); + //Parse pokefinder tables + encounterTable.swayGrass = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[6].children[0].children); - //Parse fire tables - encounterTable.gbaFire = GetParsedEncounters(encounterTableFields[encounterTableIdx]["gbaFire"].children[0].children); + //Parse ruby tables + encounterTable.gbaRuby = GetParsedEncounters(encounterTableFields[encounterTableIdx]["gbaRuby"].children[0].children); - //Parse leaf tables - encounterTable.gbaLeaf = GetParsedEncounters(encounterTableFields[encounterTableIdx]["gbaLeaf"].children[0].children); + //Parse sapphire tables + encounterTable.gbaSapphire = GetParsedEncounters(encounterTableFields[encounterTableIdx]["gbaSapp"].children[0].children); - //Parse surfing tables - encounterTable.waterMons = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[16].children[0].children); + //Parse emerald tables + encounterTable.gbaEmerald = GetParsedEncounters(encounterTableFields[encounterTableIdx]["gbaEme"].children[0].children); - //Parse old rod tables - encounterTable.oldRodMons = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[18].children[0].children); + //Parse fire tables + encounterTable.gbaFire = GetParsedEncounters(encounterTableFields[encounterTableIdx]["gbaFire"].children[0].children); - //Parse good rod tables - encounterTable.goodRodMons = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[20].children[0].children); + //Parse leaf tables + encounterTable.gbaLeaf = GetParsedEncounters(encounterTableFields[encounterTableIdx]["gbaLeaf"].children[0].children); - //Parse super rod tables - encounterTable.superRodMons = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[22].children[0].children); + //Parse surfing tables + encounterTable.waterMons = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[16].children[0].children); - encounterTableFile.encounterTables.Add(encounterTable); - } + //Parse old rod tables + encounterTable.oldRodMons = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[18].children[0].children); - //Parse trophy garden table - encounterTableFile.trophyGardenMons = new(); - AssetTypeValueField[] trophyGardenMonFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[5].children[0].children; - for (int trophyGardenMonIdx = 0; trophyGardenMonIdx < trophyGardenMonFields.Length; trophyGardenMonIdx++) - encounterTableFile.trophyGardenMons.Add(trophyGardenMonFields[trophyGardenMonIdx].children[0].value.value.asInt32); + //Parse good rod tables + encounterTable.goodRodMons = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[20].children[0].children); - //Parse honey tree tables - encounterTableFile.honeyTreeEnconters = new(); - AssetTypeValueField[] honeyTreeEncounterFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[6].children[0].children; - for (int honeyTreeEncounterIdx = 0; honeyTreeEncounterIdx < honeyTreeEncounterFields.Length; honeyTreeEncounterIdx++) - { - HoneyTreeEncounter honeyTreeEncounter = new(); - honeyTreeEncounter.rate = honeyTreeEncounterFields[honeyTreeEncounterIdx].children[0].value.value.asInt32; - honeyTreeEncounter.normalDexID = honeyTreeEncounterFields[honeyTreeEncounterIdx].children[1].value.value.asInt32; - honeyTreeEncounter.rareDexID = honeyTreeEncounterFields[honeyTreeEncounterIdx].children[2].value.value.asInt32; - honeyTreeEncounter.superRareDexID = honeyTreeEncounterFields[honeyTreeEncounterIdx].children[3].value.value.asInt32; + //Parse super rod tables + encounterTable.superRodMons = GetParsedEncounters(encounterTableFields[encounterTableIdx].children[22].children[0].children); - encounterTableFile.honeyTreeEnconters.Add(honeyTreeEncounter); - } + encounterTableFile.encounterTables.Add(encounterTable); +} - //Parse safari table - encounterTableFile.safariMons = new(); - AssetTypeValueField[] safariMonFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[8].children[0].children; - for (int safariMonIdx = 0; safariMonIdx < safariMonFields.Length; safariMonIdx++) - encounterTableFile.safariMons.Add(safariMonFields[safariMonIdx].children[0].value.value.asInt32); +//Parse trophy garden table +encounterTableFile.trophyGardenMons = new(); +AssetTypeValueField[] trophyGardenMonFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[5].children[0].children; +for (int trophyGardenMonIdx = 0; trophyGardenMonIdx < trophyGardenMonFields.Length; trophyGardenMonIdx++) + encounterTableFile.trophyGardenMons.Add(trophyGardenMonFields[trophyGardenMonIdx].children[0].value.value.asInt32); - gameData.encounterTableFiles[encounterTableFileIdx] = encounterTableFile; - } - } +//Parse honey tree tables +encounterTableFile.honeyTreeEnconters = new(); +AssetTypeValueField[] honeyTreeEncounterFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[6].children[0].children; +for (int honeyTreeEncounterIdx = 0; honeyTreeEncounterIdx < honeyTreeEncounterFields.Length; honeyTreeEncounterIdx++) +{ + HoneyTreeEncounter honeyTreeEncounter = new(); + honeyTreeEncounter.rate = honeyTreeEncounterFields[honeyTreeEncounterIdx].children[0].value.value.asInt32; + honeyTreeEncounter.normalDexID = honeyTreeEncounterFields[honeyTreeEncounterIdx].children[1].value.value.asInt32; + honeyTreeEncounter.rareDexID = honeyTreeEncounterFields[honeyTreeEncounterIdx].children[2].value.value.asInt32; + honeyTreeEncounter.superRareDexID = honeyTreeEncounterFields[honeyTreeEncounterIdx].children[3].value.value.asInt32; - /// - /// Parses an array of encounters in a monobehaviour into a list of Encounters. - /// - private static List GetParsedEncounters(AssetTypeValueField[] encounterFields) - { - List encounters = new(); - for (int encounterIdx = 0; encounterIdx < encounterFields.Length; encounterIdx++) - { - Encounter encounter = new(); - encounter.maxLv = encounterFields[encounterIdx].children[0].value.value.asInt32; - encounter.minLv = encounterFields[encounterIdx].children[1].value.value.asInt32; - encounter.dexID = encounterFields[encounterIdx].children[2].value.value.asInt32; + encounterTableFile.honeyTreeEnconters.Add(honeyTreeEncounter); +} - encounters.Add(encounter); - } - return encounters; - } +//Parse safari table +encounterTableFile.safariMons = new(); +AssetTypeValueField[] safariMonFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[8].children[0].children; +for (int safariMonIdx = 0; safariMonIdx < safariMonFields.Length; safariMonIdx++) + encounterTableFile.safariMons.Add(safariMonFields[safariMonIdx].children[0].value.value.asInt32); - /// - /// Overwrites GlobalData with parsed DexEntries and PersonalEntries. - /// - private static async Task ParsePokemon() - { - gameData.dexEntries = new(); - gameData.personalEntries = new(); - List monoBehaviours = (await monoBehaviourCollection[PathEnum.PersonalMasterdatas]); - AssetTypeValueField textData = (await monoBehaviourCollection[PathEnum.CommonMsbt]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "english_ss_monsname"); - - AssetTypeValueField[] levelUpMoveFields = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "WazaOboeTable").children[4].children[0].children; - AssetTypeValueField[] eggMoveFields = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "TamagoWazaTable").children[4].children[0].children; - AssetTypeValueField[] evolveFields = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "EvolveTable").children[4].children[0].children; - AssetTypeValueField[] personalFields = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "PersonalTable").children[4].children[0].children; - AssetTypeValueField[] textFields = textData.children[8].children[0].children; - - if (levelUpMoveFields.Length < personalFields.Length) - MainForm.ShowParserError("Oh my, this WazaOboeTable is missing some stuff...\n" + - "I don't feel so good...\n" + - "PersonalTable entries: " + personalFields.Length + "\n" + - "WazaOboeTable entries: " + levelUpMoveFields.Length + "??"); - if (eggMoveFields.Length < personalFields.Length) - MainForm.ShowParserError("Oh my, this TamagoWazaTable is missing some stuff...\n" + - "I don't feel so good...\n" + - "PersonalTable entries: " + personalFields.Length + "\n" + - "TamagoWazaTable entries: " + eggMoveFields.Length + "??"); - if (evolveFields.Length < personalFields.Length) - MainForm.ShowParserError("Oh my, this EvolveTable is missing some stuff...\n" + - "I don't feel so good...\n" + - "PersonalTable entries: " + personalFields.Length + "\n" + - "EvolveTable entries: " + evolveFields.Length + "??"); - - for (int personalID = 0; personalID < personalFields.Length; personalID++) - { - Pokemon pokemon = new(); - pokemon.validFlag = personalFields[personalID].children[0].value.value.asUInt8; - pokemon.personalID = personalFields[personalID].children[1].value.value.asUInt16; - pokemon.dexID = personalFields[personalID].children[2].value.value.asUInt16; - pokemon.formIndex = personalFields[personalID].children[3].value.value.asUInt16; - pokemon.formMax = personalFields[personalID].children[4].value.value.asUInt8; - pokemon.color = personalFields[personalID].children[5].value.value.asUInt8; - pokemon.graNo = personalFields[personalID].children[6].value.value.asUInt16; - pokemon.basicHp = personalFields[personalID].children[7].value.value.asUInt8; - pokemon.basicAtk = personalFields[personalID].children[8].value.value.asUInt8; - pokemon.basicDef = personalFields[personalID].children[9].value.value.asUInt8; - pokemon.basicSpd = personalFields[personalID].children[10].value.value.asUInt8; - pokemon.basicSpAtk = personalFields[personalID].children[11].value.value.asUInt8; - pokemon.basicSpDef = personalFields[personalID].children[12].value.value.asUInt8; - pokemon.typingID1 = personalFields[personalID].children[13].value.value.asUInt8; - pokemon.typingID2 = personalFields[personalID].children[14].value.value.asUInt8; - pokemon.getRate = personalFields[personalID].children[15].value.value.asUInt8; - pokemon.rank = personalFields[personalID].children[16].value.value.asUInt8; - pokemon.expValue = personalFields[personalID].children[17].value.value.asUInt16; - pokemon.item1 = personalFields[personalID].children[18].value.value.asUInt16; - pokemon.item2 = personalFields[personalID].children[19].value.value.asUInt16; - pokemon.item3 = personalFields[personalID].children[20].value.value.asUInt16; - pokemon.sex = personalFields[personalID].children[21].value.value.asUInt8; - pokemon.eggBirth = personalFields[personalID].children[22].value.value.asUInt8; - pokemon.initialFriendship = personalFields[personalID].children[23].value.value.asUInt8; - pokemon.eggGroup1 = personalFields[personalID].children[24].value.value.asUInt8; - pokemon.eggGroup2 = personalFields[personalID].children[25].value.value.asUInt8; - pokemon.grow = personalFields[personalID].children[26].value.value.asUInt8; - pokemon.abilityID1 = personalFields[personalID].children[27].value.value.asUInt16; - pokemon.abilityID2 = personalFields[personalID].children[28].value.value.asUInt16; - pokemon.abilityID3 = personalFields[personalID].children[29].value.value.asUInt16; - pokemon.giveExp = personalFields[personalID].children[30].value.value.asUInt16; - pokemon.height = personalFields[personalID].children[31].value.value.asUInt16; - pokemon.weight = personalFields[personalID].children[32].value.value.asUInt16; - pokemon.chihouZukanNo = personalFields[personalID].children[33].value.value.asUInt16; - pokemon.machine1 = personalFields[personalID].children[34].value.value.asUInt32; - pokemon.machine2 = personalFields[personalID].children[35].value.value.asUInt32; - pokemon.machine3 = personalFields[personalID].children[36].value.value.asUInt32; - pokemon.machine4 = personalFields[personalID].children[37].value.value.asUInt32; - pokemon.hiddenMachine = personalFields[personalID].children[38].value.value.asUInt32; - pokemon.eggMonsno = personalFields[personalID].children[39].value.value.asUInt16; - pokemon.eggFormno = personalFields[personalID].children[40].value.value.asUInt16; - pokemon.eggFormnoKawarazunoishi = personalFields[personalID].children[41].value.value.asUInt16; - pokemon.eggFormInheritKawarazunoishi = personalFields[personalID].children[42].value.value.asUInt8; - - pokemon.formID = 0; - if (pokemon.personalID != pokemon.dexID) - pokemon.formID = pokemon.personalID - pokemon.formIndex + 1; - pokemon.name = ""; - if (textFields[pokemon.dexID].children[6].children[0].childrenCount > 0) - pokemon.name = Encoding.UTF8.GetString(textFields[pokemon.dexID].children[6].children[0].children[0].children[4].value.value.asString); - pokemon.nextEvoLvs = (ushort.MaxValue, ushort.MaxValue); //(wildLevel, trainerLevel) - pokemon.pastPokemon = new(); - pokemon.nextPokemon = new(); - pokemon.inferiorForms = new(); - pokemon.superiorForms = new(); - - //Parse level up moves - pokemon.levelUpMoves = new(); - for (int levelUpMoveIdx = 0; levelUpMoveIdx < levelUpMoveFields[personalID].children[1].children[0].childrenCount; levelUpMoveIdx += 2) - { - LevelUpMove levelUpMove = new(); - levelUpMove.level = levelUpMoveFields[personalID].children[1].children[0].children[levelUpMoveIdx].value.value.asUInt16; - levelUpMove.moveID = levelUpMoveFields[personalID].children[1].children[0].children[levelUpMoveIdx + 1].value.value.asUInt16; +gameData.encounterTableFiles[encounterTableFileIdx] = encounterTableFile; +} +} - pokemon.levelUpMoves.Add(levelUpMove); - } +/// +/// Parses an array of encounters in a monobehaviour into a list of Encounters. +/// +private static List GetParsedEncounters(AssetTypeValueField[] encounterFields) +{ +List encounters = new(); +for (int encounterIdx = 0; encounterIdx < encounterFields.Length; encounterIdx++) +{ +Encounter encounter = new(); +encounter.maxLv = encounterFields[encounterIdx].children[0].value.value.asInt32; +encounter.minLv = encounterFields[encounterIdx].children[1].value.value.asInt32; +encounter.dexID = encounterFields[encounterIdx].children[2].value.value.asInt32; - //Parse egg moves - pokemon.eggMoves = new(); - for (int eggMoveIdx = 0; eggMoveIdx < eggMoveFields[personalID].children[2].children[0].childrenCount; eggMoveIdx++) - pokemon.eggMoves.Add(eggMoveFields[personalID].children[2].children[0].children[eggMoveIdx].value.value.asUInt16); +encounters.Add(encounter); +} +return encounters; +} - //Parse evolutions - pokemon.evolutionPaths = new(); - for (int evolutionIdx = 0; evolutionIdx < evolveFields[personalID].children[1].children[0].childrenCount; evolutionIdx += 5) - { - EvolutionPath evolution = new(); - evolution.method = evolveFields[personalID].children[1].children[0].children[evolutionIdx].value.value.asUInt16; - evolution.parameter = evolveFields[personalID].children[1].children[0].children[evolutionIdx + 1].value.value.asUInt16; - evolution.destDexID = evolveFields[personalID].children[1].children[0].children[evolutionIdx + 2].value.value.asUInt16; - evolution.destFormID = evolveFields[personalID].children[1].children[0].children[evolutionIdx + 3].value.value.asUInt16; - evolution.level = evolveFields[personalID].children[1].children[0].children[evolutionIdx + 4].value.value.asUInt16; - - pokemon.evolutionPaths.Add(evolution); - } +/// +/// Overwrites GlobalData with parsed DexEntries and PersonalEntries. +/// +private static async Task ParsePokemon() +{ +gameData.dexEntries = new(); +gameData.personalEntries = new(); +List monoBehaviours = (await monoBehaviourCollection[PathEnum.PersonalMasterdatas]); +AssetTypeValueField textData = (await monoBehaviourCollection[PathEnum.CommonMsbt]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "english_ss_monsname"); + +AssetTypeValueField[] levelUpMoveFields = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "WazaOboeTable").children[4].children[0].children; +AssetTypeValueField[] eggMoveFields = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "TamagoWazaTable").children[4].children[0].children; +AssetTypeValueField[] evolveFields = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "EvolveTable").children[4].children[0].children; +AssetTypeValueField[] personalFields = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "PersonalTable").children[4].children[0].children; +AssetTypeValueField[] textFields = textData.children[8].children[0].children; + +if (levelUpMoveFields.Length < personalFields.Length) +MainForm.ShowParserError("Oh my, this WazaOboeTable is missing some stuff...\n" + + "I don't feel so good...\n" + + "PersonalTable entries: " + personalFields.Length + "\n" + + "WazaOboeTable entries: " + levelUpMoveFields.Length + "??"); +if (eggMoveFields.Length < personalFields.Length) +MainForm.ShowParserError("Oh my, this TamagoWazaTable is missing some stuff...\n" + + "I don't feel so good...\n" + + "PersonalTable entries: " + personalFields.Length + "\n" + + "TamagoWazaTable entries: " + eggMoveFields.Length + "??"); +if (evolveFields.Length < personalFields.Length) +MainForm.ShowParserError("Oh my, this EvolveTable is missing some stuff...\n" + + "I don't feel so good...\n" + + "PersonalTable entries: " + personalFields.Length + "\n" + + "EvolveTable entries: " + evolveFields.Length + "??"); + +for (int personalID = 0; personalID < personalFields.Length; personalID++) +{ +Pokemon pokemon = new(); +pokemon.validFlag = personalFields[personalID].children[0].value.value.asUInt8; +pokemon.personalID = personalFields[personalID].children[1].value.value.asUInt16; +pokemon.dexID = personalFields[personalID].children[2].value.value.asUInt16; +pokemon.formIndex = personalFields[personalID].children[3].value.value.asUInt16; +pokemon.formMax = personalFields[personalID].children[4].value.value.asUInt8; +pokemon.color = personalFields[personalID].children[5].value.value.asUInt8; +pokemon.graNo = personalFields[personalID].children[6].value.value.asUInt16; +pokemon.basicHp = personalFields[personalID].children[7].value.value.asUInt8; +pokemon.basicAtk = personalFields[personalID].children[8].value.value.asUInt8; +pokemon.basicDef = personalFields[personalID].children[9].value.value.asUInt8; +pokemon.basicSpd = personalFields[personalID].children[10].value.value.asUInt8; +pokemon.basicSpAtk = personalFields[personalID].children[11].value.value.asUInt8; +pokemon.basicSpDef = personalFields[personalID].children[12].value.value.asUInt8; +pokemon.typingID1 = personalFields[personalID].children[13].value.value.asUInt8; +pokemon.typingID2 = personalFields[personalID].children[14].value.value.asUInt8; +pokemon.getRate = personalFields[personalID].children[15].value.value.asUInt8; +pokemon.rank = personalFields[personalID].children[16].value.value.asUInt8; +pokemon.expValue = personalFields[personalID].children[17].value.value.asUInt16; +pokemon.item1 = personalFields[personalID].children[18].value.value.asUInt16; +pokemon.item2 = personalFields[personalID].children[19].value.value.asUInt16; +pokemon.item3 = personalFields[personalID].children[20].value.value.asUInt16; +pokemon.sex = personalFields[personalID].children[21].value.value.asUInt8; +pokemon.eggBirth = personalFields[personalID].children[22].value.value.asUInt8; +pokemon.initialFriendship = personalFields[personalID].children[23].value.value.asUInt8; +pokemon.eggGroup1 = personalFields[personalID].children[24].value.value.asUInt8; +pokemon.eggGroup2 = personalFields[personalID].children[25].value.value.asUInt8; +pokemon.grow = personalFields[personalID].children[26].value.value.asUInt8; +pokemon.abilityID1 = personalFields[personalID].children[27].value.value.asUInt16; +pokemon.abilityID2 = personalFields[personalID].children[28].value.value.asUInt16; +pokemon.abilityID3 = personalFields[personalID].children[29].value.value.asUInt16; +pokemon.giveExp = personalFields[personalID].children[30].value.value.asUInt16; +pokemon.height = personalFields[personalID].children[31].value.value.asUInt16; +pokemon.weight = personalFields[personalID].children[32].value.value.asUInt16; +pokemon.chihouZukanNo = personalFields[personalID].children[33].value.value.asUInt16; +pokemon.machine1 = personalFields[personalID].children[34].value.value.asUInt32; +pokemon.machine2 = personalFields[personalID].children[35].value.value.asUInt32; +pokemon.machine3 = personalFields[personalID].children[36].value.value.asUInt32; +pokemon.machine4 = personalFields[personalID].children[37].value.value.asUInt32; +pokemon.hiddenMachine = personalFields[personalID].children[38].value.value.asUInt32; +pokemon.eggMonsno = personalFields[personalID].children[39].value.value.asUInt16; +pokemon.eggFormno = personalFields[personalID].children[40].value.value.asUInt16; +pokemon.eggFormnoKawarazunoishi = personalFields[personalID].children[41].value.value.asUInt16; +pokemon.eggFormInheritKawarazunoishi = personalFields[personalID].children[42].value.value.asUInt8; + +pokemon.formID = 0; +if (pokemon.personalID != pokemon.dexID) + pokemon.formID = pokemon.personalID - pokemon.formIndex + 1; +pokemon.name = ""; +if (textFields[pokemon.dexID].children[6].children[0].childrenCount > 0) + pokemon.name = Encoding.UTF8.GetString(textFields[pokemon.dexID].children[6].children[0].children[0].children[4].value.value.asString); +pokemon.nextEvoLvs = (ushort.MaxValue, ushort.MaxValue); //(wildLevel, trainerLevel) +pokemon.pastPokemon = new(); +pokemon.nextPokemon = new(); +pokemon.inferiorForms = new(); +pokemon.superiorForms = new(); + +//Parse level up moves +pokemon.levelUpMoves = new(); +for (int levelUpMoveIdx = 0; levelUpMoveIdx < levelUpMoveFields[personalID].children[1].children[0].childrenCount; levelUpMoveIdx += 2) +{ + LevelUpMove levelUpMove = new(); + levelUpMove.level = levelUpMoveFields[personalID].children[1].children[0].children[levelUpMoveIdx].value.value.asUInt16; + levelUpMove.moveID = levelUpMoveFields[personalID].children[1].children[0].children[levelUpMoveIdx + 1].value.value.asUInt16; - gameData.personalEntries.Add(pokemon); + pokemon.levelUpMoves.Add(levelUpMove); +} - if (gameData.dexEntries.Count == pokemon.dexID) - { - gameData.dexEntries.Add(new()); - gameData.dexEntries[pokemon.dexID].dexID = pokemon.dexID; - gameData.dexEntries[pokemon.dexID].forms = new(); - gameData.dexEntries[pokemon.dexID].name = pokemon.name; - } +//Parse egg moves +pokemon.eggMoves = new(); +for (int eggMoveIdx = 0; eggMoveIdx < eggMoveFields[personalID].children[2].children[0].childrenCount; eggMoveIdx++) + pokemon.eggMoves.Add(eggMoveFields[personalID].children[2].children[0].children[eggMoveIdx].value.value.asUInt16); - gameData.dexEntries[pokemon.dexID].forms.Add(pokemon); - } +//Parse evolutions +pokemon.evolutionPaths = new(); +for (int evolutionIdx = 0; evolutionIdx < evolveFields[personalID].children[1].children[0].childrenCount; evolutionIdx += 5) +{ + EvolutionPath evolution = new(); + evolution.method = evolveFields[personalID].children[1].children[0].children[evolutionIdx].value.value.asUInt16; + evolution.parameter = evolveFields[personalID].children[1].children[0].children[evolutionIdx + 1].value.value.asUInt16; + evolution.destDexID = evolveFields[personalID].children[1].children[0].children[evolutionIdx + 2].value.value.asUInt16; + evolution.destFormID = evolveFields[personalID].children[1].children[0].children[evolutionIdx + 3].value.value.asUInt16; + evolution.level = evolveFields[personalID].children[1].children[0].children[evolutionIdx + 4].value.value.asUInt16; + + pokemon.evolutionPaths.Add(evolution); +} - SetFamilies(); - SetLegendaries(); - } +gameData.personalEntries.Add(pokemon); - private static async void SetLegendaries() - { - AssetTypeValueField[] legendFields = (await monoBehaviourCollection[PathEnum.Gamesettings]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "FieldEncountTable_d").children[10].children[0].children; - for (int legendEntryIdx = 0; legendEntryIdx < legendFields.Length; legendEntryIdx++) - { - List forms = gameData.dexEntries[legendFields[legendEntryIdx].children[0].value.value.asInt32].forms; - for (int formID = 0; formID < forms.Count; formID++) - forms[formID].legendary = true; - } - } +if (gameData.dexEntries.Count == pokemon.dexID) +{ + gameData.dexEntries.Add(new()); + gameData.dexEntries[pokemon.dexID].dexID = pokemon.dexID; + gameData.dexEntries[pokemon.dexID].forms = new(); + gameData.dexEntries[pokemon.dexID].name = pokemon.name; +} - /// - /// Overwrites and updates all pokemons' evolution info for easier BST logic. - /// - public static void SetFamilies() - { - for (int dexID = 0; dexID < gameData.dexEntries.Count; dexID++) - { - for (int formID = 0; formID < gameData.dexEntries[dexID].forms.Count; formID++) - { - Pokemon pokemon = gameData.dexEntries[dexID].forms[formID]; - for (int evolutionIdx = 0; evolutionIdx < gameData.dexEntries[dexID].forms[formID].evolutionPaths.Count; evolutionIdx++) - { - EvolutionPath evo = pokemon.evolutionPaths[evolutionIdx]; - Pokemon next = gameData.dexEntries[evo.destDexID].forms[evo.destFormID]; - - if (pokemon.dexID == next.dexID) - continue; - - pokemon.nextPokemon.Add(next); - next.pastPokemon.Add(pokemon); - } - - for (int formID2 = 0; formID2 < gameData.dexEntries[dexID].forms.Count; formID2++) - { - Pokemon pokemon2 = gameData.dexEntries[dexID].forms[formID2]; - if (pokemon2.GetBST() - pokemon.GetBST() >= 30) - { - pokemon2.inferiorForms.Add(pokemon); - pokemon.superiorForms.Add(pokemon2); - } - } - } - } +gameData.dexEntries[pokemon.dexID].forms.Add(pokemon); +} - for (int dexID = 0; dexID < gameData.dexEntries.Count; dexID++) - { - for (int formID = 0; formID < gameData.dexEntries[dexID].forms.Count; formID++) - { - Pokemon pokemon = gameData.dexEntries[dexID].forms[formID]; - (ushort, ushort) evoLvs = GetEvoLvs(pokemon); - if (evoLvs == (0, 0)) - continue; +SetFamilies(); +SetLegendaries(); +} - pokemon.nextEvoLvs = evoLvs; +private static async void SetLegendaries() +{ +AssetTypeValueField[] legendFields = (await monoBehaviourCollection[PathEnum.Gamesettings]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "FieldEncountTable_d").children[10].children[0].children; +for (int legendEntryIdx = 0; legendEntryIdx < legendFields.Length; legendEntryIdx++) +{ +List forms = gameData.dexEntries[legendFields[legendEntryIdx].children[0].value.value.asInt32].forms; +for (int formID = 0; formID < forms.Count; formID++) + forms[formID].legendary = true; +} +} - for (int evolutionIdx = 0; evolutionIdx < gameData.dexEntries[dexID].forms[formID].evolutionPaths.Count; evolutionIdx++) - { - EvolutionPath evo = pokemon.evolutionPaths[evolutionIdx]; - Pokemon next = gameData.dexEntries[evo.destDexID].forms[evo.destFormID]; +/// +/// Overwrites and updates all pokemons' evolution info for easier BST logic. +/// +public static void SetFamilies() +{ +for (int dexID = 0; dexID < gameData.dexEntries.Count; dexID++) +{ +for (int formID = 0; formID < gameData.dexEntries[dexID].forms.Count; formID++) +{ + Pokemon pokemon = gameData.dexEntries[dexID].forms[formID]; + for (int evolutionIdx = 0; evolutionIdx < gameData.dexEntries[dexID].forms[formID].evolutionPaths.Count; evolutionIdx++) + { + EvolutionPath evo = pokemon.evolutionPaths[evolutionIdx]; + Pokemon next = gameData.dexEntries[evo.destDexID].forms[evo.destFormID]; - if (pokemon.dexID == next.dexID) - continue; + if (pokemon.dexID == next.dexID) + continue; - next.pastEvoLvs.Item1 = Math.Max(next.pastEvoLvs.Item1, evoLvs.Item1); - next.pastEvoLvs.Item2 = Math.Max(next.pastEvoLvs.Item2, evoLvs.Item2); - } - } - } - } + pokemon.nextPokemon.Add(next); + next.pastPokemon.Add(pokemon); + } - /// - /// Finds the levels the specified pokemon is likely to evolve: (wildLevel, trainerLevel). - /// - private static (ushort, ushort) GetEvoLvs(Pokemon pokemon) + for (int formID2 = 0; formID2 < gameData.dexEntries[dexID].forms.Count; formID2++) + { + Pokemon pokemon2 = gameData.dexEntries[dexID].forms[formID2]; + if (pokemon2.GetBST() - pokemon.GetBST() >= 30) { - (ushort, ushort) evoLvs = (0, 0); - for (int evolutionIdx = 0; evolutionIdx < pokemon.evolutionPaths.Count; evolutionIdx++) - { - EvolutionPath evo = pokemon.evolutionPaths[evolutionIdx]; - if (pokemon.dexID == evo.destDexID) - continue; - - switch (evo.method) - { - case 1: - case 2: - case 3: - case 21: - case 29: - case 43: - for (int pastEvos = 0; pastEvos < pokemon.pastPokemon.Count; pastEvos++) - { - (ushort, ushort) pastPokemonEvoLvs = GetEvoLvs(pokemon.pastPokemon[pastEvos]); - evoLvs.Item1 = Math.Max(evoLvs.Item1, pastPokemonEvoLvs.Item1); - evoLvs.Item2 = Math.Max(evoLvs.Item2, pastPokemonEvoLvs.Item2); - } - if (evoLvs == (0, 0)) - evoLvs = (1, 1); - evoLvs.Item1 += 16; - evoLvs.Item2 += 16; - break; - case 4: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 23: - case 24: - case 28: - case 32: - case 33: - case 34: - case 36: - case 37: - case 38: - case 40: - case 41: - case 46: - case 47: - evoLvs.Item1 = evo.level; - evoLvs.Item2 = evo.level; - break; - case 5: - case 8: - case 17: - case 18: - case 22: - case 25: - case 26: - case 27: - case 39: - case 42: - case 44: - case 45: - for (int pastEvos = 0; pastEvos < pokemon.pastPokemon.Count; pastEvos++) - { - (ushort, ushort) pastPokemonEvoLvs = GetEvoLvs(pokemon.pastPokemon[pastEvos]); - evoLvs.Item1 = Math.Max(evoLvs.Item1, pastPokemonEvoLvs.Item1); - evoLvs.Item2 = Math.Max(evoLvs.Item2, pastPokemonEvoLvs.Item2); - } - if (evoLvs == (0, 0)) - evoLvs = (1, 1); - evoLvs.Item1 += 32; - evoLvs.Item2 += 16; - break; - case 6: - case 7: - for (int pastEvos = 0; pastEvos < pokemon.pastPokemon.Count; pastEvos++) - { - (ushort, ushort) pastPokemonEvoLvs = GetEvoLvs(pokemon.pastPokemon[pastEvos]); - evoLvs.Item1 = Math.Max(evoLvs.Item1, pastPokemonEvoLvs.Item1); - evoLvs.Item2 = Math.Max(evoLvs.Item2, pastPokemonEvoLvs.Item2); - } - if (evoLvs == (0, 0)) - evoLvs = (1, 1); - evoLvs.Item1 += 48; - evoLvs.Item2 += 16; - break; - case 16: - for (int pastEvos = 0; pastEvos < pokemon.pastPokemon.Count; pastEvos++) - { - (ushort, ushort) pastPokemonEvoLvs = GetEvoLvs(pokemon.pastPokemon[pastEvos]); - evoLvs.Item1 = Math.Max(evoLvs.Item1, pastPokemonEvoLvs.Item1); - evoLvs.Item2 = Math.Max(evoLvs.Item2, pastPokemonEvoLvs.Item2); - } - if (evoLvs == (0, 0)) - evoLvs = (1, 1); - evoLvs.Item1 += 48; - evoLvs.Item2 += 32; - break; - case 19: - case 20: - case 30: - case 31: - evoLvs.Item1 = (ushort)(evo.level + 16); - evoLvs.Item2 = evo.level; - break; - } - } - return evoLvs; + pokemon2.inferiorForms.Add(pokemon); + pokemon.superiorForms.Add(pokemon2); } + } +} +} - /// - /// Overwrites GlobalData with parsed TMs. - /// - private static async Task ParseTMs() - { - gameData.tms = new(); - AssetTypeValueField monoBehaviour = (await monoBehaviourCollection[PathEnum.PersonalMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "ItemTable"); - AssetTypeValueField textData = (await monoBehaviourCollection[PathEnum.English]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "english_ss_itemname"); +for (int dexID = 0; dexID < gameData.dexEntries.Count; dexID++) +{ +for (int formID = 0; formID < gameData.dexEntries[dexID].forms.Count; formID++) +{ + Pokemon pokemon = gameData.dexEntries[dexID].forms[formID]; + (ushort, ushort) evoLvs = GetEvoLvs(pokemon); + if (evoLvs == (0, 0)) + continue; - AssetTypeValueField[] tmFields = monoBehaviour.children[5].children[0].children; - AssetTypeValueField[] textFields = textData.children[8].children[0].children; - for (int tmID = 0; tmID < tmFields.Length; tmID++) - { - TM tm = new(); - tm.itemID = tmFields[tmID].children[0].value.value.asInt32; - tm.machineNo = tmFields[tmID].children[1].value.value.asInt32; - tm.moveID = tmFields[tmID].children[2].value.value.asInt32; + pokemon.nextEvoLvs = evoLvs; + + for (int evolutionIdx = 0; evolutionIdx < gameData.dexEntries[dexID].forms[formID].evolutionPaths.Count; evolutionIdx++) + { + EvolutionPath evo = pokemon.evolutionPaths[evolutionIdx]; + Pokemon next = gameData.dexEntries[evo.destDexID].forms[evo.destFormID]; - tm.tmID = tmID; - tm.name = ""; - if (textFields[tm.itemID].children[6].children[0].childrenCount > 0) - tm.name = Encoding.UTF8.GetString(textFields[tm.itemID].children[6].children[0].children[0].children[4].value.value.asString); + if (pokemon.dexID == next.dexID) + continue; - gameData.tms.Add(tm); - } + next.pastEvoLvs.Item1 = Math.Max(next.pastEvoLvs.Item1, evoLvs.Item1); + next.pastEvoLvs.Item2 = Math.Max(next.pastEvoLvs.Item2, evoLvs.Item2); + } +} +} +} + +/// +/// Finds the levels the specified pokemon is likely to evolve: (wildLevel, trainerLevel). +/// +private static (ushort, ushort) GetEvoLvs(Pokemon pokemon) +{ +(ushort, ushort) evoLvs = (0, 0); +for (int evolutionIdx = 0; evolutionIdx < pokemon.evolutionPaths.Count; evolutionIdx++) +{ +EvolutionPath evo = pokemon.evolutionPaths[evolutionIdx]; +if (pokemon.dexID == evo.destDexID) + continue; + +switch (evo.method) +{ + case 1: + case 2: + case 3: + case 21: + case 29: + case 43: + for (int pastEvos = 0; pastEvos < pokemon.pastPokemon.Count; pastEvos++) + { + (ushort, ushort) pastPokemonEvoLvs = GetEvoLvs(pokemon.pastPokemon[pastEvos]); + evoLvs.Item1 = Math.Max(evoLvs.Item1, pastPokemonEvoLvs.Item1); + evoLvs.Item2 = Math.Max(evoLvs.Item2, pastPokemonEvoLvs.Item2); } - private static async Task ParsePersonalMasterDatas() + if (evoLvs == (0, 0)) + evoLvs = (1, 1); + evoLvs.Item1 += 16; + evoLvs.Item2 += 16; + break; + case 4: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 23: + case 24: + case 28: + case 32: + case 33: + case 34: + case 36: + case 37: + case 38: + case 40: + case 41: + case 46: + case 47: + evoLvs.Item1 = evo.level; + evoLvs.Item2 = evo.level; + break; + case 5: + case 8: + case 17: + case 18: + case 22: + case 25: + case 26: + case 27: + case 39: + case 42: + case 44: + case 45: + for (int pastEvos = 0; pastEvos < pokemon.pastPokemon.Count; pastEvos++) { - gameData.addPersonalTables = new(); - AssetTypeValueField addPersonalTable = (await monoBehaviourCollection[PathEnum.PersonalMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "AddPersonalTable"); - AssetTypeValueField[] addPersonalTableArray = addPersonalTable["AddPersonal"].children[0].children; - for (int i = 0; i < addPersonalTableArray.Length; i++) - { - PersonalMasterdatas.AddPersonalTable addPersonal = new(); - addPersonal.valid_flag = addPersonalTableArray[i]["valid_flag"].value.value.asUInt8 == 1; - addPersonal.monsno = addPersonalTableArray[i]["monsno"].value.value.asUInt16; - addPersonal.formno = addPersonalTableArray[i]["formno"].value.value.asUInt16; - addPersonal.isEnableSynchronize = addPersonalTableArray[i]["isEnableSynchronize"].value.value.asUInt8 == 0; - addPersonal.escape = addPersonalTableArray[i]["escape"].value.value.asUInt8; - addPersonal.isDisableReverce = addPersonalTableArray[i]["isDisableReverce"].value.value.asUInt8 == 0; - gameData.addPersonalTables.Add(addPersonal); - } + (ushort, ushort) pastPokemonEvoLvs = GetEvoLvs(pokemon.pastPokemon[pastEvos]); + evoLvs.Item1 = Math.Max(evoLvs.Item1, pastPokemonEvoLvs.Item1); + evoLvs.Item2 = Math.Max(evoLvs.Item2, pastPokemonEvoLvs.Item2); } - - private static async Task ParseUIMasterDatas() + if (evoLvs == (0, 0)) + evoLvs = (1, 1); + evoLvs.Item1 += 32; + evoLvs.Item2 += 16; + break; + case 6: + case 7: + for (int pastEvos = 0; pastEvos < pokemon.pastPokemon.Count; pastEvos++) { - gameData.uiPokemonIcon = new(); - gameData.uiAshiatoIcon = new(); - gameData.uiPokemonVoice = new(); - gameData.uiZukanDisplay = new(); - gameData.uiZukanCompareHeights = new(); - gameData.uiSearchPokeIconSex = new(); - gameData.uiDistributionTable = new(); - AssetTypeValueField uiDatabase = (await monoBehaviourCollection[PathEnum.UIMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "UIDatabase"); - AssetTypeValueField distributionTable = (await monoBehaviourCollection[PathEnum.UIMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "DistributionTable"); - - AssetTypeValueField[] pokemonIcons = uiDatabase["PokemonIcon"].children[0].children; - for (int i = 0; i < pokemonIcons.Length; i++) - { - UIMasterdatas.PokemonIcon pokemonIcon = new(); - pokemonIcon.uniqueID = pokemonIcons[i]["UniqueID"].value.value.asInt32; - pokemonIcon.assetBundleName = pokemonIcons[i]["AssetBundleName"].GetValue().AsString(); - pokemonIcon.assetName = pokemonIcons[i]["AssetName"].GetValue().AsString(); - pokemonIcon.assetBundleNameLarge = pokemonIcons[i]["AssetBundleNameLarge"].GetValue().AsString(); - pokemonIcon.assetNameLarge = pokemonIcons[i]["AssetNameLarge"].GetValue().AsString(); - pokemonIcon.assetBundleNameDP = pokemonIcons[i]["AssetBundleNameDP"].GetValue().AsString(); - pokemonIcon.assetNameDP = pokemonIcons[i]["AssetNameDP"].GetValue().AsString(); - pokemonIcon.hallofFameOffset = new(); - pokemonIcon.hallofFameOffset.X = pokemonIcons[i]["HallofFameOffset"].children[0].value.value.asFloat; - pokemonIcon.hallofFameOffset.Y = pokemonIcons[i]["HallofFameOffset"].children[1].value.value.asFloat; - - gameData.uiPokemonIcon.Add(pokemonIcon); - } + (ushort, ushort) pastPokemonEvoLvs = GetEvoLvs(pokemon.pastPokemon[pastEvos]); + evoLvs.Item1 = Math.Max(evoLvs.Item1, pastPokemonEvoLvs.Item1); + evoLvs.Item2 = Math.Max(evoLvs.Item2, pastPokemonEvoLvs.Item2); + } + if (evoLvs == (0, 0)) + evoLvs = (1, 1); + evoLvs.Item1 += 48; + evoLvs.Item2 += 16; + break; + case 16: + for (int pastEvos = 0; pastEvos < pokemon.pastPokemon.Count; pastEvos++) + { + (ushort, ushort) pastPokemonEvoLvs = GetEvoLvs(pokemon.pastPokemon[pastEvos]); + evoLvs.Item1 = Math.Max(evoLvs.Item1, pastPokemonEvoLvs.Item1); + evoLvs.Item2 = Math.Max(evoLvs.Item2, pastPokemonEvoLvs.Item2); + } + if (evoLvs == (0, 0)) + evoLvs = (1, 1); + evoLvs.Item1 += 48; + evoLvs.Item2 += 32; + break; + case 19: + case 20: + case 30: + case 31: + evoLvs.Item1 = (ushort)(evo.level + 16); + evoLvs.Item2 = evo.level; + break; +} +} +return evoLvs; +} - AssetTypeValueField[] ashiatoIcons = uiDatabase["AshiatoIcon"].children[0].children; - for (int i = 0; i < ashiatoIcons.Length; i++) - { - UIMasterdatas.AshiatoIcon ashiatoIcon = new(); - ashiatoIcon.uniqueID = ashiatoIcons[i]["UniqueID"].value.value.asInt32; - ashiatoIcon.sideIconAssetName = ashiatoIcons[i]["SideIconAssetName"].GetValue().AsString(); - ashiatoIcon.bothIconAssetName = ashiatoIcons[i]["BothIconAssetName"].GetValue().AsString(); +/// +/// Overwrites GlobalData with parsed TMs. +/// +private static async Task ParseTMs() +{ +gameData.tms = new(); +AssetTypeValueField monoBehaviour = (await monoBehaviourCollection[PathEnum.PersonalMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "ItemTable"); +AssetTypeValueField textData = (await monoBehaviourCollection[PathEnum.English]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "english_ss_itemname"); - gameData.uiAshiatoIcon.Add(ashiatoIcon); - } +AssetTypeValueField[] tmFields = monoBehaviour.children[5].children[0].children; +AssetTypeValueField[] textFields = textData.children[8].children[0].children; +for (int tmID = 0; tmID < tmFields.Length; tmID++) +{ +TM tm = new(); +tm.itemID = tmFields[tmID].children[0].value.value.asInt32; +tm.machineNo = tmFields[tmID].children[1].value.value.asInt32; +tm.moveID = tmFields[tmID].children[2].value.value.asInt32; - AssetTypeValueField[] pokemonVoices = uiDatabase["PokemonVoice"].children[0].children; - for (int i = 0; i < pokemonVoices.Length; i++) - { - UIMasterdatas.PokemonVoice pokemonVoice = new(); - pokemonVoice.uniqueID = pokemonVoices[i]["UniqueID"].value.value.asInt32; - pokemonVoice.wwiseEvent = pokemonVoices[i]["WwiseEvent"].GetValue().AsString(); - pokemonVoice.stopEventId = pokemonVoices[i]["stopEventId"].GetValue().AsString(); - pokemonVoice.centerPointOffset = new(); - pokemonVoice.centerPointOffset.X = pokemonVoices[i]["CenterPointOffset"].children[0].value.value.asFloat; - pokemonVoice.centerPointOffset.Y = pokemonVoices[i]["CenterPointOffset"].children[1].value.value.asFloat; - pokemonVoice.centerPointOffset.Z = pokemonVoices[i]["CenterPointOffset"].children[2].value.value.asFloat; - pokemonVoice.rotationLimits = pokemonVoices[i]["RotationLimits"].value.value.asUInt8 == 0; - pokemonVoice.rotationLimitAngle = new(); - pokemonVoice.rotationLimitAngle.X = pokemonVoices[i]["RotationLimitAngle"].children[0].value.value.asFloat; - pokemonVoice.rotationLimitAngle.Y = pokemonVoices[i]["RotationLimitAngle"].children[1].value.value.asFloat; - - gameData.uiPokemonVoice.Add(pokemonVoice); - } +tm.tmID = tmID; +tm.name = ""; +if (textFields[tm.itemID].children[6].children[0].childrenCount > 0) + tm.name = Encoding.UTF8.GetString(textFields[tm.itemID].children[6].children[0].children[0].children[4].value.value.asString); - AssetTypeValueField[] zukanDisplays = uiDatabase["ZukanDisplay"].children[0].children; - for (int i = 0; i < zukanDisplays.Length; i++) - { - UIMasterdatas.ZukanDisplay zukanDisplay = new(); - zukanDisplay.uniqueID = zukanDisplays[i]["UniqueID"].value.value.asInt32; +gameData.tms.Add(tm); +} +} +private static async Task ParsePersonalMasterDatas() +{ +gameData.addPersonalTables = new(); +AssetTypeValueField addPersonalTable = (await monoBehaviourCollection[PathEnum.PersonalMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "AddPersonalTable"); +AssetTypeValueField[] addPersonalTableArray = addPersonalTable["AddPersonal"].children[0].children; +for (int i = 0; i < addPersonalTableArray.Length; i++) +{ +PersonalMasterdatas.AddPersonalTable addPersonal = new(); +addPersonal.valid_flag = addPersonalTableArray[i]["valid_flag"].value.value.asUInt8 == 1; +addPersonal.monsno = addPersonalTableArray[i]["monsno"].value.value.asUInt16; +addPersonal.formno = addPersonalTableArray[i]["formno"].value.value.asUInt16; +addPersonal.isEnableSynchronize = addPersonalTableArray[i]["isEnableSynchronize"].value.value.asUInt8 == 0; +addPersonal.escape = addPersonalTableArray[i]["escape"].value.value.asUInt8; +addPersonal.isDisableReverce = addPersonalTableArray[i]["isDisableReverce"].value.value.asUInt8 == 0; +gameData.addPersonalTables.Add(addPersonal); +} +} - zukanDisplay.moveLimit = new(); - zukanDisplay.moveLimit.X = zukanDisplays[i]["MoveLimit"].children[0].value.value.asFloat; - zukanDisplay.moveLimit.Y = zukanDisplays[i]["MoveLimit"].children[1].value.value.asFloat; - zukanDisplay.moveLimit.Z = zukanDisplays[i]["MoveLimit"].children[2].value.value.asFloat; +private static async Task ParseUIMasterDatas() +{ +gameData.uiPokemonIcon = new(); +gameData.uiAshiatoIcon = new(); +gameData.uiPokemonVoice = new(); +gameData.uiZukanDisplay = new(); +gameData.uiZukanCompareHeights = new(); +gameData.uiSearchPokeIconSex = new(); +gameData.uiDistributionTable = new(); +AssetTypeValueField uiDatabase = (await monoBehaviourCollection[PathEnum.UIMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "UIDatabase"); +AssetTypeValueField distributionTable = (await monoBehaviourCollection[PathEnum.UIMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "DistributionTable"); + +AssetTypeValueField[] pokemonIcons = uiDatabase["PokemonIcon"].children[0].children; +for (int i = 0; i < pokemonIcons.Length; i++) +{ +UIMasterdatas.PokemonIcon pokemonIcon = new(); +pokemonIcon.uniqueID = pokemonIcons[i]["UniqueID"].value.value.asInt32; +pokemonIcon.assetBundleName = pokemonIcons[i]["AssetBundleName"].GetValue().AsString(); +pokemonIcon.assetName = pokemonIcons[i]["AssetName"].GetValue().AsString(); +pokemonIcon.assetBundleNameLarge = pokemonIcons[i]["AssetBundleNameLarge"].GetValue().AsString(); +pokemonIcon.assetNameLarge = pokemonIcons[i]["AssetNameLarge"].GetValue().AsString(); +pokemonIcon.assetBundleNameDP = pokemonIcons[i]["AssetBundleNameDP"].GetValue().AsString(); +pokemonIcon.assetNameDP = pokemonIcons[i]["AssetNameDP"].GetValue().AsString(); +pokemonIcon.hallofFameOffset = new(); +pokemonIcon.hallofFameOffset.X = pokemonIcons[i]["HallofFameOffset"].children[0].value.value.asFloat; +pokemonIcon.hallofFameOffset.Y = pokemonIcons[i]["HallofFameOffset"].children[1].value.value.asFloat; + +gameData.uiPokemonIcon.Add(pokemonIcon); +} - zukanDisplay.modelOffset = new(); - zukanDisplay.modelOffset.X = zukanDisplays[i]["ModelOffset"].children[0].value.value.asFloat; - zukanDisplay.modelOffset.Y = zukanDisplays[i]["ModelOffset"].children[1].value.value.asFloat; - zukanDisplay.modelOffset.Z = zukanDisplays[i]["ModelOffset"].children[2].value.value.asFloat; +AssetTypeValueField[] ashiatoIcons = uiDatabase["AshiatoIcon"].children[0].children; +for (int i = 0; i < ashiatoIcons.Length; i++) +{ +UIMasterdatas.AshiatoIcon ashiatoIcon = new(); +ashiatoIcon.uniqueID = ashiatoIcons[i]["UniqueID"].value.value.asInt32; +ashiatoIcon.sideIconAssetName = ashiatoIcons[i]["SideIconAssetName"].GetValue().AsString(); +ashiatoIcon.bothIconAssetName = ashiatoIcons[i]["BothIconAssetName"].GetValue().AsString(); - zukanDisplay.modelRotationAngle = new(); - zukanDisplay.modelRotationAngle.X = zukanDisplays[i]["ModelRotationAngle"].children[0].value.value.asFloat; - zukanDisplay.modelRotationAngle.Y = zukanDisplays[i]["ModelRotationAngle"].children[1].value.value.asFloat; +gameData.uiAshiatoIcon.Add(ashiatoIcon); +} - gameData.uiZukanDisplay.Add(zukanDisplay); - } +AssetTypeValueField[] pokemonVoices = uiDatabase["PokemonVoice"].children[0].children; +for (int i = 0; i < pokemonVoices.Length; i++) +{ +UIMasterdatas.PokemonVoice pokemonVoice = new(); +pokemonVoice.uniqueID = pokemonVoices[i]["UniqueID"].value.value.asInt32; +pokemonVoice.wwiseEvent = pokemonVoices[i]["WwiseEvent"].GetValue().AsString(); +pokemonVoice.stopEventId = pokemonVoices[i]["stopEventId"].GetValue().AsString(); +pokemonVoice.centerPointOffset = new(); +pokemonVoice.centerPointOffset.X = pokemonVoices[i]["CenterPointOffset"].children[0].value.value.asFloat; +pokemonVoice.centerPointOffset.Y = pokemonVoices[i]["CenterPointOffset"].children[1].value.value.asFloat; +pokemonVoice.centerPointOffset.Z = pokemonVoices[i]["CenterPointOffset"].children[2].value.value.asFloat; +pokemonVoice.rotationLimits = pokemonVoices[i]["RotationLimits"].value.value.asUInt8 == 0; +pokemonVoice.rotationLimitAngle = new(); +pokemonVoice.rotationLimitAngle.X = pokemonVoices[i]["RotationLimitAngle"].children[0].value.value.asFloat; +pokemonVoice.rotationLimitAngle.Y = pokemonVoices[i]["RotationLimitAngle"].children[1].value.value.asFloat; + +gameData.uiPokemonVoice.Add(pokemonVoice); +} - AssetTypeValueField[] zukanCompareHeights = uiDatabase["ZukanCompareHeight"].children[0].children; - for (int i = 0; i < zukanCompareHeights.Length; i++) - { - UIMasterdatas.ZukanCompareHeight zukanCompareHeight = new(); - zukanCompareHeight.uniqueID = zukanCompareHeights[i]["UniqueID"].value.value.asInt32; +AssetTypeValueField[] zukanDisplays = uiDatabase["ZukanDisplay"].children[0].children; +for (int i = 0; i < zukanDisplays.Length; i++) +{ +UIMasterdatas.ZukanDisplay zukanDisplay = new(); +zukanDisplay.uniqueID = zukanDisplays[i]["UniqueID"].value.value.asInt32; - zukanCompareHeight.playerScaleFactor = zukanCompareHeights[i]["PlayerScaleFactor"].value.value.asFloat; - zukanCompareHeight.playerOffset = new(); - zukanCompareHeight.playerOffset.X = zukanCompareHeights[i]["PlayerOffset"].children[0].value.value.asFloat; - zukanCompareHeight.playerOffset.Y = zukanCompareHeights[i]["PlayerOffset"].children[1].value.value.asFloat; - zukanCompareHeight.playerOffset.Z = zukanCompareHeights[i]["PlayerOffset"].children[2].value.value.asFloat; +zukanDisplay.moveLimit = new(); +zukanDisplay.moveLimit.X = zukanDisplays[i]["MoveLimit"].children[0].value.value.asFloat; +zukanDisplay.moveLimit.Y = zukanDisplays[i]["MoveLimit"].children[1].value.value.asFloat; +zukanDisplay.moveLimit.Z = zukanDisplays[i]["MoveLimit"].children[2].value.value.asFloat; - zukanCompareHeight.playerRotationAngle = new(); - zukanCompareHeight.playerRotationAngle.X = zukanCompareHeights[i]["PlayerRotationAngle"].children[0].value.value.asFloat; - zukanCompareHeight.playerRotationAngle.Y = zukanCompareHeights[i]["PlayerRotationAngle"].children[1].value.value.asFloat; +zukanDisplay.modelOffset = new(); +zukanDisplay.modelOffset.X = zukanDisplays[i]["ModelOffset"].children[0].value.value.asFloat; +zukanDisplay.modelOffset.Y = zukanDisplays[i]["ModelOffset"].children[1].value.value.asFloat; +zukanDisplay.modelOffset.Z = zukanDisplays[i]["ModelOffset"].children[2].value.value.asFloat; - gameData.uiZukanCompareHeights.Add(zukanCompareHeight); - } +zukanDisplay.modelRotationAngle = new(); +zukanDisplay.modelRotationAngle.X = zukanDisplays[i]["ModelRotationAngle"].children[0].value.value.asFloat; +zukanDisplay.modelRotationAngle.Y = zukanDisplays[i]["ModelRotationAngle"].children[1].value.value.asFloat; - AssetTypeValueField[] searchPokeIconSexes = uiDatabase["SearchPokeIconSex"].children[0].children; - for (int i = 0; i < searchPokeIconSexes.Length; i++) - { - UIMasterdatas.SearchPokeIconSex searchPokeIconSex = new(); - searchPokeIconSex.monsNo = searchPokeIconSexes[i]["MonsNo"].value.value.asInt32; - searchPokeIconSex.sex = searchPokeIconSexes[i]["Sex"].value.value.asInt32; +gameData.uiZukanDisplay.Add(zukanDisplay); +} - gameData.uiSearchPokeIconSex.Add(searchPokeIconSex); - } +AssetTypeValueField[] zukanCompareHeights = uiDatabase["ZukanCompareHeight"].children[0].children; +for (int i = 0; i < zukanCompareHeights.Length; i++) +{ +UIMasterdatas.ZukanCompareHeight zukanCompareHeight = new(); +zukanCompareHeight.uniqueID = zukanCompareHeights[i]["UniqueID"].value.value.asInt32; - AssetTypeValueField[] diamondField = distributionTable["Diamond_FieldTable"].children[0].children; - gameData.uiDistributionTable.diamondFieldTable = ParseDistributionSheet(diamondField); - AssetTypeValueField[] diamondDungeon = distributionTable["Diamond_DungeonTable"].children[0].children; - gameData.uiDistributionTable.diamondDungeonTable = ParseDistributionSheet(diamondDungeon); - AssetTypeValueField[] pearlField = distributionTable["Pearl_FieldTable"].children[0].children; - gameData.uiDistributionTable.pearlFieldTable = ParseDistributionSheet(pearlField); - AssetTypeValueField[] pearlDungeon = distributionTable["Pearl_DungeonTable"].children[0].children; - gameData.uiDistributionTable.pearlDungeonTable = ParseDistributionSheet(pearlDungeon); - } +zukanCompareHeight.playerScaleFactor = zukanCompareHeights[i]["PlayerScaleFactor"].value.value.asFloat; +zukanCompareHeight.playerOffset = new(); +zukanCompareHeight.playerOffset.X = zukanCompareHeights[i]["PlayerOffset"].children[0].value.value.asFloat; +zukanCompareHeight.playerOffset.Y = zukanCompareHeights[i]["PlayerOffset"].children[1].value.value.asFloat; +zukanCompareHeight.playerOffset.Z = zukanCompareHeights[i]["PlayerOffset"].children[2].value.value.asFloat; - private static List ParseDistributionSheet(AssetTypeValueField[] sheetATVF) - { - List sheet = new(); - for (int i = 0; i < sheetATVF.Length; i++) - { - UIMasterdatas.DistributionEntry entry = new() - { - beforeMorning = ParseDistributionCoord(sheetATVF[i]["BeforeMorning"]), - beforeDaytime = ParseDistributionCoord(sheetATVF[i]["BeforeDaytime"]), - beforeNight = ParseDistributionCoord(sheetATVF[i]["BeforeNight"]), - afterMorning = ParseDistributionCoord(sheetATVF[i]["AfterMorning"]), - afterDaytime = ParseDistributionCoord(sheetATVF[i]["AfterDaytime"]), - afterNight = ParseDistributionCoord(sheetATVF[i]["AfterNight"]), - fishing = ParseDistributionCoord(sheetATVF[i]["Fishing"]), - pokemonTraser = ParseDistributionCoord(sheetATVF[i]["PokemonTraser"]), - honeyTree = ParseDistributionCoord(sheetATVF[i]["HoneyTree"]) - }; - sheet.Add(entry); - } - return sheet; - } +zukanCompareHeight.playerRotationAngle = new(); +zukanCompareHeight.playerRotationAngle.X = zukanCompareHeights[i]["PlayerRotationAngle"].children[0].value.value.asFloat; +zukanCompareHeight.playerRotationAngle.Y = zukanCompareHeights[i]["PlayerRotationAngle"].children[1].value.value.asFloat; - private static int[] ParseDistributionCoord(AssetTypeValueField posATVF) => posATVF[0].children.Select(a => a.GetValue().AsInt()).ToArray(); +gameData.uiZukanCompareHeights.Add(zukanCompareHeight); +} - private static async Task ParseMasterDatas() - { - gameData.pokemonInfos = new(); - AssetTypeValueField pokemonInfo = (await monoBehaviourCollection[PathEnum.DprMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "PokemonInfo"); - AssetTypeValueField[] catalogArray = pokemonInfo["Catalog"].children[0].children; - AssetTypeValueField[] trearukiArray = null; - if (pokemonInfo["Trearuki"].children != null) - trearukiArray = pokemonInfo["Trearuki"].children[0].children; - //pre-1.3.0 versions don't have this field - - for (int i = 0; i < catalogArray.Length; i++) - { - Masterdatas.PokemonInfoCatalog catalog = new(); - catalog.UniqueID = catalogArray[i]["UniqueID"].value.value.asInt32; - catalog.No = catalogArray[i]["No"].value.value.asInt32; - catalog.SinnohNo = catalogArray[i]["SinnohNo"].value.value.asInt32; - catalog.MonsNo = catalogArray[i]["MonsNo"].value.value.asInt32; - catalog.FormNo = catalogArray[i]["FormNo"].value.value.asInt32; - catalog.Sex = catalogArray[i]["Sex"].value.value.asUInt8; - catalog.Rare = catalogArray[i]["Rare"].value.value.asUInt8 == 1; - catalog.AssetBundleName = catalogArray[i]["AssetBundleName"].GetValue().AsString(); - catalog.BattleScale = catalogArray[i]["BattleScale"].value.value.asFloat; - catalog.ContestScale = catalogArray[i]["ContestScale"].value.value.asFloat; - catalog.ContestSize = (Masterdatas.Size) catalogArray[i]["ContestSize"].value.value.asInt32; - catalog.FieldScale = catalogArray[i]["FieldScale"].value.value.asFloat; - catalog.FieldChikaScale = catalogArray[i]["FieldChikaScale"].value.value.asFloat; - catalog.StatueScale = catalogArray[i]["StatueScale"].value.value.asFloat; - catalog.FieldWalkingScale = catalogArray[i]["FieldWalkingScale"].value.value.asFloat; - catalog.FieldFureaiScale = catalogArray[i]["FieldFureaiScale"].value.value.asFloat; - catalog.MenuScale = catalogArray[i]["MenuScale"].value.value.asFloat; - catalog.ModelMotion = catalogArray[i]["ModelMotion"].GetValue().AsString(); - - catalog.ModelOffset = new(); - catalog.ModelOffset.X = catalogArray[i]["ModelOffset"].children[0].value.value.asFloat; - catalog.ModelOffset.Y = catalogArray[i]["ModelOffset"].children[1].value.value.asFloat; - catalog.ModelOffset.Z = catalogArray[i]["ModelOffset"].children[2].value.value.asFloat; - - catalog.ModelRotationAngle = new(); - catalog.ModelRotationAngle.X = catalogArray[i]["ModelRotationAngle"].children[0].value.value.asFloat; - catalog.ModelRotationAngle.Y = catalogArray[i]["ModelRotationAngle"].children[1].value.value.asFloat; - catalog.ModelRotationAngle.Z = catalogArray[i]["ModelRotationAngle"].children[2].value.value.asFloat; - - catalog.DistributionScale = catalogArray[i]["DistributionScale"].value.value.asFloat; - catalog.DistributionModelMotion = catalogArray[i]["DistributionModelMotion"].GetValue().AsString(); - - catalog.DistributionModelOffset = new(); - catalog.DistributionModelOffset.X = catalogArray[i]["DistributionModelOffset"].children[0].value.value.asFloat; - catalog.DistributionModelOffset.Y = catalogArray[i]["DistributionModelOffset"].children[1].value.value.asFloat; - catalog.DistributionModelOffset.Z = catalogArray[i]["DistributionModelOffset"].children[2].value.value.asFloat; - - catalog.DistributionModelRotationAngle = new(); - catalog.DistributionModelRotationAngle.X = catalogArray[i]["DistributionModelRotationAngle"].children[0].value.value.asFloat; - catalog.DistributionModelRotationAngle.Y = catalogArray[i]["DistributionModelRotationAngle"].children[1].value.value.asFloat; - catalog.DistributionModelRotationAngle.Z = catalogArray[i]["DistributionModelRotationAngle"].children[2].value.value.asFloat; - - catalog.VoiceScale = catalogArray[i]["VoiceScale"].value.value.asFloat; - catalog.VoiceModelMotion = catalogArray[i]["VoiceModelMotion"].GetValue().AsString(); - - catalog.VoiceModelOffset = new(); - catalog.VoiceModelOffset.X = catalogArray[i]["VoiceModelOffset"].children[0].value.value.asFloat; - catalog.VoiceModelOffset.Y = catalogArray[i]["VoiceModelOffset"].children[1].value.value.asFloat; - catalog.VoiceModelOffset.Z = catalogArray[i]["VoiceModelOffset"].children[2].value.value.asFloat; - - catalog.VoiceModelRotationAngle = new(); - catalog.VoiceModelRotationAngle.X = catalogArray[i]["VoiceModelRotationAngle"].children[0].value.value.asFloat; - catalog.VoiceModelRotationAngle.Y = catalogArray[i]["VoiceModelRotationAngle"].children[1].value.value.asFloat; - catalog.VoiceModelRotationAngle.Z = catalogArray[i]["VoiceModelRotationAngle"].children[2].value.value.asFloat; - - catalog.CenterPointOffset = new(); - catalog.CenterPointOffset.X = catalogArray[i]["CenterPointOffset"].children[0].value.value.asFloat; - catalog.CenterPointOffset.Y = catalogArray[i]["CenterPointOffset"].children[1].value.value.asFloat; - catalog.CenterPointOffset.Z = catalogArray[i]["CenterPointOffset"].children[2].value.value.asFloat; - - catalog.RotationLimitAngle = new(); - catalog.RotationLimitAngle.X = catalogArray[i]["RotationLimitAngle"].children[0].value.value.asFloat; - catalog.RotationLimitAngle.Y = catalogArray[i]["RotationLimitAngle"].children[1].value.value.asFloat; - - catalog.StatusScale = catalogArray[i]["StatusScale"].value.value.asFloat; - catalog.StatusModelMotion = catalogArray[i]["StatusModelMotion"].GetValue().AsString(); - - catalog.StatusModelOffset = new(); - catalog.StatusModelOffset.X = catalogArray[i]["StatusModelOffset"].children[0].value.value.asFloat; - catalog.StatusModelOffset.Y = catalogArray[i]["StatusModelOffset"].children[1].value.value.asFloat; - catalog.StatusModelOffset.Z = catalogArray[i]["StatusModelOffset"].children[2].value.value.asFloat; - - catalog.StatusModelRotationAngle = new(); - catalog.StatusModelRotationAngle.X = catalogArray[i]["StatusModelRotationAngle"].children[0].value.value.asFloat; - catalog.StatusModelRotationAngle.Y = catalogArray[i]["StatusModelRotationAngle"].children[1].value.value.asFloat; - catalog.StatusModelRotationAngle.Z = catalogArray[i]["StatusModelRotationAngle"].children[2].value.value.asFloat; - - catalog.BoxScale = catalogArray[i]["BoxScale"].value.value.asFloat; - catalog.BoxModelMotion = catalogArray[i]["BoxModelMotion"].GetValue().AsString(); - - catalog.BoxModelOffset = new(); - catalog.BoxModelOffset.X = catalogArray[i]["BoxModelOffset"].children[0].value.value.asFloat; - catalog.BoxModelOffset.Y = catalogArray[i]["BoxModelOffset"].children[1].value.value.asFloat; - catalog.BoxModelOffset.Z = catalogArray[i]["BoxModelOffset"].children[2].value.value.asFloat; - - catalog.BoxModelRotationAngle = new(); - catalog.BoxModelRotationAngle.X = catalogArray[i]["BoxModelRotationAngle"].children[0].value.value.asFloat; - catalog.BoxModelRotationAngle.Y = catalogArray[i]["BoxModelRotationAngle"].children[1].value.value.asFloat; - catalog.BoxModelRotationAngle.Z = catalogArray[i]["BoxModelRotationAngle"].children[2].value.value.asFloat; - - catalog.CompareScale = catalogArray[i]["CompareScale"].value.value.asFloat; - catalog.CompareModelMotion = catalogArray[i]["CompareModelMotion"].GetValue().AsString(); - - catalog.CompareModelOffset = new(); - catalog.CompareModelOffset.X = catalogArray[i]["CompareModelOffset"].children[0].value.value.asFloat; - catalog.CompareModelOffset.Y = catalogArray[i]["CompareModelOffset"].children[1].value.value.asFloat; - catalog.CompareModelOffset.Z = catalogArray[i]["CompareModelOffset"].children[2].value.value.asFloat; - - catalog.CompareModelRotationAngle = new(); - catalog.CompareModelRotationAngle.X = catalogArray[i]["CompareModelRotationAngle"].children[0].value.value.asFloat; - catalog.CompareModelRotationAngle.Y = catalogArray[i]["CompareModelRotationAngle"].children[1].value.value.asFloat; - catalog.CompareModelRotationAngle.Z = catalogArray[i]["CompareModelRotationAngle"].children[2].value.value.asFloat; - - catalog.BrakeStart = catalogArray[i]["BrakeStart"].value.value.asFloat; - catalog.BrakeEnd = catalogArray[i]["BrakeEnd"].value.value.asFloat; - catalog.WalkSpeed = catalogArray[i]["WalkSpeed"].value.value.asFloat; - catalog.RunSpeed = catalogArray[i]["RunSpeed"].value.value.asFloat; - catalog.WalkStart = catalogArray[i]["WalkStart"].value.value.asFloat; - catalog.RunStart = catalogArray[i]["RunStart"].value.value.asFloat; - catalog.BodySize = catalogArray[i]["BodySize"].value.value.asFloat; - catalog.AppearLimit = catalogArray[i]["AppearLimit"].value.value.asFloat; - catalog.MoveType = (Masterdatas.MoveType) catalogArray[i]["MoveType"].value.value.asInt32; - - catalog.GroundEffect = catalogArray[i]["GroundEffect"].value.value.asUInt8 != 0; - catalog.Waitmoving = catalogArray[i]["Waitmoving"].value.value.asUInt8 != 0; - catalog.BattleAjustHeight = catalogArray[i]["BattleAjustHeight"].value.value.asInt32; - - if (trearukiArray != null) - { - Masterdatas.Trearuki t = new() - { - enable = trearukiArray[i]["Enable"].GetValue().value.asUInt8 != 0, - animeIndex = new(), - animeDuration = new() - }; - catalog.trearuki = t; - - AssetTypeValueField[] animeIndexATVFS = trearukiArray[i]["AnimeIndex"].children[0].children; - foreach (AssetTypeValueField atvf in animeIndexATVFS) - t.animeIndex.Add(atvf.GetValue().AsInt()); - - AssetTypeValueField[] animeDurationATVFS = trearukiArray[i]["AnimeIndex"].children[0].children; - foreach (AssetTypeValueField atvf in animeDurationATVFS) - t.animeDuration.Add(atvf.GetValue().AsFloat()); - } +AssetTypeValueField[] searchPokeIconSexes = uiDatabase["SearchPokeIconSex"].children[0].children; +for (int i = 0; i < searchPokeIconSexes.Length; i++) +{ +UIMasterdatas.SearchPokeIconSex searchPokeIconSex = new(); +searchPokeIconSex.monsNo = searchPokeIconSexes[i]["MonsNo"].value.value.asInt32; +searchPokeIconSex.sex = searchPokeIconSexes[i]["Sex"].value.value.asInt32; - gameData.pokemonInfos.Add(catalog); - } - } - private static async Task ParseBattleMasterDatas() - { - gameData.motionTimingData = new(); - AssetTypeValueField battleDataTable = (await monoBehaviourCollection[PathEnum.BattleMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "BattleDataTable"); - AssetTypeValueField[] motionTimingDataArray = battleDataTable["MotionTimingData"].children[0].children; +gameData.uiSearchPokeIconSex.Add(searchPokeIconSex); +} - for (int i = 0; i < motionTimingDataArray.Length; i++) - { - BattleMasterdatas.MotionTimingData motionTimingData = new(); - motionTimingData.MonsNo = motionTimingDataArray[i]["MonsNo"].value.value.asInt32; - motionTimingData.FormNo = motionTimingDataArray[i]["FormNo"].value.value.asInt32; - motionTimingData.Sex = motionTimingDataArray[i]["Sex"].value.value.asInt32; - motionTimingData.Buturi01 = motionTimingDataArray[i]["Buturi01"].value.value.asInt32; - motionTimingData.Buturi02 = motionTimingDataArray[i]["Buturi02"].value.value.asInt32; - motionTimingData.Buturi03 = motionTimingDataArray[i]["Buturi03"].value.value.asInt32; - motionTimingData.Tokusyu01 = motionTimingDataArray[i]["Tokusyu01"].value.value.asInt32; - motionTimingData.Tokusyu02 = motionTimingDataArray[i]["Tokusyu02"].value.value.asInt32; - motionTimingData.Tokusyu03 = motionTimingDataArray[i]["Tokusyu03"].value.value.asInt32; - motionTimingData.BodyBlow = motionTimingDataArray[i]["BodyBlow"].value.value.asInt32; - motionTimingData.Punch = motionTimingDataArray[i]["Punch"].value.value.asInt32; - motionTimingData.Kick = motionTimingDataArray[i]["Kick"].value.value.asInt32; - motionTimingData.Tail = motionTimingDataArray[i]["Tail"].value.value.asInt32; - motionTimingData.Bite = motionTimingDataArray[i]["Bite"].value.value.asInt32; - motionTimingData.Peck = motionTimingDataArray[i]["Peck"].value.value.asInt32; - motionTimingData.Radial = motionTimingDataArray[i]["Radial"].value.value.asInt32; - motionTimingData.Cry = motionTimingDataArray[i]["Cry"].value.value.asInt32; - motionTimingData.Dust = motionTimingDataArray[i]["Dust"].value.value.asInt32; - motionTimingData.Shot = motionTimingDataArray[i]["Shot"].value.value.asInt32; - motionTimingData.Guard = motionTimingDataArray[i]["Guard"].value.value.asInt32; - motionTimingData.LandingFall = motionTimingDataArray[i]["LandingFall"].value.value.asInt32; - motionTimingData.LandingFallEase = motionTimingDataArray[i]["LandingFallEase"].value.value.asInt32; - - gameData.motionTimingData.Add(motionTimingData); - } - } +AssetTypeValueField[] diamondField = distributionTable["Diamond_FieldTable"].children[0].children; +gameData.uiDistributionTable.diamondFieldTable = ParseDistributionSheet(diamondField); +AssetTypeValueField[] diamondDungeon = distributionTable["Diamond_DungeonTable"].children[0].children; +gameData.uiDistributionTable.diamondDungeonTable = ParseDistributionSheet(diamondDungeon); +AssetTypeValueField[] pearlField = distributionTable["Pearl_FieldTable"].children[0].children; +gameData.uiDistributionTable.pearlFieldTable = ParseDistributionSheet(pearlField); +AssetTypeValueField[] pearlDungeon = distributionTable["Pearl_DungeonTable"].children[0].children; +gameData.uiDistributionTable.pearlDungeonTable = ParseDistributionSheet(pearlDungeon); +} - /// - /// Overwrites GlobalData with parsed Moves. - /// - private static async Task ParseMoves() - { - gameData.moves = new(); - AssetTypeValueField monoBehaviour = (await monoBehaviourCollection[PathEnum.PersonalMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "WazaTable"); - AssetTypeValueField animationData = (await monoBehaviourCollection[PathEnum.BattleMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "BattleDataTable"); - AssetTypeValueField textData = (await monoBehaviourCollection[PathEnum.English]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "english_ss_wazaname"); - - AssetTypeValueField[] moveFields = monoBehaviour.children[4].children[0].children; - AssetTypeValueField[] animationFields = animationData.children[8].children[0].children; - AssetTypeValueField[] textFields = textData.children[8].children[0].children; - for (int moveID = 0; moveID < moveFields.Length; moveID++) - { - Move move = new(); - move.moveID = moveFields[moveID].children[0].value.value.asInt32; - move.isValid = moveFields[moveID].children[1].value.value.asUInt8; - move.typingID = moveFields[moveID].children[2].value.value.asUInt8; - move.category = moveFields[moveID].children[3].value.value.asUInt8; - move.damageCategoryID = moveFields[moveID].children[4].value.value.asUInt8; - move.power = moveFields[moveID].children[5].value.value.asUInt8; - move.hitPer = moveFields[moveID].children[6].value.value.asUInt8; - move.basePP = moveFields[moveID].children[7].value.value.asUInt8; - move.priority = moveFields[moveID].children[8].value.value.asInt8; - move.hitCountMax = moveFields[moveID].children[9].value.value.asUInt8; - move.hitCountMin = moveFields[moveID].children[10].value.value.asUInt8; - move.sickID = moveFields[moveID].children[11].value.value.asUInt16; - move.sickPer = moveFields[moveID].children[12].value.value.asUInt8; - move.sickCont = moveFields[moveID].children[13].value.value.asUInt8; - move.sickTurnMin = moveFields[moveID].children[14].value.value.asUInt8; - move.sickTurnMax = moveFields[moveID].children[15].value.value.asUInt8; - move.criticalRank = moveFields[moveID].children[16].value.value.asUInt8; - move.shrinkPer = moveFields[moveID].children[17].value.value.asUInt8; - move.aiSeqNo = moveFields[moveID].children[18].value.value.asUInt16; - move.damageRecoverRatio = moveFields[moveID].children[19].value.value.asInt8; - move.hpRecoverRatio = moveFields[moveID].children[20].value.value.asInt8; - move.target = moveFields[moveID].children[21].value.value.asUInt8; - move.rankEffType1 = moveFields[moveID].children[22].value.value.asUInt8; - move.rankEffType2 = moveFields[moveID].children[23].value.value.asUInt8; - move.rankEffType3 = moveFields[moveID].children[24].value.value.asUInt8; - move.rankEffValue1 = moveFields[moveID].children[25].value.value.asInt8; - move.rankEffValue2 = moveFields[moveID].children[26].value.value.asInt8; - move.rankEffValue3 = moveFields[moveID].children[27].value.value.asInt8; - move.rankEffPer1 = moveFields[moveID].children[28].value.value.asUInt8; - move.rankEffPer2 = moveFields[moveID].children[29].value.value.asUInt8; - move.rankEffPer3 = moveFields[moveID].children[30].value.value.asUInt8; - move.flags = moveFields[moveID].children[31].value.value.asUInt32; - move.contestWazaNo = moveFields[moveID].children[32].value.value.asUInt32; - - move.cmdSeqName = animationFields[moveID].children[1].GetValue().AsString(); - move.cmdSeqNameLegend = animationFields[moveID].children[2].GetValue().AsString(); - move.notShortenTurnType0 = animationFields[moveID].children[3].GetValue().AsString(); - move.notShortenTurnType1 = animationFields[moveID].children[4].GetValue().AsString(); - move.turnType1 = animationFields[moveID].children[5].GetValue().AsString(); - move.turnType2 = animationFields[moveID].children[6].GetValue().AsString(); - move.turnType3 = animationFields[moveID].children[7].GetValue().AsString(); - move.turnType4 = animationFields[moveID].children[8].GetValue().AsString(); - - move.name = ""; - if (textFields[moveID].children[6].children[0].childrenCount > 0) - move.name = Encoding.UTF8.GetString(textFields[moveID].children[6].children[0].children[0].children[4].value.value.asString); - - gameData.moves.Add(move); - } - } +private static List ParseDistributionSheet(AssetTypeValueField[] sheetATVF) +{ +List sheet = new(); +for (int i = 0; i < sheetATVF.Length; i++) +{ +UIMasterdatas.DistributionEntry entry = new() +{ + beforeMorning = ParseDistributionCoord(sheetATVF[i]["BeforeMorning"]), + beforeDaytime = ParseDistributionCoord(sheetATVF[i]["BeforeDaytime"]), + beforeNight = ParseDistributionCoord(sheetATVF[i]["BeforeNight"]), + afterMorning = ParseDistributionCoord(sheetATVF[i]["AfterMorning"]), + afterDaytime = ParseDistributionCoord(sheetATVF[i]["AfterDaytime"]), + afterNight = ParseDistributionCoord(sheetATVF[i]["AfterNight"]), + fishing = ParseDistributionCoord(sheetATVF[i]["Fishing"]), + pokemonTraser = ParseDistributionCoord(sheetATVF[i]["PokemonTraser"]), + honeyTree = ParseDistributionCoord(sheetATVF[i]["HoneyTree"]) +}; +sheet.Add(entry); +} +return sheet; +} - /// - /// Overwrites GlobalData with parsed ShopTables. - /// - private static async Task ParseShopTables() - { - gameData.shopTables = new(); - AssetTypeValueField monoBehaviour = (await monoBehaviourCollection[PathEnum.DprMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "ShopTable"); +private static int[] ParseDistributionCoord(AssetTypeValueField posATVF) => posATVF[0].children.Select(a => a.GetValue().AsInt()).ToArray(); - gameData.shopTables.martItems = new(); - AssetTypeValueField[] martItemFields = monoBehaviour.children[4].children[0].children; - for (int martItemIdx = 0; martItemIdx < martItemFields.Length; martItemIdx++) - { - MartItem martItem = new(); - martItem.itemID = martItemFields[martItemIdx].children[0].value.value.asUInt16; - martItem.badgeNum = martItemFields[martItemIdx].children[1].value.value.asInt32; - martItem.zoneID = martItemFields[martItemIdx].children[2].value.value.asInt32; +private static async Task ParseMasterDatas() +{ +gameData.pokemonInfos = new(); +AssetTypeValueField pokemonInfo = (await monoBehaviourCollection[PathEnum.DprMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "PokemonInfo"); +AssetTypeValueField[] catalogArray = pokemonInfo["Catalog"].children[0].children; +AssetTypeValueField[] trearukiArray = null; +if (pokemonInfo["Trearuki"].children != null) +trearukiArray = pokemonInfo["Trearuki"].children[0].children; +//pre-1.3.0 versions don't have this field + +for (int i = 0; i < catalogArray.Length; i++) +{ +Masterdatas.PokemonInfoCatalog catalog = new(); +catalog.UniqueID = catalogArray[i]["UniqueID"].value.value.asInt32; +catalog.No = catalogArray[i]["No"].value.value.asInt32; +catalog.SinnohNo = catalogArray[i]["SinnohNo"].value.value.asInt32; +catalog.MonsNo = catalogArray[i]["MonsNo"].value.value.asInt32; +catalog.FormNo = catalogArray[i]["FormNo"].value.value.asInt32; +catalog.Sex = catalogArray[i]["Sex"].value.value.asUInt8; +catalog.Rare = catalogArray[i]["Rare"].value.value.asUInt8 == 1; +catalog.AssetBundleName = catalogArray[i]["AssetBundleName"].GetValue().AsString(); +catalog.BattleScale = catalogArray[i]["BattleScale"].value.value.asFloat; +catalog.ContestScale = catalogArray[i]["ContestScale"].value.value.asFloat; +catalog.ContestSize = (Masterdatas.Size) catalogArray[i]["ContestSize"].value.value.asInt32; +catalog.FieldScale = catalogArray[i]["FieldScale"].value.value.asFloat; +catalog.FieldChikaScale = catalogArray[i]["FieldChikaScale"].value.value.asFloat; +catalog.StatueScale = catalogArray[i]["StatueScale"].value.value.asFloat; +catalog.FieldWalkingScale = catalogArray[i]["FieldWalkingScale"].value.value.asFloat; +catalog.FieldFureaiScale = catalogArray[i]["FieldFureaiScale"].value.value.asFloat; +catalog.MenuScale = catalogArray[i]["MenuScale"].value.value.asFloat; +catalog.ModelMotion = catalogArray[i]["ModelMotion"].GetValue().AsString(); + +catalog.ModelOffset = new(); +catalog.ModelOffset.X = catalogArray[i]["ModelOffset"].children[0].value.value.asFloat; +catalog.ModelOffset.Y = catalogArray[i]["ModelOffset"].children[1].value.value.asFloat; +catalog.ModelOffset.Z = catalogArray[i]["ModelOffset"].children[2].value.value.asFloat; + +catalog.ModelRotationAngle = new(); +catalog.ModelRotationAngle.X = catalogArray[i]["ModelRotationAngle"].children[0].value.value.asFloat; +catalog.ModelRotationAngle.Y = catalogArray[i]["ModelRotationAngle"].children[1].value.value.asFloat; +catalog.ModelRotationAngle.Z = catalogArray[i]["ModelRotationAngle"].children[2].value.value.asFloat; + +catalog.DistributionScale = catalogArray[i]["DistributionScale"].value.value.asFloat; +catalog.DistributionModelMotion = catalogArray[i]["DistributionModelMotion"].GetValue().AsString(); + +catalog.DistributionModelOffset = new(); +catalog.DistributionModelOffset.X = catalogArray[i]["DistributionModelOffset"].children[0].value.value.asFloat; +catalog.DistributionModelOffset.Y = catalogArray[i]["DistributionModelOffset"].children[1].value.value.asFloat; +catalog.DistributionModelOffset.Z = catalogArray[i]["DistributionModelOffset"].children[2].value.value.asFloat; + +catalog.DistributionModelRotationAngle = new(); +catalog.DistributionModelRotationAngle.X = catalogArray[i]["DistributionModelRotationAngle"].children[0].value.value.asFloat; +catalog.DistributionModelRotationAngle.Y = catalogArray[i]["DistributionModelRotationAngle"].children[1].value.value.asFloat; +catalog.DistributionModelRotationAngle.Z = catalogArray[i]["DistributionModelRotationAngle"].children[2].value.value.asFloat; + +catalog.VoiceScale = catalogArray[i]["VoiceScale"].value.value.asFloat; +catalog.VoiceModelMotion = catalogArray[i]["VoiceModelMotion"].GetValue().AsString(); + +catalog.VoiceModelOffset = new(); +catalog.VoiceModelOffset.X = catalogArray[i]["VoiceModelOffset"].children[0].value.value.asFloat; +catalog.VoiceModelOffset.Y = catalogArray[i]["VoiceModelOffset"].children[1].value.value.asFloat; +catalog.VoiceModelOffset.Z = catalogArray[i]["VoiceModelOffset"].children[2].value.value.asFloat; + +catalog.VoiceModelRotationAngle = new(); +catalog.VoiceModelRotationAngle.X = catalogArray[i]["VoiceModelRotationAngle"].children[0].value.value.asFloat; +catalog.VoiceModelRotationAngle.Y = catalogArray[i]["VoiceModelRotationAngle"].children[1].value.value.asFloat; +catalog.VoiceModelRotationAngle.Z = catalogArray[i]["VoiceModelRotationAngle"].children[2].value.value.asFloat; + +catalog.CenterPointOffset = new(); +catalog.CenterPointOffset.X = catalogArray[i]["CenterPointOffset"].children[0].value.value.asFloat; +catalog.CenterPointOffset.Y = catalogArray[i]["CenterPointOffset"].children[1].value.value.asFloat; +catalog.CenterPointOffset.Z = catalogArray[i]["CenterPointOffset"].children[2].value.value.asFloat; + +catalog.RotationLimitAngle = new(); +catalog.RotationLimitAngle.X = catalogArray[i]["RotationLimitAngle"].children[0].value.value.asFloat; +catalog.RotationLimitAngle.Y = catalogArray[i]["RotationLimitAngle"].children[1].value.value.asFloat; + +catalog.StatusScale = catalogArray[i]["StatusScale"].value.value.asFloat; +catalog.StatusModelMotion = catalogArray[i]["StatusModelMotion"].GetValue().AsString(); + +catalog.StatusModelOffset = new(); +catalog.StatusModelOffset.X = catalogArray[i]["StatusModelOffset"].children[0].value.value.asFloat; +catalog.StatusModelOffset.Y = catalogArray[i]["StatusModelOffset"].children[1].value.value.asFloat; +catalog.StatusModelOffset.Z = catalogArray[i]["StatusModelOffset"].children[2].value.value.asFloat; + +catalog.StatusModelRotationAngle = new(); +catalog.StatusModelRotationAngle.X = catalogArray[i]["StatusModelRotationAngle"].children[0].value.value.asFloat; +catalog.StatusModelRotationAngle.Y = catalogArray[i]["StatusModelRotationAngle"].children[1].value.value.asFloat; +catalog.StatusModelRotationAngle.Z = catalogArray[i]["StatusModelRotationAngle"].children[2].value.value.asFloat; + +catalog.BoxScale = catalogArray[i]["BoxScale"].value.value.asFloat; +catalog.BoxModelMotion = catalogArray[i]["BoxModelMotion"].GetValue().AsString(); + +catalog.BoxModelOffset = new(); +catalog.BoxModelOffset.X = catalogArray[i]["BoxModelOffset"].children[0].value.value.asFloat; +catalog.BoxModelOffset.Y = catalogArray[i]["BoxModelOffset"].children[1].value.value.asFloat; +catalog.BoxModelOffset.Z = catalogArray[i]["BoxModelOffset"].children[2].value.value.asFloat; + +catalog.BoxModelRotationAngle = new(); +catalog.BoxModelRotationAngle.X = catalogArray[i]["BoxModelRotationAngle"].children[0].value.value.asFloat; +catalog.BoxModelRotationAngle.Y = catalogArray[i]["BoxModelRotationAngle"].children[1].value.value.asFloat; +catalog.BoxModelRotationAngle.Z = catalogArray[i]["BoxModelRotationAngle"].children[2].value.value.asFloat; + +catalog.CompareScale = catalogArray[i]["CompareScale"].value.value.asFloat; +catalog.CompareModelMotion = catalogArray[i]["CompareModelMotion"].GetValue().AsString(); + +catalog.CompareModelOffset = new(); +catalog.CompareModelOffset.X = catalogArray[i]["CompareModelOffset"].children[0].value.value.asFloat; +catalog.CompareModelOffset.Y = catalogArray[i]["CompareModelOffset"].children[1].value.value.asFloat; +catalog.CompareModelOffset.Z = catalogArray[i]["CompareModelOffset"].children[2].value.value.asFloat; + +catalog.CompareModelRotationAngle = new(); +catalog.CompareModelRotationAngle.X = catalogArray[i]["CompareModelRotationAngle"].children[0].value.value.asFloat; +catalog.CompareModelRotationAngle.Y = catalogArray[i]["CompareModelRotationAngle"].children[1].value.value.asFloat; +catalog.CompareModelRotationAngle.Z = catalogArray[i]["CompareModelRotationAngle"].children[2].value.value.asFloat; + +catalog.BrakeStart = catalogArray[i]["BrakeStart"].value.value.asFloat; +catalog.BrakeEnd = catalogArray[i]["BrakeEnd"].value.value.asFloat; +catalog.WalkSpeed = catalogArray[i]["WalkSpeed"].value.value.asFloat; +catalog.RunSpeed = catalogArray[i]["RunSpeed"].value.value.asFloat; +catalog.WalkStart = catalogArray[i]["WalkStart"].value.value.asFloat; +catalog.RunStart = catalogArray[i]["RunStart"].value.value.asFloat; +catalog.BodySize = catalogArray[i]["BodySize"].value.value.asFloat; +catalog.AppearLimit = catalogArray[i]["AppearLimit"].value.value.asFloat; +catalog.MoveType = (Masterdatas.MoveType) catalogArray[i]["MoveType"].value.value.asInt32; + +catalog.GroundEffect = catalogArray[i]["GroundEffect"].value.value.asUInt8 != 0; +catalog.Waitmoving = catalogArray[i]["Waitmoving"].value.value.asUInt8 != 0; +catalog.BattleAjustHeight = catalogArray[i]["BattleAjustHeight"].value.value.asInt32; + +if (trearukiArray != null) +{ + Masterdatas.Trearuki t = new() + { + enable = trearukiArray[i]["Enable"].GetValue().value.asUInt8 != 0, + animeIndex = new(), + animeDuration = new() + }; + catalog.trearuki = t; + + AssetTypeValueField[] animeIndexATVFS = trearukiArray[i]["AnimeIndex"].children[0].children; + foreach (AssetTypeValueField atvf in animeIndexATVFS) + t.animeIndex.Add(atvf.GetValue().AsInt()); + + AssetTypeValueField[] animeDurationATVFS = trearukiArray[i]["AnimeIndex"].children[0].children; + foreach (AssetTypeValueField atvf in animeDurationATVFS) + t.animeDuration.Add(atvf.GetValue().AsFloat()); +} - gameData.shopTables.martItems.Add(martItem); - } +gameData.pokemonInfos.Add(catalog); +} +} +private static async Task ParseBattleMasterDatas() +{ +gameData.motionTimingData = new(); +AssetTypeValueField battleDataTable = (await monoBehaviourCollection[PathEnum.BattleMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "BattleDataTable"); +AssetTypeValueField[] motionTimingDataArray = battleDataTable["MotionTimingData"].children[0].children; - gameData.shopTables.fixedShopItems = new(); - AssetTypeValueField[] fixedShopItemFields = monoBehaviour.children[5].children[0].children; - for (int fixedShopItemIdx = 0; fixedShopItemIdx < fixedShopItemFields.Length; fixedShopItemIdx++) - { - FixedShopItem fixedShopItem = new(); - fixedShopItem.itemID = fixedShopItemFields[fixedShopItemIdx].children[0].value.value.asUInt16; - fixedShopItem.shopID = fixedShopItemFields[fixedShopItemIdx].children[1].value.value.asInt32; +for (int i = 0; i < motionTimingDataArray.Length; i++) +{ +BattleMasterdatas.MotionTimingData motionTimingData = new(); +motionTimingData.MonsNo = motionTimingDataArray[i]["MonsNo"].value.value.asInt32; +motionTimingData.FormNo = motionTimingDataArray[i]["FormNo"].value.value.asInt32; +motionTimingData.Sex = motionTimingDataArray[i]["Sex"].value.value.asInt32; +motionTimingData.Buturi01 = motionTimingDataArray[i]["Buturi01"].value.value.asInt32; +motionTimingData.Buturi02 = motionTimingDataArray[i]["Buturi02"].value.value.asInt32; +motionTimingData.Buturi03 = motionTimingDataArray[i]["Buturi03"].value.value.asInt32; +motionTimingData.Tokusyu01 = motionTimingDataArray[i]["Tokusyu01"].value.value.asInt32; +motionTimingData.Tokusyu02 = motionTimingDataArray[i]["Tokusyu02"].value.value.asInt32; +motionTimingData.Tokusyu03 = motionTimingDataArray[i]["Tokusyu03"].value.value.asInt32; +motionTimingData.BodyBlow = motionTimingDataArray[i]["BodyBlow"].value.value.asInt32; +motionTimingData.Punch = motionTimingDataArray[i]["Punch"].value.value.asInt32; +motionTimingData.Kick = motionTimingDataArray[i]["Kick"].value.value.asInt32; +motionTimingData.Tail = motionTimingDataArray[i]["Tail"].value.value.asInt32; +motionTimingData.Bite = motionTimingDataArray[i]["Bite"].value.value.asInt32; +motionTimingData.Peck = motionTimingDataArray[i]["Peck"].value.value.asInt32; +motionTimingData.Radial = motionTimingDataArray[i]["Radial"].value.value.asInt32; +motionTimingData.Cry = motionTimingDataArray[i]["Cry"].value.value.asInt32; +motionTimingData.Dust = motionTimingDataArray[i]["Dust"].value.value.asInt32; +motionTimingData.Shot = motionTimingDataArray[i]["Shot"].value.value.asInt32; +motionTimingData.Guard = motionTimingDataArray[i]["Guard"].value.value.asInt32; +motionTimingData.LandingFall = motionTimingDataArray[i]["LandingFall"].value.value.asInt32; +motionTimingData.LandingFallEase = motionTimingDataArray[i]["LandingFallEase"].value.value.asInt32; + +gameData.motionTimingData.Add(motionTimingData); +} +} - gameData.shopTables.fixedShopItems.Add(fixedShopItem); - } +/// +/// Overwrites GlobalData with parsed Moves. +/// +private static async Task ParseMoves() +{ +gameData.moves = new(); +AssetTypeValueField monoBehaviour = (await monoBehaviourCollection[PathEnum.PersonalMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "WazaTable"); +AssetTypeValueField animationData = (await monoBehaviourCollection[PathEnum.BattleMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "BattleDataTable"); +AssetTypeValueField textData = (await monoBehaviourCollection[PathEnum.English]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "english_ss_wazaname"); + +AssetTypeValueField[] moveFields = monoBehaviour.children[4].children[0].children; +AssetTypeValueField[] animationFields = animationData.children[8].children[0].children; +AssetTypeValueField[] textFields = textData.children[8].children[0].children; +for (int moveID = 0; moveID < moveFields.Length; moveID++) +{ +Move move = new(); +move.moveID = moveFields[moveID].children[0].value.value.asInt32; +move.isValid = moveFields[moveID].children[1].value.value.asUInt8; +move.typingID = moveFields[moveID].children[2].value.value.asUInt8; +move.category = moveFields[moveID].children[3].value.value.asUInt8; +move.damageCategoryID = moveFields[moveID].children[4].value.value.asUInt8; +move.power = moveFields[moveID].children[5].value.value.asUInt8; +move.hitPer = moveFields[moveID].children[6].value.value.asUInt8; +move.basePP = moveFields[moveID].children[7].value.value.asUInt8; +move.priority = moveFields[moveID].children[8].value.value.asInt8; +move.hitCountMax = moveFields[moveID].children[9].value.value.asUInt8; +move.hitCountMin = moveFields[moveID].children[10].value.value.asUInt8; +move.sickID = moveFields[moveID].children[11].value.value.asUInt16; +move.sickPer = moveFields[moveID].children[12].value.value.asUInt8; +move.sickCont = moveFields[moveID].children[13].value.value.asUInt8; +move.sickTurnMin = moveFields[moveID].children[14].value.value.asUInt8; +move.sickTurnMax = moveFields[moveID].children[15].value.value.asUInt8; +move.criticalRank = moveFields[moveID].children[16].value.value.asUInt8; +move.shrinkPer = moveFields[moveID].children[17].value.value.asUInt8; +move.aiSeqNo = moveFields[moveID].children[18].value.value.asUInt16; +move.damageRecoverRatio = moveFields[moveID].children[19].value.value.asInt8; +move.hpRecoverRatio = moveFields[moveID].children[20].value.value.asInt8; +move.target = moveFields[moveID].children[21].value.value.asUInt8; +move.rankEffType1 = moveFields[moveID].children[22].value.value.asUInt8; +move.rankEffType2 = moveFields[moveID].children[23].value.value.asUInt8; +move.rankEffType3 = moveFields[moveID].children[24].value.value.asUInt8; +move.rankEffValue1 = moveFields[moveID].children[25].value.value.asInt8; +move.rankEffValue2 = moveFields[moveID].children[26].value.value.asInt8; +move.rankEffValue3 = moveFields[moveID].children[27].value.value.asInt8; +move.rankEffPer1 = moveFields[moveID].children[28].value.value.asUInt8; +move.rankEffPer2 = moveFields[moveID].children[29].value.value.asUInt8; +move.rankEffPer3 = moveFields[moveID].children[30].value.value.asUInt8; +move.flags = moveFields[moveID].children[31].value.value.asUInt32; +move.contestWazaNo = moveFields[moveID].children[32].value.value.asUInt32; + +move.cmdSeqName = animationFields[moveID].children[1].GetValue().AsString(); +move.cmdSeqNameLegend = animationFields[moveID].children[2].GetValue().AsString(); +move.notShortenTurnType0 = animationFields[moveID].children[3].GetValue().AsString(); +move.notShortenTurnType1 = animationFields[moveID].children[4].GetValue().AsString(); +move.turnType1 = animationFields[moveID].children[5].GetValue().AsString(); +move.turnType2 = animationFields[moveID].children[6].GetValue().AsString(); +move.turnType3 = animationFields[moveID].children[7].GetValue().AsString(); +move.turnType4 = animationFields[moveID].children[8].GetValue().AsString(); + +move.name = ""; +if (textFields[moveID].children[6].children[0].childrenCount > 0) + move.name = Encoding.UTF8.GetString(textFields[moveID].children[6].children[0].children[0].children[4].value.value.asString); + +gameData.moves.Add(move); +} +} - gameData.shopTables.bpShopItems = new(); - AssetTypeValueField[] bpShopItemFields = monoBehaviour.children[9].children[0].children; - for (int bpShopItemIdx = 0; bpShopItemIdx < bpShopItemFields.Length; bpShopItemIdx++) - { - BpShopItem bpShopItem = new(); - bpShopItem.itemID = bpShopItemFields[bpShopItemIdx].children[0].value.value.asUInt16; - try - { - bpShopItem.npcID = bpShopItemFields[bpShopItemIdx].children[1].value.value.asInt32; - } - catch (IndexOutOfRangeException) - { - MainForm.ShowParserError("Oh my, this dump might be a bit outdated...\n" + - "Please input at least the v1.1.3 version of BDSP.\n" + - "I don't feel so good..."); - throw; - } +/// +/// Overwrites GlobalData with parsed ShopTables. +/// +private static async Task ParseShopTables() +{ +gameData.shopTables = new(); +AssetTypeValueField monoBehaviour = (await monoBehaviourCollection[PathEnum.DprMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "ShopTable"); - gameData.shopTables.bpShopItems.Add(bpShopItem); - } - } +gameData.shopTables.martItems = new(); +AssetTypeValueField[] martItemFields = monoBehaviour.children[4].children[0].children; +for (int martItemIdx = 0; martItemIdx < martItemFields.Length; martItemIdx++) +{ +MartItem martItem = new(); +martItem.itemID = martItemFields[martItemIdx].children[0].value.value.asUInt16; +martItem.badgeNum = martItemFields[martItemIdx].children[1].value.value.asInt32; +martItem.zoneID = martItemFields[martItemIdx].children[2].value.value.asInt32; - /// - /// Overwrites GlobalData with parsed PickupItems. - /// - private static async Task ParsePickupItems() - { - gameData.pickupItems = new(); - AssetTypeValueField monoBehaviour = (await monoBehaviourCollection[PathEnum.DprMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "MonohiroiTable"); +gameData.shopTables.martItems.Add(martItem); +} - AssetTypeValueField[] pickupItemFields = monoBehaviour.children[4].children[0].children; - for (int pickupItemIdx = 0; pickupItemIdx < pickupItemFields.Length; pickupItemIdx++) - { - PickupItem pickupItem = new(); - pickupItem.itemID = pickupItemFields[pickupItemIdx].children[0].value.value.asUInt16; +gameData.shopTables.fixedShopItems = new(); +AssetTypeValueField[] fixedShopItemFields = monoBehaviour.children[5].children[0].children; +for (int fixedShopItemIdx = 0; fixedShopItemIdx < fixedShopItemFields.Length; fixedShopItemIdx++) +{ +FixedShopItem fixedShopItem = new(); +fixedShopItem.itemID = fixedShopItemFields[fixedShopItemIdx].children[0].value.value.asUInt16; +fixedShopItem.shopID = fixedShopItemFields[fixedShopItemIdx].children[1].value.value.asInt32; - //Parse item probabilities - pickupItem.ratios = new(); - for (int ratio = 0; ratio < pickupItemFields[pickupItemIdx].children[1].children[0].childrenCount; ratio++) - pickupItem.ratios.Add(pickupItemFields[pickupItemIdx].children[1].children[0].children[ratio].value.value.asUInt8); +gameData.shopTables.fixedShopItems.Add(fixedShopItem); +} - gameData.pickupItems.Add(pickupItem); - } - } +gameData.shopTables.bpShopItems = new(); +AssetTypeValueField[] bpShopItemFields = monoBehaviour.children[9].children[0].children; +for (int bpShopItemIdx = 0; bpShopItemIdx < bpShopItemFields.Length; bpShopItemIdx++) +{ +BpShopItem bpShopItem = new(); +bpShopItem.itemID = bpShopItemFields[bpShopItemIdx].children[0].value.value.asUInt16; +try +{ + bpShopItem.npcID = bpShopItemFields[bpShopItemIdx].children[1].value.value.asInt32; +} +catch (IndexOutOfRangeException) +{ + MainForm.ShowParserError("Oh my, this dump might be a bit outdated...\n" + + "Please input at least the v1.1.3 version of BDSP.\n" + + "I don't feel so good..."); + throw; +} - /// - /// Overwrites GlobalData with parsed Items. - /// - private static async Task ParseItems() - { - gameData.items = new(); - AssetTypeValueField monoBehaviour = (await monoBehaviourCollection[PathEnum.PersonalMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "ItemTable"); - AssetTypeValueField textData = (await monoBehaviourCollection[PathEnum.English]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "english_ss_itemname"); +gameData.shopTables.bpShopItems.Add(bpShopItem); +} +} - AssetTypeValueField[] itemFields = monoBehaviour.children[4].children[0].children; - AssetTypeValueField[] textFields = textData.children[8].children[0].children; +/// +/// Overwrites GlobalData with parsed PickupItems. +/// +private static async Task ParsePickupItems() +{ +gameData.pickupItems = new(); +AssetTypeValueField monoBehaviour = (await monoBehaviourCollection[PathEnum.DprMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "MonohiroiTable"); - if (textFields.Length < itemFields.Length) - MainForm.ShowParserError("Oh my, this english_ss_itemname is missing some stuff...\n" + - "I don't feel so good...\n" + - "ItemTable entries: " + itemFields.Length + "\n" + - "english_ss_itemname entries: " + textFields.Length + "??"); +AssetTypeValueField[] pickupItemFields = monoBehaviour.children[4].children[0].children; +for (int pickupItemIdx = 0; pickupItemIdx < pickupItemFields.Length; pickupItemIdx++) +{ +PickupItem pickupItem = new(); +pickupItem.itemID = pickupItemFields[pickupItemIdx].children[0].value.value.asUInt16; - for (int itemIdx = 0; itemIdx < itemFields.Length; itemIdx++) - { - Item item = new(); - item.itemID = itemFields[itemIdx].children[0].value.value.asInt16; - item.type = itemFields[itemIdx].children[1].value.value.asUInt8; - item.iconID = itemFields[itemIdx].children[2].value.value.asInt32; - item.price = itemFields[itemIdx].children[3].value.value.asInt32; - item.bpPrice = itemFields[itemIdx].children[4].value.value.asInt32; - item.nageAtc = itemFields[itemIdx].children[7].value.value.asUInt8; - item.sizenAtc = itemFields[itemIdx].children[8].value.value.asUInt8; - item.sizenType = itemFields[itemIdx].children[9].value.value.asUInt8; - item.tuibamuEff = itemFields[itemIdx].children[10].value.value.asUInt8; - item.sort = itemFields[itemIdx].children[11].value.value.asUInt8; - item.group = itemFields[itemIdx].children[12].value.value.asUInt8; - item.groupID = itemFields[itemIdx].children[13].value.value.asUInt8; - item.fldPocket = itemFields[itemIdx].children[14].value.value.asUInt8; - item.fieldFunc = itemFields[itemIdx].children[15].value.value.asUInt8; - item.battleFunc = itemFields[itemIdx].children[16].value.value.asUInt8; - item.criticalRanks = itemFields[itemIdx].children[18].value.value.asUInt8; - item.atkStages = itemFields[itemIdx].children[19].value.value.asUInt8; - item.defStages = itemFields[itemIdx].children[20].value.value.asUInt8; - item.spdStages = itemFields[itemIdx].children[21].value.value.asUInt8; - item.accStages = itemFields[itemIdx].children[22].value.value.asUInt8; - item.spAtkStages = itemFields[itemIdx].children[23].value.value.asUInt8; - item.spDefStages = itemFields[itemIdx].children[24].value.value.asUInt8; - item.ppRestoreAmount = itemFields[itemIdx].children[25].value.value.asUInt8; - item.hpEvIncrease = itemFields[itemIdx].children[26].value.value.asInt8; - item.atkEvIncrease = itemFields[itemIdx].children[27].value.value.asInt8; - item.defEvIncrease = itemFields[itemIdx].children[28].value.value.asInt8; - item.spdEvIncrease = itemFields[itemIdx].children[29].value.value.asInt8; - item.spAtkEvIncrease = itemFields[itemIdx].children[30].value.value.asInt8; - item.spDefEvIncrease = itemFields[itemIdx].children[31].value.value.asInt8; - item.friendshipIncrease1 = itemFields[itemIdx].children[32].value.value.asInt8; - item.friendshipIncrease2 = itemFields[itemIdx].children[33].value.value.asInt8; - item.friendshipIncrease3 = itemFields[itemIdx].children[34].value.value.asInt8; - item.hpRestoreAmount = itemFields[itemIdx].children[35].value.value.asUInt8; - item.flags0 = itemFields[itemIdx].children[36].value.value.asUInt32; - - item.name = ""; - if (textFields[itemIdx].children[6].children[0].childrenCount > 0) - item.name = Encoding.UTF8.GetString(textFields[itemIdx].children[6].children[0].children[0].children[4].value.value.asString); - - gameData.items.Add(item); - } - } +//Parse item probabilities +pickupItem.ratios = new(); +for (int ratio = 0; ratio < pickupItemFields[pickupItemIdx].children[1].children[0].childrenCount; ratio++) + pickupItem.ratios.Add(pickupItemFields[pickupItemIdx].children[1].children[0].children[ratio].value.value.asUInt8); - /// - /// Overwrites GlobalData with parsed growth rates. - /// - private static async Task ParseGrowthRates() - { - gameData.growthRates = new(); - AssetTypeValueField monoBehaviour = (await monoBehaviourCollection[PathEnum.PersonalMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "GrowTable"); +gameData.pickupItems.Add(pickupItem); +} +} - AssetTypeValueField[] growthRateFields = monoBehaviour.children[4].children[0].children; - for (int growthRateIdx = 0; growthRateIdx < growthRateFields.Length; growthRateIdx++) - { - GrowthRate growthRate = new(); - growthRate.growthID = growthRateIdx; +/// +/// Overwrites GlobalData with parsed Items. +/// +private static async Task ParseItems() +{ +gameData.items = new(); +AssetTypeValueField monoBehaviour = (await monoBehaviourCollection[PathEnum.PersonalMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "ItemTable"); +AssetTypeValueField textData = (await monoBehaviourCollection[PathEnum.English]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "english_ss_itemname"); - //Parse exp requirement - growthRate.expRequirements = new(); - for (int level = 0; level < growthRateFields[growthRateIdx].children[0].children[0].childrenCount; level++) - growthRate.expRequirements.Add(growthRateFields[growthRateIdx].children[0].children[0].children[level].value.value.asUInt32); +AssetTypeValueField[] itemFields = monoBehaviour.children[4].children[0].children; +AssetTypeValueField[] textFields = textData.children[8].children[0].children; - gameData.growthRates.Add(growthRate); - } - } +if (textFields.Length < itemFields.Length) +MainForm.ShowParserError("Oh my, this english_ss_itemname is missing some stuff...\n" + + "I don't feel so good...\n" + + "ItemTable entries: " + itemFields.Length + "\n" + + "english_ss_itemname entries: " + textFields.Length + "??"); - /// - /// Overwrites GlobalData with parsed MessageFiles. - /// - public static async Task ParseAllMessageFiles() - { - gameData.messageFileSets = new MessageFileSet[10]; - for (int i = 0; i < gameData.messageFileSets.Length; i++) - { - gameData.messageFileSets[i] = new(); - gameData.messageFileSets[i].messageFiles = new(); - } - gameData.messageFileSets[0].langID = 1; - gameData.messageFileSets[1].langID = 1; - gameData.messageFileSets[2].langID = 2; - gameData.messageFileSets[3].langID = 3; - gameData.messageFileSets[4].langID = 4; - gameData.messageFileSets[5].langID = 5; - gameData.messageFileSets[6].langID = 7; - gameData.messageFileSets[7].langID = 8; - gameData.messageFileSets[8].langID = 9; - gameData.messageFileSets[9].langID = 10; - - List monoBehaviours = await monoBehaviourCollection[PathEnum.CommonMsbt]; - monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.English]); - monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.French]); - monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.German]); - monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.Italian]); - monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.Jpn]); - monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.JpnKanji]); - monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.Korean]); - monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.SimpChinese]); - monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.Spanish]); - monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.TradChinese]); - - for (int mIdx = 0; mIdx < monoBehaviours.Count; mIdx++) - { - MessageFile messageFile = new(); - messageFile.mName = Encoding.Default.GetString(monoBehaviours[mIdx].children[3].value.value.asString); - messageFile.langID = monoBehaviours[mIdx].children[5].value.value.asInt32; - messageFile.isKanji = monoBehaviours[mIdx].children[7].value.value.asUInt8; - - //Parse LabelData - messageFile.labelDatas = new(); - AssetTypeValueField[] labelDataFields = monoBehaviours[mIdx].children[8].children[0].children; - for (int labelDataIdx = 0; labelDataIdx < labelDataFields.Length; labelDataIdx++) - { - LabelData labelData = new(); - labelData.labelIndex = labelDataFields[labelDataIdx].children[0].value.value.asInt32; - labelData.arrayIndex = labelDataFields[labelDataIdx].children[1].value.value.asInt32; - labelData.labelName = Encoding.Default.GetString(labelDataFields[labelDataIdx].children[2].value.value.asString); - labelData.styleIndex = labelDataFields[labelDataIdx].children[3].children[0].value.value.asInt32; - labelData.colorIndex = labelDataFields[labelDataIdx].children[3].children[1].value.value.asInt32; - labelData.fontSize = labelDataFields[labelDataIdx].children[3].children[2].value.value.asInt32; - labelData.maxWidth = labelDataFields[labelDataIdx].children[3].children[3].value.value.asInt32; - labelData.controlID = labelDataFields[labelDataIdx].children[3].children[4].value.value.asInt32; - - // Parse Attribute Array - AssetTypeValueField[] attrArray = labelDataFields[labelDataIdx].children[4].children[0].children; - labelData.attributeValues = new(); - for (int attrIdx = 0; attrIdx < attrArray.Length; attrIdx++) - { - labelData.attributeValues.Add(attrArray[attrIdx].value.value.asInt32); - } - - // Parse TagData - AssetTypeValueField[] tagDataFields = labelDataFields[labelDataIdx].children[5].children[0].children; - labelData.tagDatas = new(); - for (int tagDataIdx = 0; tagDataIdx < tagDataFields.Length; tagDataIdx++) - { - TagData tagData = new(); - tagData.tagIndex = tagDataFields[tagDataIdx].children[0].value.value.asInt32; - tagData.groupID = tagDataFields[tagDataIdx].children[1].value.value.asInt32; - tagData.tagID = tagDataFields[tagDataIdx].children[2].value.value.asInt32; - tagData.tagPatternID = tagDataFields[tagDataIdx].children[3].value.value.asInt32; - tagData.forceArticle = tagDataFields[tagDataIdx].children[4].value.value.asInt32; - tagData.tagParameter = tagDataFields[tagDataIdx].children[5].value.value.asInt32; - tagData.tagWordArray = new(); - foreach (AssetTypeValueField tagWordField in tagDataFields[tagDataIdx].children[6][0].children) - { - tagData.tagWordArray.Add(tagWordField.GetValue().AsString()); - } - - tagData.forceGrmID = tagDataFields[tagDataIdx].children[7].value.value.asInt32; - - labelData.tagDatas.Add(tagData); - } - - //Parse WordData - labelData.wordDatas = new(); - AssetTypeValueField[] wordDataFields = labelDataFields[labelDataIdx].children[6].children[0].children; - for (int wordDataIdx = 0; wordDataIdx < wordDataFields.Length; wordDataIdx++) - { - WordData wordData = new(); - wordData.patternID = wordDataFields[wordDataIdx].children[0].value.value.asInt32; - wordData.eventID = wordDataFields[wordDataIdx].children[1].value.value.asInt32; - wordData.tagIndex = wordDataFields[wordDataIdx].children[2].value.value.asInt32; - wordData.tagValue = wordDataFields[wordDataIdx].children[3].value.value.asFloat; - wordData.str = Encoding.UTF8.GetString(wordDataFields[wordDataIdx].children[4].value.value.asString); - wordData.strWidth = wordDataFields[wordDataIdx].children[5].value.value.asFloat; - - labelData.wordDatas.Add(wordData); - } - - messageFile.labelDatas.Add(labelData); - } +for (int itemIdx = 0; itemIdx < itemFields.Length; itemIdx++) +{ +Item item = new(); +item.itemID = itemFields[itemIdx].children[0].value.value.asInt16; +item.type = itemFields[itemIdx].children[1].value.value.asUInt8; +item.iconID = itemFields[itemIdx].children[2].value.value.asInt32; +item.price = itemFields[itemIdx].children[3].value.value.asInt32; +item.bpPrice = itemFields[itemIdx].children[4].value.value.asInt32; +item.nageAtc = itemFields[itemIdx].children[7].value.value.asUInt8; +item.sizenAtc = itemFields[itemIdx].children[8].value.value.asUInt8; +item.sizenType = itemFields[itemIdx].children[9].value.value.asUInt8; +item.tuibamuEff = itemFields[itemIdx].children[10].value.value.asUInt8; +item.sort = itemFields[itemIdx].children[11].value.value.asUInt8; +item.group = itemFields[itemIdx].children[12].value.value.asUInt8; +item.groupID = itemFields[itemIdx].children[13].value.value.asUInt8; +item.fldPocket = itemFields[itemIdx].children[14].value.value.asUInt8; +item.fieldFunc = itemFields[itemIdx].children[15].value.value.asUInt8; +item.battleFunc = itemFields[itemIdx].children[16].value.value.asUInt8; +item.criticalRanks = itemFields[itemIdx].children[18].value.value.asUInt8; +item.atkStages = itemFields[itemIdx].children[19].value.value.asUInt8; +item.defStages = itemFields[itemIdx].children[20].value.value.asUInt8; +item.spdStages = itemFields[itemIdx].children[21].value.value.asUInt8; +item.accStages = itemFields[itemIdx].children[22].value.value.asUInt8; +item.spAtkStages = itemFields[itemIdx].children[23].value.value.asUInt8; +item.spDefStages = itemFields[itemIdx].children[24].value.value.asUInt8; +item.ppRestoreAmount = itemFields[itemIdx].children[25].value.value.asUInt8; +item.hpEvIncrease = itemFields[itemIdx].children[26].value.value.asInt8; +item.atkEvIncrease = itemFields[itemIdx].children[27].value.value.asInt8; +item.defEvIncrease = itemFields[itemIdx].children[28].value.value.asInt8; +item.spdEvIncrease = itemFields[itemIdx].children[29].value.value.asInt8; +item.spAtkEvIncrease = itemFields[itemIdx].children[30].value.value.asInt8; +item.spDefEvIncrease = itemFields[itemIdx].children[31].value.value.asInt8; +item.friendshipIncrease1 = itemFields[itemIdx].children[32].value.value.asInt8; +item.friendshipIncrease2 = itemFields[itemIdx].children[33].value.value.asInt8; +item.friendshipIncrease3 = itemFields[itemIdx].children[34].value.value.asInt8; +item.hpRestoreAmount = itemFields[itemIdx].children[35].value.value.asUInt8; +item.flags0 = itemFields[itemIdx].children[36].value.value.asUInt32; + +item.name = ""; +if (textFields[itemIdx].children[6].children[0].childrenCount > 0) + item.name = Encoding.UTF8.GetString(textFields[itemIdx].children[6].children[0].children[0].children[4].value.value.asString); + +gameData.items.Add(item); +} +} - switch (messageFile.langID) - { - case 1: - if (messageFile.isKanji == 0) - gameData.messageFileSets[0].messageFiles.Add(messageFile); - else - gameData.messageFileSets[1].messageFiles.Add(messageFile); - break; - case 2: - gameData.messageFileSets[2].messageFiles.Add(messageFile); - break; - case 3: - gameData.messageFileSets[3].messageFiles.Add(messageFile); - break; - case 4: - gameData.messageFileSets[4].messageFiles.Add(messageFile); - break; - case 5: - gameData.messageFileSets[5].messageFiles.Add(messageFile); - break; - case 7: - gameData.messageFileSets[6].messageFiles.Add(messageFile); - break; - case 8: - gameData.messageFileSets[7].messageFiles.Add(messageFile); - break; - case 9: - gameData.messageFileSets[8].messageFiles.Add(messageFile); - break; - case 10: - gameData.messageFileSets[9].messageFiles.Add(messageFile); - break; - } - } - } +/// +/// Overwrites GlobalData with parsed growth rates. +/// +private static async Task ParseGrowthRates() +{ +gameData.growthRates = new(); +AssetTypeValueField monoBehaviour = (await monoBehaviourCollection[PathEnum.PersonalMasterdatas]).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "GrowTable"); - /// - /// Overwrites GlobalData with parsed EvScripts. - /// - private static async Task ParseEvScripts() - { - gameData.evScripts = new(); - List monoBehaviours = (await monoBehaviourCollection[PathEnum.EvScript]).Where(m => m.children[4].GetName() == "Scripts").ToList(); +AssetTypeValueField[] growthRateFields = monoBehaviour.children[4].children[0].children; +for (int growthRateIdx = 0; growthRateIdx < growthRateFields.Length; growthRateIdx++) +{ +GrowthRate growthRate = new(); +growthRate.growthID = growthRateIdx; - for (int mIdx = 0; mIdx < monoBehaviours.Count; mIdx++) - { - EvScript evScript = new(); - evScript.mName = Encoding.Default.GetString(monoBehaviours[mIdx].children[3].value.value.asString); +//Parse exp requirement +growthRate.expRequirements = new(); +for (int level = 0; level < growthRateFields[growthRateIdx].children[0].children[0].childrenCount; level++) + growthRate.expRequirements.Add(growthRateFields[growthRateIdx].children[0].children[0].children[level].value.value.asUInt32); - //Parse Scripts - evScript.scripts = new(); - AssetTypeValueField[] scriptFields = monoBehaviours[mIdx].children[4].children[0].children; - for (int scriptIdx = 0; scriptIdx < scriptFields.Length; scriptIdx++) - { - Script script = new(); - script.evLabel = Encoding.Default.GetString(scriptFields[scriptIdx].children[0].value.value.asString); - - //Parse Commands - script.commands = new(); - AssetTypeValueField[] commandFields = scriptFields[scriptIdx].children[1].children[0].children; - for (int commandIdx = 0; commandIdx < commandFields.Length; commandIdx++) - { - Command command = new(); - - //Check for commands without data, because those exist for some reason. - if (commandFields[commandIdx].children[0].children[0].children.Length == 0) - { - command.cmdType = -1; - script.commands.Add(command); - continue; - } - command.cmdType = commandFields[commandIdx].children[0].children[0].children[0].children[1].value.value.asInt32; - - //Parse Arguments - command.args = new(); - AssetTypeValueField[] argumentFields = commandFields[commandIdx].children[0].children[0].children; - for (int argIdx = 1; argIdx < argumentFields.Length; argIdx++) - { - Argument arg = new(); - arg.argType = argumentFields[argIdx].children[0].value.value.asInt32; - arg.data = argumentFields[argIdx].children[1].value.value.asInt32; - if (arg.argType == 1) - arg.data = ConvertToFloat((int)arg.data); - - command.args.Add(arg); - } - - script.commands.Add(command); - } - - evScript.scripts.Add(script); - } +gameData.growthRates.Add(growthRate); +} +} - //Parse StrLists - evScript.strList = new(); - AssetTypeValueField[] stringFields = monoBehaviours[mIdx].children[5].children[0].children; - for (int stringIdx = 0; stringIdx < stringFields.Length; stringIdx++) - evScript.strList.Add(Encoding.Default.GetString(stringFields[stringIdx].value.value.asString)); +/// +/// Overwrites GlobalData with parsed MessageFiles. +/// +public static async Task ParseAllMessageFiles() +{ +gameData.messageFileSets = new MessageFileSet[10]; +for (int i = 0; i < gameData.messageFileSets.Length; i++) +{ +gameData.messageFileSets[i] = new(); +gameData.messageFileSets[i].messageFiles = new(); +} +gameData.messageFileSets[0].langID = 1; +gameData.messageFileSets[1].langID = 1; +gameData.messageFileSets[2].langID = 2; +gameData.messageFileSets[3].langID = 3; +gameData.messageFileSets[4].langID = 4; +gameData.messageFileSets[5].langID = 5; +gameData.messageFileSets[6].langID = 7; +gameData.messageFileSets[7].langID = 8; +gameData.messageFileSets[8].langID = 9; +gameData.messageFileSets[9].langID = 10; + +List monoBehaviours = await monoBehaviourCollection[PathEnum.CommonMsbt]; +monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.English]); +monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.French]); +monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.German]); +monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.Italian]); +monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.Jpn]); +monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.JpnKanji]); +monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.Korean]); +monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.SimpChinese]); +monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.Spanish]); +monoBehaviours.AddRange(await monoBehaviourCollection[PathEnum.TradChinese]); + +for (int mIdx = 0; mIdx < monoBehaviours.Count; mIdx++) +{ +MessageFile messageFile = new(); +messageFile.mName = Encoding.Default.GetString(monoBehaviours[mIdx].children[3].value.value.asString); +messageFile.langID = monoBehaviours[mIdx].children[5].value.value.asInt32; +messageFile.isKanji = monoBehaviours[mIdx].children[7].value.value.asUInt8; + +//Parse LabelData +messageFile.labelDatas = new(); +AssetTypeValueField[] labelDataFields = monoBehaviours[mIdx].children[8].children[0].children; +for (int labelDataIdx = 0; labelDataIdx < labelDataFields.Length; labelDataIdx++) +{ + LabelData labelData = new(); + labelData.labelIndex = labelDataFields[labelDataIdx].children[0].value.value.asInt32; + labelData.arrayIndex = labelDataFields[labelDataIdx].children[1].value.value.asInt32; + labelData.labelName = Encoding.Default.GetString(labelDataFields[labelDataIdx].children[2].value.value.asString); + labelData.styleIndex = labelDataFields[labelDataIdx].children[3].children[0].value.value.asInt32; + labelData.colorIndex = labelDataFields[labelDataIdx].children[3].children[1].value.value.asInt32; + labelData.fontSize = labelDataFields[labelDataIdx].children[3].children[2].value.value.asInt32; + labelData.maxWidth = labelDataFields[labelDataIdx].children[3].children[3].value.value.asInt32; + labelData.controlID = labelDataFields[labelDataIdx].children[3].children[4].value.value.asInt32; + + // Parse Attribute Array + AssetTypeValueField[] attrArray = labelDataFields[labelDataIdx].children[4].children[0].children; + labelData.attributeValues = new(); + for (int attrIdx = 0; attrIdx < attrArray.Length; attrIdx++) + { + labelData.attributeValues.Add(attrArray[attrIdx].value.value.asInt32); + } - gameData.evScripts.Add(evScript); - } + // Parse TagData + AssetTypeValueField[] tagDataFields = labelDataFields[labelDataIdx].children[5].children[0].children; + labelData.tagDatas = new(); + for (int tagDataIdx = 0; tagDataIdx < tagDataFields.Length; tagDataIdx++) + { + TagData tagData = new(); + tagData.tagIndex = tagDataFields[tagDataIdx].children[0].value.value.asInt32; + tagData.groupID = tagDataFields[tagDataIdx].children[1].value.value.asInt32; + tagData.tagID = tagDataFields[tagDataIdx].children[2].value.value.asInt32; + tagData.tagPatternID = tagDataFields[tagDataIdx].children[3].value.value.asInt32; + tagData.forceArticle = tagDataFields[tagDataIdx].children[4].value.value.asInt32; + tagData.tagParameter = tagDataFields[tagDataIdx].children[5].value.value.asInt32; + tagData.tagWordArray = new(); + foreach (AssetTypeValueField tagWordField in tagDataFields[tagDataIdx].children[6][0].children) + { + tagData.tagWordArray.Add(tagWordField.GetValue().AsString()); } - /// - /// Interprets bytes of an int32 as a float. - /// - private static float ConvertToFloat(int n) + tagData.forceGrmID = tagDataFields[tagDataIdx].children[7].value.value.asInt32; + + labelData.tagDatas.Add(tagData); + } + + //Parse WordData + labelData.wordDatas = new(); + AssetTypeValueField[] wordDataFields = labelDataFields[labelDataIdx].children[6].children[0].children; + for (int wordDataIdx = 0; wordDataIdx < wordDataFields.Length; wordDataIdx++) + { + WordData wordData = new(); + wordData.patternID = wordDataFields[wordDataIdx].children[0].value.value.asInt32; + wordData.eventID = wordDataFields[wordDataIdx].children[1].value.value.asInt32; + wordData.tagIndex = wordDataFields[wordDataIdx].children[2].value.value.asInt32; + wordData.tagValue = wordDataFields[wordDataIdx].children[3].value.value.asFloat; + wordData.str = Encoding.UTF8.GetString(wordDataFields[wordDataIdx].children[4].value.value.asString); + wordData.strWidth = wordDataFields[wordDataIdx].children[5].value.value.asFloat; + + labelData.wordDatas.Add(wordData); + } + + messageFile.labelDatas.Add(labelData); +} + +switch (messageFile.langID) +{ + case 1: + if (messageFile.isKanji == 0) + gameData.messageFileSets[0].messageFiles.Add(messageFile); + else + gameData.messageFileSets[1].messageFiles.Add(messageFile); + break; + case 2: + gameData.messageFileSets[2].messageFiles.Add(messageFile); + break; + case 3: + gameData.messageFileSets[3].messageFiles.Add(messageFile); + break; + case 4: + gameData.messageFileSets[4].messageFiles.Add(messageFile); + break; + case 5: + gameData.messageFileSets[5].messageFiles.Add(messageFile); + break; + case 7: + gameData.messageFileSets[6].messageFiles.Add(messageFile); + break; + case 8: + gameData.messageFileSets[7].messageFiles.Add(messageFile); + break; + case 9: + gameData.messageFileSets[8].messageFiles.Add(messageFile); + break; + case 10: + gameData.messageFileSets[9].messageFiles.Add(messageFile); + break; +} +} +} + +/// +/// Overwrites GlobalData with parsed EvScripts. +/// +private static async Task ParseEvScripts() +{ +gameData.evScripts = new(); +List monoBehaviours = (await monoBehaviourCollection[PathEnum.EvScript]).Where(m => m.children[4].GetName() == "Scripts").ToList(); + +for (int mIdx = 0; mIdx < monoBehaviours.Count; mIdx++) +{ +EvScript evScript = new(); +evScript.mName = Encoding.Default.GetString(monoBehaviours[mIdx].children[3].value.value.asString); + +//Parse Scripts +evScript.scripts = new(); +AssetTypeValueField[] scriptFields = monoBehaviours[mIdx].children[4].children[0].children; +for (int scriptIdx = 0; scriptIdx < scriptFields.Length; scriptIdx++) +{ + Script script = new(); + script.evLabel = Encoding.Default.GetString(scriptFields[scriptIdx].children[0].value.value.asString); + + //Parse Commands + script.commands = new(); + AssetTypeValueField[] commandFields = scriptFields[scriptIdx].children[1].children[0].children; + for (int commandIdx = 0; commandIdx < commandFields.Length; commandIdx++) + { + Command command = new(); + + //Check for commands without data, because those exist for some reason. + if (commandFields[commandIdx].children[0].children[0].children.Length == 0) { - return BitConverter.ToSingle(BitConverter.GetBytes(n)); + command.cmdType = -1; + script.commands.Add(command); + continue; } + command.cmdType = commandFields[commandIdx].children[0].children[0].children[0].children[1].value.value.asInt32; - /// - /// Overwrites GlobalData with a parsed WwiseData. - /// - private static void ParseAudioData() + //Parse Arguments + command.args = new(); + AssetTypeValueField[] argumentFields = commandFields[commandIdx].children[0].children[0].children; + for (int argIdx = 1; argIdx < argumentFields.Length; argIdx++) { - gameData.audioData = new(); - gameData.audioData.Parse(fileManager.GetDelphisMainBuffer()); + Argument arg = new(); + arg.argType = argumentFields[argIdx].children[0].value.value.asInt32; + arg.data = argumentFields[argIdx].children[1].value.value.asInt32; + if (arg.argType == 1) + arg.data = ConvertToFloat((int)arg.data); + + command.args.Add(arg); } - /// - /// Overwrites GlobalData with a parsed GlobalMetadata. - /// - private static void ParseGlobalMetadata() - { - gameData.globalMetadata = new(); - byte[] buffer = fileManager.GetGlobalMetadataBuffer(); - gameData.globalMetadata.buffer = buffer; + script.commands.Add(command); + } - gameData.globalMetadata.stringOffset = BitConverter.ToUInt32(buffer, 0x18); + evScript.scripts.Add(script); +} - gameData.globalMetadata.defaultValuePtrOffset = BitConverter.ToUInt32(buffer, 0x40); - gameData.globalMetadata.defaultValuePtrSecSize = BitConverter.ToUInt32(buffer, 0x44); - uint defaultValuePtrSize = 0xC; - uint defaultValuePtrCount = gameData.globalMetadata.defaultValuePtrSecSize / defaultValuePtrSize; +//Parse StrLists +evScript.strList = new(); +AssetTypeValueField[] stringFields = monoBehaviours[mIdx].children[5].children[0].children; +for (int stringIdx = 0; stringIdx < stringFields.Length; stringIdx++) + evScript.strList.Add(Encoding.Default.GetString(stringFields[stringIdx].value.value.asString)); - gameData.globalMetadata.defaultValueOffset = BitConverter.ToUInt32(buffer, 0x48); - gameData.globalMetadata.defaultValueSecSize = BitConverter.ToUInt32(buffer, 0x4C); +gameData.evScripts.Add(evScript); +} +} - gameData.globalMetadata.fieldOffset = BitConverter.ToUInt32(buffer, 0x60); - uint fieldSize = 0xC; +/// +/// Interprets bytes of an int32 as a float. +/// +private static float ConvertToFloat(int n) +{ +return BitConverter.ToSingle(BitConverter.GetBytes(n)); +} - gameData.globalMetadata.typeOffset = BitConverter.ToUInt32(buffer, 0xA0); - uint typeSize = 0x5C; +/// +/// Overwrites GlobalData with a parsed WwiseData. +/// +private static void ParseAudioData() +{ +gameData.audioData = new(); +gameData.audioData.Parse(fileManager.GetDelphisMainBuffer()); +} - gameData.globalMetadata.imageOffset = BitConverter.ToUInt32(buffer, 0xA8); - gameData.globalMetadata.imageSecSize = BitConverter.ToUInt32(buffer, 0xAC); - uint imageSize = 0x28; - uint imageCount = gameData.globalMetadata.imageSecSize / imageSize; +/// +/// Overwrites GlobalData with a parsed GlobalMetadata. +/// +private static void ParseGlobalMetadata() +{ +gameData.globalMetadata = new(); +byte[] buffer = fileManager.GetGlobalMetadataBuffer(); +gameData.globalMetadata.buffer = buffer; - gameData.globalMetadata.defaultValueDic = new(); - uint defaultValuePtrOffset = gameData.globalMetadata.defaultValuePtrOffset; - for (int defaultValuePtrIdx = 0; defaultValuePtrIdx < defaultValuePtrCount; defaultValuePtrIdx++) - { - FieldDefaultValue fdv = new(); - fdv.offset = gameData.globalMetadata.defaultValueOffset + BitConverter.ToUInt32(buffer, (int)defaultValuePtrOffset + 8); - long nextOffset = gameData.globalMetadata.defaultValueOffset + gameData.globalMetadata.defaultValueSecSize; - if (defaultValuePtrIdx < defaultValuePtrCount - 1) - nextOffset = gameData.globalMetadata.defaultValueOffset + BitConverter.ToUInt32(buffer, (int)defaultValuePtrOffset + 20); - fdv.length = (int)(nextOffset - fdv.offset); - uint fieldIdx = BitConverter.ToUInt32(buffer, (int)defaultValuePtrOffset + 0); - - gameData.globalMetadata.defaultValueDic[fieldIdx] = fdv; - defaultValuePtrOffset += defaultValuePtrSize; - } +gameData.globalMetadata.stringOffset = BitConverter.ToUInt32(buffer, 0x18); - gameData.globalMetadata.images = new(); - uint imageOffset = gameData.globalMetadata.imageOffset; - for (int imageIdx = 0; imageIdx < imageCount; imageIdx++) - { - ImageDefinition id = new(); - uint imageNameIdx = BitConverter.ToUInt32(buffer, (int)imageOffset + 0); - id.name = ReadNullTerminatedString(buffer, gameData.globalMetadata.stringOffset + imageNameIdx); - id.typeStart = BitConverter.ToUInt32(buffer, (int)imageOffset + 8); - id.typeCount = BitConverter.ToUInt32(buffer, (int)imageOffset + 12); - - id.types = new(); - uint typeOffset = gameData.globalMetadata.typeOffset + id.typeStart * typeSize; - for (uint typeIdx = id.typeStart; typeIdx < id.typeStart + id.typeCount; typeIdx++) - { - TypeDefinition td = new(); - uint typeNameIdx = BitConverter.ToUInt32(buffer, (int)typeOffset + 0); - uint namespaceNameIdx = BitConverter.ToUInt32(buffer, (int)typeOffset + 4); - td.name = ReadNullTerminatedString(buffer, gameData.globalMetadata.stringOffset + namespaceNameIdx); - td.name += td.name.Length > 0 ? "." : ""; - td.name += ReadNullTerminatedString(buffer, gameData.globalMetadata.stringOffset + typeNameIdx); - td.fieldStart = BitConverter.ToInt32(buffer, (int)typeOffset + 36); - td.fieldCount = BitConverter.ToUInt16(buffer, (int)typeOffset + 72); - - td.fields = new(); - uint fieldOffset = (uint)(gameData.globalMetadata.fieldOffset + td.fieldStart * fieldSize); - for (uint fieldIdx = (uint)td.fieldStart; fieldIdx < td.fieldStart + td.fieldCount; fieldIdx++) - { - FieldDefinition fd = new(); - uint fieldNameIdx = BitConverter.ToUInt32(buffer, (int)fieldOffset + 0); - fd.name = ReadNullTerminatedString(buffer, gameData.globalMetadata.stringOffset + fieldNameIdx); - if (gameData.globalMetadata.defaultValueDic.TryGetValue(fieldIdx, out FieldDefaultValue fdv)) - fd.defautValue = fdv; - - td.fields.Add(fd); - fieldOffset += fieldSize; - } - - id.types.Add(td); - typeOffset += typeSize; - } +gameData.globalMetadata.defaultValuePtrOffset = BitConverter.ToUInt32(buffer, 0x40); +gameData.globalMetadata.defaultValuePtrSecSize = BitConverter.ToUInt32(buffer, 0x44); +uint defaultValuePtrSize = 0xC; +uint defaultValuePtrCount = gameData.globalMetadata.defaultValuePtrSecSize / defaultValuePtrSize; - gameData.globalMetadata.images.Add(id); - imageOffset += imageSize; - } +gameData.globalMetadata.defaultValueOffset = BitConverter.ToUInt32(buffer, 0x48); +gameData.globalMetadata.defaultValueSecSize = BitConverter.ToUInt32(buffer, 0x4C); - string[] typeArrayNames = new string[] - { - "A3758C06C7FB42A47D220A11FBA532C6E8C62A77", - "4B289ECFF3C0F0970CFBB23E3106E05803CB0010", - "B9D3FD531E1A63CC167C4B98C0EC93F0249D9944", - "347E5A9763B5C5AD3094AEC4B91A98983001E87D", - "C089A0863406C198B5654996536BAC473C816234", - "BCEEC8610D8506C3EDAC1C28CED532E5E2D8AD32", - "A6F987666C679A4472D8CD64F600B501D2241486", - "ACBC28AD33161A13959E63783CBFC94EB7FB2D90", - "0459498E9764395D87F7F43BE89CCE657C669BFC", - "C4215116A59F8DBC29910FA47BFBC6A82702816F", - "AEDBD0B97A96E5BDD926058406DB246904438044", - "DF2387E4B816070AE396698F2BD7359657EADE81", - "64FFED43123BBC9517F387412947F1C700527EB4", - "B5D988D1CB442CF60C021541BF2DC2A008819FD4", - "D64329EA3A838F1B4186746A734070A5DFDA4983", - "37DF3221C4030AC4E0EB9DD64616D020BB628CC1", - "B2DD1970DDE852F750899708154090300541F4DE", - "F774719D6A36449B152496136177E900605C9778" - }; +gameData.globalMetadata.fieldOffset = BitConverter.ToUInt32(buffer, 0x60); +uint fieldSize = 0xC; - TypeDefinition privateImplementationDetails = gameData.globalMetadata.images - .Where(i => i.name == "Assembly-CSharp.dll").SelectMany(i => i.types) - .First(t => t.name == ""); +gameData.globalMetadata.typeOffset = BitConverter.ToUInt32(buffer, 0xA0); +uint typeSize = 0x5C; - gameData.globalMetadata.typeMatchupOffsets = typeArrayNames - .Select(s => privateImplementationDetails.fields.First(f => f.name == s).defautValue.offset).ToArray(); - } +gameData.globalMetadata.imageOffset = BitConverter.ToUInt32(buffer, 0xA8); +gameData.globalMetadata.imageSecSize = BitConverter.ToUInt32(buffer, 0xAC); +uint imageSize = 0x28; +uint imageCount = gameData.globalMetadata.imageSecSize / imageSize; - /// - /// Returns the null terminated UTF8 string starting at the specified offset. - /// - private static string ReadNullTerminatedString(byte[] buffer, long offset) - { - long endOffset = offset; - while (buffer[endOffset] != 0) - endOffset++; - return Encoding.UTF8.GetString(buffer, (int)offset, (int)(endOffset - offset)); - } +gameData.globalMetadata.defaultValueDic = new(); +uint defaultValuePtrOffset = gameData.globalMetadata.defaultValuePtrOffset; +for (int defaultValuePtrIdx = 0; defaultValuePtrIdx < defaultValuePtrCount; defaultValuePtrIdx++) +{ +FieldDefaultValue fdv = new(); +fdv.offset = gameData.globalMetadata.defaultValueOffset + BitConverter.ToUInt32(buffer, (int)defaultValuePtrOffset + 8); +long nextOffset = gameData.globalMetadata.defaultValueOffset + gameData.globalMetadata.defaultValueSecSize; +if (defaultValuePtrIdx < defaultValuePtrCount - 1) + nextOffset = gameData.globalMetadata.defaultValueOffset + BitConverter.ToUInt32(buffer, (int)defaultValuePtrOffset + 20); +fdv.length = (int)(nextOffset - fdv.offset); +uint fieldIdx = BitConverter.ToUInt32(buffer, (int)defaultValuePtrOffset + 0); + +gameData.globalMetadata.defaultValueDic[fieldIdx] = fdv; +defaultValuePtrOffset += defaultValuePtrSize; +} - /// - /// Overwrites GlobalData with a parsed AssetBundleDownloadManifest. - /// - private static void ParseDprBin() - { - AssetBundleDownloadManifest abdm = fileManager.GetDprBin(); - if (abdm != null) - gameData.dprBin = abdm; - } +gameData.globalMetadata.images = new(); +uint imageOffset = gameData.globalMetadata.imageOffset; +for (int imageIdx = 0; imageIdx < imageCount; imageIdx++) +{ +ImageDefinition id = new(); +uint imageNameIdx = BitConverter.ToUInt32(buffer, (int)imageOffset + 0); +id.name = ReadNullTerminatedString(buffer, gameData.globalMetadata.stringOffset + imageNameIdx); +id.typeStart = BitConverter.ToUInt32(buffer, (int)imageOffset + 8); +id.typeCount = BitConverter.ToUInt32(buffer, (int)imageOffset + 12); + +id.types = new(); +uint typeOffset = gameData.globalMetadata.typeOffset + id.typeStart * typeSize; +for (uint typeIdx = id.typeStart; typeIdx < id.typeStart + id.typeCount; typeIdx++) +{ + TypeDefinition td = new(); + uint typeNameIdx = BitConverter.ToUInt32(buffer, (int)typeOffset + 0); + uint namespaceNameIdx = BitConverter.ToUInt32(buffer, (int)typeOffset + 4); + td.name = ReadNullTerminatedString(buffer, gameData.globalMetadata.stringOffset + namespaceNameIdx); + td.name += td.name.Length > 0 ? "." : ""; + td.name += ReadNullTerminatedString(buffer, gameData.globalMetadata.stringOffset + typeNameIdx); + td.fieldStart = BitConverter.ToInt32(buffer, (int)typeOffset + 36); + td.fieldCount = BitConverter.ToUInt16(buffer, (int)typeOffset + 72); + + td.fields = new(); + uint fieldOffset = (uint)(gameData.globalMetadata.fieldOffset + td.fieldStart * fieldSize); + for (uint fieldIdx = (uint)td.fieldStart; fieldIdx < td.fieldStart + td.fieldCount; fieldIdx++) + { + FieldDefinition fd = new(); + uint fieldNameIdx = BitConverter.ToUInt32(buffer, (int)fieldOffset + 0); + fd.name = ReadNullTerminatedString(buffer, gameData.globalMetadata.stringOffset + fieldNameIdx); + if (gameData.globalMetadata.defaultValueDic.TryGetValue(fieldIdx, out FieldDefaultValue fdv)) + fd.defautValue = fdv; + + td.fields.Add(fd); + fieldOffset += fieldSize; + } - /// - /// Commits all modified files and prepares them for exporting. - /// - public static void CommitChanges() - { - if (gameData.IsModified(GameDataSet.DataField.EvScripts)) - CommitEvScripts(); - if (gameData.IsModified(GameDataSet.DataField.PickupItems)) - CommitPickupItems(); - if (gameData.IsModified(GameDataSet.DataField.ShopTables)) - CommitShopTables(); - if (gameData.IsModified(GameDataSet.DataField.Trainers)) - CommitTrainers(); - if (gameData.IsModified(GameDataSet.DataField.EncounterTableFiles)) - CommitEncounterTables(); - if (gameData.IsModified(GameDataSet.DataField.MessageFileSets)) - CommitMessageFileSets(); - if (gameData.IsModified(GameDataSet.DataField.UgAreas) || - gameData.IsModified(GameDataSet.DataField.UgEncounterFiles) || - gameData.IsModified(GameDataSet.DataField.UgEncounterLevelSets) || - gameData.IsModified(GameDataSet.DataField.UgSpecialEncounters) || - gameData.IsModified(GameDataSet.DataField.UgPokemonData)) - CommitUgTables(); - if (gameData.IsModified(GameDataSet.DataField.PersonalEntries)) - CommitPokemon(); - if (gameData.IsModified(GameDataSet.DataField.Items)) - CommitItems(); - if (gameData.IsModified(GameDataSet.DataField.TMs)) - CommitTMs(); - if (gameData.IsModified(GameDataSet.DataField.Moves)) - CommitMoves(); - if (gameData.IsModified(GameDataSet.DataField.AudioData)) - CommitAudio(); - if (gameData.IsModified(GameDataSet.DataField.GlobalMetadata)) - CommitGlobalMetadata(); - if (gameData.IsModified(GameDataSet.DataField.UIMasterdatas)) - CommitUIMasterdatas(); - if (gameData.IsModified(GameDataSet.DataField.AddPersonalTable)) - CommitAddPersonalTable(); - if (gameData.IsModified(GameDataSet.DataField.MotionTimingData)) - CommitMotionTimingData(); - if (gameData.IsModified(GameDataSet.DataField.PokemonInfo)) - CommitPokemonInfo(); - if (gameData.IsModified(GameDataSet.DataField.ContestResultMotion)) - CommitContestMasterDatas(); - if (gameData.IsModified(GameDataSet.DataField.DprBin)) - CommitDprBin(); - } + id.types.Add(td); + typeOffset += typeSize; +} - private static void CommitContestMasterDatas() - { - gameData.contestResultMotion.Sort(); - AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.ContestMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "ContestConfigDatas"); +gameData.globalMetadata.images.Add(id); +imageOffset += imageSize; +} - AssetTypeValueField[] resultMotionSheet = monoBehaviour["ResultMotion"].children[0].children; - AssetTypeValueField resultMotionRef = resultMotionSheet[0]; - List newResultMotionSheet = new(); - for (int i = 0; i < gameData.contestResultMotion.Count; i++) - { - ResultMotion rm = gameData.contestResultMotion[i]; - AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(resultMotionRef.GetTemplateField()); - baseField["valid_flag"].GetValue().Set(rm.validFlag); - baseField["id"].GetValue().Set(rm.id); - baseField["monsNo"].GetValue().Set(rm.monsNo); - baseField["winAnim"].GetValue().Set(rm.winAnim); - baseField["loseAnim"].GetValue().Set(rm.loseAnim); - baseField["waitAnim"].GetValue().Set(rm.waitAnim); - baseField["duration"].GetValue().Set(rm.duration); - newResultMotionSheet.Add(baseField); - } - monoBehaviour["ResultMotion"].children[0].SetChildrenList(newResultMotionSheet.ToArray()); - fileManager.WriteMonoBehaviour(PathEnum.ContestMasterdatas, monoBehaviour); - } +string[] typeArrayNames = new string[] +{ +"A3758C06C7FB42A47D220A11FBA532C6E8C62A77", +"4B289ECFF3C0F0970CFBB23E3106E05803CB0010", +"B9D3FD531E1A63CC167C4B98C0EC93F0249D9944", +"347E5A9763B5C5AD3094AEC4B91A98983001E87D", +"C089A0863406C198B5654996536BAC473C816234", +"BCEEC8610D8506C3EDAC1C28CED532E5E2D8AD32", +"A6F987666C679A4472D8CD64F600B501D2241486", +"ACBC28AD33161A13959E63783CBFC94EB7FB2D90", +"0459498E9764395D87F7F43BE89CCE657C669BFC", +"C4215116A59F8DBC29910FA47BFBC6A82702816F", +"AEDBD0B97A96E5BDD926058406DB246904438044", +"DF2387E4B816070AE396698F2BD7359657EADE81", +"64FFED43123BBC9517F387412947F1C700527EB4", +"B5D988D1CB442CF60C021541BF2DC2A008819FD4", +"D64329EA3A838F1B4186746A734070A5DFDA4983", +"37DF3221C4030AC4E0EB9DD64616D020BB628CC1", +"B2DD1970DDE852F750899708154090300541F4DE", +"F774719D6A36449B152496136177E900605C9778" +}; + +TypeDefinition privateImplementationDetails = gameData.globalMetadata.images +.Where(i => i.name == "Assembly-CSharp.dll").SelectMany(i => i.types) +.First(t => t.name == ""); + +gameData.globalMetadata.typeMatchupOffsets = typeArrayNames +.Select(s => privateImplementationDetails.fields.First(f => f.name == s).defautValue.offset).ToArray(); +} - private static void CommitDprBin() - { - fileManager.CommitDprBin(); - } +/// +/// Returns the null terminated UTF8 string starting at the specified offset. +/// +private static string ReadNullTerminatedString(byte[] buffer, long offset) +{ +long endOffset = offset; +while (buffer[endOffset] != 0) +endOffset++; +return Encoding.UTF8.GetString(buffer, (int)offset, (int)(endOffset - offset)); +} - private static void CommitGlobalMetadata() - { - fileManager.CommitGlobalMetadata(); - } +/// +/// Overwrites GlobalData with a parsed AssetBundleDownloadManifest. +/// +private static void ParseDprBin() +{ +AssetBundleDownloadManifest abdm = fileManager.GetDprBin(); +if (abdm != null) +gameData.dprBin = abdm; +} - private static void CommitAudio() - { - gameData.audioSourceLog ??= fileManager.GetAudioSourceLog(); - gameData.audioSourceLog.Clear(); - Dictionary lookup = gameData.audioData.objectsByID; +/// +/// Commits all modified files and prepares them for exporting. +/// +public static void CommitChanges() +{ +if (gameData.IsModified(GameDataSet.DataField.EvScripts)) +CommitEvScripts(); +if (gameData.IsModified(GameDataSet.DataField.PickupItems)) +CommitPickupItems(); +if (gameData.IsModified(GameDataSet.DataField.ShopTables)) +CommitShopTables(); +if (gameData.IsModified(GameDataSet.DataField.Trainers)) +CommitTrainers(); +CommitBattleTowerPokemon(); +CommitBattleTowerTrainers(); +if (gameData.IsModified(GameDataSet.DataField.battleTowerTrainerPokemons)) +CommitBattleTowerPokemon(); +if (gameData.IsModified(GameDataSet.DataField.EncounterTableFiles)) +CommitEncounterTables(); +if (gameData.IsModified(GameDataSet.DataField.MessageFileSets)) +CommitMessageFileSets(); +if (gameData.IsModified(GameDataSet.DataField.UgAreas) || +gameData.IsModified(GameDataSet.DataField.UgEncounterFiles) || +gameData.IsModified(GameDataSet.DataField.UgEncounterLevelSets) || +gameData.IsModified(GameDataSet.DataField.UgSpecialEncounters) || +gameData.IsModified(GameDataSet.DataField.UgPokemonData)) +CommitUgTables(); +if (gameData.IsModified(GameDataSet.DataField.PersonalEntries)) +CommitPokemon(); +if (gameData.IsModified(GameDataSet.DataField.Items)) +CommitItems(); +if (gameData.IsModified(GameDataSet.DataField.TMs)) +CommitTMs(); +if (gameData.IsModified(GameDataSet.DataField.Moves)) +CommitMoves(); +if (gameData.IsModified(GameDataSet.DataField.AudioData)) +CommitAudio(); +if (gameData.IsModified(GameDataSet.DataField.GlobalMetadata)) +CommitGlobalMetadata(); +if (gameData.IsModified(GameDataSet.DataField.UIMasterdatas)) +CommitUIMasterdatas(); +if (gameData.IsModified(GameDataSet.DataField.AddPersonalTable)) +CommitAddPersonalTable(); +if (gameData.IsModified(GameDataSet.DataField.MotionTimingData)) +CommitMotionTimingData(); +if (gameData.IsModified(GameDataSet.DataField.PokemonInfo)) +CommitPokemonInfo(); +if (gameData.IsModified(GameDataSet.DataField.ContestResultMotion)) +CommitContestMasterDatas(); +if (gameData.IsModified(GameDataSet.DataField.DprBin)) +CommitDprBin(); +} - foreach (Pokemon p in gameData.personalEntries) - { - IEnumerable eventNames = PokemonInserter.GetWwiseEvents(p.dexID, p.formID).Take(5); - foreach (string eventName in eventNames) - { - uint eventID = FNV132(eventName); - if (!lookup.TryGetValue(eventID, out WwiseObject ewo)) continue; - Event e = (Event)ewo; - if (!lookup.TryGetValue(e.actionIDs.First(), out WwiseObject apwo)) continue; - ActionPlay ap = (ActionPlay)apwo; - if (!lookup.TryGetValue(ap.idExt, out WwiseObject swo)) continue; - if (swo is not Sound) continue; - Sound s = (Sound)swo; - gameData.audioSourceLog.Append(eventName + " → " + s.bankSourceData.mediaInformation.sourceID + "\n"); - } - } +private static void CommitContestMasterDatas() +{ +gameData.contestResultMotion.Sort(); +AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.ContestMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "ContestConfigDatas"); - fileManager.CommitAudio(); - } +AssetTypeValueField[] resultMotionSheet = monoBehaviour["ResultMotion"].children[0].children; +AssetTypeValueField resultMotionRef = resultMotionSheet[0]; +List newResultMotionSheet = new(); +for (int i = 0; i < gameData.contestResultMotion.Count; i++) +{ +ResultMotion rm = gameData.contestResultMotion[i]; +AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(resultMotionRef.GetTemplateField()); +baseField["valid_flag"].GetValue().Set(rm.validFlag); +baseField["id"].GetValue().Set(rm.id); +baseField["monsNo"].GetValue().Set(rm.monsNo); +baseField["winAnim"].GetValue().Set(rm.winAnim); +baseField["loseAnim"].GetValue().Set(rm.loseAnim); +baseField["waitAnim"].GetValue().Set(rm.waitAnim); +baseField["duration"].GetValue().Set(rm.duration); +newResultMotionSheet.Add(baseField); +} +monoBehaviour["ResultMotion"].children[0].SetChildrenList(newResultMotionSheet.ToArray()); +fileManager.WriteMonoBehaviour(PathEnum.ContestMasterdatas, monoBehaviour); +} - private static void CommitMoves() - { - AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.PersonalMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "WazaTable"); - AssetTypeValueField animationData = fileManager.GetMonoBehaviours(PathEnum.BattleMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "BattleDataTable"); - AssetTypeValueField textData = fileManager.GetMonoBehaviours(PathEnum.English).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "english_ss_wazaname"); - - AssetTypeValueField[] moveFields = monoBehaviour.children[4].children[0].children; - AssetTypeValueField[] animationFields = animationData.children[8].children[0].children; - AssetTypeValueField[] textFields = textData.children[8].children[0].children; - for (int moveID = 0; moveID < moveFields.Length; moveID++) - { - Move move = gameData.moves[moveID]; - moveFields[moveID].children[0].GetValue().Set(move.moveID); - moveFields[moveID].children[1].GetValue().Set(move.isValid); - moveFields[moveID].children[2].GetValue().Set(move.typingID); - moveFields[moveID].children[3].GetValue().Set(move.category); - moveFields[moveID].children[4].GetValue().Set(move.damageCategoryID); - moveFields[moveID].children[5].GetValue().Set(move.power); - moveFields[moveID].children[6].GetValue().Set(move.hitPer); - moveFields[moveID].children[7].GetValue().Set(move.basePP); - moveFields[moveID].children[8].GetValue().Set(move.priority); - moveFields[moveID].children[9].GetValue().Set(move.hitCountMax); - moveFields[moveID].children[10].GetValue().Set(move.hitCountMin); - moveFields[moveID].children[11].GetValue().Set(move.sickID); - moveFields[moveID].children[12].GetValue().Set(move.sickPer); - moveFields[moveID].children[13].GetValue().Set(move.sickCont); - moveFields[moveID].children[14].GetValue().Set(move.sickTurnMin); - moveFields[moveID].children[15].GetValue().Set(move.sickTurnMax); - moveFields[moveID].children[16].GetValue().Set(move.criticalRank); - moveFields[moveID].children[17].GetValue().Set(move.shrinkPer); - moveFields[moveID].children[18].GetValue().Set(move.aiSeqNo); - moveFields[moveID].children[19].GetValue().Set(move.damageRecoverRatio); - moveFields[moveID].children[20].GetValue().Set(move.hpRecoverRatio); - moveFields[moveID].children[21].GetValue().Set(move.target); - moveFields[moveID].children[22].GetValue().Set(move.rankEffType1); - moveFields[moveID].children[23].GetValue().Set(move.rankEffType2); - moveFields[moveID].children[24].GetValue().Set(move.rankEffType3); - moveFields[moveID].children[25].GetValue().Set(move.rankEffValue1); - moveFields[moveID].children[26].GetValue().Set(move.rankEffValue2); - moveFields[moveID].children[27].GetValue().Set(move.rankEffValue3); - moveFields[moveID].children[28].GetValue().Set(move.rankEffPer1); - moveFields[moveID].children[29].GetValue().Set(move.rankEffPer2); - moveFields[moveID].children[30].GetValue().Set(move.rankEffPer3); - moveFields[moveID].children[31].GetValue().Set(move.flags); - moveFields[moveID].children[32].GetValue().Set(move.contestWazaNo); - animationFields[moveID].children[1].GetValue().Set(move.cmdSeqName); - animationFields[moveID].children[2].GetValue().Set(move.cmdSeqNameLegend); - animationFields[moveID].children[3].GetValue().Set(move.notShortenTurnType0); - animationFields[moveID].children[4].GetValue().Set(move.notShortenTurnType1); - animationFields[moveID].children[5].GetValue().Set(move.turnType1); - animationFields[moveID].children[6].GetValue().Set(move.turnType2); - animationFields[moveID].children[7].GetValue().Set(move.turnType3); - animationFields[moveID].children[8].GetValue().Set(move.turnType4); - } +private static void CommitDprBin() +{ +fileManager.CommitDprBin(); +} - fileManager.WriteMonoBehaviour(PathEnum.PersonalMasterdatas, monoBehaviour); - fileManager.WriteMonoBehaviour(PathEnum.BattleMasterdatas, animationData); - } +private static void CommitGlobalMetadata() +{ +fileManager.CommitGlobalMetadata(); +} - /// - /// Updates loaded bundle with TMs. - /// - private static void CommitTMs() - { - AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.PersonalMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "ItemTable"); - AssetTypeValueField textData = fileManager.GetMonoBehaviours(PathEnum.English).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "english_ss_itemname"); +private static void CommitAudio() +{ +gameData.audioSourceLog ??= fileManager.GetAudioSourceLog(); +gameData.audioSourceLog.Clear(); +Dictionary lookup = gameData.audioData.objectsByID; - AssetTypeValueField[] tmFields = monoBehaviour.children[5].children[0].children; - AssetTypeValueField[] textFields = textData.children[8].children[0].children; - for (int tmID = 0; tmID < tmFields.Length; tmID++) - { - TM tm = gameData.tms[tmID]; - tmFields[tmID].children[0].GetValue().Set(tm.itemID); - tmFields[tmID].children[1].GetValue().Set(tm.machineNo); - tmFields[tmID].children[2].GetValue().Set(tm.moveID); - } +foreach (Pokemon p in gameData.personalEntries) +{ +IEnumerable eventNames = PokemonInserter.GetWwiseEvents(p.dexID, p.formID).Take(5); +foreach (string eventName in eventNames) +{ + uint eventID = FNV132(eventName); + if (!lookup.TryGetValue(eventID, out WwiseObject ewo)) continue; + Event e = (Event)ewo; + if (!lookup.TryGetValue(e.actionIDs.First(), out WwiseObject apwo)) continue; + ActionPlay ap = (ActionPlay)apwo; + if (!lookup.TryGetValue(ap.idExt, out WwiseObject swo)) continue; + if (swo is not Sound) continue; + Sound s = (Sound)swo; + gameData.audioSourceLog.Append(eventName + " → " + s.bankSourceData.mediaInformation.sourceID + "\n"); +} +} - fileManager.WriteMonoBehaviour(PathEnum.PersonalMasterdatas, monoBehaviour); - } +fileManager.CommitAudio(); +} - /// - /// Updates loaded bundle with Items. - /// - private static void CommitItems() - { - AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.PersonalMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "ItemTable"); - AssetTypeValueField textData = fileManager.GetMonoBehaviours(PathEnum.English).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "english_ss_itemname"); +private static void CommitMoves() +{ +AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.PersonalMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "WazaTable"); +AssetTypeValueField animationData = fileManager.GetMonoBehaviours(PathEnum.BattleMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "BattleDataTable"); +AssetTypeValueField textData = fileManager.GetMonoBehaviours(PathEnum.English).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "english_ss_wazaname"); + +AssetTypeValueField[] moveFields = monoBehaviour.children[4].children[0].children; +AssetTypeValueField[] animationFields = animationData.children[8].children[0].children; +AssetTypeValueField[] textFields = textData.children[8].children[0].children; +for (int moveID = 0; moveID < moveFields.Length; moveID++) +{ +Move move = gameData.moves[moveID]; +moveFields[moveID].children[0].GetValue().Set(move.moveID); +moveFields[moveID].children[1].GetValue().Set(move.isValid); +moveFields[moveID].children[2].GetValue().Set(move.typingID); +moveFields[moveID].children[3].GetValue().Set(move.category); +moveFields[moveID].children[4].GetValue().Set(move.damageCategoryID); +moveFields[moveID].children[5].GetValue().Set(move.power); +moveFields[moveID].children[6].GetValue().Set(move.hitPer); +moveFields[moveID].children[7].GetValue().Set(move.basePP); +moveFields[moveID].children[8].GetValue().Set(move.priority); +moveFields[moveID].children[9].GetValue().Set(move.hitCountMax); +moveFields[moveID].children[10].GetValue().Set(move.hitCountMin); +moveFields[moveID].children[11].GetValue().Set(move.sickID); +moveFields[moveID].children[12].GetValue().Set(move.sickPer); +moveFields[moveID].children[13].GetValue().Set(move.sickCont); +moveFields[moveID].children[14].GetValue().Set(move.sickTurnMin); +moveFields[moveID].children[15].GetValue().Set(move.sickTurnMax); +moveFields[moveID].children[16].GetValue().Set(move.criticalRank); +moveFields[moveID].children[17].GetValue().Set(move.shrinkPer); +moveFields[moveID].children[18].GetValue().Set(move.aiSeqNo); +moveFields[moveID].children[19].GetValue().Set(move.damageRecoverRatio); +moveFields[moveID].children[20].GetValue().Set(move.hpRecoverRatio); +moveFields[moveID].children[21].GetValue().Set(move.target); +moveFields[moveID].children[22].GetValue().Set(move.rankEffType1); +moveFields[moveID].children[23].GetValue().Set(move.rankEffType2); +moveFields[moveID].children[24].GetValue().Set(move.rankEffType3); +moveFields[moveID].children[25].GetValue().Set(move.rankEffValue1); +moveFields[moveID].children[26].GetValue().Set(move.rankEffValue2); +moveFields[moveID].children[27].GetValue().Set(move.rankEffValue3); +moveFields[moveID].children[28].GetValue().Set(move.rankEffPer1); +moveFields[moveID].children[29].GetValue().Set(move.rankEffPer2); +moveFields[moveID].children[30].GetValue().Set(move.rankEffPer3); +moveFields[moveID].children[31].GetValue().Set(move.flags); +moveFields[moveID].children[32].GetValue().Set(move.contestWazaNo); +animationFields[moveID].children[1].GetValue().Set(move.cmdSeqName); +animationFields[moveID].children[2].GetValue().Set(move.cmdSeqNameLegend); +animationFields[moveID].children[3].GetValue().Set(move.notShortenTurnType0); +animationFields[moveID].children[4].GetValue().Set(move.notShortenTurnType1); +animationFields[moveID].children[5].GetValue().Set(move.turnType1); +animationFields[moveID].children[6].GetValue().Set(move.turnType2); +animationFields[moveID].children[7].GetValue().Set(move.turnType3); +animationFields[moveID].children[8].GetValue().Set(move.turnType4); +} - AssetTypeValueField[] itemFields = monoBehaviour.children[4].children[0].children; - AssetTypeValueField[] textFields = textData.children[8].children[0].children; - for (int itemIdx = 0; itemIdx < itemFields.Length; itemIdx++) - { - Item item = gameData.items[itemIdx]; - itemFields[itemIdx].children[0].GetValue().Set(item.itemID); - itemFields[itemIdx].children[1].GetValue().Set(item.type); - itemFields[itemIdx].children[2].GetValue().Set(item.iconID); - itemFields[itemIdx].children[3].GetValue().Set(item.price); - itemFields[itemIdx].children[4].GetValue().Set(item.bpPrice); - itemFields[itemIdx].children[7].GetValue().Set(item.nageAtc); - itemFields[itemIdx].children[8].GetValue().Set(item.sizenAtc); - itemFields[itemIdx].children[9].GetValue().Set(item.sizenType); - itemFields[itemIdx].children[10].GetValue().Set(item.tuibamuEff); - itemFields[itemIdx].children[11].GetValue().Set(item.sort); - itemFields[itemIdx].children[12].GetValue().Set(item.group); - itemFields[itemIdx].children[13].GetValue().Set(item.groupID); - itemFields[itemIdx].children[14].GetValue().Set(item.fldPocket); - itemFields[itemIdx].children[15].GetValue().Set(item.fieldFunc); - itemFields[itemIdx].children[16].GetValue().Set(item.battleFunc); - itemFields[itemIdx].children[18].GetValue().Set(item.criticalRanks); - itemFields[itemIdx].children[19].GetValue().Set(item.atkStages); - itemFields[itemIdx].children[20].GetValue().Set(item.defStages); - itemFields[itemIdx].children[21].GetValue().Set(item.spdStages); - itemFields[itemIdx].children[22].GetValue().Set(item.accStages); - itemFields[itemIdx].children[23].GetValue().Set(item.spAtkStages); - itemFields[itemIdx].children[24].GetValue().Set(item.spDefStages); - itemFields[itemIdx].children[25].GetValue().Set(item.ppRestoreAmount); - itemFields[itemIdx].children[26].GetValue().Set(item.hpEvIncrease); - itemFields[itemIdx].children[27].GetValue().Set(item.atkEvIncrease); - itemFields[itemIdx].children[28].GetValue().Set(item.defEvIncrease); - itemFields[itemIdx].children[29].GetValue().Set(item.spdEvIncrease); - itemFields[itemIdx].children[30].GetValue().Set(item.spAtkEvIncrease); - itemFields[itemIdx].children[31].GetValue().Set(item.spDefEvIncrease); - itemFields[itemIdx].children[32].GetValue().Set(item.friendshipIncrease1); - itemFields[itemIdx].children[33].GetValue().Set(item.friendshipIncrease2); - itemFields[itemIdx].children[34].GetValue().Set(item.friendshipIncrease3); - itemFields[itemIdx].children[35].GetValue().Set(item.hpRestoreAmount); - itemFields[itemIdx].children[36].GetValue().Set(item.flags0); - } +fileManager.WriteMonoBehaviour(PathEnum.PersonalMasterdatas, monoBehaviour); +fileManager.WriteMonoBehaviour(PathEnum.BattleMasterdatas, animationData); +} - fileManager.WriteMonoBehaviour(PathEnum.PersonalMasterdatas, monoBehaviour); - } - private static void CommitPokemonInfo() - { - gameData.pokemonInfos.Sort(); +/// +/// Updates loaded bundle with TMs. +/// +private static void CommitTMs() +{ +AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.PersonalMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "ItemTable"); +AssetTypeValueField textData = fileManager.GetMonoBehaviours(PathEnum.English).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "english_ss_itemname"); - List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.DprMasterdatas); - AssetTypeValueField pokemonInfo = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "PokemonInfo"); +AssetTypeValueField[] tmFields = monoBehaviour.children[5].children[0].children; +AssetTypeValueField[] textFields = textData.children[8].children[0].children; +for (int tmID = 0; tmID < tmFields.Length; tmID++) +{ +TM tm = gameData.tms[tmID]; +tmFields[tmID].children[0].GetValue().Set(tm.itemID); +tmFields[tmID].children[1].GetValue().Set(tm.machineNo); +tmFields[tmID].children[2].GetValue().Set(tm.moveID); +} - AssetTypeValueField[] PokemonInfoCatalog = pokemonInfo["Catalog"].children[0].children; - AssetTypeValueField catalogRef = PokemonInfoCatalog[0]; +fileManager.WriteMonoBehaviour(PathEnum.PersonalMasterdatas, monoBehaviour); +} - AssetTypeValueField[] PokemonInfoTrearuki = null; - AssetTypeValueField trearukiRef = null; - if (pokemonInfo["Trearuki"].children != null) - { - PokemonInfoTrearuki = pokemonInfo["Trearuki"].children[0].children; - trearukiRef = PokemonInfoTrearuki[0]; - } +/// +/// Updates loaded bundle with Items. +/// +private static void CommitItems() +{ +AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.PersonalMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "ItemTable"); +AssetTypeValueField textData = fileManager.GetMonoBehaviours(PathEnum.English).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "english_ss_itemname"); - List newCatalogs = new(); - List newTrearukis = new(); - foreach (Masterdatas.PokemonInfoCatalog pokemonInfoCatalog in gameData.pokemonInfos) - { - AssetTypeValueField catalogBaseField = ValueBuilder.DefaultValueFieldFromTemplate(catalogRef.GetTemplateField()); - AssetTypeValueField trearukiBaseField = null; - if (trearukiRef != null) - trearukiBaseField = ValueBuilder.DefaultValueFieldFromTemplate(trearukiRef.GetTemplateField()); - Masterdatas.Trearuki t = pokemonInfoCatalog.trearuki; - - catalogBaseField["UniqueID"].GetValue().Set(pokemonInfoCatalog.UniqueID); - catalogBaseField["No"].GetValue().Set(pokemonInfoCatalog.No); - catalogBaseField["SinnohNo"].GetValue().Set(pokemonInfoCatalog.SinnohNo); - catalogBaseField["MonsNo"].GetValue().Set(pokemonInfoCatalog.MonsNo); - catalogBaseField["FormNo"].GetValue().Set(pokemonInfoCatalog.FormNo); - catalogBaseField["Sex"].GetValue().Set(pokemonInfoCatalog.Sex); - catalogBaseField["Rare"].GetValue().Set(pokemonInfoCatalog.Rare); - catalogBaseField["AssetBundleName"].GetValue().Set(pokemonInfoCatalog.AssetBundleName); - catalogBaseField["BattleScale"].GetValue().Set(pokemonInfoCatalog.BattleScale); - catalogBaseField["ContestScale"].GetValue().Set(pokemonInfoCatalog.ContestScale); - catalogBaseField["ContestSize"].GetValue().Set(pokemonInfoCatalog.ContestSize); - catalogBaseField["FieldScale"].GetValue().Set(pokemonInfoCatalog.FieldScale); - catalogBaseField["FieldChikaScale"].GetValue().Set(pokemonInfoCatalog.FieldChikaScale); - catalogBaseField["StatueScale"].GetValue().Set(pokemonInfoCatalog.StatueScale); - catalogBaseField["FieldWalkingScale"].GetValue().Set(pokemonInfoCatalog.FieldWalkingScale); - catalogBaseField["FieldFureaiScale"].GetValue().Set(pokemonInfoCatalog.FieldFureaiScale); - catalogBaseField["MenuScale"].GetValue().Set(pokemonInfoCatalog.MenuScale); - catalogBaseField["ModelMotion"].GetValue().Set(pokemonInfoCatalog.ModelMotion); - catalogBaseField["ModelOffset"].children[0].GetValue().Set(pokemonInfoCatalog.ModelOffset.X); - catalogBaseField["ModelOffset"].children[1].GetValue().Set(pokemonInfoCatalog.ModelOffset.Y); - catalogBaseField["ModelOffset"].children[2].GetValue().Set(pokemonInfoCatalog.ModelOffset.Z); - catalogBaseField["ModelRotationAngle"].children[0].GetValue().Set(pokemonInfoCatalog.ModelRotationAngle.X); - catalogBaseField["ModelRotationAngle"].children[1].GetValue().Set(pokemonInfoCatalog.ModelRotationAngle.Y); - catalogBaseField["ModelRotationAngle"].children[2].GetValue().Set(pokemonInfoCatalog.ModelRotationAngle.Z); - catalogBaseField["DistributionScale"].GetValue().Set(pokemonInfoCatalog.DistributionScale); - catalogBaseField["DistributionModelMotion"].GetValue().Set(pokemonInfoCatalog.DistributionModelMotion); - catalogBaseField["DistributionModelOffset"].children[0].GetValue().Set(pokemonInfoCatalog.DistributionModelOffset.X); - catalogBaseField["DistributionModelOffset"].children[1].GetValue().Set(pokemonInfoCatalog.DistributionModelOffset.Y); - catalogBaseField["DistributionModelOffset"].children[2].GetValue().Set(pokemonInfoCatalog.DistributionModelOffset.Z); - catalogBaseField["DistributionModelRotationAngle"].children[0].GetValue().Set(pokemonInfoCatalog.DistributionModelRotationAngle.X); - catalogBaseField["DistributionModelRotationAngle"].children[1].GetValue().Set(pokemonInfoCatalog.DistributionModelRotationAngle.Y); - catalogBaseField["DistributionModelRotationAngle"].children[2].GetValue().Set(pokemonInfoCatalog.DistributionModelRotationAngle.Z); - catalogBaseField["VoiceScale"].GetValue().Set(pokemonInfoCatalog.VoiceScale); - catalogBaseField["VoiceModelMotion"].GetValue().Set(pokemonInfoCatalog.VoiceModelMotion); - catalogBaseField["VoiceModelOffset"].children[0].GetValue().Set(pokemonInfoCatalog.VoiceModelOffset.X); - catalogBaseField["VoiceModelOffset"].children[1].GetValue().Set(pokemonInfoCatalog.VoiceModelOffset.Y); - catalogBaseField["VoiceModelOffset"].children[2].GetValue().Set(pokemonInfoCatalog.VoiceModelOffset.Z); - catalogBaseField["VoiceModelRotationAngle"].children[0].GetValue().Set(pokemonInfoCatalog.VoiceModelRotationAngle.X); - catalogBaseField["VoiceModelRotationAngle"].children[1].GetValue().Set(pokemonInfoCatalog.VoiceModelRotationAngle.Y); - catalogBaseField["VoiceModelRotationAngle"].children[2].GetValue().Set(pokemonInfoCatalog.VoiceModelRotationAngle.Z); - catalogBaseField["CenterPointOffset"].children[0].GetValue().Set(pokemonInfoCatalog.CenterPointOffset.X); - catalogBaseField["CenterPointOffset"].children[1].GetValue().Set(pokemonInfoCatalog.CenterPointOffset.Y); - catalogBaseField["CenterPointOffset"].children[2].GetValue().Set(pokemonInfoCatalog.CenterPointOffset.Z); - catalogBaseField["RotationLimitAngle"].children[0].GetValue().Set(pokemonInfoCatalog.RotationLimitAngle.X); - catalogBaseField["RotationLimitAngle"].children[1].GetValue().Set(pokemonInfoCatalog.RotationLimitAngle.Y); - catalogBaseField["StatusScale"].GetValue().Set(pokemonInfoCatalog.StatusScale); - catalogBaseField["StatusModelMotion"].GetValue().Set(pokemonInfoCatalog.StatusModelMotion); - catalogBaseField["StatusModelOffset"].children[0].GetValue().Set(pokemonInfoCatalog.StatusModelOffset.X); - catalogBaseField["StatusModelOffset"].children[1].GetValue().Set(pokemonInfoCatalog.StatusModelOffset.Y); - catalogBaseField["StatusModelOffset"].children[2].GetValue().Set(pokemonInfoCatalog.StatusModelOffset.Z); - catalogBaseField["StatusModelRotationAngle"].children[0].GetValue().Set(pokemonInfoCatalog.StatusModelRotationAngle.X); - catalogBaseField["StatusModelRotationAngle"].children[1].GetValue().Set(pokemonInfoCatalog.StatusModelRotationAngle.Y); - catalogBaseField["StatusModelRotationAngle"].children[2].GetValue().Set(pokemonInfoCatalog.StatusModelRotationAngle.Z); - catalogBaseField["BoxScale"].GetValue().Set(pokemonInfoCatalog.BoxScale); - catalogBaseField["BoxModelMotion"].GetValue().Set(pokemonInfoCatalog.BoxModelMotion); - catalogBaseField["BoxModelOffset"].children[0].GetValue().Set(pokemonInfoCatalog.BoxModelOffset.X); - catalogBaseField["BoxModelOffset"].children[1].GetValue().Set(pokemonInfoCatalog.BoxModelOffset.Y); - catalogBaseField["BoxModelOffset"].children[2].GetValue().Set(pokemonInfoCatalog.BoxModelOffset.Z); - catalogBaseField["BoxModelRotationAngle"].children[0].GetValue().Set(pokemonInfoCatalog.BoxModelRotationAngle.X); - catalogBaseField["BoxModelRotationAngle"].children[1].GetValue().Set(pokemonInfoCatalog.BoxModelRotationAngle.Y); - catalogBaseField["BoxModelRotationAngle"].children[2].GetValue().Set(pokemonInfoCatalog.BoxModelRotationAngle.Z); - catalogBaseField["CompareScale"].GetValue().Set(pokemonInfoCatalog.CompareScale); - catalogBaseField["CompareModelMotion"].GetValue().Set(pokemonInfoCatalog.CompareModelMotion); - catalogBaseField["CompareModelOffset"].children[0].GetValue().Set(pokemonInfoCatalog.CompareModelOffset.X); - catalogBaseField["CompareModelOffset"].children[1].GetValue().Set(pokemonInfoCatalog.CompareModelOffset.Y); - catalogBaseField["CompareModelOffset"].children[2].GetValue().Set(pokemonInfoCatalog.CompareModelOffset.Z); - catalogBaseField["CompareModelRotationAngle"].children[0].GetValue().Set(pokemonInfoCatalog.CompareModelRotationAngle.X); - catalogBaseField["CompareModelRotationAngle"].children[1].GetValue().Set(pokemonInfoCatalog.CompareModelRotationAngle.Y); - catalogBaseField["CompareModelRotationAngle"].children[2].GetValue().Set(pokemonInfoCatalog.CompareModelRotationAngle.Z); - catalogBaseField["BrakeStart"].GetValue().Set(pokemonInfoCatalog.BrakeStart); - catalogBaseField["BrakeEnd"].GetValue().Set(pokemonInfoCatalog.BrakeEnd); - catalogBaseField["WalkSpeed"].GetValue().Set(pokemonInfoCatalog.WalkSpeed); - catalogBaseField["RunSpeed"].GetValue().Set(pokemonInfoCatalog.RunSpeed); - catalogBaseField["WalkStart"].GetValue().Set(pokemonInfoCatalog.WalkStart); - catalogBaseField["RunStart"].GetValue().Set(pokemonInfoCatalog.RunStart); - catalogBaseField["BodySize"].GetValue().Set(pokemonInfoCatalog.BodySize); - catalogBaseField["AppearLimit"].GetValue().Set(pokemonInfoCatalog.AppearLimit); - catalogBaseField["MoveType"].GetValue().Set(pokemonInfoCatalog.MoveType); - catalogBaseField["GroundEffect"].GetValue().Set(pokemonInfoCatalog.GroundEffect); - catalogBaseField["Waitmoving"].GetValue().Set(pokemonInfoCatalog.Waitmoving); - catalogBaseField["BattleAjustHeight"].GetValue().Set(pokemonInfoCatalog.BattleAjustHeight); - - if (trearukiBaseField != null) - { - trearukiBaseField["Enable"].GetValue().Set(t.enable ? 1 : 0); - - List newAnimeIndices = new(); - for (int i = 0; i < t.animeIndex.Count; i++) - { - AssetTypeValueField animeIndexBaseField = ValueBuilder.DefaultValueFieldFromTemplate(trearukiRef["AnimeIndex"].children[0].children[0].GetTemplateField()); - animeIndexBaseField.GetValue().Set(t.animeIndex[i]); - newAnimeIndices.Add(animeIndexBaseField); - } - trearukiBaseField["AnimeIndex"].children[0].SetChildrenList(newAnimeIndices.ToArray()); - - List newAnimeDurations = new(); - for (int i = 0; i < t.animeDuration.Count; i++) - { - AssetTypeValueField animeDurationBaseField = ValueBuilder.DefaultValueFieldFromTemplate(trearukiRef["AnimeDuration"].children[0].children[0].GetTemplateField()); - animeDurationBaseField.GetValue().Set(t.animeDuration[i]); - newAnimeDurations.Add(animeDurationBaseField); - } - trearukiBaseField["AnimeDuration"].children[0].SetChildrenList(newAnimeDurations.ToArray()); - - newTrearukis.Add(trearukiBaseField); - } - newCatalogs.Add(catalogBaseField); - } +AssetTypeValueField[] itemFields = monoBehaviour.children[4].children[0].children; +AssetTypeValueField[] textFields = textData.children[8].children[0].children; +for (int itemIdx = 0; itemIdx < itemFields.Length; itemIdx++) +{ +Item item = gameData.items[itemIdx]; +itemFields[itemIdx].children[0].GetValue().Set(item.itemID); +itemFields[itemIdx].children[1].GetValue().Set(item.type); +itemFields[itemIdx].children[2].GetValue().Set(item.iconID); +itemFields[itemIdx].children[3].GetValue().Set(item.price); +itemFields[itemIdx].children[4].GetValue().Set(item.bpPrice); +itemFields[itemIdx].children[7].GetValue().Set(item.nageAtc); +itemFields[itemIdx].children[8].GetValue().Set(item.sizenAtc); +itemFields[itemIdx].children[9].GetValue().Set(item.sizenType); +itemFields[itemIdx].children[10].GetValue().Set(item.tuibamuEff); +itemFields[itemIdx].children[11].GetValue().Set(item.sort); +itemFields[itemIdx].children[12].GetValue().Set(item.group); +itemFields[itemIdx].children[13].GetValue().Set(item.groupID); +itemFields[itemIdx].children[14].GetValue().Set(item.fldPocket); +itemFields[itemIdx].children[15].GetValue().Set(item.fieldFunc); +itemFields[itemIdx].children[16].GetValue().Set(item.battleFunc); +itemFields[itemIdx].children[18].GetValue().Set(item.criticalRanks); +itemFields[itemIdx].children[19].GetValue().Set(item.atkStages); +itemFields[itemIdx].children[20].GetValue().Set(item.defStages); +itemFields[itemIdx].children[21].GetValue().Set(item.spdStages); +itemFields[itemIdx].children[22].GetValue().Set(item.accStages); +itemFields[itemIdx].children[23].GetValue().Set(item.spAtkStages); +itemFields[itemIdx].children[24].GetValue().Set(item.spDefStages); +itemFields[itemIdx].children[25].GetValue().Set(item.ppRestoreAmount); +itemFields[itemIdx].children[26].GetValue().Set(item.hpEvIncrease); +itemFields[itemIdx].children[27].GetValue().Set(item.atkEvIncrease); +itemFields[itemIdx].children[28].GetValue().Set(item.defEvIncrease); +itemFields[itemIdx].children[29].GetValue().Set(item.spdEvIncrease); +itemFields[itemIdx].children[30].GetValue().Set(item.spAtkEvIncrease); +itemFields[itemIdx].children[31].GetValue().Set(item.spDefEvIncrease); +itemFields[itemIdx].children[32].GetValue().Set(item.friendshipIncrease1); +itemFields[itemIdx].children[33].GetValue().Set(item.friendshipIncrease2); +itemFields[itemIdx].children[34].GetValue().Set(item.friendshipIncrease3); +itemFields[itemIdx].children[35].GetValue().Set(item.hpRestoreAmount); +itemFields[itemIdx].children[36].GetValue().Set(item.flags0); +} - pokemonInfo["Catalog"].children[0].SetChildrenList(newCatalogs.ToArray()); - pokemonInfo["Trearuki"].children?[0].SetChildrenList(newTrearukis.ToArray()); +fileManager.WriteMonoBehaviour(PathEnum.PersonalMasterdatas, monoBehaviour); +} +private static void CommitPokemonInfo() +{ +gameData.pokemonInfos.Sort(); - fileManager.WriteMonoBehaviour(PathEnum.DprMasterdatas, pokemonInfo); - } +List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.DprMasterdatas); +AssetTypeValueField pokemonInfo = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "PokemonInfo"); - private static void CommitMotionTimingData() - { - gameData.motionTimingData.Sort(); +AssetTypeValueField[] PokemonInfoCatalog = pokemonInfo["Catalog"].children[0].children; +AssetTypeValueField catalogRef = PokemonInfoCatalog[0]; - List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.BattleMasterdatas); - AssetTypeValueField BattleDataTable = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "BattleDataTable"); +AssetTypeValueField[] PokemonInfoTrearuki = null; +AssetTypeValueField trearukiRef = null; +if (pokemonInfo["Trearuki"].children != null) +{ +PokemonInfoTrearuki = pokemonInfo["Trearuki"].children[0].children; +trearukiRef = PokemonInfoTrearuki[0]; +} - AssetTypeValueField[] MotionTimingData = BattleDataTable["MotionTimingData"].children[0].children; - AssetTypeTemplateField templateField = new(); +List newCatalogs = new(); +List newTrearukis = new(); +foreach (Masterdatas.PokemonInfoCatalog pokemonInfoCatalog in gameData.pokemonInfos) +{ +AssetTypeValueField catalogBaseField = ValueBuilder.DefaultValueFieldFromTemplate(catalogRef.GetTemplateField()); +AssetTypeValueField trearukiBaseField = null; +if (trearukiRef != null) + trearukiBaseField = ValueBuilder.DefaultValueFieldFromTemplate(trearukiRef.GetTemplateField()); +Masterdatas.Trearuki t = pokemonInfoCatalog.trearuki; + +catalogBaseField["UniqueID"].GetValue().Set(pokemonInfoCatalog.UniqueID); +catalogBaseField["No"].GetValue().Set(pokemonInfoCatalog.No); +catalogBaseField["SinnohNo"].GetValue().Set(pokemonInfoCatalog.SinnohNo); +catalogBaseField["MonsNo"].GetValue().Set(pokemonInfoCatalog.MonsNo); +catalogBaseField["FormNo"].GetValue().Set(pokemonInfoCatalog.FormNo); +catalogBaseField["Sex"].GetValue().Set(pokemonInfoCatalog.Sex); +catalogBaseField["Rare"].GetValue().Set(pokemonInfoCatalog.Rare); +catalogBaseField["AssetBundleName"].GetValue().Set(pokemonInfoCatalog.AssetBundleName); +catalogBaseField["BattleScale"].GetValue().Set(pokemonInfoCatalog.BattleScale); +catalogBaseField["ContestScale"].GetValue().Set(pokemonInfoCatalog.ContestScale); +catalogBaseField["ContestSize"].GetValue().Set(pokemonInfoCatalog.ContestSize); +catalogBaseField["FieldScale"].GetValue().Set(pokemonInfoCatalog.FieldScale); +catalogBaseField["FieldChikaScale"].GetValue().Set(pokemonInfoCatalog.FieldChikaScale); +catalogBaseField["StatueScale"].GetValue().Set(pokemonInfoCatalog.StatueScale); +catalogBaseField["FieldWalkingScale"].GetValue().Set(pokemonInfoCatalog.FieldWalkingScale); +catalogBaseField["FieldFureaiScale"].GetValue().Set(pokemonInfoCatalog.FieldFureaiScale); +catalogBaseField["MenuScale"].GetValue().Set(pokemonInfoCatalog.MenuScale); +catalogBaseField["ModelMotion"].GetValue().Set(pokemonInfoCatalog.ModelMotion); +catalogBaseField["ModelOffset"].children[0].GetValue().Set(pokemonInfoCatalog.ModelOffset.X); +catalogBaseField["ModelOffset"].children[1].GetValue().Set(pokemonInfoCatalog.ModelOffset.Y); +catalogBaseField["ModelOffset"].children[2].GetValue().Set(pokemonInfoCatalog.ModelOffset.Z); +catalogBaseField["ModelRotationAngle"].children[0].GetValue().Set(pokemonInfoCatalog.ModelRotationAngle.X); +catalogBaseField["ModelRotationAngle"].children[1].GetValue().Set(pokemonInfoCatalog.ModelRotationAngle.Y); +catalogBaseField["ModelRotationAngle"].children[2].GetValue().Set(pokemonInfoCatalog.ModelRotationAngle.Z); +catalogBaseField["DistributionScale"].GetValue().Set(pokemonInfoCatalog.DistributionScale); +catalogBaseField["DistributionModelMotion"].GetValue().Set(pokemonInfoCatalog.DistributionModelMotion); +catalogBaseField["DistributionModelOffset"].children[0].GetValue().Set(pokemonInfoCatalog.DistributionModelOffset.X); +catalogBaseField["DistributionModelOffset"].children[1].GetValue().Set(pokemonInfoCatalog.DistributionModelOffset.Y); +catalogBaseField["DistributionModelOffset"].children[2].GetValue().Set(pokemonInfoCatalog.DistributionModelOffset.Z); +catalogBaseField["DistributionModelRotationAngle"].children[0].GetValue().Set(pokemonInfoCatalog.DistributionModelRotationAngle.X); +catalogBaseField["DistributionModelRotationAngle"].children[1].GetValue().Set(pokemonInfoCatalog.DistributionModelRotationAngle.Y); +catalogBaseField["DistributionModelRotationAngle"].children[2].GetValue().Set(pokemonInfoCatalog.DistributionModelRotationAngle.Z); +catalogBaseField["VoiceScale"].GetValue().Set(pokemonInfoCatalog.VoiceScale); +catalogBaseField["VoiceModelMotion"].GetValue().Set(pokemonInfoCatalog.VoiceModelMotion); +catalogBaseField["VoiceModelOffset"].children[0].GetValue().Set(pokemonInfoCatalog.VoiceModelOffset.X); +catalogBaseField["VoiceModelOffset"].children[1].GetValue().Set(pokemonInfoCatalog.VoiceModelOffset.Y); +catalogBaseField["VoiceModelOffset"].children[2].GetValue().Set(pokemonInfoCatalog.VoiceModelOffset.Z); +catalogBaseField["VoiceModelRotationAngle"].children[0].GetValue().Set(pokemonInfoCatalog.VoiceModelRotationAngle.X); +catalogBaseField["VoiceModelRotationAngle"].children[1].GetValue().Set(pokemonInfoCatalog.VoiceModelRotationAngle.Y); +catalogBaseField["VoiceModelRotationAngle"].children[2].GetValue().Set(pokemonInfoCatalog.VoiceModelRotationAngle.Z); +catalogBaseField["CenterPointOffset"].children[0].GetValue().Set(pokemonInfoCatalog.CenterPointOffset.X); +catalogBaseField["CenterPointOffset"].children[1].GetValue().Set(pokemonInfoCatalog.CenterPointOffset.Y); +catalogBaseField["CenterPointOffset"].children[2].GetValue().Set(pokemonInfoCatalog.CenterPointOffset.Z); +catalogBaseField["RotationLimitAngle"].children[0].GetValue().Set(pokemonInfoCatalog.RotationLimitAngle.X); +catalogBaseField["RotationLimitAngle"].children[1].GetValue().Set(pokemonInfoCatalog.RotationLimitAngle.Y); +catalogBaseField["StatusScale"].GetValue().Set(pokemonInfoCatalog.StatusScale); +catalogBaseField["StatusModelMotion"].GetValue().Set(pokemonInfoCatalog.StatusModelMotion); +catalogBaseField["StatusModelOffset"].children[0].GetValue().Set(pokemonInfoCatalog.StatusModelOffset.X); +catalogBaseField["StatusModelOffset"].children[1].GetValue().Set(pokemonInfoCatalog.StatusModelOffset.Y); +catalogBaseField["StatusModelOffset"].children[2].GetValue().Set(pokemonInfoCatalog.StatusModelOffset.Z); +catalogBaseField["StatusModelRotationAngle"].children[0].GetValue().Set(pokemonInfoCatalog.StatusModelRotationAngle.X); +catalogBaseField["StatusModelRotationAngle"].children[1].GetValue().Set(pokemonInfoCatalog.StatusModelRotationAngle.Y); +catalogBaseField["StatusModelRotationAngle"].children[2].GetValue().Set(pokemonInfoCatalog.StatusModelRotationAngle.Z); +catalogBaseField["BoxScale"].GetValue().Set(pokemonInfoCatalog.BoxScale); +catalogBaseField["BoxModelMotion"].GetValue().Set(pokemonInfoCatalog.BoxModelMotion); +catalogBaseField["BoxModelOffset"].children[0].GetValue().Set(pokemonInfoCatalog.BoxModelOffset.X); +catalogBaseField["BoxModelOffset"].children[1].GetValue().Set(pokemonInfoCatalog.BoxModelOffset.Y); +catalogBaseField["BoxModelOffset"].children[2].GetValue().Set(pokemonInfoCatalog.BoxModelOffset.Z); +catalogBaseField["BoxModelRotationAngle"].children[0].GetValue().Set(pokemonInfoCatalog.BoxModelRotationAngle.X); +catalogBaseField["BoxModelRotationAngle"].children[1].GetValue().Set(pokemonInfoCatalog.BoxModelRotationAngle.Y); +catalogBaseField["BoxModelRotationAngle"].children[2].GetValue().Set(pokemonInfoCatalog.BoxModelRotationAngle.Z); +catalogBaseField["CompareScale"].GetValue().Set(pokemonInfoCatalog.CompareScale); +catalogBaseField["CompareModelMotion"].GetValue().Set(pokemonInfoCatalog.CompareModelMotion); +catalogBaseField["CompareModelOffset"].children[0].GetValue().Set(pokemonInfoCatalog.CompareModelOffset.X); +catalogBaseField["CompareModelOffset"].children[1].GetValue().Set(pokemonInfoCatalog.CompareModelOffset.Y); +catalogBaseField["CompareModelOffset"].children[2].GetValue().Set(pokemonInfoCatalog.CompareModelOffset.Z); +catalogBaseField["CompareModelRotationAngle"].children[0].GetValue().Set(pokemonInfoCatalog.CompareModelRotationAngle.X); +catalogBaseField["CompareModelRotationAngle"].children[1].GetValue().Set(pokemonInfoCatalog.CompareModelRotationAngle.Y); +catalogBaseField["CompareModelRotationAngle"].children[2].GetValue().Set(pokemonInfoCatalog.CompareModelRotationAngle.Z); +catalogBaseField["BrakeStart"].GetValue().Set(pokemonInfoCatalog.BrakeStart); +catalogBaseField["BrakeEnd"].GetValue().Set(pokemonInfoCatalog.BrakeEnd); +catalogBaseField["WalkSpeed"].GetValue().Set(pokemonInfoCatalog.WalkSpeed); +catalogBaseField["RunSpeed"].GetValue().Set(pokemonInfoCatalog.RunSpeed); +catalogBaseField["WalkStart"].GetValue().Set(pokemonInfoCatalog.WalkStart); +catalogBaseField["RunStart"].GetValue().Set(pokemonInfoCatalog.RunStart); +catalogBaseField["BodySize"].GetValue().Set(pokemonInfoCatalog.BodySize); +catalogBaseField["AppearLimit"].GetValue().Set(pokemonInfoCatalog.AppearLimit); +catalogBaseField["MoveType"].GetValue().Set(pokemonInfoCatalog.MoveType); +catalogBaseField["GroundEffect"].GetValue().Set(pokemonInfoCatalog.GroundEffect); +catalogBaseField["Waitmoving"].GetValue().Set(pokemonInfoCatalog.Waitmoving); +catalogBaseField["BattleAjustHeight"].GetValue().Set(pokemonInfoCatalog.BattleAjustHeight); + +if (trearukiBaseField != null) +{ + trearukiBaseField["Enable"].GetValue().Set(t.enable ? 1 : 0); - AssetTypeValueField motionTimingDataRef = MotionTimingData[0]; - List newMotionTimingData = new(); - foreach (BattleMasterdatas.MotionTimingData motionTimingData in gameData.motionTimingData) - { - AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(motionTimingDataRef.GetTemplateField()); - baseField["MonsNo"].GetValue().Set(motionTimingData.MonsNo); - baseField["FormNo"].GetValue().Set(motionTimingData.FormNo); - baseField["Sex"].GetValue().Set(motionTimingData.Sex); - baseField["Buturi01"].GetValue().Set(motionTimingData.Buturi01); - baseField["Buturi02"].GetValue().Set(motionTimingData.Buturi02); - baseField["Buturi03"].GetValue().Set(motionTimingData.Buturi03); - baseField["Tokusyu01"].GetValue().Set(motionTimingData.Tokusyu01); - baseField["Tokusyu02"].GetValue().Set(motionTimingData.Tokusyu02); - baseField["Tokusyu03"].GetValue().Set(motionTimingData.Tokusyu03); - baseField["BodyBlow"].GetValue().Set(motionTimingData.BodyBlow); - baseField["Punch"].GetValue().Set(motionTimingData.Punch); - baseField["Kick"].GetValue().Set(motionTimingData.Kick); - baseField["Tail"].GetValue().Set(motionTimingData.Tail); - baseField["Bite"].GetValue().Set(motionTimingData.Bite); - baseField["Peck"].GetValue().Set(motionTimingData.Peck); - baseField["Radial"].GetValue().Set(motionTimingData.Radial); - baseField["Cry"].GetValue().Set(motionTimingData.Cry); - baseField["Dust"].GetValue().Set(motionTimingData.Dust); - baseField["Shot"].GetValue().Set(motionTimingData.Shot); - baseField["Guard"].GetValue().Set(motionTimingData.Guard); - baseField["LandingFall"].GetValue().Set(motionTimingData.LandingFall); - baseField["LandingFallEase"].GetValue().Set(motionTimingData.LandingFallEase); - newMotionTimingData.Add(baseField); - } + List newAnimeIndices = new(); + for (int i = 0; i < t.animeIndex.Count; i++) + { + AssetTypeValueField animeIndexBaseField = ValueBuilder.DefaultValueFieldFromTemplate(trearukiRef["AnimeIndex"].children[0].children[0].GetTemplateField()); + animeIndexBaseField.GetValue().Set(t.animeIndex[i]); + newAnimeIndices.Add(animeIndexBaseField); + } + trearukiBaseField["AnimeIndex"].children[0].SetChildrenList(newAnimeIndices.ToArray()); - BattleDataTable["MotionTimingData"].children[0].SetChildrenList(newMotionTimingData.ToArray()); + List newAnimeDurations = new(); + for (int i = 0; i < t.animeDuration.Count; i++) + { + AssetTypeValueField animeDurationBaseField = ValueBuilder.DefaultValueFieldFromTemplate(trearukiRef["AnimeDuration"].children[0].children[0].GetTemplateField()); + animeDurationBaseField.GetValue().Set(t.animeDuration[i]); + newAnimeDurations.Add(animeDurationBaseField); + } + trearukiBaseField["AnimeDuration"].children[0].SetChildrenList(newAnimeDurations.ToArray()); - fileManager.WriteMonoBehaviour(PathEnum.BattleMasterdatas, BattleDataTable); - } - private static void CommitAddPersonalTable() - { - gameData.addPersonalTables.Sort(); + newTrearukis.Add(trearukiBaseField); +} +newCatalogs.Add(catalogBaseField); +} - List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.PersonalMasterdatas); - AssetTypeValueField AddPersonalTable = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "AddPersonalTable"); +pokemonInfo["Catalog"].children[0].SetChildrenList(newCatalogs.ToArray()); +pokemonInfo["Trearuki"].children?[0].SetChildrenList(newTrearukis.ToArray()); - AssetTypeValueField[] addPersonals = AddPersonalTable["AddPersonal"].children[0].children; +fileManager.WriteMonoBehaviour(PathEnum.DprMasterdatas, pokemonInfo); +} - AssetTypeValueField addPersonalRef = addPersonals[0]; +private static void CommitMotionTimingData() +{ +gameData.motionTimingData.Sort(); - List newAddPersonals = new(); - foreach (PersonalMasterdatas.AddPersonalTable addPersonal in gameData.addPersonalTables) - { - AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(addPersonalRef.GetTemplateField()); - baseField["valid_flag"].GetValue().Set(addPersonal.valid_flag ? 1 : 0); - baseField["monsno"].GetValue().Set(addPersonal.monsno); - baseField["formno"].GetValue().Set(addPersonal.formno); - baseField["isEnableSynchronize"].GetValue().Set(addPersonal.isEnableSynchronize); - baseField["escape"].GetValue().Set(addPersonal.escape); - baseField["isDisableReverce"].GetValue().Set(addPersonal.isDisableReverce); - newAddPersonals.Add(baseField); - } +List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.BattleMasterdatas); +AssetTypeValueField BattleDataTable = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "BattleDataTable"); - AddPersonalTable["AddPersonal"].children[0].SetChildrenList(newAddPersonals.ToArray()); +AssetTypeValueField[] MotionTimingData = BattleDataTable["MotionTimingData"].children[0].children; +AssetTypeTemplateField templateField = new(); - fileManager.WriteMonoBehaviour(PathEnum.PersonalMasterdatas, AddPersonalTable); - } +AssetTypeValueField motionTimingDataRef = MotionTimingData[0]; +List newMotionTimingData = new(); +foreach (BattleMasterdatas.MotionTimingData motionTimingData in gameData.motionTimingData) +{ +AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(motionTimingDataRef.GetTemplateField()); +baseField["MonsNo"].GetValue().Set(motionTimingData.MonsNo); +baseField["FormNo"].GetValue().Set(motionTimingData.FormNo); +baseField["Sex"].GetValue().Set(motionTimingData.Sex); +baseField["Buturi01"].GetValue().Set(motionTimingData.Buturi01); +baseField["Buturi02"].GetValue().Set(motionTimingData.Buturi02); +baseField["Buturi03"].GetValue().Set(motionTimingData.Buturi03); +baseField["Tokusyu01"].GetValue().Set(motionTimingData.Tokusyu01); +baseField["Tokusyu02"].GetValue().Set(motionTimingData.Tokusyu02); +baseField["Tokusyu03"].GetValue().Set(motionTimingData.Tokusyu03); +baseField["BodyBlow"].GetValue().Set(motionTimingData.BodyBlow); +baseField["Punch"].GetValue().Set(motionTimingData.Punch); +baseField["Kick"].GetValue().Set(motionTimingData.Kick); +baseField["Tail"].GetValue().Set(motionTimingData.Tail); +baseField["Bite"].GetValue().Set(motionTimingData.Bite); +baseField["Peck"].GetValue().Set(motionTimingData.Peck); +baseField["Radial"].GetValue().Set(motionTimingData.Radial); +baseField["Cry"].GetValue().Set(motionTimingData.Cry); +baseField["Dust"].GetValue().Set(motionTimingData.Dust); +baseField["Shot"].GetValue().Set(motionTimingData.Shot); +baseField["Guard"].GetValue().Set(motionTimingData.Guard); +baseField["LandingFall"].GetValue().Set(motionTimingData.LandingFall); +baseField["LandingFallEase"].GetValue().Set(motionTimingData.LandingFallEase); +newMotionTimingData.Add(baseField); +} - private static void CommitUIMasterdatas() - { - gameData.uiPokemonIcon.Sort(); - gameData.uiAshiatoIcon.Sort(); - gameData.uiPokemonVoice.Sort(); - gameData.uiZukanDisplay.Sort(); - gameData.uiZukanCompareHeights.Sort(); - gameData.uiSearchPokeIconSex.Sort(); - - List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.UIMasterdatas); - - AssetTypeValueField uiDatabase = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "UIDatabase"); - AssetTypeValueField distributionTable = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "DistributionTable"); - monoBehaviours = new() - { - uiDatabase, - distributionTable - }; +BattleDataTable["MotionTimingData"].children[0].SetChildrenList(newMotionTimingData.ToArray()); - // Pokemon Icon - AssetTypeValueField[] pokemonIcons = uiDatabase["PokemonIcon"].children[0].children; +fileManager.WriteMonoBehaviour(PathEnum.BattleMasterdatas, BattleDataTable); +} +private static void CommitAddPersonalTable() +{ +gameData.addPersonalTables.Sort(); - AssetTypeValueField pokemonIconRef = pokemonIcons[0]; - List newPokemonIcons = new(); - foreach (UIMasterdatas.PokemonIcon pokemonIcon in gameData.uiPokemonIcon) - { - AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(pokemonIconRef.GetTemplateField()); - baseField["UniqueID"].GetValue().Set(pokemonIcon.uniqueID); - baseField["AssetBundleName"].GetValue().Set(pokemonIcon.assetBundleName); - baseField["AssetName"].GetValue().Set(pokemonIcon.assetName); - baseField["AssetBundleNameLarge"].GetValue().Set(pokemonIcon.assetBundleNameLarge); - baseField["AssetNameLarge"].GetValue().Set(pokemonIcon.assetNameLarge); - baseField["AssetBundleNameDP"].GetValue().Set(pokemonIcon.assetBundleNameDP); - baseField["AssetNameDP"].GetValue().Set(pokemonIcon.assetNameDP); - baseField["HallofFameOffset"].children[0].GetValue().Set(pokemonIcon.hallofFameOffset.X); - baseField["HallofFameOffset"].children[1].GetValue().Set(pokemonIcon.hallofFameOffset.Y); - newPokemonIcons.Add(baseField); - } - uiDatabase["PokemonIcon"].children[0].SetChildrenList(newPokemonIcons.ToArray()); +List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.PersonalMasterdatas); +AssetTypeValueField AddPersonalTable = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "AddPersonalTable"); - // Ashiato Icon - AssetTypeValueField[] ashiatoIcons = uiDatabase["AshiatoIcon"].children[0].children; +AssetTypeValueField[] addPersonals = AddPersonalTable["AddPersonal"].children[0].children; - AssetTypeValueField ashiatoIconRef = ashiatoIcons[0]; - List newAshiatoIcons = new(); - foreach (UIMasterdatas.AshiatoIcon ashiatoIcon in gameData.uiAshiatoIcon) - { - AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(ashiatoIconRef.GetTemplateField()); - baseField["UniqueID"].GetValue().Set(ashiatoIcon.uniqueID); - baseField["SideIconAssetName"].GetValue().Set(ashiatoIcon.sideIconAssetName); - baseField["BothIconAssetName"].GetValue().Set(ashiatoIcon.bothIconAssetName); - newAshiatoIcons.Add(baseField); - } - uiDatabase["AshiatoIcon"].children[0].SetChildrenList(newAshiatoIcons.ToArray()); +AssetTypeValueField addPersonalRef = addPersonals[0]; +List newAddPersonals = new(); +foreach (PersonalMasterdatas.AddPersonalTable addPersonal in gameData.addPersonalTables) +{ +AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(addPersonalRef.GetTemplateField()); +baseField["valid_flag"].GetValue().Set(addPersonal.valid_flag ? 1 : 0); +baseField["monsno"].GetValue().Set(addPersonal.monsno); +baseField["formno"].GetValue().Set(addPersonal.formno); +baseField["isEnableSynchronize"].GetValue().Set(addPersonal.isEnableSynchronize); +baseField["escape"].GetValue().Set(addPersonal.escape); +baseField["isDisableReverce"].GetValue().Set(addPersonal.isDisableReverce); +newAddPersonals.Add(baseField); +} - // Pokemon Voice - AssetTypeValueField[] pokemonVoices = uiDatabase["PokemonVoice"].children[0].children; +AddPersonalTable["AddPersonal"].children[0].SetChildrenList(newAddPersonals.ToArray()); - AssetTypeValueField pokemonVoiceRef = pokemonVoices[0]; - List newPokemonVoices = new(); - foreach (UIMasterdatas.PokemonVoice pokemonVoice in gameData.uiPokemonVoice) - { - AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(pokemonVoiceRef.GetTemplateField()); - baseField["UniqueID"].GetValue().Set(pokemonVoice.uniqueID); - baseField["WwiseEvent"].GetValue().Set(pokemonVoice.wwiseEvent); - baseField["stopEventId"].GetValue().Set(pokemonVoice.stopEventId); - baseField["CenterPointOffset"].children[0].GetValue().Set(pokemonVoice.centerPointOffset.X); - baseField["CenterPointOffset"].children[1].GetValue().Set(pokemonVoice.centerPointOffset.Y); - baseField["CenterPointOffset"].children[2].GetValue().Set(pokemonVoice.centerPointOffset.Z); - baseField["RotationLimits"].GetValue().Set(pokemonVoice.rotationLimits); - baseField["RotationLimitAngle"].children[0].GetValue().Set(pokemonVoice.rotationLimitAngle.X); - baseField["RotationLimitAngle"].children[1].GetValue().Set(pokemonVoice.rotationLimitAngle.Y); - newPokemonVoices.Add(baseField); - } - uiDatabase["PokemonVoice"].children[0].SetChildrenList(newPokemonVoices.ToArray()); +fileManager.WriteMonoBehaviour(PathEnum.PersonalMasterdatas, AddPersonalTable); +} +private static void CommitUIMasterdatas() +{ +gameData.uiPokemonIcon.Sort(); +gameData.uiAshiatoIcon.Sort(); +gameData.uiPokemonVoice.Sort(); +gameData.uiZukanDisplay.Sort(); +gameData.uiZukanCompareHeights.Sort(); +gameData.uiSearchPokeIconSex.Sort(); + +List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.UIMasterdatas); + +AssetTypeValueField uiDatabase = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "UIDatabase"); +AssetTypeValueField distributionTable = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "DistributionTable"); +monoBehaviours = new() +{ +uiDatabase, +distributionTable +}; - // ZukanDisplay - AssetTypeValueField[] zukanDisplays = uiDatabase["ZukanDisplay"].children[0].children; +// Pokemon Icon +AssetTypeValueField[] pokemonIcons = uiDatabase["PokemonIcon"].children[0].children; - AssetTypeValueField zukanDisplayRef = zukanDisplays[0]; - List newZukanDisplays = new(); - foreach (UIMasterdatas.ZukanDisplay zukanDisplay in gameData.uiZukanDisplay) - { - AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(zukanDisplayRef.GetTemplateField()); - baseField["UniqueID"].GetValue().Set(zukanDisplay.uniqueID); - baseField["MoveLimit"].children[0].GetValue().Set(zukanDisplay.moveLimit.X); - baseField["MoveLimit"].children[1].GetValue().Set(zukanDisplay.moveLimit.Y); - baseField["MoveLimit"].children[2].GetValue().Set(zukanDisplay.moveLimit.Z); - baseField["ModelOffset"].children[0].GetValue().Set(zukanDisplay.modelOffset.X); - baseField["ModelOffset"].children[1].GetValue().Set(zukanDisplay.modelOffset.Y); - baseField["ModelOffset"].children[2].GetValue().Set(zukanDisplay.modelOffset.Z); - baseField["ModelRotationAngle"].children[0].GetValue().Set(zukanDisplay.modelRotationAngle.X); - baseField["ModelRotationAngle"].children[1].GetValue().Set(zukanDisplay.modelRotationAngle.Y); - newZukanDisplays.Add(baseField); - } - uiDatabase["ZukanDisplay"].children[0].SetChildrenList(newZukanDisplays.ToArray()); +AssetTypeValueField pokemonIconRef = pokemonIcons[0]; +List newPokemonIcons = new(); +foreach (UIMasterdatas.PokemonIcon pokemonIcon in gameData.uiPokemonIcon) +{ +AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(pokemonIconRef.GetTemplateField()); +baseField["UniqueID"].GetValue().Set(pokemonIcon.uniqueID); +baseField["AssetBundleName"].GetValue().Set(pokemonIcon.assetBundleName); +baseField["AssetName"].GetValue().Set(pokemonIcon.assetName); +baseField["AssetBundleNameLarge"].GetValue().Set(pokemonIcon.assetBundleNameLarge); +baseField["AssetNameLarge"].GetValue().Set(pokemonIcon.assetNameLarge); +baseField["AssetBundleNameDP"].GetValue().Set(pokemonIcon.assetBundleNameDP); +baseField["AssetNameDP"].GetValue().Set(pokemonIcon.assetNameDP); +baseField["HallofFameOffset"].children[0].GetValue().Set(pokemonIcon.hallofFameOffset.X); +baseField["HallofFameOffset"].children[1].GetValue().Set(pokemonIcon.hallofFameOffset.Y); +newPokemonIcons.Add(baseField); +} +uiDatabase["PokemonIcon"].children[0].SetChildrenList(newPokemonIcons.ToArray()); - // ZukanCompareHeight - AssetTypeValueField[] zukanCompareHeights = uiDatabase["ZukanCompareHeight"].children[0].children; +// Ashiato Icon +AssetTypeValueField[] ashiatoIcons = uiDatabase["AshiatoIcon"].children[0].children; - AssetTypeValueField zukanCompareHeightRef = zukanCompareHeights[0]; - List newZukanCompareHeights = new(); - foreach (UIMasterdatas.ZukanCompareHeight zukanCompareHeight in gameData.uiZukanCompareHeights) - { - AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(zukanCompareHeightRef.GetTemplateField()); - baseField["UniqueID"].GetValue().Set(zukanCompareHeight.uniqueID); - baseField["PlayerScaleFactor"].GetValue().Set(zukanCompareHeight.playerScaleFactor); - baseField["PlayerOffset"].children[0].GetValue().Set(zukanCompareHeight.playerOffset.X); - baseField["PlayerOffset"].children[1].GetValue().Set(zukanCompareHeight.playerOffset.Y); - baseField["PlayerOffset"].children[2].GetValue().Set(zukanCompareHeight.playerOffset.Z); - baseField["PlayerRotationAngle"].children[0].GetValue().Set(zukanCompareHeight.playerRotationAngle.X); - baseField["PlayerRotationAngle"].children[1].GetValue().Set(zukanCompareHeight.playerRotationAngle.Y); - newZukanCompareHeights.Add(baseField); - } - uiDatabase["ZukanCompareHeight"].children[0].SetChildrenList(newZukanCompareHeights.ToArray()); +AssetTypeValueField ashiatoIconRef = ashiatoIcons[0]; +List newAshiatoIcons = new(); +foreach (UIMasterdatas.AshiatoIcon ashiatoIcon in gameData.uiAshiatoIcon) +{ +AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(ashiatoIconRef.GetTemplateField()); +baseField["UniqueID"].GetValue().Set(ashiatoIcon.uniqueID); +baseField["SideIconAssetName"].GetValue().Set(ashiatoIcon.sideIconAssetName); +baseField["BothIconAssetName"].GetValue().Set(ashiatoIcon.bothIconAssetName); +newAshiatoIcons.Add(baseField); +} +uiDatabase["AshiatoIcon"].children[0].SetChildrenList(newAshiatoIcons.ToArray()); - // SearchPokeIconSex - AssetTypeValueField[] searchPokeIconSexes = uiDatabase["SearchPokeIconSex"].children[0].children; - AssetTypeValueField searchPokeIconSexRef = searchPokeIconSexes[0]; - List newSearchPokeIconSexes = new(); - foreach (UIMasterdatas.SearchPokeIconSex searchPokeIconSex in gameData.uiSearchPokeIconSex) - { - AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(searchPokeIconSexRef.GetTemplateField()); - baseField["MonsNo"].GetValue().Set(searchPokeIconSex.monsNo); - baseField["Sex"].GetValue().Set(searchPokeIconSex.sex); - newSearchPokeIconSexes.Add(baseField); - } - uiDatabase["SearchPokeIconSex"].children[0].SetChildrenList(newSearchPokeIconSexes.ToArray()); +// Pokemon Voice +AssetTypeValueField[] pokemonVoices = uiDatabase["PokemonVoice"].children[0].children; - // DistributionTable - CommitDistributionSheet(distributionTable["Diamond_FieldTable"].children[0], gameData.uiDistributionTable.diamondFieldTable); - CommitDistributionSheet(distributionTable["Diamond_DungeonTable"].children[0], gameData.uiDistributionTable.diamondDungeonTable); - CommitDistributionSheet(distributionTable["Pearl_FieldTable"].children[0], gameData.uiDistributionTable.pearlFieldTable); - CommitDistributionSheet(distributionTable["Pearl_DungeonTable"].children[0], gameData.uiDistributionTable.pearlDungeonTable); +AssetTypeValueField pokemonVoiceRef = pokemonVoices[0]; +List newPokemonVoices = new(); +foreach (UIMasterdatas.PokemonVoice pokemonVoice in gameData.uiPokemonVoice) +{ +AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(pokemonVoiceRef.GetTemplateField()); +baseField["UniqueID"].GetValue().Set(pokemonVoice.uniqueID); +baseField["WwiseEvent"].GetValue().Set(pokemonVoice.wwiseEvent); +baseField["stopEventId"].GetValue().Set(pokemonVoice.stopEventId); +baseField["CenterPointOffset"].children[0].GetValue().Set(pokemonVoice.centerPointOffset.X); +baseField["CenterPointOffset"].children[1].GetValue().Set(pokemonVoice.centerPointOffset.Y); +baseField["CenterPointOffset"].children[2].GetValue().Set(pokemonVoice.centerPointOffset.Z); +baseField["RotationLimits"].GetValue().Set(pokemonVoice.rotationLimits); +baseField["RotationLimitAngle"].children[0].GetValue().Set(pokemonVoice.rotationLimitAngle.X); +baseField["RotationLimitAngle"].children[1].GetValue().Set(pokemonVoice.rotationLimitAngle.Y); +newPokemonVoices.Add(baseField); +} +uiDatabase["PokemonVoice"].children[0].SetChildrenList(newPokemonVoices.ToArray()); - fileManager.WriteMonoBehaviours(PathEnum.UIMasterdatas, monoBehaviours.ToArray()); - } - private static void CommitDistributionSheet(AssetTypeValueField sheetATVF, List sheet) - { - AssetTypeValueField distributionEntryRef = sheetATVF.children[0]; - List newSheet = new(); - foreach (UIMasterdatas.DistributionEntry entry in sheet) - { - AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(distributionEntryRef.GetTemplateField()); - CommitDistributionCoord(baseField["BeforeMorning"], entry.beforeMorning, distributionEntryRef[0][0][0]); - CommitDistributionCoord(baseField["BeforeDaytime"], entry.beforeDaytime, distributionEntryRef[0][0][0]); - CommitDistributionCoord(baseField["BeforeNight"], entry.beforeNight, distributionEntryRef[0][0][0]); - CommitDistributionCoord(baseField["AfterMorning"], entry.afterMorning, distributionEntryRef[0][0][0]); - CommitDistributionCoord(baseField["AfterDaytime"], entry.afterDaytime, distributionEntryRef[0][0][0]); - CommitDistributionCoord(baseField["AfterNight"], entry.afterNight, distributionEntryRef[0][0][0]); - CommitDistributionCoord(baseField["Fishing"], entry.fishing, distributionEntryRef[0][0][0]); - CommitDistributionCoord(baseField["PokemonTraser"], entry.pokemonTraser, distributionEntryRef[0][0][0]); - CommitDistributionCoord(baseField["HoneyTree"], entry.honeyTree, distributionEntryRef[0][0][0]); - newSheet.Add(baseField); - } - sheetATVF.SetChildrenList(newSheet.ToArray()); - } +// ZukanDisplay +AssetTypeValueField[] zukanDisplays = uiDatabase["ZukanDisplay"].children[0].children; - private static void CommitDistributionCoord(AssetTypeValueField posATVF, int[] pos, AssetTypeValueField intRef) - { - List newInts = new(); - for (int i = 0; i < pos.Length; i++) - { - AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(intRef.GetTemplateField()); - baseField.GetValue().Set(pos[i]); - newInts.Add(baseField); - } - posATVF[0].SetChildrenList(newInts.ToArray()); - } +AssetTypeValueField zukanDisplayRef = zukanDisplays[0]; +List newZukanDisplays = new(); +foreach (UIMasterdatas.ZukanDisplay zukanDisplay in gameData.uiZukanDisplay) +{ +AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(zukanDisplayRef.GetTemplateField()); +baseField["UniqueID"].GetValue().Set(zukanDisplay.uniqueID); +baseField["MoveLimit"].children[0].GetValue().Set(zukanDisplay.moveLimit.X); +baseField["MoveLimit"].children[1].GetValue().Set(zukanDisplay.moveLimit.Y); +baseField["MoveLimit"].children[2].GetValue().Set(zukanDisplay.moveLimit.Z); +baseField["ModelOffset"].children[0].GetValue().Set(zukanDisplay.modelOffset.X); +baseField["ModelOffset"].children[1].GetValue().Set(zukanDisplay.modelOffset.Y); +baseField["ModelOffset"].children[2].GetValue().Set(zukanDisplay.modelOffset.Z); +baseField["ModelRotationAngle"].children[0].GetValue().Set(zukanDisplay.modelRotationAngle.X); +baseField["ModelRotationAngle"].children[1].GetValue().Set(zukanDisplay.modelRotationAngle.Y); +newZukanDisplays.Add(baseField); +} +uiDatabase["ZukanDisplay"].children[0].SetChildrenList(newZukanDisplays.ToArray()); - /// - /// Updates loaded bundle with Pokemon. - /// - private static void CommitPokemon() - { - List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.PersonalMasterdatas); +// ZukanCompareHeight +AssetTypeValueField[] zukanCompareHeights = uiDatabase["ZukanCompareHeight"].children[0].children; - AssetTypeValueField wazaOboeTable = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "WazaOboeTable"); - AssetTypeValueField tamagoWazaTable = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "TamagoWazaTable"); - AssetTypeValueField evolveTable = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "EvolveTable"); - AssetTypeValueField personalTable = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "PersonalTable"); - monoBehaviours = new() - { - wazaOboeTable, - tamagoWazaTable, - evolveTable, - personalTable - }; +AssetTypeValueField zukanCompareHeightRef = zukanCompareHeights[0]; +List newZukanCompareHeights = new(); +foreach (UIMasterdatas.ZukanCompareHeight zukanCompareHeight in gameData.uiZukanCompareHeights) +{ +AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(zukanCompareHeightRef.GetTemplateField()); +baseField["UniqueID"].GetValue().Set(zukanCompareHeight.uniqueID); +baseField["PlayerScaleFactor"].GetValue().Set(zukanCompareHeight.playerScaleFactor); +baseField["PlayerOffset"].children[0].GetValue().Set(zukanCompareHeight.playerOffset.X); +baseField["PlayerOffset"].children[1].GetValue().Set(zukanCompareHeight.playerOffset.Y); +baseField["PlayerOffset"].children[2].GetValue().Set(zukanCompareHeight.playerOffset.Z); +baseField["PlayerRotationAngle"].children[0].GetValue().Set(zukanCompareHeight.playerRotationAngle.X); +baseField["PlayerRotationAngle"].children[1].GetValue().Set(zukanCompareHeight.playerRotationAngle.Y); +newZukanCompareHeights.Add(baseField); +} +uiDatabase["ZukanCompareHeight"].children[0].SetChildrenList(newZukanCompareHeights.ToArray()); - AssetTypeValueField[] levelUpMoveFields = wazaOboeTable.children[4].children[0].children; - AssetTypeValueField[] eggMoveFields = tamagoWazaTable.children[4].children[0].children; - AssetTypeValueField[] evolveFields = evolveTable.children[4].children[0].children; - AssetTypeValueField[] personalFields = personalTable.children[4].children[0].children; +// SearchPokeIconSex +AssetTypeValueField[] searchPokeIconSexes = uiDatabase["SearchPokeIconSex"].children[0].children; - List newLevelUpMoveFields = new(); - List newEggMoveFields = new(); - List newEvolveFields = new(); - List newPersonalFields = new(); +AssetTypeValueField searchPokeIconSexRef = searchPokeIconSexes[0]; +List newSearchPokeIconSexes = new(); +foreach (UIMasterdatas.SearchPokeIconSex searchPokeIconSex in gameData.uiSearchPokeIconSex) +{ +AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(searchPokeIconSexRef.GetTemplateField()); +baseField["MonsNo"].GetValue().Set(searchPokeIconSex.monsNo); +baseField["Sex"].GetValue().Set(searchPokeIconSex.sex); +newSearchPokeIconSexes.Add(baseField); +} +uiDatabase["SearchPokeIconSex"].children[0].SetChildrenList(newSearchPokeIconSexes.ToArray()); - AssetTypeValueField personalFieldRef = personalFields[0]; - for (int personalID = 0; personalID < gameData.personalEntries.Count; personalID++) - { - AssetTypeValueField personalField = ValueBuilder.DefaultValueFieldFromTemplate(personalFieldRef.GetTemplateField()); - Pokemon pokemon = gameData.personalEntries[personalID]; - personalField.children[0].GetValue().Set(pokemon.validFlag); - personalField.children[1].GetValue().Set(pokemon.personalID); - personalField.children[2].GetValue().Set(pokemon.dexID); - personalField.children[3].GetValue().Set(pokemon.formIndex); - personalField.children[4].GetValue().Set(pokemon.formMax); - personalField.children[5].GetValue().Set(pokemon.color); - personalField.children[6].GetValue().Set(pokemon.graNo); - personalField.children[7].GetValue().Set(pokemon.basicHp); - personalField.children[8].GetValue().Set(pokemon.basicAtk); - personalField.children[9].GetValue().Set(pokemon.basicDef); - personalField.children[10].GetValue().Set(pokemon.basicSpd); - personalField.children[11].GetValue().Set(pokemon.basicSpAtk); - personalField.children[12].GetValue().Set(pokemon.basicSpDef); - personalField.children[13].GetValue().Set(pokemon.typingID1); - personalField.children[14].GetValue().Set(pokemon.typingID2); - personalField.children[15].GetValue().Set(pokemon.getRate); - personalField.children[16].GetValue().Set(pokemon.rank); - personalField.children[17].GetValue().Set(pokemon.expValue); - personalField.children[18].GetValue().Set(pokemon.item1); - personalField.children[19].GetValue().Set(pokemon.item2); - personalField.children[20].GetValue().Set(pokemon.item3); - personalField.children[21].GetValue().Set(pokemon.sex); - personalField.children[22].GetValue().Set(pokemon.eggBirth); - personalField.children[23].GetValue().Set(pokemon.initialFriendship); - personalField.children[24].GetValue().Set(pokemon.eggGroup1); - personalField.children[25].GetValue().Set(pokemon.eggGroup2); - personalField.children[26].GetValue().Set(pokemon.grow); - personalField.children[27].GetValue().Set(pokemon.abilityID1); - personalField.children[28].GetValue().Set(pokemon.abilityID2); - personalField.children[29].GetValue().Set(pokemon.abilityID3); - personalField.children[30].GetValue().Set(pokemon.giveExp); - personalField.children[31].GetValue().Set(pokemon.height); - personalField.children[32].GetValue().Set(pokemon.weight); - personalField.children[33].GetValue().Set(pokemon.chihouZukanNo); - personalField.children[34].GetValue().Set(pokemon.machine1); - personalField.children[35].GetValue().Set(pokemon.machine2); - personalField.children[36].GetValue().Set(pokemon.machine3); - personalField.children[37].GetValue().Set(pokemon.machine4); - personalField.children[38].GetValue().Set(pokemon.hiddenMachine); - personalField.children[39].GetValue().Set(pokemon.eggMonsno); - personalField.children[40].GetValue().Set(pokemon.eggFormno); - personalField.children[41].GetValue().Set(pokemon.eggFormnoKawarazunoishi); - personalField.children[42].GetValue().Set(pokemon.eggFormInheritKawarazunoishi); - newPersonalFields.Add(personalField); - - // Level Up Moves - AssetTypeValueField levelUpMoveField = ValueBuilder.DefaultValueFieldFromTemplate(levelUpMoveFields[0].GetTemplateField()); - levelUpMoveField["id"].GetValue().Set(pokemon.personalID); - - List levelUpMoveAr = new(); - AssetTypeTemplateField arTemplate = levelUpMoveFields[1]["ar"][0][0].GetTemplateField(); - foreach (LevelUpMove levelUpMove in pokemon.levelUpMoves) - { - AssetTypeValueField levelField = ValueBuilder.DefaultValueFieldFromTemplate(arTemplate); - AssetTypeValueField moveIDField = ValueBuilder.DefaultValueFieldFromTemplate(arTemplate); - levelField.GetValue().Set(levelUpMove.level); - moveIDField.GetValue().Set(levelUpMove.moveID); - levelUpMoveAr.Add(levelField); - levelUpMoveAr.Add(moveIDField); - } - levelUpMoveField["ar"][0].SetChildrenList(levelUpMoveAr.ToArray()); +// DistributionTable +CommitDistributionSheet(distributionTable["Diamond_FieldTable"].children[0], gameData.uiDistributionTable.diamondFieldTable); +CommitDistributionSheet(distributionTable["Diamond_DungeonTable"].children[0], gameData.uiDistributionTable.diamondDungeonTable); +CommitDistributionSheet(distributionTable["Pearl_FieldTable"].children[0], gameData.uiDistributionTable.pearlFieldTable); +CommitDistributionSheet(distributionTable["Pearl_DungeonTable"].children[0], gameData.uiDistributionTable.pearlDungeonTable); - newLevelUpMoveFields.Add(levelUpMoveField); +fileManager.WriteMonoBehaviours(PathEnum.UIMasterdatas, monoBehaviours.ToArray()); +} - // Evolution Paths - AssetTypeValueField evolveField = ValueBuilder.DefaultValueFieldFromTemplate(evolveFields[0].GetTemplateField()); - evolveField["id"].GetValue().Set(pokemon.personalID); +private static void CommitDistributionSheet(AssetTypeValueField sheetATVF, List sheet) +{ +AssetTypeValueField distributionEntryRef = sheetATVF.children[0]; +List newSheet = new(); +foreach (UIMasterdatas.DistributionEntry entry in sheet) +{ +AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(distributionEntryRef.GetTemplateField()); +CommitDistributionCoord(baseField["BeforeMorning"], entry.beforeMorning, distributionEntryRef[0][0][0]); +CommitDistributionCoord(baseField["BeforeDaytime"], entry.beforeDaytime, distributionEntryRef[0][0][0]); +CommitDistributionCoord(baseField["BeforeNight"], entry.beforeNight, distributionEntryRef[0][0][0]); +CommitDistributionCoord(baseField["AfterMorning"], entry.afterMorning, distributionEntryRef[0][0][0]); +CommitDistributionCoord(baseField["AfterDaytime"], entry.afterDaytime, distributionEntryRef[0][0][0]); +CommitDistributionCoord(baseField["AfterNight"], entry.afterNight, distributionEntryRef[0][0][0]); +CommitDistributionCoord(baseField["Fishing"], entry.fishing, distributionEntryRef[0][0][0]); +CommitDistributionCoord(baseField["PokemonTraser"], entry.pokemonTraser, distributionEntryRef[0][0][0]); +CommitDistributionCoord(baseField["HoneyTree"], entry.honeyTree, distributionEntryRef[0][0][0]); +newSheet.Add(baseField); +} +sheetATVF.SetChildrenList(newSheet.ToArray()); +} - List evolveAr = new(); - arTemplate = evolveFields[1]["ar"][0][0].GetTemplateField(); - foreach (EvolutionPath evolutionPath in pokemon.evolutionPaths) - { - AssetTypeValueField methodField = ValueBuilder.DefaultValueFieldFromTemplate(arTemplate); - AssetTypeValueField parameterField = ValueBuilder.DefaultValueFieldFromTemplate(arTemplate); - AssetTypeValueField destDexIDField = ValueBuilder.DefaultValueFieldFromTemplate(arTemplate); - AssetTypeValueField destFormIDField = ValueBuilder.DefaultValueFieldFromTemplate(arTemplate); - AssetTypeValueField levelField = ValueBuilder.DefaultValueFieldFromTemplate(arTemplate); - methodField.GetValue().Set(evolutionPath.method); - parameterField.GetValue().Set(evolutionPath.parameter); - destDexIDField.GetValue().Set(evolutionPath.destDexID); - destFormIDField.GetValue().Set(evolutionPath.destFormID); - levelField.GetValue().Set(evolutionPath.level); - evolveAr.Add(methodField); - evolveAr.Add(parameterField); - evolveAr.Add(destDexIDField); - evolveAr.Add(destFormIDField); - evolveAr.Add(levelField); - } - evolveField["ar"][0].SetChildrenList(evolveAr.ToArray()); +private static void CommitDistributionCoord(AssetTypeValueField posATVF, int[] pos, AssetTypeValueField intRef) +{ +List newInts = new(); +for (int i = 0; i < pos.Length; i++) +{ +AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(intRef.GetTemplateField()); +baseField.GetValue().Set(pos[i]); +newInts.Add(baseField); +} +posATVF[0].SetChildrenList(newInts.ToArray()); +} - newEvolveFields.Add(evolveField); +/// +/// Updates loaded bundle with Pokemon. +/// +private static void CommitPokemon() +{ +List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.PersonalMasterdatas); - // Egg Moves - AssetTypeValueField eggMoveField = ValueBuilder.DefaultValueFieldFromTemplate(eggMoveFields[0].GetTemplateField()); - eggMoveField["no"].GetValue().Set(pokemon.dexID); - eggMoveField["formNo"].GetValue().Set(pokemon.formID); +AssetTypeValueField wazaOboeTable = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "WazaOboeTable"); +AssetTypeValueField tamagoWazaTable = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "TamagoWazaTable"); +AssetTypeValueField evolveTable = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "EvolveTable"); +AssetTypeValueField personalTable = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "PersonalTable"); +monoBehaviours = new() +{ +wazaOboeTable, +tamagoWazaTable, +evolveTable, +personalTable +}; + +AssetTypeValueField[] levelUpMoveFields = wazaOboeTable.children[4].children[0].children; +AssetTypeValueField[] eggMoveFields = tamagoWazaTable.children[4].children[0].children; +AssetTypeValueField[] evolveFields = evolveTable.children[4].children[0].children; +AssetTypeValueField[] personalFields = personalTable.children[4].children[0].children; + +List newLevelUpMoveFields = new(); +List newEggMoveFields = new(); +List newEvolveFields = new(); +List newPersonalFields = new(); + +AssetTypeValueField personalFieldRef = personalFields[0]; +for (int personalID = 0; personalID < gameData.personalEntries.Count; personalID++) +{ +AssetTypeValueField personalField = ValueBuilder.DefaultValueFieldFromTemplate(personalFieldRef.GetTemplateField()); +Pokemon pokemon = gameData.personalEntries[personalID]; +personalField.children[0].GetValue().Set(pokemon.validFlag); +personalField.children[1].GetValue().Set(pokemon.personalID); +personalField.children[2].GetValue().Set(pokemon.dexID); +personalField.children[3].GetValue().Set(pokemon.formIndex); +personalField.children[4].GetValue().Set(pokemon.formMax); +personalField.children[5].GetValue().Set(pokemon.color); +personalField.children[6].GetValue().Set(pokemon.graNo); +personalField.children[7].GetValue().Set(pokemon.basicHp); +personalField.children[8].GetValue().Set(pokemon.basicAtk); +personalField.children[9].GetValue().Set(pokemon.basicDef); +personalField.children[10].GetValue().Set(pokemon.basicSpd); +personalField.children[11].GetValue().Set(pokemon.basicSpAtk); +personalField.children[12].GetValue().Set(pokemon.basicSpDef); +personalField.children[13].GetValue().Set(pokemon.typingID1); +personalField.children[14].GetValue().Set(pokemon.typingID2); +personalField.children[15].GetValue().Set(pokemon.getRate); +personalField.children[16].GetValue().Set(pokemon.rank); +personalField.children[17].GetValue().Set(pokemon.expValue); +personalField.children[18].GetValue().Set(pokemon.item1); +personalField.children[19].GetValue().Set(pokemon.item2); +personalField.children[20].GetValue().Set(pokemon.item3); +personalField.children[21].GetValue().Set(pokemon.sex); +personalField.children[22].GetValue().Set(pokemon.eggBirth); +personalField.children[23].GetValue().Set(pokemon.initialFriendship); +personalField.children[24].GetValue().Set(pokemon.eggGroup1); +personalField.children[25].GetValue().Set(pokemon.eggGroup2); +personalField.children[26].GetValue().Set(pokemon.grow); +personalField.children[27].GetValue().Set(pokemon.abilityID1); +personalField.children[28].GetValue().Set(pokemon.abilityID2); +personalField.children[29].GetValue().Set(pokemon.abilityID3); +personalField.children[30].GetValue().Set(pokemon.giveExp); +personalField.children[31].GetValue().Set(pokemon.height); +personalField.children[32].GetValue().Set(pokemon.weight); +personalField.children[33].GetValue().Set(pokemon.chihouZukanNo); +personalField.children[34].GetValue().Set(pokemon.machine1); +personalField.children[35].GetValue().Set(pokemon.machine2); +personalField.children[36].GetValue().Set(pokemon.machine3); +personalField.children[37].GetValue().Set(pokemon.machine4); +personalField.children[38].GetValue().Set(pokemon.hiddenMachine); +personalField.children[39].GetValue().Set(pokemon.eggMonsno); +personalField.children[40].GetValue().Set(pokemon.eggFormno); +personalField.children[41].GetValue().Set(pokemon.eggFormnoKawarazunoishi); +personalField.children[42].GetValue().Set(pokemon.eggFormInheritKawarazunoishi); +newPersonalFields.Add(personalField); + +// Level Up Moves +AssetTypeValueField levelUpMoveField = ValueBuilder.DefaultValueFieldFromTemplate(levelUpMoveFields[0].GetTemplateField()); +levelUpMoveField["id"].GetValue().Set(pokemon.personalID); + +List levelUpMoveAr = new(); +AssetTypeTemplateField arTemplate = levelUpMoveFields[1]["ar"][0][0].GetTemplateField(); +foreach (LevelUpMove levelUpMove in pokemon.levelUpMoves) +{ + AssetTypeValueField levelField = ValueBuilder.DefaultValueFieldFromTemplate(arTemplate); + AssetTypeValueField moveIDField = ValueBuilder.DefaultValueFieldFromTemplate(arTemplate); + levelField.GetValue().Set(levelUpMove.level); + moveIDField.GetValue().Set(levelUpMove.moveID); + levelUpMoveAr.Add(levelField); + levelUpMoveAr.Add(moveIDField); +} +levelUpMoveField["ar"][0].SetChildrenList(levelUpMoveAr.ToArray()); - List wazaNos = new(); - AssetTypeTemplateField wazaNoTemplate = eggMoveFields[1]["wazaNo"][0][0].GetTemplateField(); - foreach (ushort wazaNo in pokemon.eggMoves) - { - AssetTypeValueField wazaNoField = ValueBuilder.DefaultValueFieldFromTemplate(wazaNoTemplate); - wazaNoField.GetValue().Set(wazaNo); - wazaNos.Add(wazaNoField); - } - eggMoveField["wazaNo"][0].SetChildrenList(wazaNos.ToArray()); +newLevelUpMoveFields.Add(levelUpMoveField); - newEggMoveFields.Add(eggMoveField); - } +// Evolution Paths +AssetTypeValueField evolveField = ValueBuilder.DefaultValueFieldFromTemplate(evolveFields[0].GetTemplateField()); +evolveField["id"].GetValue().Set(pokemon.personalID); - newPersonalFields.Sort((atvf1, atvf2) => atvf1[1].GetValue().AsUInt().CompareTo(atvf2[1].GetValue().AsUInt())); - newLevelUpMoveFields.Sort((atvf1, atvf2) => atvf1["id"].GetValue().AsInt().CompareTo(atvf2["id"].GetValue().AsInt())); - newEvolveFields.Sort((atvf1, atvf2) => atvf1["id"].GetValue().AsInt().CompareTo(atvf2["id"].GetValue().AsInt())); - newEggMoveFields.Sort((atvf1, atvf2) => - { - if (atvf1["formNo"].GetValue().AsUInt().CompareTo(atvf2["formNo"].GetValue().AsUInt()) != 0) - { - if (atvf1["formNo"].GetValue().AsUInt() == 0) - return -1; - if (atvf2["formNo"].GetValue().AsUInt() == 0) - return 1; - } +List evolveAr = new(); +arTemplate = evolveFields[1]["ar"][0][0].GetTemplateField(); +foreach (EvolutionPath evolutionPath in pokemon.evolutionPaths) +{ + AssetTypeValueField methodField = ValueBuilder.DefaultValueFieldFromTemplate(arTemplate); + AssetTypeValueField parameterField = ValueBuilder.DefaultValueFieldFromTemplate(arTemplate); + AssetTypeValueField destDexIDField = ValueBuilder.DefaultValueFieldFromTemplate(arTemplate); + AssetTypeValueField destFormIDField = ValueBuilder.DefaultValueFieldFromTemplate(arTemplate); + AssetTypeValueField levelField = ValueBuilder.DefaultValueFieldFromTemplate(arTemplate); + methodField.GetValue().Set(evolutionPath.method); + parameterField.GetValue().Set(evolutionPath.parameter); + destDexIDField.GetValue().Set(evolutionPath.destDexID); + destFormIDField.GetValue().Set(evolutionPath.destFormID); + levelField.GetValue().Set(evolutionPath.level); + evolveAr.Add(methodField); + evolveAr.Add(parameterField); + evolveAr.Add(destDexIDField); + evolveAr.Add(destFormIDField); + evolveAr.Add(levelField); +} +evolveField["ar"][0].SetChildrenList(evolveAr.ToArray()); - int i = atvf1["no"].GetValue().AsUInt().CompareTo(atvf2["no"].GetValue().AsUInt()); - if (i == 0) - i = atvf1["formNo"].GetValue().AsUInt().CompareTo(atvf2["formNo"].GetValue().AsUInt()); - return i; - }); +newEvolveFields.Add(evolveField); - wazaOboeTable.children[4].children[0].SetChildrenList(newLevelUpMoveFields.ToArray()); - tamagoWazaTable.children[4].children[0].SetChildrenList(newEggMoveFields.ToArray()); - evolveTable.children[4].children[0].SetChildrenList(newEvolveFields.ToArray()); - personalTable.children[4].children[0].SetChildrenList(newPersonalFields.ToArray()); +// Egg Moves +AssetTypeValueField eggMoveField = ValueBuilder.DefaultValueFieldFromTemplate(eggMoveFields[0].GetTemplateField()); +eggMoveField["no"].GetValue().Set(pokemon.dexID); +eggMoveField["formNo"].GetValue().Set(pokemon.formID); - fileManager.WriteMonoBehaviours(PathEnum.PersonalMasterdatas, monoBehaviours.ToArray()); - } +List wazaNos = new(); +AssetTypeTemplateField wazaNoTemplate = eggMoveFields[1]["wazaNo"][0][0].GetTemplateField(); +foreach (ushort wazaNo in pokemon.eggMoves) +{ + AssetTypeValueField wazaNoField = ValueBuilder.DefaultValueFieldFromTemplate(wazaNoTemplate); + wazaNoField.GetValue().Set(wazaNo); + wazaNos.Add(wazaNoField); +} +eggMoveField["wazaNo"][0].SetChildrenList(wazaNos.ToArray()); - /// - /// Updates loaded bundle with UgEncounters. - /// - private static void CommitUgTables() - { - List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.Ugdata); - List updatedMonoBehaviours = new(); +newEggMoveFields.Add(eggMoveField); +} - AssetTypeValueField ugRandMark = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "UgRandMark"); - AssetTypeValueField[] ugAreaFields = ugRandMark["table"].children[0].children; +newPersonalFields.Sort((atvf1, atvf2) => atvf1[1].GetValue().AsUInt().CompareTo(atvf2[1].GetValue().AsUInt())); +newLevelUpMoveFields.Sort((atvf1, atvf2) => atvf1["id"].GetValue().AsInt().CompareTo(atvf2["id"].GetValue().AsInt())); +newEvolveFields.Sort((atvf1, atvf2) => atvf1["id"].GetValue().AsInt().CompareTo(atvf2["id"].GetValue().AsInt())); +newEggMoveFields.Sort((atvf1, atvf2) => +{ +if (atvf1["formNo"].GetValue().AsUInt().CompareTo(atvf2["formNo"].GetValue().AsUInt()) != 0) +{ + if (atvf1["formNo"].GetValue().AsUInt() == 0) + return -1; + if (atvf2["formNo"].GetValue().AsUInt() == 0) + return 1; +} - for (int ugAreaIdx = 0; ugAreaIdx < gameData.ugAreas.Count; ugAreaIdx++) - { - UgArea ugArea = gameData.ugAreas[ugAreaIdx]; - ugAreaFields[ugAreaIdx]["id"].GetValue().Set(ugArea.id); - ugAreaFields[ugAreaIdx]["FileName"].GetValue().Set(ugArea.fileName); - } - updatedMonoBehaviours.Add(ugRandMark); +int i = atvf1["no"].GetValue().AsUInt().CompareTo(atvf2["no"].GetValue().AsUInt()); +if (i == 0) + i = atvf1["formNo"].GetValue().AsUInt().CompareTo(atvf2["formNo"].GetValue().AsUInt()); +return i; +}); - List ugEncounterFileMonobehaviours = monoBehaviours.Where(m => Encoding.Default.GetString(m.children[3].value.value.asString).StartsWith("UgEncount_")).ToList(); - AssetTypeTemplateField ugEncounterTemplate = ugEncounterFileMonobehaviours[0]["table"][0][0].GetTemplateField(); - for (int ugEncounterFileIdx = 0; ugEncounterFileIdx < ugEncounterFileMonobehaviours.Count; ugEncounterFileIdx++) - { - UgEncounterFile ugEncounterFile = gameData.ugEncounterFiles[ugEncounterFileIdx]; - ugEncounterFileMonobehaviours[ugEncounterFileIdx]["m_Name"].GetValue().Set(ugEncounterFile.mName); +wazaOboeTable.children[4].children[0].SetChildrenList(newLevelUpMoveFields.ToArray()); +tamagoWazaTable.children[4].children[0].SetChildrenList(newEggMoveFields.ToArray()); +evolveTable.children[4].children[0].SetChildrenList(newEvolveFields.ToArray()); +personalTable.children[4].children[0].SetChildrenList(newPersonalFields.ToArray()); - List newUgEncounters = new(); - foreach (UgEncounter ugEncounter in ugEncounterFile.ugEncounters) - { - AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(ugEncounterTemplate); - baseField["monsno"].GetValue().Set(ugEncounter.dexID); - baseField["version"].GetValue().Set(ugEncounter.version); - baseField["zukanflag"].GetValue().Set(ugEncounter.zukanFlag); +fileManager.WriteMonoBehaviours(PathEnum.PersonalMasterdatas, monoBehaviours.ToArray()); +} - newUgEncounters.Add(baseField); - } - ugEncounterFileMonobehaviours[ugEncounterFileIdx]["table"][0].SetChildrenList(newUgEncounters.ToArray()); +/// +/// Updates loaded bundle with UgEncounters. +/// +private static void CommitUgTables() +{ +List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.Ugdata); +List updatedMonoBehaviours = new(); - updatedMonoBehaviours.Add(ugEncounterFileMonobehaviours[ugEncounterFileIdx]); - } +AssetTypeValueField ugRandMark = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "UgRandMark"); +AssetTypeValueField[] ugAreaFields = ugRandMark["table"].children[0].children; - AssetTypeValueField ugEncounterLevelMonobehaviour = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "UgEncountLevel"); - AssetTypeValueField[] ugEncounterLevelFields = ugEncounterLevelMonobehaviour.children[4].children[0].children; - for (int ugEncouterLevelIdx = 0; ugEncouterLevelIdx < ugEncounterLevelFields.Length; ugEncouterLevelIdx++) - { - UgEncounterLevelSet ugLevels = gameData.ugEncounterLevelSets[ugEncouterLevelIdx]; - ugEncounterLevelFields[ugEncouterLevelIdx].children[0].GetValue().Set(ugLevels.minLv); - ugEncounterLevelFields[ugEncouterLevelIdx].children[1].GetValue().Set(ugLevels.maxLv); - } - updatedMonoBehaviours.Add(ugEncounterLevelMonobehaviour); +for (int ugAreaIdx = 0; ugAreaIdx < gameData.ugAreas.Count; ugAreaIdx++) +{ +UgArea ugArea = gameData.ugAreas[ugAreaIdx]; +ugAreaFields[ugAreaIdx]["id"].GetValue().Set(ugArea.id); +ugAreaFields[ugAreaIdx]["FileName"].GetValue().Set(ugArea.fileName); +} +updatedMonoBehaviours.Add(ugRandMark); - AssetTypeValueField ugSpecialPokemon = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "UgSpecialPokemon"); - AssetTypeValueField[] ugSpecialPokemonFields = ugSpecialPokemon["Sheet1"].children[0].children; +List ugEncounterFileMonobehaviours = monoBehaviours.Where(m => Encoding.Default.GetString(m.children[3].value.value.asString).StartsWith("UgEncount_")).ToList(); +AssetTypeTemplateField ugEncounterTemplate = ugEncounterFileMonobehaviours[0]["table"][0][0].GetTemplateField(); +for (int ugEncounterFileIdx = 0; ugEncounterFileIdx < ugEncounterFileMonobehaviours.Count; ugEncounterFileIdx++) +{ +UgEncounterFile ugEncounterFile = gameData.ugEncounterFiles[ugEncounterFileIdx]; +ugEncounterFileMonobehaviours[ugEncounterFileIdx]["m_Name"].GetValue().Set(ugEncounterFile.mName); - AssetTypeTemplateField ugSpecialPokemonTemplate = ugSpecialPokemonFields[0].GetTemplateField(); +List newUgEncounters = new(); +foreach (UgEncounter ugEncounter in ugEncounterFile.ugEncounters) +{ + AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(ugEncounterTemplate); + baseField["monsno"].GetValue().Set(ugEncounter.dexID); + baseField["version"].GetValue().Set(ugEncounter.version); + baseField["zukanflag"].GetValue().Set(ugEncounter.zukanFlag); - List newUgSpecialPokemon = new(); - foreach (UgSpecialEncounter ugSpecialEncounter in gameData.ugSpecialEncounters) - { - AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(ugSpecialPokemonTemplate); + newUgEncounters.Add(baseField); +} +ugEncounterFileMonobehaviours[ugEncounterFileIdx]["table"][0].SetChildrenList(newUgEncounters.ToArray()); - baseField["id"].GetValue().Set(ugSpecialEncounter.id); - baseField["monsno"].GetValue().Set(ugSpecialEncounter.dexID); - baseField["version"].GetValue().Set(ugSpecialEncounter.version); - baseField["Dspecialrate"].GetValue().Set(ugSpecialEncounter.dRate); - baseField["Pspecialrate"].GetValue().Set(ugSpecialEncounter.pRate); +updatedMonoBehaviours.Add(ugEncounterFileMonobehaviours[ugEncounterFileIdx]); +} - newUgSpecialPokemon.Add(baseField); - } - ugSpecialPokemon["Sheet1"].children[0].SetChildrenList(newUgSpecialPokemon.ToArray()); +AssetTypeValueField ugEncounterLevelMonobehaviour = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "UgEncountLevel"); +AssetTypeValueField[] ugEncounterLevelFields = ugEncounterLevelMonobehaviour.children[4].children[0].children; +for (int ugEncouterLevelIdx = 0; ugEncouterLevelIdx < ugEncounterLevelFields.Length; ugEncouterLevelIdx++) +{ +UgEncounterLevelSet ugLevels = gameData.ugEncounterLevelSets[ugEncouterLevelIdx]; +ugEncounterLevelFields[ugEncouterLevelIdx].children[0].GetValue().Set(ugLevels.minLv); +ugEncounterLevelFields[ugEncouterLevelIdx].children[1].GetValue().Set(ugLevels.maxLv); +} +updatedMonoBehaviours.Add(ugEncounterLevelMonobehaviour); - updatedMonoBehaviours.Add(ugSpecialPokemon); +AssetTypeValueField ugSpecialPokemon = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "UgSpecialPokemon"); +AssetTypeValueField[] ugSpecialPokemonFields = ugSpecialPokemon["Sheet1"].children[0].children; - AssetTypeValueField ugPokemonDataMonobehaviour = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "UgPokemonData"); - AssetTypeValueField[] ugPokemonDataFields = ugPokemonDataMonobehaviour["table"].children[0].children; +AssetTypeTemplateField ugSpecialPokemonTemplate = ugSpecialPokemonFields[0].GetTemplateField(); - AssetTypeTemplateField ugPokemonDataTemplate = ugPokemonDataFields[0].GetTemplateField(); - AssetTypeTemplateField intATTF = ugPokemonDataFields[0]["reactioncode"][0][0].GetTemplateField(); +List newUgSpecialPokemon = new(); +foreach (UgSpecialEncounter ugSpecialEncounter in gameData.ugSpecialEncounters) +{ +AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(ugSpecialPokemonTemplate); - List newUgPokemonData = new(); - foreach (UgPokemonData ugPokemonData in gameData.ugPokemonData) - { - AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(ugPokemonDataTemplate); +baseField["id"].GetValue().Set(ugSpecialEncounter.id); +baseField["monsno"].GetValue().Set(ugSpecialEncounter.dexID); +baseField["version"].GetValue().Set(ugSpecialEncounter.version); +baseField["Dspecialrate"].GetValue().Set(ugSpecialEncounter.dRate); +baseField["Pspecialrate"].GetValue().Set(ugSpecialEncounter.pRate); - baseField["monsno"].GetValue().Set(ugPokemonData.monsno); - baseField["type1ID"].GetValue().Set(ugPokemonData.type1ID); - baseField["type2ID"].GetValue().Set(ugPokemonData.type2ID); - baseField["size"].GetValue().Set(ugPokemonData.size); - baseField["movetype"].GetValue().Set(ugPokemonData.movetype); +newUgSpecialPokemon.Add(baseField); +} +ugSpecialPokemon["Sheet1"].children[0].SetChildrenList(newUgSpecialPokemon.ToArray()); - baseField["reactioncode"][0].SetChildrenList(PrimitiveATVFArray(ugPokemonData.reactioncode, intATTF)); - baseField["move_rate"][0].SetChildrenList(PrimitiveATVFArray(ugPokemonData.moveRate, intATTF)); - baseField["submove_rate"][0].SetChildrenList(PrimitiveATVFArray(ugPokemonData.submoveRate, intATTF)); - baseField["reaction"][0].SetChildrenList(PrimitiveATVFArray(ugPokemonData.reaction, intATTF)); - baseField["flagrate"][0].SetChildrenList(PrimitiveATVFArray(ugPokemonData.flagrate, intATTF)); +updatedMonoBehaviours.Add(ugSpecialPokemon); - newUgPokemonData.Add(baseField); - } - ugPokemonDataMonobehaviour["table"].children[0].SetChildrenList(newUgPokemonData.ToArray()); +AssetTypeValueField ugPokemonDataMonobehaviour = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "UgPokemonData"); +AssetTypeValueField[] ugPokemonDataFields = ugPokemonDataMonobehaviour["table"].children[0].children; - updatedMonoBehaviours.Add(ugPokemonDataMonobehaviour); +AssetTypeTemplateField ugPokemonDataTemplate = ugPokemonDataFields[0].GetTemplateField(); +AssetTypeTemplateField intATTF = ugPokemonDataFields[0]["reactioncode"][0][0].GetTemplateField(); - fileManager.WriteMonoBehaviours(PathEnum.Ugdata, updatedMonoBehaviours.ToArray()); - } +List newUgPokemonData = new(); +foreach (UgPokemonData ugPokemonData in gameData.ugPokemonData) +{ +AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(ugPokemonDataTemplate); - /// - /// Builds an array of AssetTypeValueField objects from primitive values. - /// - private static AssetTypeValueField[] PrimitiveATVFArray(T[] values, AssetTypeTemplateField attf) - { - List atvfList = new(); - for (int i = 0; i < values.Length; i++) - { - AssetTypeValueField intField = ValueBuilder.DefaultValueFieldFromTemplate(attf); - intField.GetValue().Set(values[i]); - atvfList.Add(intField); - } - return atvfList.ToArray(); - } +baseField["monsno"].GetValue().Set(ugPokemonData.monsno); +baseField["type1ID"].GetValue().Set(ugPokemonData.type1ID); +baseField["type2ID"].GetValue().Set(ugPokemonData.type2ID); +baseField["size"].GetValue().Set(ugPokemonData.size); +baseField["movetype"].GetValue().Set(ugPokemonData.movetype); - /// - /// Updates loaded bundle with EncounterTables. - /// - private static void CommitMessageFileSets() - { - List messageFiles = gameData.messageFileSets.SelectMany(mfs => mfs.messageFiles).ToList(); +baseField["reactioncode"][0].SetChildrenList(PrimitiveATVFArray(ugPokemonData.reactioncode, intATTF)); +baseField["move_rate"][0].SetChildrenList(PrimitiveATVFArray(ugPokemonData.moveRate, intATTF)); +baseField["submove_rate"][0].SetChildrenList(PrimitiveATVFArray(ugPokemonData.submoveRate, intATTF)); +baseField["reaction"][0].SetChildrenList(PrimitiveATVFArray(ugPokemonData.reaction, intATTF)); +baseField["flagrate"][0].SetChildrenList(PrimitiveATVFArray(ugPokemonData.flagrate, intATTF)); + +newUgPokemonData.Add(baseField); +} +ugPokemonDataMonobehaviour["table"].children[0].SetChildrenList(newUgPokemonData.ToArray()); - List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.CommonMsbt); - CommitMessageFiles(monoBehaviours, messageFiles); - fileManager.WriteMonoBehaviours(PathEnum.CommonMsbt, monoBehaviours.ToArray()); +updatedMonoBehaviours.Add(ugPokemonDataMonobehaviour); - monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.English); - CommitMessageFiles(monoBehaviours, messageFiles); - fileManager.WriteMonoBehaviours(PathEnum.English, monoBehaviours.ToArray()); +fileManager.WriteMonoBehaviours(PathEnum.Ugdata, updatedMonoBehaviours.ToArray()); +} + +/// +/// Builds an array of AssetTypeValueField objects from primitive values. +/// +private static AssetTypeValueField[] PrimitiveATVFArray(T[] values, AssetTypeTemplateField attf) +{ +List atvfList = new(); +for (int i = 0; i < values.Length; i++) +{ +AssetTypeValueField intField = ValueBuilder.DefaultValueFieldFromTemplate(attf); +intField.GetValue().Set(values[i]); +atvfList.Add(intField); +} +return atvfList.ToArray(); +} - monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.French); - CommitMessageFiles(monoBehaviours, messageFiles); - fileManager.WriteMonoBehaviours(PathEnum.French, monoBehaviours.ToArray()); +/// +/// Updates loaded bundle with EncounterTables. +/// +private static void CommitMessageFileSets() +{ +List messageFiles = gameData.messageFileSets.SelectMany(mfs => mfs.messageFiles).ToList(); - monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.German); - CommitMessageFiles(monoBehaviours, messageFiles); - fileManager.WriteMonoBehaviours(PathEnum.German, monoBehaviours.ToArray()); +List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.CommonMsbt); +CommitMessageFiles(monoBehaviours, messageFiles); +fileManager.WriteMonoBehaviours(PathEnum.CommonMsbt, monoBehaviours.ToArray()); - monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.Italian); - CommitMessageFiles(monoBehaviours, messageFiles); - fileManager.WriteMonoBehaviours(PathEnum.Italian, monoBehaviours.ToArray()); +monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.English); +CommitMessageFiles(monoBehaviours, messageFiles); +fileManager.WriteMonoBehaviours(PathEnum.English, monoBehaviours.ToArray()); - monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.Jpn); - CommitMessageFiles(monoBehaviours, messageFiles); - fileManager.WriteMonoBehaviours(PathEnum.Jpn, monoBehaviours.ToArray()); +monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.French); +CommitMessageFiles(monoBehaviours, messageFiles); +fileManager.WriteMonoBehaviours(PathEnum.French, monoBehaviours.ToArray()); - monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.JpnKanji); - CommitMessageFiles(monoBehaviours, messageFiles); - fileManager.WriteMonoBehaviours(PathEnum.JpnKanji, monoBehaviours.ToArray()); +monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.German); +CommitMessageFiles(monoBehaviours, messageFiles); +fileManager.WriteMonoBehaviours(PathEnum.German, monoBehaviours.ToArray()); - monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.Korean); - CommitMessageFiles(monoBehaviours, messageFiles); - fileManager.WriteMonoBehaviours(PathEnum.Korean, monoBehaviours.ToArray()); +monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.Italian); +CommitMessageFiles(monoBehaviours, messageFiles); +fileManager.WriteMonoBehaviours(PathEnum.Italian, monoBehaviours.ToArray()); - monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.SimpChinese); - CommitMessageFiles(monoBehaviours, messageFiles); - fileManager.WriteMonoBehaviours(PathEnum.SimpChinese, monoBehaviours.ToArray()); +monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.Jpn); +CommitMessageFiles(monoBehaviours, messageFiles); +fileManager.WriteMonoBehaviours(PathEnum.Jpn, monoBehaviours.ToArray()); - monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.Spanish); - CommitMessageFiles(monoBehaviours, messageFiles); - fileManager.WriteMonoBehaviours(PathEnum.Spanish, monoBehaviours.ToArray()); +monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.JpnKanji); +CommitMessageFiles(monoBehaviours, messageFiles); +fileManager.WriteMonoBehaviours(PathEnum.JpnKanji, monoBehaviours.ToArray()); - monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.TradChinese); - CommitMessageFiles(monoBehaviours, messageFiles); - fileManager.WriteMonoBehaviours(PathEnum.TradChinese, monoBehaviours.ToArray()); - } +monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.Korean); +CommitMessageFiles(monoBehaviours, messageFiles); +fileManager.WriteMonoBehaviours(PathEnum.Korean, monoBehaviours.ToArray()); - /// - /// Writes all data into monobehaviors from a superset of MessageFiles. - /// - private static void CommitMessageFiles(List monoBehaviours, List messageFiles) - { - foreach (AssetTypeValueField monoBehaviour in monoBehaviours) - { - MessageFile messageFile = messageFiles.Find(mf => mf.mName == monoBehaviour.children[3].GetValue().AsString()); - AssetTypeValueField[] labelDataArray = monoBehaviour["labelDataArray"].children[0].children; - AssetTypeTemplateField templateField = new(); +monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.SimpChinese); +CommitMessageFiles(monoBehaviours, messageFiles); +fileManager.WriteMonoBehaviours(PathEnum.SimpChinese, monoBehaviours.ToArray()); - AssetTypeValueField labelDataRef = labelDataArray[0]; +monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.Spanish); +CommitMessageFiles(monoBehaviours, messageFiles); +fileManager.WriteMonoBehaviours(PathEnum.Spanish, monoBehaviours.ToArray()); - // tagDataFields[tagDataIdx].children[6][0].children - foreach (AssetTypeValueField field in labelDataArray) - { - if (tagDataTemplate == null && field["tagDataArray"].children[0].childrenCount > 0) - { - tagDataTemplate = field["tagDataArray"].children[0][0].GetTemplateField(); - } - - - if (tagWordTemplate == null && field["tagDataArray"].children[0].childrenCount > 0) - { - if (field["tagDataArray"].children[0][0]["tagWordArray"].children[0].childrenCount > 0) - { - tagWordTemplate = field["tagDataArray"].children[0][0]["tagWordArray"].children[0][0].GetTemplateField(); - if (tagWordTemplate != null) - { - - } - } - } - - if (attributeValueTemplate == null && field["attributeValueArray"].children[0].childrenCount > 0) - { - attributeValueTemplate = field["attributeValueArray"].children[0][0].GetTemplateField(); - } - - if (wordDataTemplate == null && field["wordDataArray"].children[0].childrenCount > 0) - { - wordDataTemplate = field["wordDataArray"].children[0][0].GetTemplateField(); - } - } +monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.TradChinese); +CommitMessageFiles(monoBehaviours, messageFiles); +fileManager.WriteMonoBehaviours(PathEnum.TradChinese, monoBehaviours.ToArray()); +} - List newLabelDataArray = new(); - foreach (LabelData labelData in messageFile.labelDatas) - { - AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(labelDataRef.GetTemplateField()); - baseField["labelIndex"].GetValue().Set(labelData.labelIndex); - baseField["arrayIndex"].GetValue().Set(labelData.arrayIndex); - baseField["labelName"].GetValue().Set(labelData.labelName); - baseField["styleInfo"]["styleIndex"].GetValue().Set(labelData.styleIndex); - baseField["styleInfo"]["colorIndex"].GetValue().Set(labelData.colorIndex); - baseField["styleInfo"]["fontSize"].GetValue().Set(labelData.fontSize); - baseField["styleInfo"]["maxWidth"].GetValue().Set(labelData.maxWidth); - baseField["styleInfo"]["controlID"].GetValue().Set(labelData.controlID); - - List attributeValueArray = new(); - foreach (int attrVal in labelData.attributeValues) - { - AssetTypeValueField attributeValueField = ValueBuilder.DefaultValueFieldFromTemplate(attributeValueTemplate); - attributeValueField.GetValue().Set(attrVal); - attributeValueArray.Add(attributeValueField); - } - baseField["attributeValueArray"][0].SetChildrenList(attributeValueArray.ToArray()); - - List tagDataArray = new(); - foreach (TagData tagData in labelData.tagDatas) - { - AssetTypeValueField tagDataField = ValueBuilder.DefaultValueFieldFromTemplate(tagDataTemplate); - tagDataField["tagIndex"].GetValue().Set(tagData.tagIndex); - tagDataField["groupID"].GetValue().Set(tagData.groupID); - tagDataField["tagID"].GetValue().Set(tagData.tagID); - tagDataField["tagPatternID"].GetValue().Set(tagData.tagPatternID); - tagDataField["forceArticle"].GetValue().Set(tagData.forceArticle); - tagDataField["tagParameter"].GetValue().Set(tagData.tagParameter); - List tagWordArray = new(); - foreach (string tagWord in tagData.tagWordArray) - { - AssetTypeValueField tagWordField = ValueBuilder.DefaultValueFieldFromTemplate(tagWordTemplate); - tagWordField.GetValue().Set(tagWord); - tagWordArray.Add(tagWordField); - } - tagDataField["tagWordArray"][0].SetChildrenList(tagWordArray.ToArray()); - // tagWordArray - tagDataField["forceGrmID"].GetValue().Set(tagData.forceGrmID); - tagDataArray.Add(tagDataField); - } - baseField["tagDataArray"][0].SetChildrenList(tagDataArray.ToArray()); - - List wordDataArray = new(); - foreach (WordData wordData in labelData.wordDatas) - { - AssetTypeValueField wordDataField = ValueBuilder.DefaultValueFieldFromTemplate(wordDataTemplate); - wordDataField["patternID"].GetValue().Set(wordData.patternID); - wordDataField["eventID"].GetValue().Set(wordData.eventID); - wordDataField["tagIndex"].GetValue().Set(wordData.tagIndex); - wordDataField["tagValue"].GetValue().Set(wordData.tagValue); - wordDataField["str"].GetValue().Set(wordData.str); - wordDataField["strWidth"].GetValue().Set(wordData.strWidth); - wordDataArray.Add(wordDataField); - } - baseField["wordDataArray"][0].SetChildrenList(wordDataArray.ToArray()); - - newLabelDataArray.Add(baseField); - } +/// +/// Writes all data into monobehaviors from a superset of MessageFiles. +/// +private static void CommitMessageFiles(List monoBehaviours, List messageFiles) +{ +foreach (AssetTypeValueField monoBehaviour in monoBehaviours) +{ +MessageFile messageFile = messageFiles.Find(mf => mf.mName == monoBehaviour.children[3].GetValue().AsString()); +AssetTypeValueField[] labelDataArray = monoBehaviour["labelDataArray"].children[0].children; +AssetTypeTemplateField templateField = new(); + +AssetTypeValueField labelDataRef = labelDataArray[0]; + +// tagDataFields[tagDataIdx].children[6][0].children +foreach (AssetTypeValueField field in labelDataArray) +{ + if (tagDataTemplate == null && field["tagDataArray"].children[0].childrenCount > 0) + { + tagDataTemplate = field["tagDataArray"].children[0][0].GetTemplateField(); + } + + + if (tagWordTemplate == null && field["tagDataArray"].children[0].childrenCount > 0) + { + if (field["tagDataArray"].children[0][0]["tagWordArray"].children[0].childrenCount > 0) + { + tagWordTemplate = field["tagDataArray"].children[0][0]["tagWordArray"].children[0][0].GetTemplateField(); + if (tagWordTemplate != null) + { - monoBehaviour["labelDataArray"].children[0].SetChildrenList(newLabelDataArray.ToArray()); } } + } - /// - /// Updates loaded bundle with EncounterTables. - /// - private static void CommitEncounterTables() + if (attributeValueTemplate == null && field["attributeValueArray"].children[0].childrenCount > 0) + { + attributeValueTemplate = field["attributeValueArray"].children[0][0].GetTemplateField(); + } + + if (wordDataTemplate == null && field["wordDataArray"].children[0].childrenCount > 0) + { + wordDataTemplate = field["wordDataArray"].children[0][0].GetTemplateField(); + } +} + +List newLabelDataArray = new(); +foreach (LabelData labelData in messageFile.labelDatas) +{ + AssetTypeValueField baseField = ValueBuilder.DefaultValueFieldFromTemplate(labelDataRef.GetTemplateField()); + baseField["labelIndex"].GetValue().Set(labelData.labelIndex); + baseField["arrayIndex"].GetValue().Set(labelData.arrayIndex); + baseField["labelName"].GetValue().Set(labelData.labelName); + baseField["styleInfo"]["styleIndex"].GetValue().Set(labelData.styleIndex); + baseField["styleInfo"]["colorIndex"].GetValue().Set(labelData.colorIndex); + baseField["styleInfo"]["fontSize"].GetValue().Set(labelData.fontSize); + baseField["styleInfo"]["maxWidth"].GetValue().Set(labelData.maxWidth); + baseField["styleInfo"]["controlID"].GetValue().Set(labelData.controlID); + + List attributeValueArray = new(); + foreach (int attrVal in labelData.attributeValues) + { + AssetTypeValueField attributeValueField = ValueBuilder.DefaultValueFieldFromTemplate(attributeValueTemplate); + attributeValueField.GetValue().Set(attrVal); + attributeValueArray.Add(attributeValueField); + } + baseField["attributeValueArray"][0].SetChildrenList(attributeValueArray.ToArray()); + + List tagDataArray = new(); + foreach (TagData tagData in labelData.tagDatas) + { + AssetTypeValueField tagDataField = ValueBuilder.DefaultValueFieldFromTemplate(tagDataTemplate); + tagDataField["tagIndex"].GetValue().Set(tagData.tagIndex); + tagDataField["groupID"].GetValue().Set(tagData.groupID); + tagDataField["tagID"].GetValue().Set(tagData.tagID); + tagDataField["tagPatternID"].GetValue().Set(tagData.tagPatternID); + tagDataField["forceArticle"].GetValue().Set(tagData.forceArticle); + tagDataField["tagParameter"].GetValue().Set(tagData.tagParameter); + List tagWordArray = new(); + foreach (string tagWord in tagData.tagWordArray) { - List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.Gamesettings); - AssetTypeValueField[] encounterTableMonoBehaviours = new AssetTypeValueField[2]; - encounterTableMonoBehaviours[0] = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "FieldEncountTable_d"); - encounterTableMonoBehaviours[1] = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "FieldEncountTable_p"); - for (int encounterTableFileIdx = 0; encounterTableFileIdx < encounterTableMonoBehaviours.Length; encounterTableFileIdx++) - { - EncounterTableFile encounterTableFile = gameData.encounterTableFiles[encounterTableFileIdx]; - encounterTableMonoBehaviours[encounterTableFileIdx].children[3].GetValue().Set(encounterTableFile.mName); + AssetTypeValueField tagWordField = ValueBuilder.DefaultValueFieldFromTemplate(tagWordTemplate); + tagWordField.GetValue().Set(tagWord); + tagWordArray.Add(tagWordField); + } + tagDataField["tagWordArray"][0].SetChildrenList(tagWordArray.ToArray()); + // tagWordArray + tagDataField["forceGrmID"].GetValue().Set(tagData.forceGrmID); + tagDataArray.Add(tagDataField); + } + baseField["tagDataArray"][0].SetChildrenList(tagDataArray.ToArray()); - //Write wild encounter tables - AssetTypeValueField[] encounterTableFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[4].children[0].children; - for (int encounterTableIdx = 0; encounterTableIdx < encounterTableFields.Length; encounterTableIdx++) - { - EncounterTable encounterTable = encounterTableFile.encounterTables[encounterTableIdx]; - encounterTableFields[encounterTableIdx].children[0].GetValue().Set(encounterTable.zoneID); - encounterTableFields[encounterTableIdx].children[1].GetValue().Set(encounterTable.encRateGround); - encounterTableFields[encounterTableIdx].children[7].children[0].children[0].GetValue().Set(encounterTable.formProb); - encounterTableFields[encounterTableIdx].children[9].children[0].children[1].GetValue().Set(encounterTable.unownTable); - encounterTableFields[encounterTableIdx].children[15].GetValue().Set(encounterTable.encRateWater); - encounterTableFields[encounterTableIdx].children[17].GetValue().Set(encounterTable.encRateOldRod); - encounterTableFields[encounterTableIdx].children[19].GetValue().Set(encounterTable.encRateGoodRod); - encounterTableFields[encounterTableIdx].children[21].GetValue().Set(encounterTable.encRateSuperRod); + List wordDataArray = new(); + foreach (WordData wordData in labelData.wordDatas) + { + AssetTypeValueField wordDataField = ValueBuilder.DefaultValueFieldFromTemplate(wordDataTemplate); + wordDataField["patternID"].GetValue().Set(wordData.patternID); + wordDataField["eventID"].GetValue().Set(wordData.eventID); + wordDataField["tagIndex"].GetValue().Set(wordData.tagIndex); + wordDataField["tagValue"].GetValue().Set(wordData.tagValue); + wordDataField["str"].GetValue().Set(wordData.str); + wordDataField["strWidth"].GetValue().Set(wordData.strWidth); + wordDataArray.Add(wordDataField); + } + baseField["wordDataArray"][0].SetChildrenList(wordDataArray.ToArray()); + + newLabelDataArray.Add(baseField); +} + +monoBehaviour["labelDataArray"].children[0].SetChildrenList(newLabelDataArray.ToArray()); +} +} + +/// +/// Updates loaded bundle with EncounterTables. +/// +private static void CommitEncounterTables() +{ +List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.Gamesettings); +AssetTypeValueField[] encounterTableMonoBehaviours = new AssetTypeValueField[2]; +encounterTableMonoBehaviours[0] = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "FieldEncountTable_d"); +encounterTableMonoBehaviours[1] = monoBehaviours.Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "FieldEncountTable_p"); +for (int encounterTableFileIdx = 0; encounterTableFileIdx < encounterTableMonoBehaviours.Length; encounterTableFileIdx++) +{ +EncounterTableFile encounterTableFile = gameData.encounterTableFiles[encounterTableFileIdx]; +encounterTableMonoBehaviours[encounterTableFileIdx].children[3].GetValue().Set(encounterTableFile.mName); - //Write ground tables - SetEncounters(encounterTableFields[encounterTableIdx].children[2].children[0], encounterTable.groundMons); +//Write wild encounter tables +AssetTypeValueField[] encounterTableFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[4].children[0].children; +for (int encounterTableIdx = 0; encounterTableIdx < encounterTableFields.Length; encounterTableIdx++) +{ + EncounterTable encounterTable = encounterTableFile.encounterTables[encounterTableIdx]; + encounterTableFields[encounterTableIdx].children[0].GetValue().Set(encounterTable.zoneID); + encounterTableFields[encounterTableIdx].children[1].GetValue().Set(encounterTable.encRateGround); + encounterTableFields[encounterTableIdx].children[7].children[0].children[0].GetValue().Set(encounterTable.formProb); + encounterTableFields[encounterTableIdx].children[9].children[0].children[1].GetValue().Set(encounterTable.unownTable); + encounterTableFields[encounterTableIdx].children[15].GetValue().Set(encounterTable.encRateWater); + encounterTableFields[encounterTableIdx].children[17].GetValue().Set(encounterTable.encRateOldRod); + encounterTableFields[encounterTableIdx].children[19].GetValue().Set(encounterTable.encRateGoodRod); + encounterTableFields[encounterTableIdx].children[21].GetValue().Set(encounterTable.encRateSuperRod); - //Write morning tables - SetEncounters(encounterTableFields[encounterTableIdx].children[3].children[0], encounterTable.tairyo); + //Write ground tables + SetEncounters(encounterTableFields[encounterTableIdx].children[2].children[0], encounterTable.groundMons); - //Write day tables - SetEncounters(encounterTableFields[encounterTableIdx].children[4].children[0], encounterTable.day); + //Write morning tables + SetEncounters(encounterTableFields[encounterTableIdx].children[3].children[0], encounterTable.tairyo); - //Write night tables - SetEncounters(encounterTableFields[encounterTableIdx].children[5].children[0], encounterTable.night); + //Write day tables + SetEncounters(encounterTableFields[encounterTableIdx].children[4].children[0], encounterTable.day); - //Write pokefinder tables - SetEncounters(encounterTableFields[encounterTableIdx].children[6].children[0], encounterTable.swayGrass); + //Write night tables + SetEncounters(encounterTableFields[encounterTableIdx].children[5].children[0], encounterTable.night); - //Write ruby tables - SetEncounters(encounterTableFields[encounterTableIdx]["gbaRuby"].children[0], encounterTable.gbaRuby); + //Write pokefinder tables + SetEncounters(encounterTableFields[encounterTableIdx].children[6].children[0], encounterTable.swayGrass); - //Write sapphire tables - SetEncounters(encounterTableFields[encounterTableIdx]["gbaSapp"].children[0], encounterTable.gbaSapphire); + //Write ruby tables + SetEncounters(encounterTableFields[encounterTableIdx]["gbaRuby"].children[0], encounterTable.gbaRuby); - //Write emerald tables - SetEncounters(encounterTableFields[encounterTableIdx]["gbaEme"].children[0], encounterTable.gbaEmerald); + //Write sapphire tables + SetEncounters(encounterTableFields[encounterTableIdx]["gbaSapp"].children[0], encounterTable.gbaSapphire); - //Write fire tables - SetEncounters(encounterTableFields[encounterTableIdx]["gbaFire"].children[0], encounterTable.gbaFire); + //Write emerald tables + SetEncounters(encounterTableFields[encounterTableIdx]["gbaEme"].children[0], encounterTable.gbaEmerald); - //Write leaf tables - SetEncounters(encounterTableFields[encounterTableIdx]["gbaLeaf"].children[0], encounterTable.gbaLeaf); + //Write fire tables + SetEncounters(encounterTableFields[encounterTableIdx]["gbaFire"].children[0], encounterTable.gbaFire); - //Write surfing tables - SetEncounters(encounterTableFields[encounterTableIdx].children[16].children[0], encounterTable.waterMons); + //Write leaf tables + SetEncounters(encounterTableFields[encounterTableIdx]["gbaLeaf"].children[0], encounterTable.gbaLeaf); - //Write old rod tables - SetEncounters(encounterTableFields[encounterTableIdx].children[18].children[0], encounterTable.oldRodMons); + //Write surfing tables + SetEncounters(encounterTableFields[encounterTableIdx].children[16].children[0], encounterTable.waterMons); - //Write good rod tables - SetEncounters(encounterTableFields[encounterTableIdx].children[20].children[0], encounterTable.goodRodMons); + //Write old rod tables + SetEncounters(encounterTableFields[encounterTableIdx].children[18].children[0], encounterTable.oldRodMons); - //Write super rod tables - SetEncounters(encounterTableFields[encounterTableIdx].children[22].children[0], encounterTable.superRodMons); - } + //Write good rod tables + SetEncounters(encounterTableFields[encounterTableIdx].children[20].children[0], encounterTable.goodRodMons); - //Write trophy garden table - AssetTypeValueField[] trophyGardenMonFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[5].children[0].children; - for (int trophyGardenMonIdx = 0; trophyGardenMonIdx < trophyGardenMonFields.Length; trophyGardenMonIdx++) - trophyGardenMonFields[trophyGardenMonIdx].children[0].GetValue().Set(encounterTableFile.trophyGardenMons[trophyGardenMonIdx]); + //Write super rod tables + SetEncounters(encounterTableFields[encounterTableIdx].children[22].children[0], encounterTable.superRodMons); +} - //Write honey tree tables - AssetTypeValueField[] honeyTreeEncounterFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[6].children[0].children; - for (int honeyTreeEncounterIdx = 0; honeyTreeEncounterIdx < honeyTreeEncounterFields.Length; honeyTreeEncounterIdx++) - { - HoneyTreeEncounter honeyTreeEncounter = encounterTableFile.honeyTreeEnconters[honeyTreeEncounterIdx]; - honeyTreeEncounterFields[honeyTreeEncounterIdx].children[0].GetValue().Set(honeyTreeEncounter.rate); - honeyTreeEncounterFields[honeyTreeEncounterIdx].children[1].GetValue().Set(honeyTreeEncounter.normalDexID); - honeyTreeEncounterFields[honeyTreeEncounterIdx].children[2].GetValue().Set(honeyTreeEncounter.rareDexID); - honeyTreeEncounterFields[honeyTreeEncounterIdx].children[3].GetValue().Set(honeyTreeEncounter.superRareDexID); - } +//Write trophy garden table +AssetTypeValueField[] trophyGardenMonFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[5].children[0].children; +for (int trophyGardenMonIdx = 0; trophyGardenMonIdx < trophyGardenMonFields.Length; trophyGardenMonIdx++) + trophyGardenMonFields[trophyGardenMonIdx].children[0].GetValue().Set(encounterTableFile.trophyGardenMons[trophyGardenMonIdx]); + +//Write honey tree tables +AssetTypeValueField[] honeyTreeEncounterFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[6].children[0].children; +for (int honeyTreeEncounterIdx = 0; honeyTreeEncounterIdx < honeyTreeEncounterFields.Length; honeyTreeEncounterIdx++) +{ + HoneyTreeEncounter honeyTreeEncounter = encounterTableFile.honeyTreeEnconters[honeyTreeEncounterIdx]; + honeyTreeEncounterFields[honeyTreeEncounterIdx].children[0].GetValue().Set(honeyTreeEncounter.rate); + honeyTreeEncounterFields[honeyTreeEncounterIdx].children[1].GetValue().Set(honeyTreeEncounter.normalDexID); + honeyTreeEncounterFields[honeyTreeEncounterIdx].children[2].GetValue().Set(honeyTreeEncounter.rareDexID); + honeyTreeEncounterFields[honeyTreeEncounterIdx].children[3].GetValue().Set(honeyTreeEncounter.superRareDexID); +} + +//Write safari table +AssetTypeValueField[] safariMonFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[8].children[0].children; +for (int safariMonIdx = 0; safariMonIdx < safariMonFields.Length; safariMonIdx++) + safariMonFields[safariMonIdx].children[0].GetValue().Set(encounterTableFile.safariMons[safariMonIdx]); +} + +fileManager.WriteMonoBehaviours(PathEnum.Gamesettings, encounterTableMonoBehaviours); +return; +} + +/// +/// Updates loaded bundle with Trainers. +/// +private static void CommitTrainers() +{ +AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.DprMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "TrainerTable"); + +AssetTypeValueField[] trainerFields = monoBehaviour.children[5].children[0].children; +for (int trainerIdx = 0; trainerIdx < gameData.trainers.Count; trainerIdx++) +{ +Trainer trainer = gameData.trainers[trainerIdx]; +trainerFields[trainerIdx].children[0].GetValue().Set(trainer.trainerTypeID); +trainerFields[trainerIdx].children[1].GetValue().Set(trainer.colorID); +trainerFields[trainerIdx].children[2].GetValue().Set(trainer.fightType); +trainerFields[trainerIdx].children[3].GetValue().Set(trainer.arenaID); +trainerFields[trainerIdx].children[4].GetValue().Set(trainer.effectID); +trainerFields[trainerIdx].children[5].GetValue().Set(trainer.gold); +trainerFields[trainerIdx].children[6].GetValue().Set(trainer.useItem1); +trainerFields[trainerIdx].children[7].GetValue().Set(trainer.useItem2); +trainerFields[trainerIdx].children[8].GetValue().Set(trainer.useItem3); +trainerFields[trainerIdx].children[9].GetValue().Set(trainer.useItem4); +trainerFields[trainerIdx].children[10].GetValue().Set(trainer.hpRecoverFlag); +trainerFields[trainerIdx].children[11].GetValue().Set(trainer.giftItem); +trainerFields[trainerIdx].children[12].GetValue().Set(trainer.nameLabel); +trainerFields[trainerIdx].children[19].GetValue().Set(trainer.aiBit); + +//Write trainer pokemon +List> tranierPokemons = new(); +List atvs = new(); +atvs.Add(monoBehaviour.children[6].children[0].children[trainerIdx].children[0].GetValue()); +for (int trainerPokemonIdx = 0; trainerPokemonIdx < (int)GetBoundaries(AbsoluteBoundary.TrainerPokemonCount)[2]; trainerPokemonIdx++) +{ + TrainerPokemon trainerPokemon = new(); + if (gameData.trainers[trainerIdx].trainerPokemon.Count > trainerPokemonIdx) + trainerPokemon = gameData.trainers[trainerIdx].trainerPokemon[trainerPokemonIdx]; + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.dexID)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.formID)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.isRare)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.level)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.sex)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.natureID)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.abilityID)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.moveID1)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.moveID2)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.moveID3)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.moveID4)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.itemID)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.ballID)); + atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, trainerPokemon.seal)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.hpIV)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.atkIV)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.defIV)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.spAtkIV)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.spDefIV)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.spdIV)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.hpEV)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.atkEV)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.defEV)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.spAtkEV)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.spDefEV)); + atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.spdEV)); +} +tranierPokemons.Add(atvs); +AssetTypeValueField trainerPokemonsReference = monoBehaviour.children[6].children[0].children[trainerIdx]; +monoBehaviour.children[6].children[0].children[trainerIdx] = GetATVFs(trainerPokemonsReference, tranierPokemons)[0]; +} + +fileManager.WriteMonoBehaviour(PathEnum.DprMasterdatas, monoBehaviour); +} - //Write safari table - AssetTypeValueField[] safariMonFields = encounterTableMonoBehaviours[encounterTableFileIdx].children[8].children[0].children; - for (int safariMonIdx = 0; safariMonIdx < safariMonFields.Length; safariMonIdx++) - safariMonFields[safariMonIdx].children[0].GetValue().Set(encounterTableFile.safariMons[safariMonIdx]); +/// +/// Updates loaded bundle with Battle Tower Trainers. +/// +private static void CommitBattleTowerTrainers() +{ +AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.DprMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "TowerSingleStockTable"); +AssetTypeValueField monoBehaviour2 = fileManager.GetMonoBehaviours(PathEnum.DprMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "TowerDoubleStockTable"); + + AssetTypeValueField[] trainerFields = monoBehaviour.children[4].children[0].children; + AssetTypeValueField[] trainerFieldsDouble = monoBehaviour2.children[4].children[0].children; + for (int trainerIdx = 0; trainerIdx < trainerFields.Length; trainerIdx++) +{ +BattleTowerTrainer trainer = gameData.battleTowerTrainers[trainerIdx]; +trainerFields[trainerIdx].children[0].GetValue().Set(trainer.trainerID2); +trainerFields[trainerIdx].children[1].GetValue().Set(trainer.trainerTypeID); +trainerFields[trainerIdx].children[2].children[0].children[0].GetValue().Set(trainer.battleTowerPokemonID1); +trainerFields[trainerIdx].children[2].children[0].children[1].GetValue().Set(trainer.battleTowerPokemonID2); +trainerFields[trainerIdx].children[2].children[0].children[2].GetValue().Set(trainer.battleTowerPokemonID3); +trainerFields[trainerIdx].children[3].GetValue().Set(trainer.battleBGM); +trainerFields[trainerIdx].children[4].GetValue().Set(trainer.winBGM); + } + +for (int trainerIdx = 0; trainerIdx < trainerFieldsDouble.Length; trainerIdx++) + { + BattleTowerTrainer trainer = gameData.battleTowerTrainersDouble[trainerIdx]; + trainerFieldsDouble[trainerIdx].children[0].GetValue().Set(trainer.trainerID2); + trainerFieldsDouble[trainerIdx].children[1].children[0].children[0].GetValue().Set(trainer.trainerTypeID); + trainerFieldsDouble[trainerIdx].children[1].children[0].children[1].GetValue().Set(trainer.trainerTypeID2); + trainerFieldsDouble[trainerIdx].children[2].children[0].children[0].GetValue().Set(trainer.battleTowerPokemonID1); + trainerFieldsDouble[trainerIdx].children[2].children[0].children[1].GetValue().Set(trainer.battleTowerPokemonID2); + trainerFieldsDouble[trainerIdx].children[2].children[0].children[2].GetValue().Set(trainer.battleTowerPokemonID3); + trainerFieldsDouble[trainerIdx].children[2].children[0].children[3].GetValue().Set(trainer.battleTowerPokemonID4); + trainerFieldsDouble[trainerIdx].children[3].GetValue().Set(trainer.battleBGM); + trainerFieldsDouble[trainerIdx].children[4].GetValue().Set(trainer.winBGM); } - fileManager.WriteMonoBehaviours(PathEnum.Gamesettings, encounterTableMonoBehaviours); - return; + fileManager.WriteMonoBehaviour(PathEnum.DprMasterdatas, monoBehaviour); + fileManager.WriteMonoBehaviour(PathEnum.DprMasterdatas, monoBehaviour2); } - - /// - /// Updates loaded bundle with Trainers. - /// - private static void CommitTrainers() + private static void CommitBattleTowerPokemon() { - AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.DprMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "TrainerTable"); - - AssetTypeValueField[] trainerFields = monoBehaviour.children[5].children[0].children; - for (int trainerIdx = 0; trainerIdx < gameData.trainers.Count; trainerIdx++) - { - Trainer trainer = gameData.trainers[trainerIdx]; - trainerFields[trainerIdx].children[0].GetValue().Set(trainer.trainerTypeID); - trainerFields[trainerIdx].children[1].GetValue().Set(trainer.colorID); - trainerFields[trainerIdx].children[2].GetValue().Set(trainer.fightType); - trainerFields[trainerIdx].children[3].GetValue().Set(trainer.arenaID); - trainerFields[trainerIdx].children[4].GetValue().Set(trainer.effectID); - trainerFields[trainerIdx].children[5].GetValue().Set(trainer.gold); - trainerFields[trainerIdx].children[6].GetValue().Set(trainer.useItem1); - trainerFields[trainerIdx].children[7].GetValue().Set(trainer.useItem2); - trainerFields[trainerIdx].children[8].GetValue().Set(trainer.useItem3); - trainerFields[trainerIdx].children[9].GetValue().Set(trainer.useItem4); - trainerFields[trainerIdx].children[10].GetValue().Set(trainer.hpRecoverFlag); - trainerFields[trainerIdx].children[11].GetValue().Set(trainer.giftItem); - trainerFields[trainerIdx].children[12].GetValue().Set(trainer.nameLabel); - trainerFields[trainerIdx].children[19].GetValue().Set(trainer.aiBit); - - //Write trainer pokemon - List> tranierPokemons = new(); - List atvs = new(); - atvs.Add(monoBehaviour.children[6].children[0].children[trainerIdx].children[0].GetValue()); - for (int trainerPokemonIdx = 0; trainerPokemonIdx < (int)GetBoundaries(AbsoluteBoundary.TrainerPokemonCount)[2]; trainerPokemonIdx++) - { - TrainerPokemon trainerPokemon = new(); - if (gameData.trainers[trainerIdx].trainerPokemon.Count > trainerPokemonIdx) - trainerPokemon = gameData.trainers[trainerIdx].trainerPokemon[trainerPokemonIdx]; - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.dexID)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.formID)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.isRare)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.level)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.sex)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.natureID)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.abilityID)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.moveID1)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.moveID2)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.moveID3)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.moveID4)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, trainerPokemon.itemID)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.ballID)); - atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, trainerPokemon.seal)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.hpIV)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.atkIV)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.defIV)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.spAtkIV)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.spDefIV)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.spdIV)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.hpEV)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.atkEV)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.defEV)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.spAtkEV)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.spDefEV)); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt8, trainerPokemon.spdEV)); - } - tranierPokemons.Add(atvs); - AssetTypeValueField trainerPokemonsReference = monoBehaviour.children[6].children[0].children[trainerIdx]; - monoBehaviour.children[6].children[0].children[trainerIdx] = GetATVFs(trainerPokemonsReference, tranierPokemons)[0]; + AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.DprMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "TowerTrainerTable"); + + AssetTypeValueField[] pokemonFields = monoBehaviour.children[5].children[0].children; + //Parse battle tower trainer pokemon + for (int pokemonIdx = 0; pokemonIdx < pokemonFields.Length && pokemonFields[pokemonIdx].children[0].value.value.asUInt32 != 0; pokemonIdx += 1) + { + BattleTowerTrainerPokemon pokemon = gameData.battleTowerTrainerPokemons[pokemonIdx]; + // Trainer trainer = gameData.trainers[trainerIdx]; + pokemonFields[pokemonIdx].children[0].GetValue().Set(pokemon.pokemonID); + pokemonFields[pokemonIdx].children[1].GetValue().Set(pokemon.dexID); + pokemonFields[pokemonIdx].children[2].GetValue().Set(pokemon.formID); + pokemonFields[pokemonIdx].children[3].GetValue().Set(pokemon.isRare); + pokemonFields[pokemonIdx].children[4].GetValue().Set(pokemon.level); + pokemonFields[pokemonIdx].children[5].GetValue().Set(pokemon.sex); + pokemonFields[pokemonIdx].children[6].GetValue().Set(pokemon.natureID); + pokemonFields[pokemonIdx].children[7].GetValue().Set(pokemon.abilityID); + pokemonFields[pokemonIdx].children[8].GetValue().Set(pokemon.moveID1); + pokemonFields[pokemonIdx].children[9].GetValue().Set(pokemon.moveID2); + pokemonFields[pokemonIdx].children[10].GetValue().Set(pokemon.moveID3); + pokemonFields[pokemonIdx].children[11].GetValue().Set(pokemon.moveID4); + pokemonFields[pokemonIdx].children[12].GetValue().Set(pokemon.itemID); + pokemonFields[pokemonIdx].children[13].GetValue().Set(pokemon.ballID); + pokemonFields[pokemonIdx].children[14].GetValue().Set(pokemon.seal); + pokemonFields[pokemonIdx].children[15].GetValue().Set(pokemon.hpIV); + pokemonFields[pokemonIdx].children[16].GetValue().Set(pokemon.atkIV); + pokemonFields[pokemonIdx].children[17].GetValue().Set(pokemon.defIV); + pokemonFields[pokemonIdx].children[18].GetValue().Set(pokemon.spAtkIV); + pokemonFields[pokemonIdx].children[19].GetValue().Set(pokemon.spDefIV); + pokemonFields[pokemonIdx].children[20].GetValue().Set(pokemon.spdIV); + pokemonFields[pokemonIdx].children[21].GetValue().Set(pokemon.hpEV); + pokemonFields[pokemonIdx].children[22].GetValue().Set(pokemon.atkEV); + pokemonFields[pokemonIdx].children[23].GetValue().Set(pokemon.defEV); + pokemonFields[pokemonIdx].children[24].GetValue().Set(pokemon.spAtkEV); + pokemonFields[pokemonIdx].children[25].GetValue().Set(pokemon.spDefEV); + pokemonFields[pokemonIdx].children[26].GetValue().Set(pokemon.spdEV); } fileManager.WriteMonoBehaviour(PathEnum.DprMasterdatas, monoBehaviour); @@ -3051,172 +3245,172 @@ private static void CommitTrainers() /// Updates loaded bundle with ShopTables. /// private static void CommitShopTables() - { - AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.DprMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "ShopTable"); +{ +AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.DprMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "ShopTable"); - List> martItems = new(); - for (int martItemIdx = 0; martItemIdx < gameData.shopTables.martItems.Count; martItemIdx++) - { - MartItem martItem = gameData.shopTables.martItems[martItemIdx]; - List atvs = new(); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, martItem.itemID)); - atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, martItem.badgeNum)); - atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, martItem.zoneID)); - martItems.Add(atvs); - } - AssetTypeValueField martItemReference = monoBehaviour.children[4].children[0].children[0]; - monoBehaviour.children[4].children[0].SetChildrenList(GetATVFs(martItemReference, martItems)); +List> martItems = new(); +for (int martItemIdx = 0; martItemIdx < gameData.shopTables.martItems.Count; martItemIdx++) +{ +MartItem martItem = gameData.shopTables.martItems[martItemIdx]; +List atvs = new(); +atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, martItem.itemID)); +atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, martItem.badgeNum)); +atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, martItem.zoneID)); +martItems.Add(atvs); +} +AssetTypeValueField martItemReference = monoBehaviour.children[4].children[0].children[0]; +monoBehaviour.children[4].children[0].SetChildrenList(GetATVFs(martItemReference, martItems)); - List> fixedShopItems = new(); - for (int fixedShopItemIdx = 0; fixedShopItemIdx < gameData.shopTables.fixedShopItems.Count; fixedShopItemIdx++) - { - FixedShopItem fixedShopItem = gameData.shopTables.fixedShopItems[fixedShopItemIdx]; - List atvs = new(); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, fixedShopItem.itemID)); - atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, fixedShopItem.shopID)); - fixedShopItems.Add(atvs); - } - AssetTypeValueField fixedShopItemReference = monoBehaviour.children[5].children[0].children[0]; - monoBehaviour.children[5].children[0].SetChildrenList(GetATVFs(fixedShopItemReference, fixedShopItems)); +List> fixedShopItems = new(); +for (int fixedShopItemIdx = 0; fixedShopItemIdx < gameData.shopTables.fixedShopItems.Count; fixedShopItemIdx++) +{ +FixedShopItem fixedShopItem = gameData.shopTables.fixedShopItems[fixedShopItemIdx]; +List atvs = new(); +atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, fixedShopItem.itemID)); +atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, fixedShopItem.shopID)); +fixedShopItems.Add(atvs); +} +AssetTypeValueField fixedShopItemReference = monoBehaviour.children[5].children[0].children[0]; +monoBehaviour.children[5].children[0].SetChildrenList(GetATVFs(fixedShopItemReference, fixedShopItems)); - List> bpShopItems = new(); - for (int bpShopItemIdx = 0; bpShopItemIdx < gameData.shopTables.bpShopItems.Count; bpShopItemIdx++) - { - BpShopItem bpShopItem = gameData.shopTables.bpShopItems[bpShopItemIdx]; - List atvs = new(); - atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, bpShopItem.itemID)); - atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, bpShopItem.npcID)); - bpShopItems.Add(atvs); - } - AssetTypeValueField bpShopItemReference = monoBehaviour.children[9].children[0].children[0]; - monoBehaviour.children[9].children[0].SetChildrenList(GetATVFs(bpShopItemReference, bpShopItems)); +List> bpShopItems = new(); +for (int bpShopItemIdx = 0; bpShopItemIdx < gameData.shopTables.bpShopItems.Count; bpShopItemIdx++) +{ +BpShopItem bpShopItem = gameData.shopTables.bpShopItems[bpShopItemIdx]; +List atvs = new(); +atvs.Add(new AssetTypeValue(EnumValueTypes.UInt16, bpShopItem.itemID)); +atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, bpShopItem.npcID)); +bpShopItems.Add(atvs); +} +AssetTypeValueField bpShopItemReference = monoBehaviour.children[9].children[0].children[0]; +monoBehaviour.children[9].children[0].SetChildrenList(GetATVFs(bpShopItemReference, bpShopItems)); - fileManager.WriteMonoBehaviour(PathEnum.DprMasterdatas, monoBehaviour); - } +fileManager.WriteMonoBehaviour(PathEnum.DprMasterdatas, monoBehaviour); +} - /// - /// Updates loaded bundle with PickupItems. - /// - private static void CommitPickupItems() - { - AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.DprMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "MonohiroiTable"); +/// +/// Updates loaded bundle with PickupItems. +/// +private static void CommitPickupItems() +{ +AssetTypeValueField monoBehaviour = fileManager.GetMonoBehaviours(PathEnum.DprMasterdatas).Find(m => Encoding.Default.GetString(m.children[3].value.value.asString) == "MonohiroiTable"); - AssetTypeValueField[] pickupItemFields = monoBehaviour.children[4].children[0].children; - for (int pickupItemIdx = 0; pickupItemIdx < pickupItemFields.Length; pickupItemIdx++) - { - PickupItem pickupItem = gameData.pickupItems[pickupItemIdx]; - pickupItemFields[pickupItemIdx].children[0].GetValue().Set(pickupItem.itemID); +AssetTypeValueField[] pickupItemFields = monoBehaviour.children[4].children[0].children; +for (int pickupItemIdx = 0; pickupItemIdx < pickupItemFields.Length; pickupItemIdx++) +{ +PickupItem pickupItem = gameData.pickupItems[pickupItemIdx]; +pickupItemFields[pickupItemIdx].children[0].GetValue().Set(pickupItem.itemID); - //Write item probabilities - for (int ratio = 0; ratio < pickupItemFields[pickupItemIdx].children[1].children[0].childrenCount; ratio++) - pickupItemFields[pickupItemIdx].children[1].children[0].children[ratio].GetValue().Set(pickupItem.ratios[ratio]); - } +//Write item probabilities +for (int ratio = 0; ratio < pickupItemFields[pickupItemIdx].children[1].children[0].childrenCount; ratio++) + pickupItemFields[pickupItemIdx].children[1].children[0].children[ratio].GetValue().Set(pickupItem.ratios[ratio]); +} - fileManager.WriteMonoBehaviour(PathEnum.DprMasterdatas, monoBehaviour); - } +fileManager.WriteMonoBehaviour(PathEnum.DprMasterdatas, monoBehaviour); +} - /// - /// Updates loaded bundle with EvScripts. - /// - private static void CommitEvScripts() - { - List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.EvScript).Where(m => m.children[4].GetName() == "Scripts").ToList(); +/// +/// Updates loaded bundle with EvScripts. +/// +private static void CommitEvScripts() +{ +List monoBehaviours = fileManager.GetMonoBehaviours(PathEnum.EvScript).Where(m => m.children[4].GetName() == "Scripts").ToList(); - for (int mIdx = 0; mIdx < monoBehaviours.Count; mIdx++) - { - EvScript evScript = gameData.evScripts[mIdx]; - monoBehaviours[mIdx].children[3].GetValue().Set(evScript.mName); +for (int mIdx = 0; mIdx < monoBehaviours.Count; mIdx++) +{ +EvScript evScript = gameData.evScripts[mIdx]; +monoBehaviours[mIdx].children[3].GetValue().Set(evScript.mName); - //Write Scripts - AssetTypeValueField[] scriptFields = monoBehaviours[mIdx].children[4].children[0].children; - for (int scriptIdx = 0; scriptIdx < scriptFields.Length; scriptIdx++) - { - Script script = evScript.scripts[scriptIdx]; - scriptFields[scriptIdx].children[0].GetValue().Set(script.evLabel); - - //Write Commands - AssetTypeValueField[] commandFields = scriptFields[scriptIdx].children[1].children[0].children; - for (int commandIdx = 0; commandIdx < commandFields.Length; commandIdx++) - { - Command command = script.commands[commandIdx]; - - //Check for commands without data, because those exist for some reason. - if (commandFields[commandIdx].children[0].children[0].children.Length == 0) - continue; - - commandFields[commandIdx].children[0].children[0].children[0].children[1].GetValue().Set(command.cmdType); - - //Write Arguments - AssetTypeValueField[] argumentFields = commandFields[commandIdx].children[0].children[0].children; - for (int argIdx = 1; argIdx < argumentFields.Length; argIdx++) - { - Argument arg = command.args[argIdx - 1]; - argumentFields[argIdx].children[0].GetValue().Set(arg.argType); - argumentFields[argIdx].children[1].GetValue().Set(arg.data); - if (arg.argType == 1) - argumentFields[argIdx].children[1].GetValue().Set(ConvertToInt((int)arg.data)); - } - } - } +//Write Scripts +AssetTypeValueField[] scriptFields = monoBehaviours[mIdx].children[4].children[0].children; +for (int scriptIdx = 0; scriptIdx < scriptFields.Length; scriptIdx++) +{ + Script script = evScript.scripts[scriptIdx]; + scriptFields[scriptIdx].children[0].GetValue().Set(script.evLabel); - //Write StrLists - AssetTypeValueField[] stringFields = monoBehaviours[mIdx].children[5].children[0].children; - for (int stringIdx = 0; stringIdx < stringFields.Length; stringIdx++) - stringFields[stringIdx].GetValue().Set(evScript.strList[stringIdx]); - } + //Write Commands + AssetTypeValueField[] commandFields = scriptFields[scriptIdx].children[1].children[0].children; + for (int commandIdx = 0; commandIdx < commandFields.Length; commandIdx++) + { + Command command = script.commands[commandIdx]; - fileManager.WriteMonoBehaviours(PathEnum.EvScript, monoBehaviours.ToArray()); - } + //Check for commands without data, because those exist for some reason. + if (commandFields[commandIdx].children[0].children[0].children.Length == 0) + continue; - /// - /// Converts a List of Encounters into a AssetTypeValueField array. - /// - private static void SetEncounters(AssetTypeValueField encounterSetAtvf, List encounters) + commandFields[commandIdx].children[0].children[0].children[0].children[1].GetValue().Set(command.cmdType); + + //Write Arguments + AssetTypeValueField[] argumentFields = commandFields[commandIdx].children[0].children[0].children; + for (int argIdx = 1; argIdx < argumentFields.Length; argIdx++) { - List> encounterAtvs = new(); - for (int encounterIdx = 0; encounterIdx < encounterSetAtvf.GetChildrenCount(); encounterIdx++) - { - Encounter encounter = encounters[encounterIdx]; - List atvs = new(); - atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, encounter.maxLv)); - atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, encounter.minLv)); - atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, encounter.dexID)); - encounterAtvs.Add(atvs); - } - AssetTypeValueField martItemReference = encounterSetAtvf.children[0]; - encounterSetAtvf.SetChildrenList(GetATVFs(martItemReference, encounterAtvs)); + Argument arg = command.args[argIdx - 1]; + argumentFields[argIdx].children[0].GetValue().Set(arg.argType); + argumentFields[argIdx].children[1].GetValue().Set(arg.data); + if (arg.argType == 1) + argumentFields[argIdx].children[1].GetValue().Set(ConvertToInt((int)arg.data)); } + } +} - /// - /// Updates loaded bundle with PickupItems. - /// - private static AssetTypeValueField[] GetATVFs(AssetTypeValueField reference, List> items) - { - List atvfs = new(); - for (int itemIdx = 0; itemIdx < items.Count; itemIdx++) - { - List item = items[itemIdx]; - AssetTypeValueField atvf = new(); - AssetTypeValueField[] children = new AssetTypeValueField[item.Count]; +//Write StrLists +AssetTypeValueField[] stringFields = monoBehaviours[mIdx].children[5].children[0].children; +for (int stringIdx = 0; stringIdx < stringFields.Length; stringIdx++) + stringFields[stringIdx].GetValue().Set(evScript.strList[stringIdx]); +} - for (int i = 0; i < children.Length; i++) - { - children[i] = new AssetTypeValueField(); - children[i].Read(item[i], reference.children[i].templateField, Array.Empty()); - } +fileManager.WriteMonoBehaviours(PathEnum.EvScript, monoBehaviours.ToArray()); +} - atvf.Read(null, reference.templateField, children); - atvfs.Add(atvf); - } - return atvfs.ToArray(); - } +/// +/// Converts a List of Encounters into a AssetTypeValueField array. +/// +private static void SetEncounters(AssetTypeValueField encounterSetAtvf, List encounters) +{ +List> encounterAtvs = new(); +for (int encounterIdx = 0; encounterIdx < encounterSetAtvf.GetChildrenCount(); encounterIdx++) +{ +Encounter encounter = encounters[encounterIdx]; +List atvs = new(); +atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, encounter.maxLv)); +atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, encounter.minLv)); +atvs.Add(new AssetTypeValue(EnumValueTypes.Int32, encounter.dexID)); +encounterAtvs.Add(atvs); +} +AssetTypeValueField martItemReference = encounterSetAtvf.children[0]; +encounterSetAtvf.SetChildrenList(GetATVFs(martItemReference, encounterAtvs)); +} - /// - /// Interprets bytes of a float as an int32. - /// - private static int ConvertToInt(float n) - { - return BitConverter.ToInt32(BitConverter.GetBytes(n)); - } - } +/// +/// Updates loaded bundle with PickupItems. +/// +private static AssetTypeValueField[] GetATVFs(AssetTypeValueField reference, List> items) +{ +List atvfs = new(); +for (int itemIdx = 0; itemIdx < items.Count; itemIdx++) +{ +List item = items[itemIdx]; +AssetTypeValueField atvf = new(); +AssetTypeValueField[] children = new AssetTypeValueField[item.Count]; + +for (int i = 0; i < children.Length; i++) +{ + children[i] = new AssetTypeValueField(); + children[i].Read(item[i], reference.children[i].templateField, Array.Empty()); +} + +atvf.Read(null, reference.templateField, children); +atvfs.Add(atvf); +} +return atvfs.ToArray(); +} + +/// +/// Interprets bytes of a float as an int32. +/// +private static int ConvertToInt(float n) +{ +return BitConverter.ToInt32(BitConverter.GetBytes(n)); +} +} } diff --git a/Forms/BattleTowerPokemonForm.Designer.cs b/Forms/BattleTowerPokemonForm.Designer.cs new file mode 100644 index 0000000..709a913 --- /dev/null +++ b/Forms/BattleTowerPokemonForm.Designer.cs @@ -0,0 +1,814 @@ +namespace ImpostersOrdeal.Forms +{ + partial class BattleTowerPokemonForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + groupBox1 = new System.Windows.Forms.GroupBox(); + label3 = new System.Windows.Forms.Label(); + levelNumericUpDown = new System.Windows.Forms.NumericUpDown(); + label2 = new System.Windows.Forms.Label(); + formComboBox = new System.Windows.Forms.ComboBox(); + label1 = new System.Windows.Forms.Label(); + speciesComboBox = new System.Windows.Forms.ComboBox(); + checkBox1 = new System.Windows.Forms.CheckBox(); + label4 = new System.Windows.Forms.Label(); + comboBox3 = new System.Windows.Forms.ComboBox(); + groupBox2 = new System.Windows.Forms.GroupBox(); + label9 = new System.Windows.Forms.Label(); + numericUpDown3 = new System.Windows.Forms.NumericUpDown(); + label8 = new System.Windows.Forms.Label(); + numericUpDown2 = new System.Windows.Forms.NumericUpDown(); + groupBox3 = new System.Windows.Forms.GroupBox(); + label7 = new System.Windows.Forms.Label(); + comboBox6 = new System.Windows.Forms.ComboBox(); + label6 = new System.Windows.Forms.Label(); + comboBox5 = new System.Windows.Forms.ComboBox(); + label5 = new System.Windows.Forms.Label(); + comboBox4 = new System.Windows.Forms.ComboBox(); + groupBox4 = new System.Windows.Forms.GroupBox(); + label13 = new System.Windows.Forms.Label(); + label12 = new System.Windows.Forms.Label(); + label11 = new System.Windows.Forms.Label(); + comboBox10 = new System.Windows.Forms.ComboBox(); + comboBox9 = new System.Windows.Forms.ComboBox(); + comboBox8 = new System.Windows.Forms.ComboBox(); + label10 = new System.Windows.Forms.Label(); + comboBox7 = new System.Windows.Forms.ComboBox(); + groupBox5 = new System.Windows.Forms.GroupBox(); + label19 = new System.Windows.Forms.Label(); + numericUpDown9 = new System.Windows.Forms.NumericUpDown(); + label18 = new System.Windows.Forms.Label(); + numericUpDown8 = new System.Windows.Forms.NumericUpDown(); + label17 = new System.Windows.Forms.Label(); + numericUpDown7 = new System.Windows.Forms.NumericUpDown(); + label16 = new System.Windows.Forms.Label(); + numericUpDown6 = new System.Windows.Forms.NumericUpDown(); + label15 = new System.Windows.Forms.Label(); + numericUpDown5 = new System.Windows.Forms.NumericUpDown(); + label14 = new System.Windows.Forms.Label(); + numericUpDown4 = new System.Windows.Forms.NumericUpDown(); + groupBox6 = new System.Windows.Forms.GroupBox(); + label20 = new System.Windows.Forms.Label(); + numericUpDown10 = new System.Windows.Forms.NumericUpDown(); + label21 = new System.Windows.Forms.Label(); + numericUpDown11 = new System.Windows.Forms.NumericUpDown(); + label22 = new System.Windows.Forms.Label(); + numericUpDown12 = new System.Windows.Forms.NumericUpDown(); + label23 = new System.Windows.Forms.Label(); + numericUpDown13 = new System.Windows.Forms.NumericUpDown(); + label24 = new System.Windows.Forms.Label(); + numericUpDown14 = new System.Windows.Forms.NumericUpDown(); + label25 = new System.Windows.Forms.Label(); + numericUpDown15 = new System.Windows.Forms.NumericUpDown(); + sortByComboBox = new System.Windows.Forms.ComboBox(); + trainerDisplayTextBox = new System.Windows.Forms.TextBox(); + listBox = new System.Windows.Forms.ListBox(); + groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)levelNumericUpDown).BeginInit(); + groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown2).BeginInit(); + groupBox3.SuspendLayout(); + groupBox4.SuspendLayout(); + groupBox5.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown9).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown8).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown7).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown6).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown4).BeginInit(); + groupBox6.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown10).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown11).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown12).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown13).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown14).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown15).BeginInit(); + SuspendLayout(); + // + // groupBox1 + // + groupBox1.Controls.Add(label3); + groupBox1.Controls.Add(levelNumericUpDown); + groupBox1.Controls.Add(label2); + groupBox1.Controls.Add(formComboBox); + groupBox1.Controls.Add(label1); + groupBox1.Controls.Add(speciesComboBox); + groupBox1.Location = new System.Drawing.Point(208, 48); + groupBox1.Name = "groupBox1"; + groupBox1.Size = new System.Drawing.Size(189, 131); + groupBox1.TabIndex = 0; + groupBox1.TabStop = false; + groupBox1.Text = "Main"; + // + // label3 + // + label3.AutoSize = true; + label3.Location = new System.Drawing.Point(85, 96); + label3.Name = "label3"; + label3.Size = new System.Drawing.Size(43, 20); + label3.TabIndex = 6; + label3.Text = "Level"; + // + // levelNumericUpDown + // + levelNumericUpDown.Location = new System.Drawing.Point(133, 93); + levelNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + levelNumericUpDown.Name = "levelNumericUpDown"; + levelNumericUpDown.Size = new System.Drawing.Size(50, 27); + levelNumericUpDown.TabIndex = 5; + // + // label2 + // + label2.AutoSize = true; + label2.Location = new System.Drawing.Point(83, 63); + label2.Name = "label2"; + label2.Size = new System.Drawing.Size(43, 20); + label2.TabIndex = 3; + label2.Text = "Form"; + // + // formComboBox + // + formComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + formComboBox.FormattingEnabled = true; + formComboBox.Location = new System.Drawing.Point(133, 60); + formComboBox.Name = "formComboBox"; + formComboBox.Size = new System.Drawing.Size(50, 28); + formComboBox.TabIndex = 2; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new System.Drawing.Point(18, 29); + label1.Name = "label1"; + label1.Size = new System.Drawing.Size(59, 20); + label1.TabIndex = 1; + label1.Text = "Species"; + // + // speciesComboBox + // + speciesComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + speciesComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + speciesComboBox.FormattingEnabled = true; + speciesComboBox.Location = new System.Drawing.Point(83, 27); + speciesComboBox.Name = "speciesComboBox"; + speciesComboBox.Size = new System.Drawing.Size(100, 28); + speciesComboBox.TabIndex = 0; + // + // checkBox1 + // + checkBox1.AutoSize = true; + checkBox1.Location = new System.Drawing.Point(117, 27); + checkBox1.Name = "checkBox1"; + checkBox1.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + checkBox1.Size = new System.Drawing.Size(66, 24); + checkBox1.TabIndex = 4; + checkBox1.Text = "Shiny"; + checkBox1.UseVisualStyleBackColor = true; + // + // label4 + // + label4.AutoSize = true; + label4.Location = new System.Drawing.Point(21, 29); + label4.Name = "label4"; + label4.Size = new System.Drawing.Size(57, 20); + label4.TabIndex = 8; + label4.Text = "Gender"; + // + // comboBox3 + // + comboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + comboBox3.FormattingEnabled = true; + comboBox3.Location = new System.Drawing.Point(83, 27); + comboBox3.Name = "comboBox3"; + comboBox3.Size = new System.Drawing.Size(100, 28); + comboBox3.TabIndex = 7; + // + // groupBox2 + // + groupBox2.Controls.Add(label9); + groupBox2.Controls.Add(numericUpDown3); + groupBox2.Controls.Add(label8); + groupBox2.Controls.Add(numericUpDown2); + groupBox2.Controls.Add(checkBox1); + groupBox2.Location = new System.Drawing.Point(404, 56); + groupBox2.Name = "groupBox2"; + groupBox2.Size = new System.Drawing.Size(189, 131); + groupBox2.TabIndex = 5; + groupBox2.TabStop = false; + groupBox2.Text = "Visuals"; + // + // label9 + // + label9.AutoSize = true; + label9.Location = new System.Drawing.Point(42, 91); + label9.Name = "label9"; + label9.Size = new System.Drawing.Size(35, 20); + label9.TabIndex = 10; + label9.Text = "seal"; + // + // numericUpDown3 + // + numericUpDown3.Location = new System.Drawing.Point(83, 89); + numericUpDown3.Maximum = new decimal(new int[] { int.MaxValue, 0, 0, 0 }); + numericUpDown3.Minimum = new decimal(new int[] { int.MinValue, 0, 0, int.MinValue }); + numericUpDown3.Name = "numericUpDown3"; + numericUpDown3.Size = new System.Drawing.Size(101, 27); + numericUpDown3.TabIndex = 9; + // + // label8 + // + label8.AutoSize = true; + label8.Location = new System.Drawing.Point(78, 59); + label8.Name = "label8"; + label8.Size = new System.Drawing.Size(49, 20); + label8.TabIndex = 8; + label8.Text = "ballID"; + // + // numericUpDown2 + // + numericUpDown2.Location = new System.Drawing.Point(133, 56); + numericUpDown2.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + numericUpDown2.Name = "numericUpDown2"; + numericUpDown2.Size = new System.Drawing.Size(50, 27); + numericUpDown2.TabIndex = 7; + // + // groupBox3 + // + groupBox3.Controls.Add(label7); + groupBox3.Controls.Add(comboBox6); + groupBox3.Controls.Add(label6); + groupBox3.Controls.Add(comboBox5); + groupBox3.Controls.Add(label5); + groupBox3.Controls.Add(comboBox4); + groupBox3.Controls.Add(label4); + groupBox3.Controls.Add(comboBox3); + groupBox3.Location = new System.Drawing.Point(599, 56); + groupBox3.Name = "groupBox3"; + groupBox3.Size = new System.Drawing.Size(189, 184); + groupBox3.TabIndex = 7; + groupBox3.TabStop = false; + groupBox3.Text = "Attributes"; + // + // label7 + // + label7.AutoSize = true; + label7.Location = new System.Drawing.Point(38, 131); + label7.Name = "label7"; + label7.Size = new System.Drawing.Size(39, 20); + label7.TabIndex = 14; + label7.Text = "Item"; + // + // comboBox6 + // + comboBox6.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + comboBox6.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + comboBox6.FormattingEnabled = true; + comboBox6.Location = new System.Drawing.Point(83, 128); + comboBox6.Name = "comboBox6"; + comboBox6.Size = new System.Drawing.Size(100, 28); + comboBox6.TabIndex = 13; + // + // label6 + // + label6.AutoSize = true; + label6.Location = new System.Drawing.Point(25, 97); + label6.Name = "label6"; + label6.Size = new System.Drawing.Size(52, 20); + label6.TabIndex = 12; + label6.Text = "Ability"; + // + // comboBox5 + // + comboBox5.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + comboBox5.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + comboBox5.FormattingEnabled = true; + comboBox5.Location = new System.Drawing.Point(83, 93); + comboBox5.Name = "comboBox5"; + comboBox5.Size = new System.Drawing.Size(100, 28); + comboBox5.TabIndex = 11; + // + // label5 + // + label5.AutoSize = true; + label5.Location = new System.Drawing.Point(23, 63); + label5.Name = "label5"; + label5.Size = new System.Drawing.Size(54, 20); + label5.TabIndex = 10; + label5.Text = "Nature"; + // + // comboBox4 + // + comboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + comboBox4.FormattingEnabled = true; + comboBox4.Location = new System.Drawing.Point(83, 60); + comboBox4.Name = "comboBox4"; + comboBox4.Size = new System.Drawing.Size(100, 28); + comboBox4.TabIndex = 9; + // + // groupBox4 + // + groupBox4.Controls.Add(label13); + groupBox4.Controls.Add(label12); + groupBox4.Controls.Add(label11); + groupBox4.Controls.Add(comboBox10); + groupBox4.Controls.Add(comboBox9); + groupBox4.Controls.Add(comboBox8); + groupBox4.Controls.Add(label10); + groupBox4.Controls.Add(comboBox7); + groupBox4.Location = new System.Drawing.Point(599, 248); + groupBox4.Name = "groupBox4"; + groupBox4.Size = new System.Drawing.Size(189, 173); + groupBox4.TabIndex = 8; + groupBox4.TabStop = false; + groupBox4.Text = "Moveset"; + // + // label13 + // + label13.AutoSize = true; + label13.Location = new System.Drawing.Point(19, 131); + label13.Name = "label13"; + label13.Size = new System.Drawing.Size(58, 20); + label13.TabIndex = 23; + label13.Text = "Move 4"; + // + // label12 + // + label12.AutoSize = true; + label12.Location = new System.Drawing.Point(19, 97); + label12.Name = "label12"; + label12.Size = new System.Drawing.Size(58, 20); + label12.TabIndex = 22; + label12.Text = "Move 3"; + // + // label11 + // + label11.AutoSize = true; + label11.Location = new System.Drawing.Point(19, 63); + label11.Name = "label11"; + label11.Size = new System.Drawing.Size(58, 20); + label11.TabIndex = 21; + label11.Text = "Move 2"; + // + // comboBox10 + // + comboBox10.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + comboBox10.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + comboBox10.FormattingEnabled = true; + comboBox10.Location = new System.Drawing.Point(83, 128); + comboBox10.Name = "comboBox10"; + comboBox10.Size = new System.Drawing.Size(100, 28); + comboBox10.TabIndex = 19; + // + // comboBox9 + // + comboBox9.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + comboBox9.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + comboBox9.FormattingEnabled = true; + comboBox9.Location = new System.Drawing.Point(83, 93); + comboBox9.Name = "comboBox9"; + comboBox9.Size = new System.Drawing.Size(100, 28); + comboBox9.TabIndex = 17; + // + // comboBox8 + // + comboBox8.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + comboBox8.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + comboBox8.FormattingEnabled = true; + comboBox8.Location = new System.Drawing.Point(83, 60); + comboBox8.Name = "comboBox8"; + comboBox8.Size = new System.Drawing.Size(100, 28); + comboBox8.TabIndex = 15; + // + // label10 + // + label10.AutoSize = true; + label10.Location = new System.Drawing.Point(19, 29); + label10.Name = "label10"; + label10.Size = new System.Drawing.Size(58, 20); + label10.TabIndex = 14; + label10.Text = "Move 1"; + // + // comboBox7 + // + comboBox7.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + comboBox7.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + comboBox7.FormattingEnabled = true; + comboBox7.Location = new System.Drawing.Point(83, 27); + comboBox7.Name = "comboBox7"; + comboBox7.Size = new System.Drawing.Size(100, 28); + comboBox7.TabIndex = 13; + // + // groupBox5 + // + groupBox5.Controls.Add(label19); + groupBox5.Controls.Add(numericUpDown9); + groupBox5.Controls.Add(label18); + groupBox5.Controls.Add(numericUpDown8); + groupBox5.Controls.Add(label17); + groupBox5.Controls.Add(numericUpDown7); + groupBox5.Controls.Add(label16); + groupBox5.Controls.Add(numericUpDown6); + groupBox5.Controls.Add(label15); + groupBox5.Controls.Add(numericUpDown5); + groupBox5.Controls.Add(label14); + groupBox5.Controls.Add(numericUpDown4); + groupBox5.Location = new System.Drawing.Point(208, 192); + groupBox5.Name = "groupBox5"; + groupBox5.Size = new System.Drawing.Size(189, 229); + groupBox5.TabIndex = 4; + groupBox5.TabStop = false; + groupBox5.Text = "IVs"; + // + // label19 + // + label19.AutoSize = true; + label19.Location = new System.Drawing.Point(75, 193); + label19.Name = "label19"; + label19.Size = new System.Drawing.Size(51, 20); + label19.TabIndex = 18; + label19.Text = "Speed"; + // + // numericUpDown9 + // + numericUpDown9.Location = new System.Drawing.Point(133, 191); + numericUpDown9.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + numericUpDown9.Name = "numericUpDown9"; + numericUpDown9.Size = new System.Drawing.Size(50, 27); + numericUpDown9.TabIndex = 17; + // + // label18 + // + label18.AutoSize = true; + label18.Location = new System.Drawing.Point(40, 160); + label18.Name = "label18"; + label18.Size = new System.Drawing.Size(87, 20); + label18.TabIndex = 16; + label18.Text = "Sp. Defense"; + // + // numericUpDown8 + // + numericUpDown8.Location = new System.Drawing.Point(133, 157); + numericUpDown8.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + numericUpDown8.Name = "numericUpDown8"; + numericUpDown8.Size = new System.Drawing.Size(50, 27); + numericUpDown8.TabIndex = 15; + // + // label17 + // + label17.AutoSize = true; + label17.Location = new System.Drawing.Point(53, 127); + label17.Name = "label17"; + label17.Size = new System.Drawing.Size(75, 20); + label17.TabIndex = 14; + label17.Text = "Sp. Attack"; + // + // numericUpDown7 + // + numericUpDown7.Location = new System.Drawing.Point(133, 125); + numericUpDown7.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + numericUpDown7.Name = "numericUpDown7"; + numericUpDown7.Size = new System.Drawing.Size(50, 27); + numericUpDown7.TabIndex = 13; + // + // label16 + // + label16.AutoSize = true; + label16.Location = new System.Drawing.Point(64, 93); + label16.Name = "label16"; + label16.Size = new System.Drawing.Size(63, 20); + label16.TabIndex = 12; + label16.Text = "Defense"; + // + // numericUpDown6 + // + numericUpDown6.Location = new System.Drawing.Point(133, 92); + numericUpDown6.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + numericUpDown6.Name = "numericUpDown6"; + numericUpDown6.Size = new System.Drawing.Size(50, 27); + numericUpDown6.TabIndex = 11; + // + // label15 + // + label15.AutoSize = true; + label15.Location = new System.Drawing.Point(75, 63); + label15.Name = "label15"; + label15.Size = new System.Drawing.Size(51, 20); + label15.TabIndex = 10; + label15.Text = "Attack"; + // + // numericUpDown5 + // + numericUpDown5.Location = new System.Drawing.Point(133, 59); + numericUpDown5.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + numericUpDown5.Name = "numericUpDown5"; + numericUpDown5.Size = new System.Drawing.Size(50, 27); + numericUpDown5.TabIndex = 9; + // + // label14 + // + label14.AutoSize = true; + label14.Location = new System.Drawing.Point(99, 28); + label14.Name = "label14"; + label14.Size = new System.Drawing.Size(28, 20); + label14.TabIndex = 8; + label14.Text = "HP"; + // + // numericUpDown4 + // + numericUpDown4.Location = new System.Drawing.Point(133, 27); + numericUpDown4.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + numericUpDown4.Name = "numericUpDown4"; + numericUpDown4.Size = new System.Drawing.Size(50, 27); + numericUpDown4.TabIndex = 7; + // + // groupBox6 + // + groupBox6.Controls.Add(label20); + groupBox6.Controls.Add(numericUpDown10); + groupBox6.Controls.Add(label21); + groupBox6.Controls.Add(numericUpDown11); + groupBox6.Controls.Add(label22); + groupBox6.Controls.Add(numericUpDown12); + groupBox6.Controls.Add(label23); + groupBox6.Controls.Add(numericUpDown13); + groupBox6.Controls.Add(label24); + groupBox6.Controls.Add(numericUpDown14); + groupBox6.Controls.Add(label25); + groupBox6.Controls.Add(numericUpDown15); + groupBox6.Location = new System.Drawing.Point(404, 192); + groupBox6.Name = "groupBox6"; + groupBox6.Size = new System.Drawing.Size(189, 229); + groupBox6.TabIndex = 6; + groupBox6.TabStop = false; + groupBox6.Text = "EVs"; + // + // label20 + // + label20.AutoSize = true; + label20.Location = new System.Drawing.Point(75, 193); + label20.Name = "label20"; + label20.Size = new System.Drawing.Size(51, 20); + label20.TabIndex = 30; + label20.Text = "Speed"; + // + // numericUpDown10 + // + numericUpDown10.Location = new System.Drawing.Point(133, 191); + numericUpDown10.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + numericUpDown10.Name = "numericUpDown10"; + numericUpDown10.Size = new System.Drawing.Size(50, 27); + numericUpDown10.TabIndex = 29; + // + // label21 + // + label21.AutoSize = true; + label21.Location = new System.Drawing.Point(40, 160); + label21.Name = "label21"; + label21.Size = new System.Drawing.Size(87, 20); + label21.TabIndex = 28; + label21.Text = "Sp. Defense"; + // + // numericUpDown11 + // + numericUpDown11.Location = new System.Drawing.Point(133, 157); + numericUpDown11.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + numericUpDown11.Name = "numericUpDown11"; + numericUpDown11.Size = new System.Drawing.Size(50, 27); + numericUpDown11.TabIndex = 27; + // + // label22 + // + label22.AutoSize = true; + label22.Location = new System.Drawing.Point(53, 127); + label22.Name = "label22"; + label22.Size = new System.Drawing.Size(75, 20); + label22.TabIndex = 26; + label22.Text = "Sp. Attack"; + // + // numericUpDown12 + // + numericUpDown12.Location = new System.Drawing.Point(133, 125); + numericUpDown12.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + numericUpDown12.Name = "numericUpDown12"; + numericUpDown12.Size = new System.Drawing.Size(50, 27); + numericUpDown12.TabIndex = 25; + // + // label23 + // + label23.AutoSize = true; + label23.Location = new System.Drawing.Point(64, 93); + label23.Name = "label23"; + label23.Size = new System.Drawing.Size(63, 20); + label23.TabIndex = 24; + label23.Text = "Defense"; + // + // numericUpDown13 + // + numericUpDown13.Location = new System.Drawing.Point(133, 92); + numericUpDown13.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + numericUpDown13.Name = "numericUpDown13"; + numericUpDown13.Size = new System.Drawing.Size(50, 27); + numericUpDown13.TabIndex = 23; + // + // label24 + // + label24.AutoSize = true; + label24.Location = new System.Drawing.Point(75, 63); + label24.Name = "label24"; + label24.Size = new System.Drawing.Size(51, 20); + label24.TabIndex = 22; + label24.Text = "Attack"; + // + // numericUpDown14 + // + numericUpDown14.Location = new System.Drawing.Point(133, 59); + numericUpDown14.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + numericUpDown14.Name = "numericUpDown14"; + numericUpDown14.Size = new System.Drawing.Size(50, 27); + numericUpDown14.TabIndex = 21; + // + // label25 + // + label25.AutoSize = true; + label25.Location = new System.Drawing.Point(99, 28); + label25.Name = "label25"; + label25.Size = new System.Drawing.Size(28, 20); + label25.TabIndex = 20; + label25.Text = "HP"; + // + // numericUpDown15 + // + numericUpDown15.Location = new System.Drawing.Point(133, 27); + numericUpDown15.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + numericUpDown15.Name = "numericUpDown15"; + numericUpDown15.Size = new System.Drawing.Size(50, 27); + numericUpDown15.TabIndex = 19; + // + // sortByComboBox + // + sortByComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + sortByComboBox.FormattingEnabled = true; + sortByComboBox.Location = new System.Drawing.Point(12, 12); + sortByComboBox.Name = "sortByComboBox"; + sortByComboBox.Size = new System.Drawing.Size(189, 28); + sortByComboBox.TabIndex = 11; + // + // trainerDisplayTextBox + // + trainerDisplayTextBox.Location = new System.Drawing.Point(207, 12); + trainerDisplayTextBox.Name = "trainerDisplayTextBox"; + trainerDisplayTextBox.ReadOnly = true; + trainerDisplayTextBox.Size = new System.Drawing.Size(189, 27); + trainerDisplayTextBox.TabIndex = 9; + // + // listBox + // + listBox.FormattingEnabled = true; + listBox.ItemHeight = 20; + listBox.Location = new System.Drawing.Point(12, 46); + listBox.Name = "listBox"; + listBox.Size = new System.Drawing.Size(189, 404); + listBox.TabIndex = 10; + // + // BattleTowerPokemonForm + // + AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + ClientSize = new System.Drawing.Size(800, 462); + Controls.Add(sortByComboBox); + Controls.Add(trainerDisplayTextBox); + Controls.Add(listBox); + Controls.Add(groupBox6); + Controls.Add(groupBox5); + Controls.Add(groupBox4); + Controls.Add(groupBox3); + Controls.Add(groupBox2); + Controls.Add(groupBox1); + FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + MaximizeBox = false; + MinimizeBox = false; + Name = "BattleTowerPokemonForm"; + Text = "Battle Tower Pokemon Editor"; + FormClosed += OnClosed; + Load += OnLoad; + groupBox1.ResumeLayout(false); + groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)levelNumericUpDown).EndInit(); + groupBox2.ResumeLayout(false); + groupBox2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown3).EndInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown2).EndInit(); + groupBox3.ResumeLayout(false); + groupBox3.PerformLayout(); + groupBox4.ResumeLayout(false); + groupBox4.PerformLayout(); + groupBox5.ResumeLayout(false); + groupBox5.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown9).EndInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown8).EndInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown7).EndInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown6).EndInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown5).EndInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown4).EndInit(); + groupBox6.ResumeLayout(false); + groupBox6.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown10).EndInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown11).EndInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown12).EndInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown13).EndInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown14).EndInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown15).EndInit(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.ComboBox formComboBox; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox speciesComboBox; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.ComboBox comboBox3; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.NumericUpDown levelNumericUpDown; + private System.Windows.Forms.CheckBox checkBox1; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.NumericUpDown numericUpDown3; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.NumericUpDown numericUpDown2; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.ComboBox comboBox6; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.ComboBox comboBox5; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.ComboBox comboBox4; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.ComboBox comboBox10; + private System.Windows.Forms.ComboBox comboBox9; + private System.Windows.Forms.ComboBox comboBox8; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.ComboBox comboBox7; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.NumericUpDown numericUpDown9; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.NumericUpDown numericUpDown8; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.NumericUpDown numericUpDown7; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.NumericUpDown numericUpDown6; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.NumericUpDown numericUpDown5; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.NumericUpDown numericUpDown4; + private System.Windows.Forms.GroupBox groupBox6; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.NumericUpDown numericUpDown10; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.NumericUpDown numericUpDown11; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.NumericUpDown numericUpDown12; + private System.Windows.Forms.Label label23; + private System.Windows.Forms.NumericUpDown numericUpDown13; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.NumericUpDown numericUpDown14; + private System.Windows.Forms.Label label25; + private System.Windows.Forms.NumericUpDown numericUpDown15; + private System.Windows.Forms.ComboBox sortByComboBox; + private System.Windows.Forms.TextBox trainerDisplayTextBox; + private System.Windows.Forms.ListBox listBox; + } +} \ No newline at end of file diff --git a/Forms/BattleTowerPokemonForm.cs b/Forms/BattleTowerPokemonForm.cs new file mode 100644 index 0000000..b97a51a --- /dev/null +++ b/Forms/BattleTowerPokemonForm.cs @@ -0,0 +1,322 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using static ImpostersOrdeal.GameDataTypes; +using static ImpostersOrdeal.GlobalData; + +namespace ImpostersOrdeal.Forms +{ + public partial class BattleTowerPokemonForm : Form + { + private List dexEntries; + private List natures; + private List abilities; + private List moves; + private BattleTowerTrainerPokemon tp; + public List battleTowerTrainerPokemons; + public Dictionary trainerTypeNames; + public List items; + public BattleTowerTrainerPokemon t; + public string pokemonName; + + private readonly string[] sortNames = new string[] + { + "Sort by ID", + "Sort by pokedex order", + "Sort by species name" + }; + + private readonly Comparison[] sortComparisons = new Comparison[] + { + (t1, t2) => t1.GetID().CompareTo(t2.GetID()), + (t1, t2) => t1.GetName().CompareTo(t2.GetName()), + (t1, t2) => String.Compare(gameData.dexEntries[t1.dexID].GetName(), gameData.dexEntries[t2.dexID].GetName(), StringComparison.Ordinal), + }; + + private readonly string[] genders = new string[] + { + "Male", "Female", "Genderless", "Random" + }; + + public BattleTowerPokemonForm() + { + dexEntries = gameData.dexEntries.Select(p => p.GetName()).ToList(); + natures = gameData.natures.Select(n => n.GetName()).ToList(); + abilities = gameData.abilities.Select(a => a.GetName()).ToList(); + moves = gameData.moves.Select(m => m.GetName()).ToList(); + items = gameData.items.Select(m => m.GetName()).ToList(); + tp = gameData.battleTowerTrainerPokemons[0]; + InitializeComponent(); + pokemonName = gameData.dexEntries[2].GetName(); + speciesComboBox.DataSource = dexEntries.ToArray(); + comboBox3.DataSource = genders.ToArray(); + comboBox4.DataSource = natures.ToArray(); + comboBox5.DataSource = abilities.ToArray(); + comboBox6.DataSource = items.ToArray(); + comboBox7.DataSource = moves.ToArray(); + comboBox8.DataSource = moves.ToArray(); + comboBox9.DataSource = moves.ToArray(); + comboBox10.DataSource = moves.ToArray(); + //Add Data + battleTowerTrainerPokemons = new(); + battleTowerTrainerPokemons.AddRange(gameData.battleTowerTrainerPokemons); + + sortByComboBox.DataSource = sortNames; + sortByComboBox.SelectedIndex = 0; + battleTowerTrainerPokemons.Sort(sortComparisons[sortByComboBox.SelectedIndex]); + PopulateListBox(); + + } + + + private void OnLoad(object sender, EventArgs e) + { + speciesComboBox.SelectedIndex = tp.dexID; + ResetFormComboBox(); + levelNumericUpDown.Value = tp.level; + + numericUpDown4.Value = tp.hpIV; + numericUpDown5.Value = tp.atkIV; + numericUpDown6.Value = tp.defIV; + numericUpDown7.Value = tp.spAtkIV; + numericUpDown8.Value = tp.spDefIV; + numericUpDown9.Value = tp.spdIV; + + checkBox1.Checked = tp.isRare == 1; + numericUpDown2.Value = tp.ballID; + numericUpDown3.Value = tp.seal; + + numericUpDown15.Value = tp.hpEV; + numericUpDown14.Value = tp.atkEV; + numericUpDown13.Value = tp.defEV; + numericUpDown12.Value = tp.spAtkEV; + numericUpDown11.Value = tp.spDefEV; + numericUpDown10.Value = tp.spdEV; + + comboBox3.SelectedIndex = tp.sex; + comboBox4.SelectedIndex = tp.natureID; + comboBox5.SelectedIndex = tp.abilityID; + comboBox6.SelectedIndex = tp.itemID; + comboBox7.SelectedIndex = tp.moveID1; + comboBox8.SelectedIndex = tp.moveID2; + comboBox9.SelectedIndex = tp.moveID3; + comboBox10.SelectedIndex = tp.moveID4; + RefreshTextBoxDisplay(); + ActivateControls(); + } + + private void OnClosed(object sender, FormClosedEventArgs e) + { + DeactivateControls(); + } + + private void CommitSpeciesEdit(object sender, EventArgs e) + { + DeactivateControls(); + + tp.dexID = (ushort)(speciesComboBox.SelectedIndex == -1 ? 0 : speciesComboBox.SelectedIndex); + ResetFormComboBox(); + PopulateListBox(); + CommitEdit(sender, e); + ActivateControls(); + } + private void PokemonChanged(object sender, EventArgs e) + { + DeactivateControls(); + + tp = battleTowerTrainerPokemons[listBox.SelectedIndex]; + RefreshPokemonDisplay(); + ActivateControls(); + } + + private void RefreshPokemonDisplay() + { + RefreshTextBoxDisplay(); + + PopulatePartyDataGridView(); + } + + private void RefreshTextBoxDisplay() + { + string nameDisplay = pokemonName = gameData.dexEntries[tp.dexID].GetName(); + trainerDisplayTextBox.Text = tp.GetID() + " - " + " " + nameDisplay; + } + + private void PopulatePartyDataGridView() + { + speciesComboBox.SelectedIndex = tp.dexID; + ResetFormComboBox(); + levelNumericUpDown.Value = tp.level; + + numericUpDown4.Value = tp.hpIV; + numericUpDown5.Value = tp.atkIV; + numericUpDown6.Value = tp.defIV; + numericUpDown7.Value = tp.spAtkIV; + numericUpDown8.Value = tp.spDefIV; + numericUpDown9.Value = tp.spdIV; + + checkBox1.Checked = tp.isRare == 1; + numericUpDown2.Value = tp.ballID; + numericUpDown3.Value = tp.seal; + + numericUpDown15.Value = tp.hpEV; + numericUpDown14.Value = tp.atkEV; + numericUpDown13.Value = tp.defEV; + numericUpDown12.Value = tp.spAtkEV; + numericUpDown11.Value = tp.spDefEV; + numericUpDown10.Value = tp.spdEV; + + comboBox3.SelectedIndex = tp.sex; + comboBox4.SelectedIndex = tp.natureID; + comboBox5.SelectedIndex = tp.abilityID; + comboBox6.SelectedIndex = tp.itemID; + + comboBox7.SelectedIndex = tp.moveID1; + comboBox8.SelectedIndex = tp.moveID2; + comboBox9.SelectedIndex = tp.moveID3; + comboBox10.SelectedIndex = tp.moveID4; + } + + private void CommitEdit(object sender, EventArgs e) + { + tp.formID = (ushort)(formComboBox.SelectedIndex == -1 ? 0 : formComboBox.SelectedIndex); + tp.level = (byte)levelNumericUpDown.Value; + + tp.hpIV = (byte)numericUpDown4.Value; + tp.atkIV = (byte)numericUpDown5.Value; + tp.defIV = (byte)numericUpDown6.Value; + tp.spAtkIV = (byte)numericUpDown7.Value; + tp.spDefIV = (byte)numericUpDown8.Value; + tp.spdIV = (byte)numericUpDown9.Value; + + tp.isRare = (byte)(checkBox1.Checked ? 1 : 0); + tp.ballID = (byte)numericUpDown2.Value; + tp.seal = (int)numericUpDown3.Value; + + tp.hpEV = (byte)numericUpDown15.Value; + tp.atkEV = (byte)numericUpDown14.Value; + tp.defEV = (byte)numericUpDown13.Value; + tp.spAtkEV = (byte)numericUpDown12.Value; + tp.spDefEV = (byte)numericUpDown11.Value; + tp.spdEV = (byte)numericUpDown10.Value; + + tp.sex = (byte)(comboBox3.SelectedIndex == -1 ? 0 : comboBox3.SelectedIndex); + tp.natureID = (byte)(comboBox4.SelectedIndex == -1 ? 0 : comboBox4.SelectedIndex); + tp.abilityID = (ushort)(comboBox5.SelectedIndex == -1 ? 0 : comboBox5.SelectedIndex); + tp.itemID = (ushort)(comboBox6.SelectedIndex == -1 ? 0 : comboBox6.SelectedIndex); + + tp.moveID1 = (ushort)(comboBox7.SelectedIndex == -1 ? 0 : comboBox7.SelectedIndex); + tp.moveID2 = (ushort)(comboBox8.SelectedIndex == -1 ? 0 : comboBox8.SelectedIndex); + tp.moveID3 = (ushort)(comboBox9.SelectedIndex == -1 ? 0 : comboBox9.SelectedIndex); + tp.moveID4 = (ushort)(comboBox10.SelectedIndex == -1 ? 0 : comboBox10.SelectedIndex); + } + + private void ActivateControls() + { + speciesComboBox.SelectedIndexChanged += CommitSpeciesEdit; + formComboBox.SelectedIndexChanged += CommitEdit; + levelNumericUpDown.ValueChanged += CommitEdit; + + numericUpDown4.ValueChanged += CommitEdit; + numericUpDown5.ValueChanged += CommitEdit; + numericUpDown6.ValueChanged += CommitEdit; + numericUpDown7.ValueChanged += CommitEdit; + numericUpDown8.ValueChanged += CommitEdit; + numericUpDown9.ValueChanged += CommitEdit; + + checkBox1.CheckedChanged += CommitEdit; + numericUpDown2.ValueChanged += CommitEdit; + numericUpDown3.ValueChanged += CommitEdit; + + numericUpDown15.ValueChanged += CommitEdit; + numericUpDown14.ValueChanged += CommitEdit; + numericUpDown13.ValueChanged += CommitEdit; + numericUpDown12.ValueChanged += CommitEdit; + numericUpDown11.ValueChanged += CommitEdit; + numericUpDown10.ValueChanged += CommitEdit; + + comboBox3.SelectedIndexChanged += CommitEdit; + comboBox4.SelectedIndexChanged += CommitEdit; + comboBox5.SelectedIndexChanged += CommitEdit; + comboBox6.SelectedIndexChanged += CommitEdit; + + comboBox7.SelectedIndexChanged += CommitEdit; + comboBox8.SelectedIndexChanged += CommitEdit; + comboBox9.SelectedIndexChanged += CommitEdit; + comboBox10.SelectedIndexChanged += CommitEdit; + sortByComboBox.SelectedIndexChanged += SortChanged; + listBox.SelectedIndexChanged += PokemonChanged; + } + + private void DeactivateControls() + { + speciesComboBox.SelectedIndexChanged -= CommitSpeciesEdit; + formComboBox.SelectedIndexChanged -= CommitEdit; + levelNumericUpDown.ValueChanged -= CommitEdit; + + numericUpDown4.ValueChanged -= CommitEdit; + numericUpDown5.ValueChanged -= CommitEdit; + numericUpDown6.ValueChanged -= CommitEdit; + numericUpDown7.ValueChanged -= CommitEdit; + numericUpDown8.ValueChanged -= CommitEdit; + numericUpDown9.ValueChanged -= CommitEdit; + + checkBox1.CheckedChanged -= CommitEdit; + numericUpDown2.ValueChanged -= CommitEdit; + numericUpDown3.ValueChanged -= CommitEdit; + + numericUpDown15.ValueChanged -= CommitEdit; + numericUpDown14.ValueChanged -= CommitEdit; + numericUpDown13.ValueChanged -= CommitEdit; + numericUpDown12.ValueChanged -= CommitEdit; + numericUpDown11.ValueChanged -= CommitEdit; + numericUpDown10.ValueChanged -= CommitEdit; + + comboBox3.SelectedIndexChanged -= CommitEdit; + comboBox4.SelectedIndexChanged -= CommitEdit; + comboBox5.SelectedIndexChanged -= CommitEdit; + comboBox6.SelectedIndexChanged -= CommitEdit; + + comboBox7.SelectedIndexChanged -= CommitEdit; + comboBox8.SelectedIndexChanged -= CommitEdit; + comboBox9.SelectedIndexChanged -= CommitEdit; + comboBox10.SelectedIndexChanged -= CommitEdit; + listBox.SelectedIndexChanged -= PokemonChanged; + sortByComboBox.SelectedIndexChanged -= SortChanged; + } + + private void ResetFormComboBox() + { + formComboBox.SelectedIndex = -1; + formComboBox.DataSource = gameData.dexEntries[tp.dexID].forms.Select((p, i) => i.ToString()).ToArray(); + int convertedFormID = (int)tp.formID; + formComboBox.SelectedIndex = convertedFormID; + } + + private void PopulateListBox() + { + int index = listBox.SelectedIndex; + if (index < 0) + index = 0; + listBox.DataSource = battleTowerTrainerPokemons.Select(o => o.GetID() + " - " + String.Join(", ", gameData.dexEntries[o.dexID].GetName())).ToArray(); + listBox.SelectedIndex = index; + } + private void SortChanged(object sender, EventArgs e) + { + DeactivateControls(); + + battleTowerTrainerPokemons.Sort(sortComparisons[sortByComboBox.SelectedIndex]); + PopulateListBox(); + listBox.SelectedIndex = battleTowerTrainerPokemons.IndexOf(t); + + ActivateControls(); + } + } +} diff --git a/Forms/BattleTowerPokemonForm.resx b/Forms/BattleTowerPokemonForm.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/Forms/BattleTowerPokemonForm.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Forms/BattleTowerTrainerEditorForm.Designer.cs b/Forms/BattleTowerTrainerEditorForm.Designer.cs new file mode 100644 index 0000000..924e306 --- /dev/null +++ b/Forms/BattleTowerTrainerEditorForm.Designer.cs @@ -0,0 +1,176 @@ +namespace ImpostersOrdeal.Forms +{ + partial class BattleTowerTrainerEditorForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + listBox = new System.Windows.Forms.ListBox(); + trainerDisplayTextBox = new System.Windows.Forms.TextBox(); + groupBox4 = new System.Windows.Forms.GroupBox(); + partyDataGridView = new System.Windows.Forms.DataGridView(); + tpDisplayColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + pokemonSelector = new System.Windows.Forms.DataGridViewComboBoxColumn(); + button1 = new System.Windows.Forms.Button(); + sortByComboBox = new System.Windows.Forms.ComboBox(); + button2 = new System.Windows.Forms.Button(); + Column1 = new System.Windows.Forms.DataGridViewComboBoxColumn(); + groupBox4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)partyDataGridView).BeginInit(); + SuspendLayout(); + // + // listBox + // + listBox.FormattingEnabled = true; + listBox.ItemHeight = 20; + listBox.Location = new System.Drawing.Point(12, 45); + listBox.Name = "listBox"; + listBox.Size = new System.Drawing.Size(189, 404); + listBox.TabIndex = 1; + // + // trainerDisplayTextBox + // + trainerDisplayTextBox.Location = new System.Drawing.Point(208, 12); + trainerDisplayTextBox.Name = "trainerDisplayTextBox"; + trainerDisplayTextBox.ReadOnly = true; + trainerDisplayTextBox.Size = new System.Drawing.Size(189, 27); + trainerDisplayTextBox.TabIndex = 0; + // + // groupBox4 + // + groupBox4.Controls.Add(partyDataGridView); + groupBox4.Location = new System.Drawing.Point(207, 45); + groupBox4.Name = "groupBox4"; + groupBox4.Size = new System.Drawing.Size(753, 352); + groupBox4.TabIndex = 7; + groupBox4.TabStop = false; + groupBox4.Text = "Party"; + // + // partyDataGridView + // + partyDataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + partyDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + partyDataGridView.ColumnHeadersVisible = false; + partyDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { tpDisplayColumn, pokemonSelector }); + partyDataGridView.Location = new System.Drawing.Point(6, 27); + partyDataGridView.Name = "partyDataGridView"; + partyDataGridView.RowHeadersWidth = 20; + partyDataGridView.RowTemplate.Height = 29; + partyDataGridView.Size = new System.Drawing.Size(741, 285); + partyDataGridView.TabIndex = 0; + // + // tpDisplayColumn + // + tpDisplayColumn.FillWeight = 300F; + tpDisplayColumn.HeaderText = "TPDisplay"; + tpDisplayColumn.MinimumWidth = 6; + tpDisplayColumn.Name = "tpDisplayColumn"; + tpDisplayColumn.ReadOnly = true; + tpDisplayColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True; + // + // pokemonSelector + // + pokemonSelector.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + pokemonSelector.FillWeight = 200F; + pokemonSelector.HeaderText = "Column3"; + pokemonSelector.MinimumWidth = 6; + pokemonSelector.Name = "pokemonSelector"; + pokemonSelector.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // button1 + // + button1.Location = new System.Drawing.Point(12, 491); + button1.Name = "button1"; + button1.Size = new System.Drawing.Size(189, 29); + button1.TabIndex = 3; + button1.Text = "Double Battle Trainers"; + button1.UseVisualStyleBackColor = true; + button1.Click += Button1_Click; + // + // sortByComboBox + // + sortByComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + sortByComboBox.FormattingEnabled = true; + sortByComboBox.Location = new System.Drawing.Point(12, 12); + sortByComboBox.Name = "sortByComboBox"; + sortByComboBox.Size = new System.Drawing.Size(189, 28); + sortByComboBox.TabIndex = 8; + // + // button2 + // + button2.Location = new System.Drawing.Point(12, 456); + button2.Name = "button2"; + button2.Size = new System.Drawing.Size(189, 29); + button2.TabIndex = 2; + button2.Text = "Single Battle Trainers"; + button2.UseVisualStyleBackColor = true; + button2.Click += Button2_Click; + // + // Column1 + // + Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; + Column1.FillWeight = 200F; + Column1.HeaderText = "Change Pokemon"; + Column1.MinimumWidth = 6; + Column1.Name = "Column1"; + Column1.Width = 125; + // + // BattleTowerTrainerEditorForm + // + AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + ClientSize = new System.Drawing.Size(972, 532); + Controls.Add(sortByComboBox); + Controls.Add(button1); + Controls.Add(button2); + Controls.Add(groupBox4); + Controls.Add(trainerDisplayTextBox); + Controls.Add(listBox); + FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + MaximizeBox = false; + MinimizeBox = false; + Name = "BattleTowerTrainerEditorForm"; + Text = "Battle Tower Trainer Editor"; + groupBox4.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)partyDataGridView).EndInit(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private System.Windows.Forms.ListBox listBox; + private System.Windows.Forms.TextBox trainerDisplayTextBox; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.DataGridView partyDataGridView; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.ComboBox sortByComboBox; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.DataGridViewComboBoxColumn Column1; + private System.Windows.Forms.DataGridViewTextBoxColumn tpDisplayColumn; + private System.Windows.Forms.DataGridViewComboBoxColumn pokemonSelector; + } +} \ No newline at end of file diff --git a/Forms/BattleTowerTrainerEditorForm.cs b/Forms/BattleTowerTrainerEditorForm.cs new file mode 100644 index 0000000..c0e4008 --- /dev/null +++ b/Forms/BattleTowerTrainerEditorForm.cs @@ -0,0 +1,246 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Windows.Forms; +using static ImpostersOrdeal.GameDataTypes; +using static ImpostersOrdeal.GlobalData; + +namespace ImpostersOrdeal.Forms +{ + public partial class BattleTowerTrainerEditorForm : Form + { + public List battleTowertrainers; + public List battleTowertrainersDoubles; + private Dictionary trainerTypeLabels; + public Dictionary trainerTypeNames; + private Dictionary trainerTypeToCC; + public List items; + public BattleTowerTrainer t; + public List battleTowerTrainerPokemons; + private BattleTowerTrainerPokemon trainerPokemon1; + private BattleTowerTrainerPokemon trainerPokemon2; + private BattleTowerTrainerPokemon trainerPokemon3; + private BattleTowerTrainerPokemon trainerPokemon4; + private int mostRecentModifiedRowIndex = -1; + private bool doubleTrainerMode = false; + + private readonly string[] sortNames = new string[] + { + "Sort by ID", + "Sort by name", + // "Sort by internal ID" + }; + + private readonly Comparison[] sortComparisons = new Comparison[] + { + (t1, t2) => t1.GetID().CompareTo(t2.GetID()), + (t1, t2) => t1.GetName().CompareTo(t2.GetName()), + }; + + public BattleTowerTrainerEditorForm() + { + trainerTypeLabels = new(); + trainerTypeNames = new(); + trainerTypeToCC = new(); + trainerTypeLabels.Add(-1, "None"); + trainerTypeNames.Add(-1, "None"); + trainerTypeToCC.Add(-1, 0); + for (int i = 0; i < gameData.trainerTypes.Count; i++) + { + TrainerType tt = gameData.trainerTypes[i]; + trainerTypeLabels.Add(tt.GetID(), tt.label); + trainerTypeNames.Add(tt.GetID(), tt.GetName()); + trainerTypeToCC.Add(tt.GetID(), i + 1); + } + InitializeComponent(); + battleTowertrainers = new(); + battleTowertrainers.AddRange(gameData.battleTowerTrainers); + battleTowertrainersDoubles = new(); + battleTowertrainersDoubles.AddRange(gameData.battleTowerTrainersDouble); + sortByComboBox.DataSource = sortNames; + sortByComboBox.SelectedIndex = 0; + pokemonSelector.DataSource = gameData.battleTowerTrainerPokemons.Select(o => o.GetID() + " - " + String.Join(", ", gameData.dexEntries[o.dexID].GetName())).ToArray(); + battleTowertrainers.Sort(sortComparisons[sortByComboBox.SelectedIndex]); + battleTowertrainersDoubles.Sort(sortComparisons[sortByComboBox.SelectedIndex]); + partyDataGridView.AllowUserToAddRows = false; + partyDataGridView.EditMode = DataGridViewEditMode.EditOnKeystrokeOrF2; + PopulateListBox(false); + t = battleTowertrainers[0]; + RefreshTrainerDisplay(); + ActivateControls(); + } + + private void TrainerChanged(object sender, EventArgs e) + { + DeactivateControls(); + if (doubleTrainerMode == false) + { + t = battleTowertrainers[listBox.SelectedIndex]; + } + else + { + t = battleTowertrainersDoubles[listBox.SelectedIndex]; + } + RefreshTrainerDisplay(); + + ActivateControls(); + } + + private void SortChanged(object sender, EventArgs e) + { + DeactivateControls(); + if (doubleTrainerMode == false) + { + battleTowertrainers.Sort(sortComparisons[sortByComboBox.SelectedIndex]); + PopulateListBox(false); + listBox.SelectedIndex = battleTowertrainers.IndexOf(t); + } + else + { + battleTowertrainersDoubles.Sort(sortComparisons[sortByComboBox.SelectedIndex]); + PopulateListBox(false); + listBox.SelectedIndex = battleTowertrainersDoubles.IndexOf(t); + } + + ActivateControls(); + } + + private void RefreshTrainerDisplay() + { + RefreshTextBoxDisplay(); + PopulatePartyDataGridView(); + } + + private void CommitEdit(object sender, EventArgs e) + { + //Get the values needed + int rowIndex = mostRecentModifiedRowIndex; ; + int columnIndex = partyDataGridView.Columns["pokemonSelector"].Index; + DataGridViewComboBoxCell comboBoxCell1 = (DataGridViewComboBoxCell)partyDataGridView.Rows[rowIndex].Cells[columnIndex]; + string selectedValue = comboBoxCell1.Value.ToString(); + string numericValue = Regex.Replace(selectedValue, @"[^0-9]", ""); + int pokemonNumber = int.Parse(numericValue); + switch (rowIndex) + { + case 0: + t.battleTowerPokemonID1 = (uint)pokemonNumber; + break; + case 1: + t.battleTowerPokemonID2 = (uint)pokemonNumber; + break; + case 2: + t.battleTowerPokemonID3 = (uint)pokemonNumber; + break; + case 3: + t.battleTowerPokemonID4 = (uint)pokemonNumber; + break; + } + RefreshTextBoxDisplay(); + PopulatePartyDataGridView(); + } + private void DataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + mostRecentModifiedRowIndex = e.RowIndex; + } + + private void CommitNameEdit(object sender, EventArgs e) + { + DeactivateControls(); + PopulateListBox(false); + RefreshTextBoxDisplay(); + + ActivateControls(); + } + + private void ActivateControls() + { + sortByComboBox.SelectedIndexChanged += SortChanged; + listBox.SelectedIndexChanged += TrainerChanged; + partyDataGridView.CellContentClick += ConfigureTP; + partyDataGridView.CellValueChanged += DataGridView1_CellValueChanged; + partyDataGridView.CellValueChanged += CommitEdit; + + } + + private void DeactivateControls() + { + sortByComboBox.SelectedIndexChanged -= SortChanged; + listBox.SelectedIndexChanged -= TrainerChanged; + partyDataGridView.CellValueChanged -= DataGridView1_CellValueChanged; + partyDataGridView.CellValueChanged -= CommitEdit; + partyDataGridView.CellContentClick -= ConfigureTP; + } + + private void RefreshTextBoxDisplay() + { + trainerDisplayTextBox.Text = t.GetID() + " - " + t.GetName(); + } + + private void PopulatePartyDataGridView() + { + partyDataGridView.Rows.Clear(); + + trainerPokemon1 = gameData.battleTowerTrainerPokemons.FirstOrDefault(t1 => t1.pokemonID == t.battleTowerPokemonID1); + trainerPokemon2 = gameData.battleTowerTrainerPokemons.FirstOrDefault(t1 => t1.pokemonID == t.battleTowerPokemonID2); + trainerPokemon3 = gameData.battleTowerTrainerPokemons.FirstOrDefault(t1 => t1.pokemonID == t.battleTowerPokemonID3); + string nameTrainerPokemon1 = gameData.dexEntries[trainerPokemon1.dexID].GetName(); + string nameTrainerPokemon2 = gameData.dexEntries[trainerPokemon2.dexID].GetName(); + string nameTrainerPokemon3 = gameData.dexEntries[trainerPokemon3.dexID].GetName(); + partyDataGridView.Rows.Add(new object[] { t.battleTowerPokemonID1 + " - " + nameTrainerPokemon1 }); + partyDataGridView.Rows.Add(new object[] { t.battleTowerPokemonID2 + " - " + nameTrainerPokemon2 }); + partyDataGridView.Rows.Add(new object[] { t.battleTowerPokemonID3 + " - " + nameTrainerPokemon3 }); + if (t.isDouble == true) + { + trainerPokemon4 = gameData.battleTowerTrainerPokemons.FirstOrDefault(t1 => t1.pokemonID == t.battleTowerPokemonID4); + string nameTrainerPokemon4 = gameData.dexEntries[trainerPokemon4.dexID].GetName(); + partyDataGridView.Rows.Add(new object[] { t.battleTowerPokemonID4 + " - " + nameTrainerPokemon4 }); + } + } + + private void ConfigureTP(object sender, DataGridViewCellEventArgs e) + { + } + + private void PopulateListBox(bool resetIndex) + { + int index = 0; + if (resetIndex == false) + { + index = listBox.SelectedIndex; + } + if (index < 0) + index = 0; + if (doubleTrainerMode == false) + { + listBox.DataSource = battleTowertrainers.Select(o => o.GetID() + " - " + o.GetName()).ToArray(); + listBox.SelectedIndex = index; + } + else + { + listBox.DataSource = battleTowertrainersDoubles.Select(o => o.GetID() + " - " + o.GetName()).ToArray(); + listBox.SelectedIndex = index; + } + } + + private void Button1_Click(object sender, EventArgs e) + { + doubleTrainerMode = true; + PopulateListBox(true); + } + + private void Button2_Click(object sender, EventArgs e) + { + doubleTrainerMode = false; + //Todo + //Add trainer type to editor + PopulateListBox(true); + } + } +} diff --git a/Forms/BattleTowerTrainerEditorForm.resx b/Forms/BattleTowerTrainerEditorForm.resx new file mode 100644 index 0000000..30c8a7f --- /dev/null +++ b/Forms/BattleTowerTrainerEditorForm.resx @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + \ No newline at end of file diff --git a/Forms/MainForm.Designer.cs b/Forms/MainForm.Designer.cs index fee5450..4d6bf2f 100644 --- a/Forms/MainForm.Designer.cs +++ b/Forms/MainForm.Designer.cs @@ -30,2648 +30,2678 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); - this.groupBox1 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox2 = new System.Windows.Forms.CheckBox(); - this.button1 = new System.Windows.Forms.Button(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.button2 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.button31 = new System.Windows.Forms.Button(); - this.button5 = new System.Windows.Forms.Button(); - this.button3 = new System.Windows.Forms.Button(); - this.tabControl1 = new System.Windows.Forms.TabControl(); - this.tabPage1 = new System.Windows.Forms.TabPage(); - this.groupBox12 = new System.Windows.Forms.GroupBox(); - this.numericDistributionControl2 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox4 = new System.Windows.Forms.CheckBox(); - this.button7 = new System.Windows.Forms.Button(); - this.textBox3 = new System.Windows.Forms.TextBox(); - this.numericDistributionControl4 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox11 = new System.Windows.Forms.CheckBox(); - this.button9 = new System.Windows.Forms.Button(); - this.textBox5 = new System.Windows.Forms.TextBox(); - this.numericDistributionControl3 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox9 = new System.Windows.Forms.CheckBox(); - this.button8 = new System.Windows.Forms.Button(); - this.textBox4 = new System.Windows.Forms.TextBox(); - this.numericDistributionControl5 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox14 = new System.Windows.Forms.CheckBox(); - this.button10 = new System.Windows.Forms.Button(); - this.textBox6 = new System.Windows.Forms.TextBox(); - this.groupBox11 = new System.Windows.Forms.GroupBox(); - this.itemDistributionControl7 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.label5 = new System.Windows.Forms.Label(); - this.numericUpDown5 = new System.Windows.Forms.NumericUpDown(); - this.numericDistributionControl9 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox23 = new System.Windows.Forms.CheckBox(); - this.button14 = new System.Windows.Forms.Button(); - this.textBox10 = new System.Windows.Forms.TextBox(); - this.checkBox24 = new System.Windows.Forms.CheckBox(); - this.groupBox10 = new System.Windows.Forms.GroupBox(); - this.numericDistributionControl7 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox20 = new System.Windows.Forms.CheckBox(); - this.button12 = new System.Windows.Forms.Button(); - this.textBox8 = new System.Windows.Forms.TextBox(); - this.itemDistributionControl6 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox18 = new System.Windows.Forms.CheckBox(); - this.label4 = new System.Windows.Forms.Label(); - this.numericUpDown4 = new System.Windows.Forms.NumericUpDown(); - this.numericDistributionControl6 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox19 = new System.Windows.Forms.CheckBox(); - this.button11 = new System.Windows.Forms.Button(); - this.textBox7 = new System.Windows.Forms.TextBox(); - this.checkBox17 = new System.Windows.Forms.CheckBox(); - this.groupBox9 = new System.Windows.Forms.GroupBox(); - this.label2 = new System.Windows.Forms.Label(); - this.numericUpDown2 = new System.Windows.Forms.NumericUpDown(); - this.checkBox16 = new System.Windows.Forms.CheckBox(); - this.label3 = new System.Windows.Forms.Label(); - this.numericUpDown3 = new System.Windows.Forms.NumericUpDown(); - this.checkBox15 = new System.Windows.Forms.CheckBox(); - this.groupBox8 = new System.Windows.Forms.GroupBox(); - this.itemDistributionControl4 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox13 = new System.Windows.Forms.CheckBox(); - this.groupBox7 = new System.Windows.Forms.GroupBox(); - this.itemDistributionControl3 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox12 = new System.Windows.Forms.CheckBox(); - this.groupBox6 = new System.Windows.Forms.GroupBox(); - this.itemDistributionControl2 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox10 = new System.Windows.Forms.CheckBox(); - this.groupBox5 = new System.Windows.Forms.GroupBox(); - this.checkBox61 = new System.Windows.Forms.CheckBox(); - this.itemDistributionControl1 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.label1 = new System.Windows.Forms.Label(); - this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); - this.checkBox8 = new System.Windows.Forms.CheckBox(); - this.groupBox4 = new System.Windows.Forms.GroupBox(); - this.numericDistributionControl1 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox7 = new System.Windows.Forms.CheckBox(); - this.button6 = new System.Windows.Forms.Button(); - this.textBox2 = new System.Windows.Forms.TextBox(); - this.checkBox6 = new System.Windows.Forms.CheckBox(); - this.checkBox5 = new System.Windows.Forms.CheckBox(); - this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.checkBox3 = new System.Windows.Forms.CheckBox(); - this.checkBox1 = new System.Windows.Forms.CheckBox(); - this.tabPage2 = new System.Windows.Forms.TabPage(); - this.groupBox26 = new System.Windows.Forms.GroupBox(); - this.checkBox52 = new System.Windows.Forms.CheckBox(); - this.itemDistributionControl19 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox51 = new System.Windows.Forms.CheckBox(); - this.groupBox25 = new System.Windows.Forms.GroupBox(); - this.itemDistributionControl18 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox50 = new System.Windows.Forms.CheckBox(); - this.groupBox23 = new System.Windows.Forms.GroupBox(); - this.itemDistributionControl16 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox47 = new System.Windows.Forms.CheckBox(); - this.numericDistributionControl18 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox46 = new System.Windows.Forms.CheckBox(); - this.button22 = new System.Windows.Forms.Button(); - this.textBox19 = new System.Windows.Forms.TextBox(); - this.numericDistributionControl11 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox27 = new System.Windows.Forms.CheckBox(); - this.button16 = new System.Windows.Forms.Button(); - this.textBox12 = new System.Windows.Forms.TextBox(); - this.numericDistributionControl10 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox26 = new System.Windows.Forms.CheckBox(); - this.button15 = new System.Windows.Forms.Button(); - this.textBox11 = new System.Windows.Forms.TextBox(); - this.numericDistributionControl8 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox25 = new System.Windows.Forms.CheckBox(); - this.button13 = new System.Windows.Forms.Button(); - this.textBox9 = new System.Windows.Forms.TextBox(); - this.groupBox14 = new System.Windows.Forms.GroupBox(); - this.itemDistributionControl9 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox22 = new System.Windows.Forms.CheckBox(); - this.groupBox13 = new System.Windows.Forms.GroupBox(); - this.itemDistributionControl8 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox21 = new System.Windows.Forms.CheckBox(); - this.tabPage3 = new System.Windows.Forms.TabPage(); - this.groupBox18 = new System.Windows.Forms.GroupBox(); - this.groupBox24 = new System.Windows.Forms.GroupBox(); - this.checkBox49 = new System.Windows.Forms.CheckBox(); - this.itemDistributionControl17 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox48 = new System.Windows.Forms.CheckBox(); - this.numericDistributionControl17 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox45 = new System.Windows.Forms.CheckBox(); - this.button21 = new System.Windows.Forms.Button(); - this.textBox18 = new System.Windows.Forms.TextBox(); - this.numericDistributionControl16 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox44 = new System.Windows.Forms.CheckBox(); - this.button20 = new System.Windows.Forms.Button(); - this.textBox17 = new System.Windows.Forms.TextBox(); - this.groupBox22 = new System.Windows.Forms.GroupBox(); - this.checkBox43 = new System.Windows.Forms.CheckBox(); - this.itemDistributionControl15 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox42 = new System.Windows.Forms.CheckBox(); - this.groupBox21 = new System.Windows.Forms.GroupBox(); - this.label7 = new System.Windows.Forms.Label(); - this.numericUpDown7 = new System.Windows.Forms.NumericUpDown(); - this.comboBox1 = new System.Windows.Forms.ComboBox(); - this.itemDistributionControl14 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.groupBox20 = new System.Windows.Forms.GroupBox(); - this.itemDistributionControl13 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox41 = new System.Windows.Forms.CheckBox(); - this.numericDistributionControl15 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox40 = new System.Windows.Forms.CheckBox(); - this.button19 = new System.Windows.Forms.Button(); - this.textBox16 = new System.Windows.Forms.TextBox(); - this.groupBox19 = new System.Windows.Forms.GroupBox(); - this.label6 = new System.Windows.Forms.Label(); - this.numericUpDown6 = new System.Windows.Forms.NumericUpDown(); - this.checkBox39 = new System.Windows.Forms.CheckBox(); - this.groupBox17 = new System.Windows.Forms.GroupBox(); - this.checkBox38 = new System.Windows.Forms.CheckBox(); - this.checkBox34 = new System.Windows.Forms.CheckBox(); - this.checkBox35 = new System.Windows.Forms.CheckBox(); - this.itemDistributionControl12 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox37 = new System.Windows.Forms.CheckBox(); - this.numericDistributionControl14 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox36 = new System.Windows.Forms.CheckBox(); - this.button18 = new System.Windows.Forms.Button(); - this.textBox15 = new System.Windows.Forms.TextBox(); - this.groupBox16 = new System.Windows.Forms.GroupBox(); - this.numericDistributionControl13 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox33 = new System.Windows.Forms.CheckBox(); - this.button4 = new System.Windows.Forms.Button(); - this.textBox14 = new System.Windows.Forms.TextBox(); - this.itemDistributionControl11 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox32 = new System.Windows.Forms.CheckBox(); - this.groupBox15 = new System.Windows.Forms.GroupBox(); - this.checkBox31 = new System.Windows.Forms.CheckBox(); - this.checkBox30 = new System.Windows.Forms.CheckBox(); - this.numericDistributionControl12 = new ImpostersOrdeal.MainForm.NumericDistributionControl(); - this.checkBox28 = new System.Windows.Forms.CheckBox(); - this.button17 = new System.Windows.Forms.Button(); - this.textBox13 = new System.Windows.Forms.TextBox(); - this.itemDistributionControl10 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox29 = new System.Windows.Forms.CheckBox(); - this.tabPage4 = new System.Windows.Forms.TabPage(); - this.groupBox33 = new System.Windows.Forms.GroupBox(); - this.itemDistributionControl5 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox63 = new System.Windows.Forms.CheckBox(); - this.groupBox31 = new System.Windows.Forms.GroupBox(); - this.absoluteBoundaryDataGridView = new System.Windows.Forms.DataGridView(); - this.groupBox30 = new System.Windows.Forms.GroupBox(); - this.label9 = new System.Windows.Forms.Label(); - this.numericUpDown8 = new System.Windows.Forms.NumericUpDown(); - this.checkBox60 = new System.Windows.Forms.CheckBox(); - this.checkBox59 = new System.Windows.Forms.CheckBox(); - this.checkBox58 = new System.Windows.Forms.CheckBox(); - this.label8 = new System.Windows.Forms.Label(); - this.checkBox57 = new System.Windows.Forms.CheckBox(); - this.groupBox29 = new System.Windows.Forms.GroupBox(); - this.checkBox62 = new System.Windows.Forms.CheckBox(); - this.checkBox56 = new System.Windows.Forms.CheckBox(); - this.checkBox55 = new System.Windows.Forms.CheckBox(); - this.groupBox27 = new System.Windows.Forms.GroupBox(); - this.itemDistributionControl21 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox54 = new System.Windows.Forms.CheckBox(); - this.itemDistributionControl20 = new ImpostersOrdeal.MainForm.ItemDistributionControl(); - this.checkBox53 = new System.Windows.Forms.CheckBox(); - this.groupBox28 = new System.Windows.Forms.GroupBox(); - this.pokemonEditorButton = new System.Windows.Forms.Button(); - this.button24 = new System.Windows.Forms.Button(); - this.button25 = new System.Windows.Forms.Button(); - this.button26 = new System.Windows.Forms.Button(); - this.button27 = new System.Windows.Forms.Button(); - this.button28 = new System.Windows.Forms.Button(); - this.wildEncButton = new System.Windows.Forms.Button(); - this.button30 = new System.Windows.Forms.Button(); - this.groupBox32 = new System.Windows.Forms.GroupBox(); - this.button23 = new System.Windows.Forms.Button(); - this.button32 = new System.Windows.Forms.Button(); - this.groupBox34 = new System.Windows.Forms.GroupBox(); - this.button29 = new System.Windows.Forms.Button(); - this.button33 = new System.Windows.Forms.Button(); - this.groupBox1.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.tabControl1.SuspendLayout(); - this.tabPage1.SuspendLayout(); - this.groupBox12.SuspendLayout(); - this.numericDistributionControl2.SuspendLayout(); - this.numericDistributionControl4.SuspendLayout(); - this.numericDistributionControl3.SuspendLayout(); - this.numericDistributionControl5.SuspendLayout(); - this.groupBox11.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit(); - this.numericDistributionControl9.SuspendLayout(); - this.groupBox10.SuspendLayout(); - this.numericDistributionControl7.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit(); - this.numericDistributionControl6.SuspendLayout(); - this.groupBox9.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit(); - this.groupBox8.SuspendLayout(); - this.groupBox7.SuspendLayout(); - this.groupBox6.SuspendLayout(); - this.groupBox5.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); - this.groupBox4.SuspendLayout(); - this.numericDistributionControl1.SuspendLayout(); - this.groupBox3.SuspendLayout(); - this.tabPage2.SuspendLayout(); - this.groupBox26.SuspendLayout(); - this.groupBox25.SuspendLayout(); - this.groupBox23.SuspendLayout(); - this.numericDistributionControl18.SuspendLayout(); - this.numericDistributionControl11.SuspendLayout(); - this.numericDistributionControl10.SuspendLayout(); - this.numericDistributionControl8.SuspendLayout(); - this.groupBox14.SuspendLayout(); - this.groupBox13.SuspendLayout(); - this.tabPage3.SuspendLayout(); - this.groupBox18.SuspendLayout(); - this.groupBox24.SuspendLayout(); - this.numericDistributionControl17.SuspendLayout(); - this.numericDistributionControl16.SuspendLayout(); - this.groupBox22.SuspendLayout(); - this.groupBox21.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).BeginInit(); - this.groupBox20.SuspendLayout(); - this.numericDistributionControl15.SuspendLayout(); - this.groupBox19.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).BeginInit(); - this.groupBox17.SuspendLayout(); - this.numericDistributionControl14.SuspendLayout(); - this.groupBox16.SuspendLayout(); - this.numericDistributionControl13.SuspendLayout(); - this.groupBox15.SuspendLayout(); - this.numericDistributionControl12.SuspendLayout(); - this.tabPage4.SuspendLayout(); - this.groupBox33.SuspendLayout(); - this.groupBox31.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.absoluteBoundaryDataGridView)).BeginInit(); - this.groupBox30.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).BeginInit(); - this.groupBox29.SuspendLayout(); - this.groupBox27.SuspendLayout(); - this.groupBox32.SuspendLayout(); - this.groupBox34.SuspendLayout(); - this.SuspendLayout(); + groupBox1 = new NumericDistributionControl(); + checkBox2 = new System.Windows.Forms.CheckBox(); + button1 = new System.Windows.Forms.Button(); + textBox1 = new System.Windows.Forms.TextBox(); + button2 = new ItemDistributionControl(); + groupBox2 = new System.Windows.Forms.GroupBox(); + button31 = new System.Windows.Forms.Button(); + button5 = new System.Windows.Forms.Button(); + button3 = new System.Windows.Forms.Button(); + tabControl1 = new System.Windows.Forms.TabControl(); + tabPage1 = new System.Windows.Forms.TabPage(); + groupBox12 = new System.Windows.Forms.GroupBox(); + numericDistributionControl2 = new NumericDistributionControl(); + checkBox4 = new System.Windows.Forms.CheckBox(); + button7 = new System.Windows.Forms.Button(); + textBox3 = new System.Windows.Forms.TextBox(); + numericDistributionControl4 = new NumericDistributionControl(); + checkBox11 = new System.Windows.Forms.CheckBox(); + button9 = new System.Windows.Forms.Button(); + textBox5 = new System.Windows.Forms.TextBox(); + numericDistributionControl3 = new NumericDistributionControl(); + checkBox9 = new System.Windows.Forms.CheckBox(); + button8 = new System.Windows.Forms.Button(); + textBox4 = new System.Windows.Forms.TextBox(); + numericDistributionControl5 = new NumericDistributionControl(); + checkBox14 = new System.Windows.Forms.CheckBox(); + button10 = new System.Windows.Forms.Button(); + textBox6 = new System.Windows.Forms.TextBox(); + groupBox11 = new System.Windows.Forms.GroupBox(); + itemDistributionControl7 = new ItemDistributionControl(); + label5 = new System.Windows.Forms.Label(); + numericUpDown5 = new System.Windows.Forms.NumericUpDown(); + numericDistributionControl9 = new NumericDistributionControl(); + checkBox23 = new System.Windows.Forms.CheckBox(); + button14 = new System.Windows.Forms.Button(); + textBox10 = new System.Windows.Forms.TextBox(); + checkBox24 = new System.Windows.Forms.CheckBox(); + groupBox10 = new System.Windows.Forms.GroupBox(); + numericDistributionControl7 = new NumericDistributionControl(); + checkBox20 = new System.Windows.Forms.CheckBox(); + button12 = new System.Windows.Forms.Button(); + textBox8 = new System.Windows.Forms.TextBox(); + itemDistributionControl6 = new ItemDistributionControl(); + checkBox18 = new System.Windows.Forms.CheckBox(); + label4 = new System.Windows.Forms.Label(); + numericUpDown4 = new System.Windows.Forms.NumericUpDown(); + numericDistributionControl6 = new NumericDistributionControl(); + checkBox19 = new System.Windows.Forms.CheckBox(); + button11 = new System.Windows.Forms.Button(); + textBox7 = new System.Windows.Forms.TextBox(); + checkBox17 = new System.Windows.Forms.CheckBox(); + groupBox9 = new System.Windows.Forms.GroupBox(); + label2 = new System.Windows.Forms.Label(); + numericUpDown2 = new System.Windows.Forms.NumericUpDown(); + checkBox16 = new System.Windows.Forms.CheckBox(); + label3 = new System.Windows.Forms.Label(); + numericUpDown3 = new System.Windows.Forms.NumericUpDown(); + checkBox15 = new System.Windows.Forms.CheckBox(); + groupBox8 = new System.Windows.Forms.GroupBox(); + itemDistributionControl4 = new ItemDistributionControl(); + checkBox13 = new System.Windows.Forms.CheckBox(); + groupBox7 = new System.Windows.Forms.GroupBox(); + itemDistributionControl3 = new ItemDistributionControl(); + checkBox12 = new System.Windows.Forms.CheckBox(); + groupBox6 = new System.Windows.Forms.GroupBox(); + itemDistributionControl2 = new ItemDistributionControl(); + checkBox10 = new System.Windows.Forms.CheckBox(); + groupBox5 = new System.Windows.Forms.GroupBox(); + checkBox61 = new System.Windows.Forms.CheckBox(); + itemDistributionControl1 = new ItemDistributionControl(); + label1 = new System.Windows.Forms.Label(); + numericUpDown1 = new System.Windows.Forms.NumericUpDown(); + checkBox8 = new System.Windows.Forms.CheckBox(); + groupBox4 = new System.Windows.Forms.GroupBox(); + numericDistributionControl1 = new NumericDistributionControl(); + checkBox7 = new System.Windows.Forms.CheckBox(); + button6 = new System.Windows.Forms.Button(); + textBox2 = new System.Windows.Forms.TextBox(); + checkBox6 = new System.Windows.Forms.CheckBox(); + checkBox5 = new System.Windows.Forms.CheckBox(); + groupBox3 = new System.Windows.Forms.GroupBox(); + checkBox3 = new System.Windows.Forms.CheckBox(); + checkBox1 = new System.Windows.Forms.CheckBox(); + tabPage2 = new System.Windows.Forms.TabPage(); + groupBox26 = new System.Windows.Forms.GroupBox(); + checkBox52 = new System.Windows.Forms.CheckBox(); + itemDistributionControl19 = new ItemDistributionControl(); + checkBox51 = new System.Windows.Forms.CheckBox(); + groupBox25 = new System.Windows.Forms.GroupBox(); + itemDistributionControl18 = new ItemDistributionControl(); + checkBox50 = new System.Windows.Forms.CheckBox(); + groupBox23 = new System.Windows.Forms.GroupBox(); + itemDistributionControl16 = new ItemDistributionControl(); + checkBox47 = new System.Windows.Forms.CheckBox(); + numericDistributionControl18 = new NumericDistributionControl(); + checkBox46 = new System.Windows.Forms.CheckBox(); + button22 = new System.Windows.Forms.Button(); + textBox19 = new System.Windows.Forms.TextBox(); + numericDistributionControl11 = new NumericDistributionControl(); + checkBox27 = new System.Windows.Forms.CheckBox(); + button16 = new System.Windows.Forms.Button(); + textBox12 = new System.Windows.Forms.TextBox(); + numericDistributionControl10 = new NumericDistributionControl(); + checkBox26 = new System.Windows.Forms.CheckBox(); + button15 = new System.Windows.Forms.Button(); + textBox11 = new System.Windows.Forms.TextBox(); + numericDistributionControl8 = new NumericDistributionControl(); + checkBox25 = new System.Windows.Forms.CheckBox(); + button13 = new System.Windows.Forms.Button(); + textBox9 = new System.Windows.Forms.TextBox(); + groupBox14 = new System.Windows.Forms.GroupBox(); + itemDistributionControl9 = new ItemDistributionControl(); + checkBox22 = new System.Windows.Forms.CheckBox(); + groupBox13 = new System.Windows.Forms.GroupBox(); + itemDistributionControl8 = new ItemDistributionControl(); + checkBox21 = new System.Windows.Forms.CheckBox(); + tabPage3 = new System.Windows.Forms.TabPage(); + groupBox18 = new System.Windows.Forms.GroupBox(); + groupBox24 = new System.Windows.Forms.GroupBox(); + checkBox49 = new System.Windows.Forms.CheckBox(); + itemDistributionControl17 = new ItemDistributionControl(); + checkBox48 = new System.Windows.Forms.CheckBox(); + numericDistributionControl17 = new NumericDistributionControl(); + checkBox45 = new System.Windows.Forms.CheckBox(); + button21 = new System.Windows.Forms.Button(); + textBox18 = new System.Windows.Forms.TextBox(); + numericDistributionControl16 = new NumericDistributionControl(); + checkBox44 = new System.Windows.Forms.CheckBox(); + button20 = new System.Windows.Forms.Button(); + textBox17 = new System.Windows.Forms.TextBox(); + groupBox22 = new System.Windows.Forms.GroupBox(); + checkBox43 = new System.Windows.Forms.CheckBox(); + itemDistributionControl15 = new ItemDistributionControl(); + checkBox42 = new System.Windows.Forms.CheckBox(); + groupBox21 = new System.Windows.Forms.GroupBox(); + label7 = new System.Windows.Forms.Label(); + numericUpDown7 = new System.Windows.Forms.NumericUpDown(); + comboBox1 = new System.Windows.Forms.ComboBox(); + itemDistributionControl14 = new ItemDistributionControl(); + groupBox20 = new System.Windows.Forms.GroupBox(); + itemDistributionControl13 = new ItemDistributionControl(); + checkBox41 = new System.Windows.Forms.CheckBox(); + numericDistributionControl15 = new NumericDistributionControl(); + checkBox40 = new System.Windows.Forms.CheckBox(); + button19 = new System.Windows.Forms.Button(); + textBox16 = new System.Windows.Forms.TextBox(); + groupBox19 = new System.Windows.Forms.GroupBox(); + label6 = new System.Windows.Forms.Label(); + numericUpDown6 = new System.Windows.Forms.NumericUpDown(); + checkBox39 = new System.Windows.Forms.CheckBox(); + groupBox17 = new System.Windows.Forms.GroupBox(); + checkBox38 = new System.Windows.Forms.CheckBox(); + checkBox34 = new System.Windows.Forms.CheckBox(); + checkBox35 = new System.Windows.Forms.CheckBox(); + itemDistributionControl12 = new ItemDistributionControl(); + checkBox37 = new System.Windows.Forms.CheckBox(); + numericDistributionControl14 = new NumericDistributionControl(); + checkBox36 = new System.Windows.Forms.CheckBox(); + button18 = new System.Windows.Forms.Button(); + textBox15 = new System.Windows.Forms.TextBox(); + groupBox16 = new System.Windows.Forms.GroupBox(); + numericDistributionControl13 = new NumericDistributionControl(); + checkBox33 = new System.Windows.Forms.CheckBox(); + button4 = new System.Windows.Forms.Button(); + textBox14 = new System.Windows.Forms.TextBox(); + itemDistributionControl11 = new ItemDistributionControl(); + checkBox32 = new System.Windows.Forms.CheckBox(); + groupBox15 = new System.Windows.Forms.GroupBox(); + checkBox31 = new System.Windows.Forms.CheckBox(); + checkBox30 = new System.Windows.Forms.CheckBox(); + numericDistributionControl12 = new NumericDistributionControl(); + checkBox28 = new System.Windows.Forms.CheckBox(); + button17 = new System.Windows.Forms.Button(); + textBox13 = new System.Windows.Forms.TextBox(); + itemDistributionControl10 = new ItemDistributionControl(); + checkBox29 = new System.Windows.Forms.CheckBox(); + tabPage4 = new System.Windows.Forms.TabPage(); + groupBox33 = new System.Windows.Forms.GroupBox(); + itemDistributionControl5 = new ItemDistributionControl(); + checkBox63 = new System.Windows.Forms.CheckBox(); + groupBox31 = new System.Windows.Forms.GroupBox(); + absoluteBoundaryDataGridView = new System.Windows.Forms.DataGridView(); + groupBox30 = new System.Windows.Forms.GroupBox(); + label9 = new System.Windows.Forms.Label(); + numericUpDown8 = new System.Windows.Forms.NumericUpDown(); + checkBox60 = new System.Windows.Forms.CheckBox(); + checkBox59 = new System.Windows.Forms.CheckBox(); + checkBox58 = new System.Windows.Forms.CheckBox(); + label8 = new System.Windows.Forms.Label(); + checkBox57 = new System.Windows.Forms.CheckBox(); + groupBox29 = new System.Windows.Forms.GroupBox(); + checkBox62 = new System.Windows.Forms.CheckBox(); + checkBox56 = new System.Windows.Forms.CheckBox(); + checkBox55 = new System.Windows.Forms.CheckBox(); + groupBox27 = new System.Windows.Forms.GroupBox(); + itemDistributionControl21 = new ItemDistributionControl(); + checkBox54 = new System.Windows.Forms.CheckBox(); + itemDistributionControl20 = new ItemDistributionControl(); + checkBox53 = new System.Windows.Forms.CheckBox(); + groupBox28 = new System.Windows.Forms.GroupBox(); + pokemonEditorButton = new System.Windows.Forms.Button(); + button24 = new System.Windows.Forms.Button(); + button25 = new System.Windows.Forms.Button(); + button26 = new System.Windows.Forms.Button(); + button27 = new System.Windows.Forms.Button(); + button28 = new System.Windows.Forms.Button(); + wildEncButton = new System.Windows.Forms.Button(); + button30 = new System.Windows.Forms.Button(); + groupBox32 = new System.Windows.Forms.GroupBox(); + flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + button32 = new System.Windows.Forms.Button(); + button23 = new System.Windows.Forms.Button(); + button34 = new System.Windows.Forms.Button(); + button35 = new System.Windows.Forms.Button(); + groupBox34 = new System.Windows.Forms.GroupBox(); + button33 = new System.Windows.Forms.Button(); + button29 = new System.Windows.Forms.Button(); + groupBox1.SuspendLayout(); + groupBox2.SuspendLayout(); + tabControl1.SuspendLayout(); + tabPage1.SuspendLayout(); + groupBox12.SuspendLayout(); + numericDistributionControl2.SuspendLayout(); + numericDistributionControl4.SuspendLayout(); + numericDistributionControl3.SuspendLayout(); + numericDistributionControl5.SuspendLayout(); + groupBox11.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown5).BeginInit(); + numericDistributionControl9.SuspendLayout(); + groupBox10.SuspendLayout(); + numericDistributionControl7.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown4).BeginInit(); + numericDistributionControl6.SuspendLayout(); + groupBox9.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown3).BeginInit(); + groupBox8.SuspendLayout(); + groupBox7.SuspendLayout(); + groupBox6.SuspendLayout(); + groupBox5.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown1).BeginInit(); + groupBox4.SuspendLayout(); + numericDistributionControl1.SuspendLayout(); + groupBox3.SuspendLayout(); + tabPage2.SuspendLayout(); + groupBox26.SuspendLayout(); + groupBox25.SuspendLayout(); + groupBox23.SuspendLayout(); + numericDistributionControl18.SuspendLayout(); + numericDistributionControl11.SuspendLayout(); + numericDistributionControl10.SuspendLayout(); + numericDistributionControl8.SuspendLayout(); + groupBox14.SuspendLayout(); + groupBox13.SuspendLayout(); + tabPage3.SuspendLayout(); + groupBox18.SuspendLayout(); + groupBox24.SuspendLayout(); + numericDistributionControl17.SuspendLayout(); + numericDistributionControl16.SuspendLayout(); + groupBox22.SuspendLayout(); + groupBox21.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown7).BeginInit(); + groupBox20.SuspendLayout(); + numericDistributionControl15.SuspendLayout(); + groupBox19.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown6).BeginInit(); + groupBox17.SuspendLayout(); + numericDistributionControl14.SuspendLayout(); + groupBox16.SuspendLayout(); + numericDistributionControl13.SuspendLayout(); + groupBox15.SuspendLayout(); + numericDistributionControl12.SuspendLayout(); + tabPage4.SuspendLayout(); + groupBox33.SuspendLayout(); + groupBox31.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)absoluteBoundaryDataGridView).BeginInit(); + groupBox30.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown8).BeginInit(); + groupBox29.SuspendLayout(); + groupBox27.SuspendLayout(); + groupBox32.SuspendLayout(); + flowLayoutPanel1.SuspendLayout(); + groupBox34.SuspendLayout(); + SuspendLayout(); // // groupBox1 // - this.groupBox1.Controls.Add(this.checkBox2); - this.groupBox1.Controls.Add(this.button1); - this.groupBox1.Controls.Add(this.textBox1); - this.groupBox1.Location = new System.Drawing.Point(6, 116); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(173, 90); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Evolution Levels"; + groupBox1.Controls.Add(checkBox2); + groupBox1.Controls.Add(button1); + groupBox1.Controls.Add(textBox1); + groupBox1.Location = new System.Drawing.Point(6, 116); + groupBox1.Name = "groupBox1"; + groupBox1.Size = new System.Drawing.Size(173, 91); + groupBox1.TabIndex = 0; + groupBox1.TabStop = false; + groupBox1.Text = "Evolution Levels"; // // checkBox2 // - this.checkBox2.AutoSize = true; - this.checkBox2.Location = new System.Drawing.Point(6, 26); - this.checkBox2.Name = "checkBox2"; - this.checkBox2.Size = new System.Drawing.Size(106, 24); - this.checkBox2.TabIndex = 3; - this.checkBox2.Text = "Randomize"; - this.checkBox2.UseVisualStyleBackColor = true; + checkBox2.AutoSize = true; + checkBox2.Location = new System.Drawing.Point(6, 27); + checkBox2.Name = "checkBox2"; + checkBox2.Size = new System.Drawing.Size(106, 24); + checkBox2.TabIndex = 3; + checkBox2.Text = "Randomize"; + checkBox2.UseVisualStyleBackColor = true; // // button1 // - this.button1.Location = new System.Drawing.Point(137, 55); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(29, 29); - this.button1.TabIndex = 1; - this.button1.Text = ">"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button1.Location = new System.Drawing.Point(137, 55); + button1.Name = "button1"; + button1.Size = new System.Drawing.Size(29, 29); + button1.TabIndex = 1; + button1.Text = ">"; + button1.UseVisualStyleBackColor = true; + button1.Click += OpenNumericDistributionForm; // // textBox1 // - this.textBox1.Location = new System.Drawing.Point(6, 56); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(125, 27); - this.textBox1.TabIndex = 0; - this.textBox1.Leave += new System.EventHandler(this.NumericDistributionTextBoxChanged); + textBox1.Location = new System.Drawing.Point(6, 56); + textBox1.Name = "textBox1"; + textBox1.Size = new System.Drawing.Size(125, 27); + textBox1.TabIndex = 0; + textBox1.Leave += NumericDistributionTextBoxChanged; // // button2 // - this.button2.Location = new System.Drawing.Point(6, 83); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(173, 29); - this.button2.TabIndex = 2; - this.button2.Text = "Destination Pokémon"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.OpenItemDistributionForm); + button2.Location = new System.Drawing.Point(6, 83); + button2.Name = "button2"; + button2.Size = new System.Drawing.Size(173, 29); + button2.TabIndex = 2; + button2.Text = "Destination Pokémon"; + button2.UseVisualStyleBackColor = true; + button2.Click += OpenItemDistributionForm; // // groupBox2 // - this.groupBox2.Controls.Add(this.button31); - this.groupBox2.Controls.Add(this.button5); - this.groupBox2.Controls.Add(this.button3); - this.groupBox2.Location = new System.Drawing.Point(12, 12); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(185, 140); - this.groupBox2.TabIndex = 3; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Main"; + groupBox2.AutoSize = true; + groupBox2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + groupBox2.Controls.Add(button31); + groupBox2.Controls.Add(button5); + groupBox2.Controls.Add(button3); + groupBox2.Location = new System.Drawing.Point(12, 12); + groupBox2.Name = "groupBox2"; + groupBox2.Size = new System.Drawing.Size(206, 151); + groupBox2.TabIndex = 3; + groupBox2.TabStop = false; + groupBox2.Text = "Main"; // // button31 // - this.button31.Location = new System.Drawing.Point(6, 96); - this.button31.Name = "button31"; - this.button31.Size = new System.Drawing.Size(173, 29); - this.button31.TabIndex = 11; - this.button31.Text = "Export and Exit"; - this.button31.UseVisualStyleBackColor = true; - this.button31.Click += new System.EventHandler(this.Export); + button31.Location = new System.Drawing.Point(6, 96); + button31.Name = "button31"; + button31.Size = new System.Drawing.Size(194, 29); + button31.TabIndex = 11; + button31.Text = "Export and Exit"; + button31.UseVisualStyleBackColor = true; + button31.Click += Export; // // button5 // - this.button5.Location = new System.Drawing.Point(6, 61); - this.button5.Name = "button5"; - this.button5.Size = new System.Drawing.Size(173, 29); - this.button5.TabIndex = 2; - this.button5.Text = "Randomize"; - this.button5.UseVisualStyleBackColor = true; - this.button5.Click += new System.EventHandler(this.Randomize); + button5.Location = new System.Drawing.Point(6, 61); + button5.Name = "button5"; + button5.Size = new System.Drawing.Size(194, 29); + button5.TabIndex = 2; + button5.Text = "Randomize"; + button5.UseVisualStyleBackColor = true; + button5.Click += Randomize; // // button3 // - this.button3.Location = new System.Drawing.Point(6, 26); - this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(173, 29); - this.button3.TabIndex = 0; - this.button3.Text = "Add Mod"; - this.button3.UseVisualStyleBackColor = true; - this.button3.Click += new System.EventHandler(this.AddMod); + button3.Location = new System.Drawing.Point(6, 27); + button3.Name = "button3"; + button3.Size = new System.Drawing.Size(194, 29); + button3.TabIndex = 0; + button3.Text = "Add Mod"; + button3.UseVisualStyleBackColor = true; + button3.Click += AddMod; // // tabControl1 // - this.tabControl1.Controls.Add(this.tabPage1); - this.tabControl1.Controls.Add(this.tabPage2); - this.tabControl1.Controls.Add(this.tabPage3); - this.tabControl1.Controls.Add(this.tabPage4); - this.tabControl1.Location = new System.Drawing.Point(203, 12); - this.tabControl1.Name = "tabControl1"; - this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(1047, 649); - this.tabControl1.TabIndex = 4; + tabControl1.Controls.Add(tabPage1); + tabControl1.Controls.Add(tabPage2); + tabControl1.Controls.Add(tabPage3); + tabControl1.Controls.Add(tabPage4); + tabControl1.Location = new System.Drawing.Point(224, 12); + tabControl1.Name = "tabControl1"; + tabControl1.SelectedIndex = 0; + tabControl1.Size = new System.Drawing.Size(1026, 649); + tabControl1.TabIndex = 4; // // tabPage1 // - this.tabPage1.Controls.Add(this.groupBox12); - this.tabPage1.Controls.Add(this.groupBox11); - this.tabPage1.Controls.Add(this.groupBox10); - this.tabPage1.Controls.Add(this.groupBox9); - this.tabPage1.Controls.Add(this.groupBox8); - this.tabPage1.Controls.Add(this.groupBox7); - this.tabPage1.Controls.Add(this.groupBox6); - this.tabPage1.Controls.Add(this.groupBox5); - this.tabPage1.Controls.Add(this.groupBox4); - this.tabPage1.Controls.Add(this.groupBox3); - this.tabPage1.Location = new System.Drawing.Point(4, 29); - this.tabPage1.Name = "tabPage1"; - this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(1039, 616); - this.tabPage1.TabIndex = 0; - this.tabPage1.Text = "Pokémon"; - this.tabPage1.UseVisualStyleBackColor = true; + tabPage1.Controls.Add(groupBox12); + tabPage1.Controls.Add(groupBox11); + tabPage1.Controls.Add(groupBox10); + tabPage1.Controls.Add(groupBox9); + tabPage1.Controls.Add(groupBox8); + tabPage1.Controls.Add(groupBox7); + tabPage1.Controls.Add(groupBox6); + tabPage1.Controls.Add(groupBox5); + tabPage1.Controls.Add(groupBox4); + tabPage1.Controls.Add(groupBox3); + tabPage1.Location = new System.Drawing.Point(4, 29); + tabPage1.Name = "tabPage1"; + tabPage1.Padding = new System.Windows.Forms.Padding(3); + tabPage1.Size = new System.Drawing.Size(1018, 616); + tabPage1.TabIndex = 0; + tabPage1.Text = "Pokémon"; + tabPage1.UseVisualStyleBackColor = true; // // groupBox12 // - this.groupBox12.Controls.Add(this.numericDistributionControl2); - this.groupBox12.Controls.Add(this.numericDistributionControl4); - this.groupBox12.Controls.Add(this.numericDistributionControl3); - this.groupBox12.Controls.Add(this.numericDistributionControl5); - this.groupBox12.Location = new System.Drawing.Point(148, 324); - this.groupBox12.Name = "groupBox12"; - this.groupBox12.Size = new System.Drawing.Size(376, 270); - this.groupBox12.TabIndex = 13; - this.groupBox12.TabStop = false; - this.groupBox12.Text = "Misc"; + groupBox12.Controls.Add(numericDistributionControl2); + groupBox12.Controls.Add(numericDistributionControl4); + groupBox12.Controls.Add(numericDistributionControl3); + groupBox12.Controls.Add(numericDistributionControl5); + groupBox12.Location = new System.Drawing.Point(144, 327); + groupBox12.Name = "groupBox12"; + groupBox12.Size = new System.Drawing.Size(376, 269); + groupBox12.TabIndex = 13; + groupBox12.TabStop = false; + groupBox12.Text = "Misc"; // // numericDistributionControl2 // - this.numericDistributionControl2.Controls.Add(this.checkBox4); - this.numericDistributionControl2.Controls.Add(this.button7); - this.numericDistributionControl2.Controls.Add(this.textBox3); - this.numericDistributionControl2.Location = new System.Drawing.Point(6, 26); - this.numericDistributionControl2.Name = "numericDistributionControl2"; - this.numericDistributionControl2.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl2.TabIndex = 4; - this.numericDistributionControl2.TabStop = false; - this.numericDistributionControl2.Text = "Catch Rate"; + numericDistributionControl2.Controls.Add(checkBox4); + numericDistributionControl2.Controls.Add(button7); + numericDistributionControl2.Controls.Add(textBox3); + numericDistributionControl2.Location = new System.Drawing.Point(6, 27); + numericDistributionControl2.Name = "numericDistributionControl2"; + numericDistributionControl2.Size = new System.Drawing.Size(173, 91); + numericDistributionControl2.TabIndex = 4; + numericDistributionControl2.TabStop = false; + numericDistributionControl2.Text = "Catch Rate"; // // checkBox4 // - this.checkBox4.AutoSize = true; - this.checkBox4.Location = new System.Drawing.Point(6, 26); - this.checkBox4.Name = "checkBox4"; - this.checkBox4.Size = new System.Drawing.Size(106, 24); - this.checkBox4.TabIndex = 3; - this.checkBox4.Text = "Randomize"; - this.checkBox4.UseVisualStyleBackColor = true; + checkBox4.AutoSize = true; + checkBox4.Location = new System.Drawing.Point(6, 27); + checkBox4.Name = "checkBox4"; + checkBox4.Size = new System.Drawing.Size(106, 24); + checkBox4.TabIndex = 3; + checkBox4.Text = "Randomize"; + checkBox4.UseVisualStyleBackColor = true; // // button7 // - this.button7.Location = new System.Drawing.Point(137, 55); - this.button7.Name = "button7"; - this.button7.Size = new System.Drawing.Size(29, 29); - this.button7.TabIndex = 1; - this.button7.Text = ">"; - this.button7.UseVisualStyleBackColor = true; - this.button7.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button7.Location = new System.Drawing.Point(137, 55); + button7.Name = "button7"; + button7.Size = new System.Drawing.Size(29, 29); + button7.TabIndex = 1; + button7.Text = ">"; + button7.UseVisualStyleBackColor = true; + button7.Click += OpenNumericDistributionForm; // // textBox3 // - this.textBox3.Location = new System.Drawing.Point(6, 56); - this.textBox3.Name = "textBox3"; - this.textBox3.Size = new System.Drawing.Size(125, 27); - this.textBox3.TabIndex = 0; + textBox3.Location = new System.Drawing.Point(6, 56); + textBox3.Name = "textBox3"; + textBox3.Size = new System.Drawing.Size(125, 27); + textBox3.TabIndex = 0; // // numericDistributionControl4 // - this.numericDistributionControl4.Controls.Add(this.checkBox11); - this.numericDistributionControl4.Controls.Add(this.button9); - this.numericDistributionControl4.Controls.Add(this.textBox5); - this.numericDistributionControl4.Location = new System.Drawing.Point(6, 122); - this.numericDistributionControl4.Name = "numericDistributionControl4"; - this.numericDistributionControl4.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl4.TabIndex = 7; - this.numericDistributionControl4.TabStop = false; - this.numericDistributionControl4.Text = "Initial Friendship"; + numericDistributionControl4.Controls.Add(checkBox11); + numericDistributionControl4.Controls.Add(button9); + numericDistributionControl4.Controls.Add(textBox5); + numericDistributionControl4.Location = new System.Drawing.Point(6, 123); + numericDistributionControl4.Name = "numericDistributionControl4"; + numericDistributionControl4.Size = new System.Drawing.Size(173, 91); + numericDistributionControl4.TabIndex = 7; + numericDistributionControl4.TabStop = false; + numericDistributionControl4.Text = "Initial Friendship"; // // checkBox11 // - this.checkBox11.AutoSize = true; - this.checkBox11.Location = new System.Drawing.Point(6, 26); - this.checkBox11.Name = "checkBox11"; - this.checkBox11.Size = new System.Drawing.Size(106, 24); - this.checkBox11.TabIndex = 3; - this.checkBox11.Text = "Randomize"; - this.checkBox11.UseVisualStyleBackColor = true; + checkBox11.AutoSize = true; + checkBox11.Location = new System.Drawing.Point(6, 27); + checkBox11.Name = "checkBox11"; + checkBox11.Size = new System.Drawing.Size(106, 24); + checkBox11.TabIndex = 3; + checkBox11.Text = "Randomize"; + checkBox11.UseVisualStyleBackColor = true; // // button9 // - this.button9.Location = new System.Drawing.Point(137, 55); - this.button9.Name = "button9"; - this.button9.Size = new System.Drawing.Size(29, 29); - this.button9.TabIndex = 1; - this.button9.Text = ">"; - this.button9.UseVisualStyleBackColor = true; - this.button9.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button9.Location = new System.Drawing.Point(137, 55); + button9.Name = "button9"; + button9.Size = new System.Drawing.Size(29, 29); + button9.TabIndex = 1; + button9.Text = ">"; + button9.UseVisualStyleBackColor = true; + button9.Click += OpenNumericDistributionForm; // // textBox5 // - this.textBox5.Location = new System.Drawing.Point(6, 56); - this.textBox5.Name = "textBox5"; - this.textBox5.Size = new System.Drawing.Size(125, 27); - this.textBox5.TabIndex = 0; + textBox5.Location = new System.Drawing.Point(6, 56); + textBox5.Name = "textBox5"; + textBox5.Size = new System.Drawing.Size(125, 27); + textBox5.TabIndex = 0; // // numericDistributionControl3 // - this.numericDistributionControl3.Controls.Add(this.checkBox9); - this.numericDistributionControl3.Controls.Add(this.button8); - this.numericDistributionControl3.Controls.Add(this.textBox4); - this.numericDistributionControl3.Location = new System.Drawing.Point(197, 26); - this.numericDistributionControl3.Name = "numericDistributionControl3"; - this.numericDistributionControl3.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl3.TabIndex = 5; - this.numericDistributionControl3.TabStop = false; - this.numericDistributionControl3.Text = "EV Yield"; + numericDistributionControl3.Controls.Add(checkBox9); + numericDistributionControl3.Controls.Add(button8); + numericDistributionControl3.Controls.Add(textBox4); + numericDistributionControl3.Location = new System.Drawing.Point(197, 27); + numericDistributionControl3.Name = "numericDistributionControl3"; + numericDistributionControl3.Size = new System.Drawing.Size(173, 91); + numericDistributionControl3.TabIndex = 5; + numericDistributionControl3.TabStop = false; + numericDistributionControl3.Text = "EV Yield"; // // checkBox9 // - this.checkBox9.AutoSize = true; - this.checkBox9.Location = new System.Drawing.Point(6, 26); - this.checkBox9.Name = "checkBox9"; - this.checkBox9.Size = new System.Drawing.Size(106, 24); - this.checkBox9.TabIndex = 3; - this.checkBox9.Text = "Randomize"; - this.checkBox9.UseVisualStyleBackColor = true; + checkBox9.AutoSize = true; + checkBox9.Location = new System.Drawing.Point(6, 27); + checkBox9.Name = "checkBox9"; + checkBox9.Size = new System.Drawing.Size(106, 24); + checkBox9.TabIndex = 3; + checkBox9.Text = "Randomize"; + checkBox9.UseVisualStyleBackColor = true; // // button8 // - this.button8.Location = new System.Drawing.Point(137, 55); - this.button8.Name = "button8"; - this.button8.Size = new System.Drawing.Size(29, 29); - this.button8.TabIndex = 1; - this.button8.Text = ">"; - this.button8.UseVisualStyleBackColor = true; - this.button8.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button8.Location = new System.Drawing.Point(137, 55); + button8.Name = "button8"; + button8.Size = new System.Drawing.Size(29, 29); + button8.TabIndex = 1; + button8.Text = ">"; + button8.UseVisualStyleBackColor = true; + button8.Click += OpenNumericDistributionForm; // // textBox4 // - this.textBox4.Location = new System.Drawing.Point(6, 56); - this.textBox4.Name = "textBox4"; - this.textBox4.Size = new System.Drawing.Size(125, 27); - this.textBox4.TabIndex = 0; + textBox4.Location = new System.Drawing.Point(6, 56); + textBox4.Name = "textBox4"; + textBox4.Size = new System.Drawing.Size(125, 27); + textBox4.TabIndex = 0; // // numericDistributionControl5 // - this.numericDistributionControl5.Controls.Add(this.checkBox14); - this.numericDistributionControl5.Controls.Add(this.button10); - this.numericDistributionControl5.Controls.Add(this.textBox6); - this.numericDistributionControl5.Location = new System.Drawing.Point(197, 122); - this.numericDistributionControl5.Name = "numericDistributionControl5"; - this.numericDistributionControl5.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl5.TabIndex = 6; - this.numericDistributionControl5.TabStop = false; - this.numericDistributionControl5.Text = "Exp Yield"; + numericDistributionControl5.Controls.Add(checkBox14); + numericDistributionControl5.Controls.Add(button10); + numericDistributionControl5.Controls.Add(textBox6); + numericDistributionControl5.Location = new System.Drawing.Point(197, 123); + numericDistributionControl5.Name = "numericDistributionControl5"; + numericDistributionControl5.Size = new System.Drawing.Size(173, 91); + numericDistributionControl5.TabIndex = 6; + numericDistributionControl5.TabStop = false; + numericDistributionControl5.Text = "Exp Yield"; // // checkBox14 // - this.checkBox14.AutoSize = true; - this.checkBox14.Location = new System.Drawing.Point(6, 26); - this.checkBox14.Name = "checkBox14"; - this.checkBox14.Size = new System.Drawing.Size(106, 24); - this.checkBox14.TabIndex = 3; - this.checkBox14.Text = "Randomize"; - this.checkBox14.UseVisualStyleBackColor = true; + checkBox14.AutoSize = true; + checkBox14.Location = new System.Drawing.Point(6, 27); + checkBox14.Name = "checkBox14"; + checkBox14.Size = new System.Drawing.Size(106, 24); + checkBox14.TabIndex = 3; + checkBox14.Text = "Randomize"; + checkBox14.UseVisualStyleBackColor = true; // // button10 // - this.button10.Location = new System.Drawing.Point(137, 55); - this.button10.Name = "button10"; - this.button10.Size = new System.Drawing.Size(29, 29); - this.button10.TabIndex = 1; - this.button10.Text = ">"; - this.button10.UseVisualStyleBackColor = true; - this.button10.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button10.Location = new System.Drawing.Point(137, 55); + button10.Name = "button10"; + button10.Size = new System.Drawing.Size(29, 29); + button10.TabIndex = 1; + button10.Text = ">"; + button10.UseVisualStyleBackColor = true; + button10.Click += OpenNumericDistributionForm; // // textBox6 // - this.textBox6.Location = new System.Drawing.Point(6, 56); - this.textBox6.Name = "textBox6"; - this.textBox6.Size = new System.Drawing.Size(125, 27); - this.textBox6.TabIndex = 0; + textBox6.Location = new System.Drawing.Point(6, 56); + textBox6.Name = "textBox6"; + textBox6.Size = new System.Drawing.Size(125, 27); + textBox6.TabIndex = 0; // // groupBox11 // - this.groupBox11.Controls.Add(this.itemDistributionControl7); - this.groupBox11.Controls.Add(this.label5); - this.groupBox11.Controls.Add(this.numericUpDown5); - this.groupBox11.Controls.Add(this.numericDistributionControl9); - this.groupBox11.Controls.Add(this.checkBox24); - this.groupBox11.Location = new System.Drawing.Point(530, 324); - this.groupBox11.Name = "groupBox11"; - this.groupBox11.Size = new System.Drawing.Size(185, 270); - this.groupBox11.TabIndex = 12; - this.groupBox11.TabStop = false; - this.groupBox11.Text = "Egg Moves"; + groupBox11.Controls.Add(itemDistributionControl7); + groupBox11.Controls.Add(label5); + groupBox11.Controls.Add(numericUpDown5); + groupBox11.Controls.Add(numericDistributionControl9); + groupBox11.Controls.Add(checkBox24); + groupBox11.Location = new System.Drawing.Point(525, 327); + groupBox11.Name = "groupBox11"; + groupBox11.Size = new System.Drawing.Size(185, 269); + groupBox11.TabIndex = 12; + groupBox11.TabStop = false; + groupBox11.Text = "Egg Moves"; // // itemDistributionControl7 // - this.itemDistributionControl7.Location = new System.Drawing.Point(6, 53); - this.itemDistributionControl7.Name = "itemDistributionControl7"; - this.itemDistributionControl7.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl7.TabIndex = 11; - this.itemDistributionControl7.Text = "Egg Moves"; - this.itemDistributionControl7.UseVisualStyleBackColor = true; - this.itemDistributionControl7.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl7.Location = new System.Drawing.Point(6, 53); + itemDistributionControl7.Name = "itemDistributionControl7"; + itemDistributionControl7.Size = new System.Drawing.Size(173, 29); + itemDistributionControl7.TabIndex = 11; + itemDistributionControl7.Text = "Egg Moves"; + itemDistributionControl7.UseVisualStyleBackColor = true; + itemDistributionControl7.Click += OpenItemDistributionForm; // // label5 // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(6, 85); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(87, 20); - this.label5.TabIndex = 9; - this.label5.Text = "Type Bias %"; + label5.AutoSize = true; + label5.Location = new System.Drawing.Point(6, 85); + label5.Name = "label5"; + label5.Size = new System.Drawing.Size(87, 20); + label5.TabIndex = 9; + label5.Text = "Type Bias %"; // // numericUpDown5 // - this.numericUpDown5.DecimalPlaces = 3; - this.numericUpDown5.Location = new System.Drawing.Point(6, 108); - this.numericUpDown5.Name = "numericUpDown5"; - this.numericUpDown5.Size = new System.Drawing.Size(173, 27); - this.numericUpDown5.TabIndex = 8; + numericUpDown5.DecimalPlaces = 3; + numericUpDown5.Location = new System.Drawing.Point(6, 108); + numericUpDown5.Name = "numericUpDown5"; + numericUpDown5.Size = new System.Drawing.Size(173, 27); + numericUpDown5.TabIndex = 8; // // numericDistributionControl9 // - this.numericDistributionControl9.Controls.Add(this.checkBox23); - this.numericDistributionControl9.Controls.Add(this.button14); - this.numericDistributionControl9.Controls.Add(this.textBox10); - this.numericDistributionControl9.Location = new System.Drawing.Point(6, 170); - this.numericDistributionControl9.Name = "numericDistributionControl9"; - this.numericDistributionControl9.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl9.TabIndex = 7; - this.numericDistributionControl9.TabStop = false; - this.numericDistributionControl9.Text = "Move Count"; + numericDistributionControl9.Controls.Add(checkBox23); + numericDistributionControl9.Controls.Add(button14); + numericDistributionControl9.Controls.Add(textBox10); + numericDistributionControl9.Location = new System.Drawing.Point(6, 171); + numericDistributionControl9.Name = "numericDistributionControl9"; + numericDistributionControl9.Size = new System.Drawing.Size(173, 91); + numericDistributionControl9.TabIndex = 7; + numericDistributionControl9.TabStop = false; + numericDistributionControl9.Text = "Move Count"; // // checkBox23 // - this.checkBox23.AutoSize = true; - this.checkBox23.Location = new System.Drawing.Point(6, 26); - this.checkBox23.Name = "checkBox23"; - this.checkBox23.Size = new System.Drawing.Size(106, 24); - this.checkBox23.TabIndex = 3; - this.checkBox23.Text = "Randomize"; - this.checkBox23.UseVisualStyleBackColor = true; + checkBox23.AutoSize = true; + checkBox23.Location = new System.Drawing.Point(6, 27); + checkBox23.Name = "checkBox23"; + checkBox23.Size = new System.Drawing.Size(106, 24); + checkBox23.TabIndex = 3; + checkBox23.Text = "Randomize"; + checkBox23.UseVisualStyleBackColor = true; // // button14 // - this.button14.Location = new System.Drawing.Point(137, 55); - this.button14.Name = "button14"; - this.button14.Size = new System.Drawing.Size(29, 29); - this.button14.TabIndex = 1; - this.button14.Text = ">"; - this.button14.UseVisualStyleBackColor = true; - this.button14.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button14.Location = new System.Drawing.Point(137, 55); + button14.Name = "button14"; + button14.Size = new System.Drawing.Size(29, 29); + button14.TabIndex = 1; + button14.Text = ">"; + button14.UseVisualStyleBackColor = true; + button14.Click += OpenNumericDistributionForm; // // textBox10 // - this.textBox10.Location = new System.Drawing.Point(6, 56); - this.textBox10.Name = "textBox10"; - this.textBox10.Size = new System.Drawing.Size(125, 27); - this.textBox10.TabIndex = 0; + textBox10.Location = new System.Drawing.Point(6, 56); + textBox10.Name = "textBox10"; + textBox10.Size = new System.Drawing.Size(125, 27); + textBox10.TabIndex = 0; // // checkBox24 // - this.checkBox24.AutoSize = true; - this.checkBox24.Location = new System.Drawing.Point(6, 26); - this.checkBox24.Name = "checkBox24"; - this.checkBox24.Size = new System.Drawing.Size(106, 24); - this.checkBox24.TabIndex = 2; - this.checkBox24.Text = "Randomize"; - this.checkBox24.UseVisualStyleBackColor = true; + checkBox24.AutoSize = true; + checkBox24.Location = new System.Drawing.Point(6, 27); + checkBox24.Name = "checkBox24"; + checkBox24.Size = new System.Drawing.Size(106, 24); + checkBox24.TabIndex = 2; + checkBox24.Text = "Randomize"; + checkBox24.UseVisualStyleBackColor = true; // // groupBox10 // - this.groupBox10.Controls.Add(this.numericDistributionControl7); - this.groupBox10.Controls.Add(this.itemDistributionControl6); - this.groupBox10.Controls.Add(this.checkBox18); - this.groupBox10.Controls.Add(this.label4); - this.groupBox10.Controls.Add(this.numericUpDown4); - this.groupBox10.Controls.Add(this.numericDistributionControl6); - this.groupBox10.Controls.Add(this.checkBox17); - this.groupBox10.Location = new System.Drawing.Point(721, 224); - this.groupBox10.Name = "groupBox10"; - this.groupBox10.Size = new System.Drawing.Size(185, 370); - this.groupBox10.TabIndex = 11; - this.groupBox10.TabStop = false; - this.groupBox10.Text = "Level Up Moves"; + groupBox10.Controls.Add(numericDistributionControl7); + groupBox10.Controls.Add(itemDistributionControl6); + groupBox10.Controls.Add(checkBox18); + groupBox10.Controls.Add(label4); + groupBox10.Controls.Add(numericUpDown4); + groupBox10.Controls.Add(numericDistributionControl6); + groupBox10.Controls.Add(checkBox17); + groupBox10.Location = new System.Drawing.Point(716, 227); + groupBox10.Name = "groupBox10"; + groupBox10.Size = new System.Drawing.Size(185, 371); + groupBox10.TabIndex = 11; + groupBox10.TabStop = false; + groupBox10.Text = "Level Up Moves"; // // numericDistributionControl7 // - this.numericDistributionControl7.Controls.Add(this.checkBox20); - this.numericDistributionControl7.Controls.Add(this.button12); - this.numericDistributionControl7.Controls.Add(this.textBox8); - this.numericDistributionControl7.Location = new System.Drawing.Point(6, 174); - this.numericDistributionControl7.Name = "numericDistributionControl7"; - this.numericDistributionControl7.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl7.TabIndex = 12; - this.numericDistributionControl7.TabStop = false; - this.numericDistributionControl7.Text = "Learn Levels"; + numericDistributionControl7.Controls.Add(checkBox20); + numericDistributionControl7.Controls.Add(button12); + numericDistributionControl7.Controls.Add(textBox8); + numericDistributionControl7.Location = new System.Drawing.Point(6, 173); + numericDistributionControl7.Name = "numericDistributionControl7"; + numericDistributionControl7.Size = new System.Drawing.Size(173, 91); + numericDistributionControl7.TabIndex = 12; + numericDistributionControl7.TabStop = false; + numericDistributionControl7.Text = "Learn Levels"; // // checkBox20 // - this.checkBox20.AutoSize = true; - this.checkBox20.Location = new System.Drawing.Point(6, 26); - this.checkBox20.Name = "checkBox20"; - this.checkBox20.Size = new System.Drawing.Size(106, 24); - this.checkBox20.TabIndex = 3; - this.checkBox20.Text = "Randomize"; - this.checkBox20.UseVisualStyleBackColor = true; + checkBox20.AutoSize = true; + checkBox20.Location = new System.Drawing.Point(6, 27); + checkBox20.Name = "checkBox20"; + checkBox20.Size = new System.Drawing.Size(106, 24); + checkBox20.TabIndex = 3; + checkBox20.Text = "Randomize"; + checkBox20.UseVisualStyleBackColor = true; // // button12 // - this.button12.Location = new System.Drawing.Point(137, 55); - this.button12.Name = "button12"; - this.button12.Size = new System.Drawing.Size(29, 29); - this.button12.TabIndex = 1; - this.button12.Text = ">"; - this.button12.UseVisualStyleBackColor = true; - this.button12.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button12.Location = new System.Drawing.Point(137, 55); + button12.Name = "button12"; + button12.Size = new System.Drawing.Size(29, 29); + button12.TabIndex = 1; + button12.Text = ">"; + button12.UseVisualStyleBackColor = true; + button12.Click += OpenNumericDistributionForm; // // textBox8 // - this.textBox8.Location = new System.Drawing.Point(6, 56); - this.textBox8.Name = "textBox8"; - this.textBox8.Size = new System.Drawing.Size(125, 27); - this.textBox8.TabIndex = 0; + textBox8.Location = new System.Drawing.Point(6, 56); + textBox8.Name = "textBox8"; + textBox8.Size = new System.Drawing.Size(125, 27); + textBox8.TabIndex = 0; // // itemDistributionControl6 // - this.itemDistributionControl6.Location = new System.Drawing.Point(6, 86); - this.itemDistributionControl6.Name = "itemDistributionControl6"; - this.itemDistributionControl6.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl6.TabIndex = 11; - this.itemDistributionControl6.Text = "Level Up Moves"; - this.itemDistributionControl6.UseVisualStyleBackColor = true; - this.itemDistributionControl6.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl6.Location = new System.Drawing.Point(6, 85); + itemDistributionControl6.Name = "itemDistributionControl6"; + itemDistributionControl6.Size = new System.Drawing.Size(173, 29); + itemDistributionControl6.TabIndex = 11; + itemDistributionControl6.Text = "Level Up Moves"; + itemDistributionControl6.UseVisualStyleBackColor = true; + itemDistributionControl6.Click += OpenItemDistributionForm; // // checkBox18 // - this.checkBox18.AutoSize = true; - this.checkBox18.Location = new System.Drawing.Point(6, 56); - this.checkBox18.Name = "checkBox18"; - this.checkBox18.Size = new System.Drawing.Size(122, 24); - this.checkBox18.TabIndex = 10; - this.checkBox18.Text = "Sort By Power"; - this.checkBox18.UseVisualStyleBackColor = true; + checkBox18.AutoSize = true; + checkBox18.Location = new System.Drawing.Point(6, 56); + checkBox18.Name = "checkBox18"; + checkBox18.Size = new System.Drawing.Size(122, 24); + checkBox18.TabIndex = 10; + checkBox18.Text = "Sort By Power"; + checkBox18.UseVisualStyleBackColor = true; // // label4 // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(6, 118); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(87, 20); - this.label4.TabIndex = 9; - this.label4.Text = "Type Bias %"; + label4.AutoSize = true; + label4.Location = new System.Drawing.Point(6, 117); + label4.Name = "label4"; + label4.Size = new System.Drawing.Size(87, 20); + label4.TabIndex = 9; + label4.Text = "Type Bias %"; // // numericUpDown4 // - this.numericUpDown4.DecimalPlaces = 3; - this.numericUpDown4.Location = new System.Drawing.Point(6, 141); - this.numericUpDown4.Name = "numericUpDown4"; - this.numericUpDown4.Size = new System.Drawing.Size(173, 27); - this.numericUpDown4.TabIndex = 8; + numericUpDown4.DecimalPlaces = 3; + numericUpDown4.Location = new System.Drawing.Point(6, 141); + numericUpDown4.Name = "numericUpDown4"; + numericUpDown4.Size = new System.Drawing.Size(173, 27); + numericUpDown4.TabIndex = 8; // // numericDistributionControl6 // - this.numericDistributionControl6.Controls.Add(this.checkBox19); - this.numericDistributionControl6.Controls.Add(this.button11); - this.numericDistributionControl6.Controls.Add(this.textBox7); - this.numericDistributionControl6.Location = new System.Drawing.Point(6, 270); - this.numericDistributionControl6.Name = "numericDistributionControl6"; - this.numericDistributionControl6.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl6.TabIndex = 7; - this.numericDistributionControl6.TabStop = false; - this.numericDistributionControl6.Text = "Move Count"; + numericDistributionControl6.Controls.Add(checkBox19); + numericDistributionControl6.Controls.Add(button11); + numericDistributionControl6.Controls.Add(textBox7); + numericDistributionControl6.Location = new System.Drawing.Point(6, 269); + numericDistributionControl6.Name = "numericDistributionControl6"; + numericDistributionControl6.Size = new System.Drawing.Size(173, 91); + numericDistributionControl6.TabIndex = 7; + numericDistributionControl6.TabStop = false; + numericDistributionControl6.Text = "Move Count"; // // checkBox19 // - this.checkBox19.AutoSize = true; - this.checkBox19.Location = new System.Drawing.Point(6, 26); - this.checkBox19.Name = "checkBox19"; - this.checkBox19.Size = new System.Drawing.Size(106, 24); - this.checkBox19.TabIndex = 3; - this.checkBox19.Text = "Randomize"; - this.checkBox19.UseVisualStyleBackColor = true; + checkBox19.AutoSize = true; + checkBox19.Location = new System.Drawing.Point(6, 27); + checkBox19.Name = "checkBox19"; + checkBox19.Size = new System.Drawing.Size(106, 24); + checkBox19.TabIndex = 3; + checkBox19.Text = "Randomize"; + checkBox19.UseVisualStyleBackColor = true; // // button11 // - this.button11.Location = new System.Drawing.Point(137, 55); - this.button11.Name = "button11"; - this.button11.Size = new System.Drawing.Size(29, 29); - this.button11.TabIndex = 1; - this.button11.Text = ">"; - this.button11.UseVisualStyleBackColor = true; - this.button11.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button11.Location = new System.Drawing.Point(137, 55); + button11.Name = "button11"; + button11.Size = new System.Drawing.Size(29, 29); + button11.TabIndex = 1; + button11.Text = ">"; + button11.UseVisualStyleBackColor = true; + button11.Click += OpenNumericDistributionForm; // // textBox7 // - this.textBox7.Location = new System.Drawing.Point(6, 56); - this.textBox7.Name = "textBox7"; - this.textBox7.Size = new System.Drawing.Size(125, 27); - this.textBox7.TabIndex = 0; + textBox7.Location = new System.Drawing.Point(6, 56); + textBox7.Name = "textBox7"; + textBox7.Size = new System.Drawing.Size(125, 27); + textBox7.TabIndex = 0; // // checkBox17 // - this.checkBox17.AutoSize = true; - this.checkBox17.Location = new System.Drawing.Point(6, 26); - this.checkBox17.Name = "checkBox17"; - this.checkBox17.Size = new System.Drawing.Size(106, 24); - this.checkBox17.TabIndex = 2; - this.checkBox17.Text = "Randomize"; - this.checkBox17.UseVisualStyleBackColor = true; + checkBox17.AutoSize = true; + checkBox17.Location = new System.Drawing.Point(6, 27); + checkBox17.Name = "checkBox17"; + checkBox17.Size = new System.Drawing.Size(106, 24); + checkBox17.TabIndex = 2; + checkBox17.Text = "Randomize"; + checkBox17.UseVisualStyleBackColor = true; // // groupBox9 // - this.groupBox9.Controls.Add(this.label2); - this.groupBox9.Controls.Add(this.numericUpDown2); - this.groupBox9.Controls.Add(this.checkBox16); - this.groupBox9.Controls.Add(this.label3); - this.groupBox9.Controls.Add(this.numericUpDown3); - this.groupBox9.Controls.Add(this.checkBox15); - this.groupBox9.Location = new System.Drawing.Point(721, 3); - this.groupBox9.Name = "groupBox9"; - this.groupBox9.Size = new System.Drawing.Size(185, 215); - this.groupBox9.TabIndex = 10; - this.groupBox9.TabStop = false; - this.groupBox9.Text = "TM Compatibility"; + groupBox9.Controls.Add(label2); + groupBox9.Controls.Add(numericUpDown2); + groupBox9.Controls.Add(checkBox16); + groupBox9.Controls.Add(label3); + groupBox9.Controls.Add(numericUpDown3); + groupBox9.Controls.Add(checkBox15); + groupBox9.Location = new System.Drawing.Point(716, 6); + groupBox9.Name = "groupBox9"; + groupBox9.Size = new System.Drawing.Size(185, 215); + groupBox9.TabIndex = 10; + groupBox9.TabStop = false; + groupBox9.Text = "TM Compatibility"; // // label2 // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(6, 83); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(140, 20); - this.label2.TabIndex = 8; - this.label2.Text = "TM Compatibility %"; + label2.AutoSize = true; + label2.Location = new System.Drawing.Point(6, 83); + label2.Name = "label2"; + label2.Size = new System.Drawing.Size(140, 20); + label2.TabIndex = 8; + label2.Text = "TM Compatibility %"; // // numericUpDown2 // - this.numericUpDown2.DecimalPlaces = 3; - this.numericUpDown2.Location = new System.Drawing.Point(6, 106); - this.numericUpDown2.Name = "numericUpDown2"; - this.numericUpDown2.Size = new System.Drawing.Size(173, 27); - this.numericUpDown2.TabIndex = 7; + numericUpDown2.DecimalPlaces = 3; + numericUpDown2.Location = new System.Drawing.Point(6, 107); + numericUpDown2.Name = "numericUpDown2"; + numericUpDown2.Size = new System.Drawing.Size(173, 27); + numericUpDown2.TabIndex = 7; // // checkBox16 // - this.checkBox16.AutoSize = true; - this.checkBox16.Location = new System.Drawing.Point(6, 56); - this.checkBox16.Name = "checkBox16"; - this.checkBox16.Size = new System.Drawing.Size(133, 24); - this.checkBox16.TabIndex = 6; - this.checkBox16.Text = "Evolution Logic"; - this.checkBox16.UseVisualStyleBackColor = true; + checkBox16.AutoSize = true; + checkBox16.Location = new System.Drawing.Point(6, 56); + checkBox16.Name = "checkBox16"; + checkBox16.Size = new System.Drawing.Size(133, 24); + checkBox16.TabIndex = 6; + checkBox16.Text = "Evolution Logic"; + checkBox16.UseVisualStyleBackColor = true; // // label3 // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(6, 136); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(87, 20); - this.label3.TabIndex = 4; - this.label3.Text = "Type Bias %"; + label3.AutoSize = true; + label3.Location = new System.Drawing.Point(6, 136); + label3.Name = "label3"; + label3.Size = new System.Drawing.Size(87, 20); + label3.TabIndex = 4; + label3.Text = "Type Bias %"; // // numericUpDown3 // - this.numericUpDown3.DecimalPlaces = 3; - this.numericUpDown3.Location = new System.Drawing.Point(6, 159); - this.numericUpDown3.Name = "numericUpDown3"; - this.numericUpDown3.Size = new System.Drawing.Size(173, 27); - this.numericUpDown3.TabIndex = 3; + numericUpDown3.DecimalPlaces = 3; + numericUpDown3.Location = new System.Drawing.Point(6, 159); + numericUpDown3.Name = "numericUpDown3"; + numericUpDown3.Size = new System.Drawing.Size(173, 27); + numericUpDown3.TabIndex = 3; // // checkBox15 // - this.checkBox15.AutoSize = true; - this.checkBox15.Location = new System.Drawing.Point(6, 26); - this.checkBox15.Name = "checkBox15"; - this.checkBox15.Size = new System.Drawing.Size(106, 24); - this.checkBox15.TabIndex = 1; - this.checkBox15.Text = "Randomize"; - this.checkBox15.UseVisualStyleBackColor = true; + checkBox15.AutoSize = true; + checkBox15.Location = new System.Drawing.Point(6, 27); + checkBox15.Name = "checkBox15"; + checkBox15.Size = new System.Drawing.Size(106, 24); + checkBox15.TabIndex = 1; + checkBox15.Text = "Randomize"; + checkBox15.UseVisualStyleBackColor = true; // // groupBox8 // - this.groupBox8.Controls.Add(this.itemDistributionControl4); - this.groupBox8.Controls.Add(this.checkBox13); - this.groupBox8.Location = new System.Drawing.Point(530, 224); - this.groupBox8.Name = "groupBox8"; - this.groupBox8.Size = new System.Drawing.Size(185, 94); - this.groupBox8.TabIndex = 9; - this.groupBox8.TabStop = false; - this.groupBox8.Text = "Abilities"; + groupBox8.Controls.Add(itemDistributionControl4); + groupBox8.Controls.Add(checkBox13); + groupBox8.Location = new System.Drawing.Point(525, 227); + groupBox8.Name = "groupBox8"; + groupBox8.Size = new System.Drawing.Size(185, 93); + groupBox8.TabIndex = 9; + groupBox8.TabStop = false; + groupBox8.Text = "Abilities"; // // itemDistributionControl4 // - this.itemDistributionControl4.Location = new System.Drawing.Point(6, 53); - this.itemDistributionControl4.Name = "itemDistributionControl4"; - this.itemDistributionControl4.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl4.TabIndex = 4; - this.itemDistributionControl4.Text = "Abilities"; - this.itemDistributionControl4.UseVisualStyleBackColor = true; - this.itemDistributionControl4.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl4.Location = new System.Drawing.Point(6, 53); + itemDistributionControl4.Name = "itemDistributionControl4"; + itemDistributionControl4.Size = new System.Drawing.Size(173, 29); + itemDistributionControl4.TabIndex = 4; + itemDistributionControl4.Text = "Abilities"; + itemDistributionControl4.UseVisualStyleBackColor = true; + itemDistributionControl4.Click += OpenItemDistributionForm; // // checkBox13 // - this.checkBox13.AutoSize = true; - this.checkBox13.Location = new System.Drawing.Point(6, 26); - this.checkBox13.Name = "checkBox13"; - this.checkBox13.Size = new System.Drawing.Size(106, 24); - this.checkBox13.TabIndex = 1; - this.checkBox13.Text = "Randomize"; - this.checkBox13.UseVisualStyleBackColor = true; + checkBox13.AutoSize = true; + checkBox13.Location = new System.Drawing.Point(6, 27); + checkBox13.Name = "checkBox13"; + checkBox13.Size = new System.Drawing.Size(106, 24); + checkBox13.TabIndex = 1; + checkBox13.Text = "Randomize"; + checkBox13.UseVisualStyleBackColor = true; // // groupBox7 // - this.groupBox7.Controls.Add(this.itemDistributionControl3); - this.groupBox7.Controls.Add(this.checkBox12); - this.groupBox7.Location = new System.Drawing.Point(339, 224); - this.groupBox7.Name = "groupBox7"; - this.groupBox7.Size = new System.Drawing.Size(185, 94); - this.groupBox7.TabIndex = 8; - this.groupBox7.TabStop = false; - this.groupBox7.Text = "Growth Rate"; + groupBox7.Controls.Add(itemDistributionControl3); + groupBox7.Controls.Add(checkBox12); + groupBox7.Location = new System.Drawing.Point(334, 227); + groupBox7.Name = "groupBox7"; + groupBox7.Size = new System.Drawing.Size(185, 93); + groupBox7.TabIndex = 8; + groupBox7.TabStop = false; + groupBox7.Text = "Growth Rate"; // // itemDistributionControl3 // - this.itemDistributionControl3.Location = new System.Drawing.Point(6, 53); - this.itemDistributionControl3.Name = "itemDistributionControl3"; - this.itemDistributionControl3.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl3.TabIndex = 4; - this.itemDistributionControl3.Text = "Growth Rate"; - this.itemDistributionControl3.UseVisualStyleBackColor = true; - this.itemDistributionControl3.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl3.Location = new System.Drawing.Point(6, 53); + itemDistributionControl3.Name = "itemDistributionControl3"; + itemDistributionControl3.Size = new System.Drawing.Size(173, 29); + itemDistributionControl3.TabIndex = 4; + itemDistributionControl3.Text = "Growth Rate"; + itemDistributionControl3.UseVisualStyleBackColor = true; + itemDistributionControl3.Click += OpenItemDistributionForm; // // checkBox12 // - this.checkBox12.AutoSize = true; - this.checkBox12.Location = new System.Drawing.Point(6, 26); - this.checkBox12.Name = "checkBox12"; - this.checkBox12.Size = new System.Drawing.Size(106, 24); - this.checkBox12.TabIndex = 1; - this.checkBox12.Text = "Randomize"; - this.checkBox12.UseVisualStyleBackColor = true; + checkBox12.AutoSize = true; + checkBox12.Location = new System.Drawing.Point(6, 27); + checkBox12.Name = "checkBox12"; + checkBox12.Size = new System.Drawing.Size(106, 24); + checkBox12.TabIndex = 1; + checkBox12.Text = "Randomize"; + checkBox12.UseVisualStyleBackColor = true; // // groupBox6 // - this.groupBox6.Controls.Add(this.itemDistributionControl2); - this.groupBox6.Controls.Add(this.checkBox10); - this.groupBox6.Location = new System.Drawing.Point(148, 224); - this.groupBox6.Name = "groupBox6"; - this.groupBox6.Size = new System.Drawing.Size(185, 94); - this.groupBox6.TabIndex = 6; - this.groupBox6.TabStop = false; - this.groupBox6.Text = "Wild Held Items"; + groupBox6.Controls.Add(itemDistributionControl2); + groupBox6.Controls.Add(checkBox10); + groupBox6.Location = new System.Drawing.Point(144, 227); + groupBox6.Name = "groupBox6"; + groupBox6.Size = new System.Drawing.Size(185, 93); + groupBox6.TabIndex = 6; + groupBox6.TabStop = false; + groupBox6.Text = "Wild Held Items"; // // itemDistributionControl2 // - this.itemDistributionControl2.Location = new System.Drawing.Point(6, 53); - this.itemDistributionControl2.Name = "itemDistributionControl2"; - this.itemDistributionControl2.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl2.TabIndex = 4; - this.itemDistributionControl2.Text = "Wild Held Items"; - this.itemDistributionControl2.UseVisualStyleBackColor = true; - this.itemDistributionControl2.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl2.Location = new System.Drawing.Point(6, 53); + itemDistributionControl2.Name = "itemDistributionControl2"; + itemDistributionControl2.Size = new System.Drawing.Size(173, 29); + itemDistributionControl2.TabIndex = 4; + itemDistributionControl2.Text = "Wild Held Items"; + itemDistributionControl2.UseVisualStyleBackColor = true; + itemDistributionControl2.Click += OpenItemDistributionForm; // // checkBox10 // - this.checkBox10.AutoSize = true; - this.checkBox10.Location = new System.Drawing.Point(6, 26); - this.checkBox10.Name = "checkBox10"; - this.checkBox10.Size = new System.Drawing.Size(106, 24); - this.checkBox10.TabIndex = 1; - this.checkBox10.Text = "Randomize"; - this.checkBox10.UseVisualStyleBackColor = true; + checkBox10.AutoSize = true; + checkBox10.Location = new System.Drawing.Point(6, 27); + checkBox10.Name = "checkBox10"; + checkBox10.Size = new System.Drawing.Size(106, 24); + checkBox10.TabIndex = 1; + checkBox10.Text = "Randomize"; + checkBox10.UseVisualStyleBackColor = true; // // groupBox5 // - this.groupBox5.Controls.Add(this.checkBox61); - this.groupBox5.Controls.Add(this.itemDistributionControl1); - this.groupBox5.Controls.Add(this.label1); - this.groupBox5.Controls.Add(this.numericUpDown1); - this.groupBox5.Controls.Add(this.checkBox8); - this.groupBox5.Location = new System.Drawing.Point(530, 3); - this.groupBox5.Name = "groupBox5"; - this.groupBox5.Size = new System.Drawing.Size(185, 215); - this.groupBox5.TabIndex = 2; - this.groupBox5.TabStop = false; - this.groupBox5.Text = "Typing"; + groupBox5.Controls.Add(checkBox61); + groupBox5.Controls.Add(itemDistributionControl1); + groupBox5.Controls.Add(label1); + groupBox5.Controls.Add(numericUpDown1); + groupBox5.Controls.Add(checkBox8); + groupBox5.Location = new System.Drawing.Point(525, 6); + groupBox5.Name = "groupBox5"; + groupBox5.Size = new System.Drawing.Size(185, 215); + groupBox5.TabIndex = 2; + groupBox5.TabStop = false; + groupBox5.Text = "Typing"; // // checkBox61 // - this.checkBox61.AutoSize = true; - this.checkBox61.Location = new System.Drawing.Point(6, 56); - this.checkBox61.Name = "checkBox61"; - this.checkBox61.Size = new System.Drawing.Size(133, 24); - this.checkBox61.TabIndex = 4; - this.checkBox61.Text = "Evolution Logic"; - this.checkBox61.UseVisualStyleBackColor = true; + checkBox61.AutoSize = true; + checkBox61.Location = new System.Drawing.Point(6, 56); + checkBox61.Name = "checkBox61"; + checkBox61.Size = new System.Drawing.Size(133, 24); + checkBox61.TabIndex = 4; + checkBox61.Text = "Evolution Logic"; + checkBox61.UseVisualStyleBackColor = true; // // itemDistributionControl1 // - this.itemDistributionControl1.Location = new System.Drawing.Point(6, 83); - this.itemDistributionControl1.Name = "itemDistributionControl1"; - this.itemDistributionControl1.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl1.TabIndex = 3; - this.itemDistributionControl1.Text = "Typing"; - this.itemDistributionControl1.UseVisualStyleBackColor = true; - this.itemDistributionControl1.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl1.Location = new System.Drawing.Point(6, 83); + itemDistributionControl1.Name = "itemDistributionControl1"; + itemDistributionControl1.Size = new System.Drawing.Size(173, 29); + itemDistributionControl1.TabIndex = 3; + itemDistributionControl1.Text = "Typing"; + itemDistributionControl1.UseVisualStyleBackColor = true; + itemDistributionControl1.Click += OpenItemDistributionForm; // // label1 // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(6, 115); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(122, 20); - this.label1.TabIndex = 2; - this.label1.Text = "Double Typing %"; + label1.AutoSize = true; + label1.Location = new System.Drawing.Point(6, 115); + label1.Name = "label1"; + label1.Size = new System.Drawing.Size(122, 20); + label1.TabIndex = 2; + label1.Text = "Double Typing %"; // // numericUpDown1 // - this.numericUpDown1.DecimalPlaces = 3; - this.numericUpDown1.Location = new System.Drawing.Point(6, 138); - this.numericUpDown1.Name = "numericUpDown1"; - this.numericUpDown1.Size = new System.Drawing.Size(173, 27); - this.numericUpDown1.TabIndex = 1; + numericUpDown1.DecimalPlaces = 3; + numericUpDown1.Location = new System.Drawing.Point(6, 139); + numericUpDown1.Name = "numericUpDown1"; + numericUpDown1.Size = new System.Drawing.Size(173, 27); + numericUpDown1.TabIndex = 1; // // checkBox8 // - this.checkBox8.AutoSize = true; - this.checkBox8.Location = new System.Drawing.Point(6, 26); - this.checkBox8.Name = "checkBox8"; - this.checkBox8.Size = new System.Drawing.Size(106, 24); - this.checkBox8.TabIndex = 0; - this.checkBox8.Text = "Randomize"; - this.checkBox8.UseVisualStyleBackColor = true; + checkBox8.AutoSize = true; + checkBox8.Location = new System.Drawing.Point(6, 27); + checkBox8.Name = "checkBox8"; + checkBox8.Size = new System.Drawing.Size(106, 24); + checkBox8.TabIndex = 0; + checkBox8.Text = "Randomize"; + checkBox8.UseVisualStyleBackColor = true; // // groupBox4 // - this.groupBox4.Controls.Add(this.numericDistributionControl1); - this.groupBox4.Controls.Add(this.checkBox6); - this.groupBox4.Controls.Add(this.checkBox5); - this.groupBox4.Location = new System.Drawing.Point(339, 3); - this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(185, 215); - this.groupBox4.TabIndex = 1; - this.groupBox4.TabStop = false; - this.groupBox4.Text = "Base Stats"; + groupBox4.Controls.Add(numericDistributionControl1); + groupBox4.Controls.Add(checkBox6); + groupBox4.Controls.Add(checkBox5); + groupBox4.Location = new System.Drawing.Point(334, 6); + groupBox4.Name = "groupBox4"; + groupBox4.Size = new System.Drawing.Size(185, 215); + groupBox4.TabIndex = 1; + groupBox4.TabStop = false; + groupBox4.Text = "Base Stats"; // // numericDistributionControl1 // - this.numericDistributionControl1.Controls.Add(this.checkBox7); - this.numericDistributionControl1.Controls.Add(this.button6); - this.numericDistributionControl1.Controls.Add(this.textBox2); - this.numericDistributionControl1.Location = new System.Drawing.Point(6, 116); - this.numericDistributionControl1.Name = "numericDistributionControl1"; - this.numericDistributionControl1.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl1.TabIndex = 3; - this.numericDistributionControl1.TabStop = false; - this.numericDistributionControl1.Text = "Base Stats"; + numericDistributionControl1.Controls.Add(checkBox7); + numericDistributionControl1.Controls.Add(button6); + numericDistributionControl1.Controls.Add(textBox2); + numericDistributionControl1.Location = new System.Drawing.Point(6, 116); + numericDistributionControl1.Name = "numericDistributionControl1"; + numericDistributionControl1.Size = new System.Drawing.Size(173, 91); + numericDistributionControl1.TabIndex = 3; + numericDistributionControl1.TabStop = false; + numericDistributionControl1.Text = "Base Stats"; // // checkBox7 // - this.checkBox7.AutoSize = true; - this.checkBox7.Location = new System.Drawing.Point(6, 26); - this.checkBox7.Name = "checkBox7"; - this.checkBox7.Size = new System.Drawing.Size(106, 24); - this.checkBox7.TabIndex = 3; - this.checkBox7.Text = "Randomize"; - this.checkBox7.UseVisualStyleBackColor = true; + checkBox7.AutoSize = true; + checkBox7.Location = new System.Drawing.Point(6, 27); + checkBox7.Name = "checkBox7"; + checkBox7.Size = new System.Drawing.Size(106, 24); + checkBox7.TabIndex = 3; + checkBox7.Text = "Randomize"; + checkBox7.UseVisualStyleBackColor = true; // // button6 // - this.button6.Location = new System.Drawing.Point(137, 55); - this.button6.Name = "button6"; - this.button6.Size = new System.Drawing.Size(29, 29); - this.button6.TabIndex = 1; - this.button6.Text = ">"; - this.button6.UseVisualStyleBackColor = true; - this.button6.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button6.Location = new System.Drawing.Point(137, 55); + button6.Name = "button6"; + button6.Size = new System.Drawing.Size(29, 29); + button6.TabIndex = 1; + button6.Text = ">"; + button6.UseVisualStyleBackColor = true; + button6.Click += OpenNumericDistributionForm; // // textBox2 // - this.textBox2.Location = new System.Drawing.Point(6, 56); - this.textBox2.Name = "textBox2"; - this.textBox2.Size = new System.Drawing.Size(125, 27); - this.textBox2.TabIndex = 0; + textBox2.Location = new System.Drawing.Point(6, 56); + textBox2.Name = "textBox2"; + textBox2.Size = new System.Drawing.Size(125, 27); + textBox2.TabIndex = 0; // // checkBox6 // - this.checkBox6.AutoSize = true; - this.checkBox6.Location = new System.Drawing.Point(6, 56); - this.checkBox6.Name = "checkBox6"; - this.checkBox6.Size = new System.Drawing.Size(96, 24); - this.checkBox6.TabIndex = 2; - this.checkBox6.Text = "BST Logic"; - this.checkBox6.UseVisualStyleBackColor = true; + checkBox6.AutoSize = true; + checkBox6.Location = new System.Drawing.Point(6, 56); + checkBox6.Name = "checkBox6"; + checkBox6.Size = new System.Drawing.Size(96, 24); + checkBox6.TabIndex = 2; + checkBox6.Text = "BST Logic"; + checkBox6.UseVisualStyleBackColor = true; // // checkBox5 // - this.checkBox5.AutoSize = true; - this.checkBox5.Location = new System.Drawing.Point(6, 26); - this.checkBox5.Name = "checkBox5"; - this.checkBox5.Size = new System.Drawing.Size(77, 24); - this.checkBox5.TabIndex = 1; - this.checkBox5.Text = "Shuffle"; - this.checkBox5.UseVisualStyleBackColor = true; + checkBox5.AutoSize = true; + checkBox5.Location = new System.Drawing.Point(6, 27); + checkBox5.Name = "checkBox5"; + checkBox5.Size = new System.Drawing.Size(77, 24); + checkBox5.TabIndex = 1; + checkBox5.Text = "Shuffle"; + checkBox5.UseVisualStyleBackColor = true; // // groupBox3 // - this.groupBox3.Controls.Add(this.checkBox3); - this.groupBox3.Controls.Add(this.checkBox1); - this.groupBox3.Controls.Add(this.groupBox1); - this.groupBox3.Controls.Add(this.button2); - this.groupBox3.Location = new System.Drawing.Point(148, 3); - this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(185, 215); - this.groupBox3.TabIndex = 0; - this.groupBox3.TabStop = false; - this.groupBox3.Text = "Evolution"; + groupBox3.Controls.Add(checkBox3); + groupBox3.Controls.Add(checkBox1); + groupBox3.Controls.Add(groupBox1); + groupBox3.Controls.Add(button2); + groupBox3.Location = new System.Drawing.Point(144, 6); + groupBox3.Name = "groupBox3"; + groupBox3.Size = new System.Drawing.Size(185, 215); + groupBox3.TabIndex = 0; + groupBox3.TabStop = false; + groupBox3.Text = "Evolution"; // // checkBox3 // - this.checkBox3.AutoSize = true; - this.checkBox3.Location = new System.Drawing.Point(6, 56); - this.checkBox3.Name = "checkBox3"; - this.checkBox3.Size = new System.Drawing.Size(96, 24); - this.checkBox3.TabIndex = 3; - this.checkBox3.Text = "BST Logic"; - this.checkBox3.UseVisualStyleBackColor = true; + checkBox3.AutoSize = true; + checkBox3.Location = new System.Drawing.Point(6, 56); + checkBox3.Name = "checkBox3"; + checkBox3.Size = new System.Drawing.Size(96, 24); + checkBox3.TabIndex = 3; + checkBox3.Text = "BST Logic"; + checkBox3.UseVisualStyleBackColor = true; // // checkBox1 // - this.checkBox1.AutoSize = true; - this.checkBox1.Location = new System.Drawing.Point(6, 26); - this.checkBox1.Name = "checkBox1"; - this.checkBox1.Size = new System.Drawing.Size(173, 24); - this.checkBox1.TabIndex = 0; - this.checkBox1.Text = "Random Destinations"; - this.checkBox1.UseVisualStyleBackColor = true; + checkBox1.AutoSize = true; + checkBox1.Location = new System.Drawing.Point(6, 27); + checkBox1.Name = "checkBox1"; + checkBox1.Size = new System.Drawing.Size(173, 24); + checkBox1.TabIndex = 0; + checkBox1.Text = "Random Destinations"; + checkBox1.UseVisualStyleBackColor = true; // // tabPage2 // - this.tabPage2.Controls.Add(this.groupBox26); - this.tabPage2.Controls.Add(this.groupBox25); - this.tabPage2.Controls.Add(this.groupBox23); - this.tabPage2.Controls.Add(this.numericDistributionControl18); - this.tabPage2.Controls.Add(this.numericDistributionControl11); - this.tabPage2.Controls.Add(this.numericDistributionControl10); - this.tabPage2.Controls.Add(this.numericDistributionControl8); - this.tabPage2.Controls.Add(this.groupBox14); - this.tabPage2.Controls.Add(this.groupBox13); - this.tabPage2.Location = new System.Drawing.Point(4, 29); - this.tabPage2.Name = "tabPage2"; - this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(1039, 616); - this.tabPage2.TabIndex = 1; - this.tabPage2.Text = "Moves and Items"; - this.tabPage2.UseVisualStyleBackColor = true; + tabPage2.Controls.Add(groupBox26); + tabPage2.Controls.Add(groupBox25); + tabPage2.Controls.Add(groupBox23); + tabPage2.Controls.Add(numericDistributionControl18); + tabPage2.Controls.Add(numericDistributionControl11); + tabPage2.Controls.Add(numericDistributionControl10); + tabPage2.Controls.Add(numericDistributionControl8); + tabPage2.Controls.Add(groupBox14); + tabPage2.Controls.Add(groupBox13); + tabPage2.Location = new System.Drawing.Point(4, 29); + tabPage2.Name = "tabPage2"; + tabPage2.Padding = new System.Windows.Forms.Padding(3); + tabPage2.Size = new System.Drawing.Size(1018, 616); + tabPage2.TabIndex = 1; + tabPage2.Text = "Moves and Items"; + tabPage2.UseVisualStyleBackColor = true; // // groupBox26 // - this.groupBox26.Controls.Add(this.checkBox52); - this.groupBox26.Controls.Add(this.itemDistributionControl19); - this.groupBox26.Controls.Add(this.checkBox51); - this.groupBox26.Location = new System.Drawing.Point(732, 250); - this.groupBox26.Name = "groupBox26"; - this.groupBox26.Size = new System.Drawing.Size(185, 125); - this.groupBox26.TabIndex = 14; - this.groupBox26.TabStop = false; - this.groupBox26.Text = "Shop Items"; + groupBox26.Controls.Add(checkBox52); + groupBox26.Controls.Add(itemDistributionControl19); + groupBox26.Controls.Add(checkBox51); + groupBox26.Location = new System.Drawing.Point(727, 250); + groupBox26.Name = "groupBox26"; + groupBox26.Size = new System.Drawing.Size(185, 125); + groupBox26.TabIndex = 14; + groupBox26.TabStop = false; + groupBox26.Text = "Shop Items"; // // checkBox52 // - this.checkBox52.AutoSize = true; - this.checkBox52.Location = new System.Drawing.Point(6, 56); - this.checkBox52.Name = "checkBox52"; - this.checkBox52.Size = new System.Drawing.Size(176, 24); - this.checkBox52.TabIndex = 5; - this.checkBox52.Text = "Preserve Regular Mart"; - this.checkBox52.UseVisualStyleBackColor = true; + checkBox52.AutoSize = true; + checkBox52.Location = new System.Drawing.Point(6, 56); + checkBox52.Name = "checkBox52"; + checkBox52.Size = new System.Drawing.Size(176, 24); + checkBox52.TabIndex = 5; + checkBox52.Text = "Preserve Regular Mart"; + checkBox52.UseVisualStyleBackColor = true; // // itemDistributionControl19 // - this.itemDistributionControl19.Location = new System.Drawing.Point(6, 86); - this.itemDistributionControl19.Name = "itemDistributionControl19"; - this.itemDistributionControl19.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl19.TabIndex = 4; - this.itemDistributionControl19.Text = "Shop Items"; - this.itemDistributionControl19.UseVisualStyleBackColor = true; - this.itemDistributionControl19.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl19.Location = new System.Drawing.Point(6, 85); + itemDistributionControl19.Name = "itemDistributionControl19"; + itemDistributionControl19.Size = new System.Drawing.Size(173, 29); + itemDistributionControl19.TabIndex = 4; + itemDistributionControl19.Text = "Shop Items"; + itemDistributionControl19.UseVisualStyleBackColor = true; + itemDistributionControl19.Click += OpenItemDistributionForm; // // checkBox51 // - this.checkBox51.AutoSize = true; - this.checkBox51.Location = new System.Drawing.Point(6, 26); - this.checkBox51.Name = "checkBox51"; - this.checkBox51.Size = new System.Drawing.Size(106, 24); - this.checkBox51.TabIndex = 1; - this.checkBox51.Text = "Randomize"; - this.checkBox51.UseVisualStyleBackColor = true; + checkBox51.AutoSize = true; + checkBox51.Location = new System.Drawing.Point(6, 27); + checkBox51.Name = "checkBox51"; + checkBox51.Size = new System.Drawing.Size(106, 24); + checkBox51.TabIndex = 1; + checkBox51.Text = "Randomize"; + checkBox51.UseVisualStyleBackColor = true; // // groupBox25 // - this.groupBox25.Controls.Add(this.itemDistributionControl18); - this.groupBox25.Controls.Add(this.checkBox50); - this.groupBox25.Location = new System.Drawing.Point(112, 346); - this.groupBox25.Name = "groupBox25"; - this.groupBox25.Size = new System.Drawing.Size(185, 90); - this.groupBox25.TabIndex = 9; - this.groupBox25.TabStop = false; - this.groupBox25.Text = "TM Moves"; + groupBox25.Controls.Add(itemDistributionControl18); + groupBox25.Controls.Add(checkBox50); + groupBox25.Location = new System.Drawing.Point(108, 346); + groupBox25.Name = "groupBox25"; + groupBox25.Size = new System.Drawing.Size(185, 91); + groupBox25.TabIndex = 9; + groupBox25.TabStop = false; + groupBox25.Text = "TM Moves"; // // itemDistributionControl18 // - this.itemDistributionControl18.Location = new System.Drawing.Point(6, 53); - this.itemDistributionControl18.Name = "itemDistributionControl18"; - this.itemDistributionControl18.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl18.TabIndex = 4; - this.itemDistributionControl18.Text = "TM Moves"; - this.itemDistributionControl18.UseVisualStyleBackColor = true; - this.itemDistributionControl18.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl18.Location = new System.Drawing.Point(6, 53); + itemDistributionControl18.Name = "itemDistributionControl18"; + itemDistributionControl18.Size = new System.Drawing.Size(173, 29); + itemDistributionControl18.TabIndex = 4; + itemDistributionControl18.Text = "TM Moves"; + itemDistributionControl18.UseVisualStyleBackColor = true; + itemDistributionControl18.Click += OpenItemDistributionForm; // // checkBox50 // - this.checkBox50.AutoSize = true; - this.checkBox50.Location = new System.Drawing.Point(6, 26); - this.checkBox50.Name = "checkBox50"; - this.checkBox50.Size = new System.Drawing.Size(106, 24); - this.checkBox50.TabIndex = 1; - this.checkBox50.Text = "Randomize"; - this.checkBox50.UseVisualStyleBackColor = true; + checkBox50.AutoSize = true; + checkBox50.Location = new System.Drawing.Point(6, 27); + checkBox50.Name = "checkBox50"; + checkBox50.Size = new System.Drawing.Size(106, 24); + checkBox50.TabIndex = 1; + checkBox50.Text = "Randomize"; + checkBox50.UseVisualStyleBackColor = true; // // groupBox23 // - this.groupBox23.Controls.Add(this.itemDistributionControl16); - this.groupBox23.Controls.Add(this.checkBox47); - this.groupBox23.Location = new System.Drawing.Point(732, 154); - this.groupBox23.Name = "groupBox23"; - this.groupBox23.Size = new System.Drawing.Size(185, 90); - this.groupBox23.TabIndex = 13; - this.groupBox23.TabStop = false; - this.groupBox23.Text = "Pickup Items"; + groupBox23.Controls.Add(itemDistributionControl16); + groupBox23.Controls.Add(checkBox47); + groupBox23.Location = new System.Drawing.Point(727, 154); + groupBox23.Name = "groupBox23"; + groupBox23.Size = new System.Drawing.Size(185, 91); + groupBox23.TabIndex = 13; + groupBox23.TabStop = false; + groupBox23.Text = "Pickup Items"; // // itemDistributionControl16 // - this.itemDistributionControl16.Location = new System.Drawing.Point(6, 53); - this.itemDistributionControl16.Name = "itemDistributionControl16"; - this.itemDistributionControl16.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl16.TabIndex = 4; - this.itemDistributionControl16.Text = "Pickup Items"; - this.itemDistributionControl16.UseVisualStyleBackColor = true; - this.itemDistributionControl16.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl16.Location = new System.Drawing.Point(6, 53); + itemDistributionControl16.Name = "itemDistributionControl16"; + itemDistributionControl16.Size = new System.Drawing.Size(173, 29); + itemDistributionControl16.TabIndex = 4; + itemDistributionControl16.Text = "Pickup Items"; + itemDistributionControl16.UseVisualStyleBackColor = true; + itemDistributionControl16.Click += OpenItemDistributionForm; // // checkBox47 // - this.checkBox47.AutoSize = true; - this.checkBox47.Location = new System.Drawing.Point(6, 26); - this.checkBox47.Name = "checkBox47"; - this.checkBox47.Size = new System.Drawing.Size(106, 24); - this.checkBox47.TabIndex = 1; - this.checkBox47.Text = "Randomize"; - this.checkBox47.UseVisualStyleBackColor = true; + checkBox47.AutoSize = true; + checkBox47.Location = new System.Drawing.Point(6, 27); + checkBox47.Name = "checkBox47"; + checkBox47.Size = new System.Drawing.Size(106, 24); + checkBox47.TabIndex = 1; + checkBox47.Text = "Randomize"; + checkBox47.UseVisualStyleBackColor = true; // // numericDistributionControl18 // - this.numericDistributionControl18.Controls.Add(this.checkBox46); - this.numericDistributionControl18.Controls.Add(this.button22); - this.numericDistributionControl18.Controls.Add(this.textBox19); - this.numericDistributionControl18.Location = new System.Drawing.Point(553, 154); - this.numericDistributionControl18.Name = "numericDistributionControl18"; - this.numericDistributionControl18.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl18.TabIndex = 12; - this.numericDistributionControl18.TabStop = false; - this.numericDistributionControl18.Text = "Item Prices"; + numericDistributionControl18.Controls.Add(checkBox46); + numericDistributionControl18.Controls.Add(button22); + numericDistributionControl18.Controls.Add(textBox19); + numericDistributionControl18.Location = new System.Drawing.Point(549, 154); + numericDistributionControl18.Name = "numericDistributionControl18"; + numericDistributionControl18.Size = new System.Drawing.Size(173, 91); + numericDistributionControl18.TabIndex = 12; + numericDistributionControl18.TabStop = false; + numericDistributionControl18.Text = "Item Prices"; // // checkBox46 // - this.checkBox46.AutoSize = true; - this.checkBox46.Location = new System.Drawing.Point(6, 26); - this.checkBox46.Name = "checkBox46"; - this.checkBox46.Size = new System.Drawing.Size(106, 24); - this.checkBox46.TabIndex = 3; - this.checkBox46.Text = "Randomize"; - this.checkBox46.UseVisualStyleBackColor = true; + checkBox46.AutoSize = true; + checkBox46.Location = new System.Drawing.Point(6, 27); + checkBox46.Name = "checkBox46"; + checkBox46.Size = new System.Drawing.Size(106, 24); + checkBox46.TabIndex = 3; + checkBox46.Text = "Randomize"; + checkBox46.UseVisualStyleBackColor = true; // // button22 // - this.button22.Location = new System.Drawing.Point(137, 55); - this.button22.Name = "button22"; - this.button22.Size = new System.Drawing.Size(29, 29); - this.button22.TabIndex = 1; - this.button22.Text = ">"; - this.button22.UseVisualStyleBackColor = true; - this.button22.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button22.Location = new System.Drawing.Point(137, 55); + button22.Name = "button22"; + button22.Size = new System.Drawing.Size(29, 29); + button22.TabIndex = 1; + button22.Text = ">"; + button22.UseVisualStyleBackColor = true; + button22.Click += OpenNumericDistributionForm; // // textBox19 // - this.textBox19.Location = new System.Drawing.Point(6, 56); - this.textBox19.Name = "textBox19"; - this.textBox19.Size = new System.Drawing.Size(125, 27); - this.textBox19.TabIndex = 0; + textBox19.Location = new System.Drawing.Point(6, 56); + textBox19.Name = "textBox19"; + textBox19.Size = new System.Drawing.Size(125, 27); + textBox19.TabIndex = 0; // // numericDistributionControl11 // - this.numericDistributionControl11.Controls.Add(this.checkBox27); - this.numericDistributionControl11.Controls.Add(this.button16); - this.numericDistributionControl11.Controls.Add(this.textBox12); - this.numericDistributionControl11.Location = new System.Drawing.Point(303, 346); - this.numericDistributionControl11.Name = "numericDistributionControl11"; - this.numericDistributionControl11.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl11.TabIndex = 11; - this.numericDistributionControl11.TabStop = false; - this.numericDistributionControl11.Text = "PP"; + numericDistributionControl11.Controls.Add(checkBox27); + numericDistributionControl11.Controls.Add(button16); + numericDistributionControl11.Controls.Add(textBox12); + numericDistributionControl11.Location = new System.Drawing.Point(299, 346); + numericDistributionControl11.Name = "numericDistributionControl11"; + numericDistributionControl11.Size = new System.Drawing.Size(173, 91); + numericDistributionControl11.TabIndex = 11; + numericDistributionControl11.TabStop = false; + numericDistributionControl11.Text = "PP"; // // checkBox27 // - this.checkBox27.AutoSize = true; - this.checkBox27.Location = new System.Drawing.Point(6, 26); - this.checkBox27.Name = "checkBox27"; - this.checkBox27.Size = new System.Drawing.Size(106, 24); - this.checkBox27.TabIndex = 3; - this.checkBox27.Text = "Randomize"; - this.checkBox27.UseVisualStyleBackColor = true; + checkBox27.AutoSize = true; + checkBox27.Location = new System.Drawing.Point(6, 27); + checkBox27.Name = "checkBox27"; + checkBox27.Size = new System.Drawing.Size(106, 24); + checkBox27.TabIndex = 3; + checkBox27.Text = "Randomize"; + checkBox27.UseVisualStyleBackColor = true; // // button16 // - this.button16.Location = new System.Drawing.Point(137, 55); - this.button16.Name = "button16"; - this.button16.Size = new System.Drawing.Size(29, 29); - this.button16.TabIndex = 1; - this.button16.Text = ">"; - this.button16.UseVisualStyleBackColor = true; - this.button16.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button16.Location = new System.Drawing.Point(137, 55); + button16.Name = "button16"; + button16.Size = new System.Drawing.Size(29, 29); + button16.TabIndex = 1; + button16.Text = ">"; + button16.UseVisualStyleBackColor = true; + button16.Click += OpenNumericDistributionForm; // // textBox12 // - this.textBox12.Location = new System.Drawing.Point(6, 56); - this.textBox12.Name = "textBox12"; - this.textBox12.Size = new System.Drawing.Size(125, 27); - this.textBox12.TabIndex = 0; + textBox12.Location = new System.Drawing.Point(6, 56); + textBox12.Name = "textBox12"; + textBox12.Size = new System.Drawing.Size(125, 27); + textBox12.TabIndex = 0; // // numericDistributionControl10 // - this.numericDistributionControl10.Controls.Add(this.checkBox26); - this.numericDistributionControl10.Controls.Add(this.button15); - this.numericDistributionControl10.Controls.Add(this.textBox11); - this.numericDistributionControl10.Location = new System.Drawing.Point(303, 250); - this.numericDistributionControl10.Name = "numericDistributionControl10"; - this.numericDistributionControl10.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl10.TabIndex = 10; - this.numericDistributionControl10.TabStop = false; - this.numericDistributionControl10.Text = "Accuracy"; + numericDistributionControl10.Controls.Add(checkBox26); + numericDistributionControl10.Controls.Add(button15); + numericDistributionControl10.Controls.Add(textBox11); + numericDistributionControl10.Location = new System.Drawing.Point(299, 250); + numericDistributionControl10.Name = "numericDistributionControl10"; + numericDistributionControl10.Size = new System.Drawing.Size(173, 91); + numericDistributionControl10.TabIndex = 10; + numericDistributionControl10.TabStop = false; + numericDistributionControl10.Text = "Accuracy"; // // checkBox26 // - this.checkBox26.AutoSize = true; - this.checkBox26.Location = new System.Drawing.Point(6, 26); - this.checkBox26.Name = "checkBox26"; - this.checkBox26.Size = new System.Drawing.Size(106, 24); - this.checkBox26.TabIndex = 3; - this.checkBox26.Text = "Randomize"; - this.checkBox26.UseVisualStyleBackColor = true; + checkBox26.AutoSize = true; + checkBox26.Location = new System.Drawing.Point(6, 27); + checkBox26.Name = "checkBox26"; + checkBox26.Size = new System.Drawing.Size(106, 24); + checkBox26.TabIndex = 3; + checkBox26.Text = "Randomize"; + checkBox26.UseVisualStyleBackColor = true; // // button15 // - this.button15.Location = new System.Drawing.Point(137, 55); - this.button15.Name = "button15"; - this.button15.Size = new System.Drawing.Size(29, 29); - this.button15.TabIndex = 1; - this.button15.Text = ">"; - this.button15.UseVisualStyleBackColor = true; - this.button15.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button15.Location = new System.Drawing.Point(137, 55); + button15.Name = "button15"; + button15.Size = new System.Drawing.Size(29, 29); + button15.TabIndex = 1; + button15.Text = ">"; + button15.UseVisualStyleBackColor = true; + button15.Click += OpenNumericDistributionForm; // // textBox11 // - this.textBox11.Location = new System.Drawing.Point(6, 56); - this.textBox11.Name = "textBox11"; - this.textBox11.Size = new System.Drawing.Size(125, 27); - this.textBox11.TabIndex = 0; + textBox11.Location = new System.Drawing.Point(6, 56); + textBox11.Name = "textBox11"; + textBox11.Size = new System.Drawing.Size(125, 27); + textBox11.TabIndex = 0; // // numericDistributionControl8 // - this.numericDistributionControl8.Controls.Add(this.checkBox25); - this.numericDistributionControl8.Controls.Add(this.button13); - this.numericDistributionControl8.Controls.Add(this.textBox9); - this.numericDistributionControl8.Location = new System.Drawing.Point(303, 154); - this.numericDistributionControl8.Name = "numericDistributionControl8"; - this.numericDistributionControl8.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl8.TabIndex = 9; - this.numericDistributionControl8.TabStop = false; - this.numericDistributionControl8.Text = "Power"; + numericDistributionControl8.Controls.Add(checkBox25); + numericDistributionControl8.Controls.Add(button13); + numericDistributionControl8.Controls.Add(textBox9); + numericDistributionControl8.Location = new System.Drawing.Point(299, 154); + numericDistributionControl8.Name = "numericDistributionControl8"; + numericDistributionControl8.Size = new System.Drawing.Size(173, 91); + numericDistributionControl8.TabIndex = 9; + numericDistributionControl8.TabStop = false; + numericDistributionControl8.Text = "Power"; // // checkBox25 // - this.checkBox25.AutoSize = true; - this.checkBox25.Location = new System.Drawing.Point(6, 26); - this.checkBox25.Name = "checkBox25"; - this.checkBox25.Size = new System.Drawing.Size(106, 24); - this.checkBox25.TabIndex = 3; - this.checkBox25.Text = "Randomize"; - this.checkBox25.UseVisualStyleBackColor = true; + checkBox25.AutoSize = true; + checkBox25.Location = new System.Drawing.Point(6, 27); + checkBox25.Name = "checkBox25"; + checkBox25.Size = new System.Drawing.Size(106, 24); + checkBox25.TabIndex = 3; + checkBox25.Text = "Randomize"; + checkBox25.UseVisualStyleBackColor = true; // // button13 // - this.button13.Location = new System.Drawing.Point(137, 55); - this.button13.Name = "button13"; - this.button13.Size = new System.Drawing.Size(29, 29); - this.button13.TabIndex = 1; - this.button13.Text = ">"; - this.button13.UseVisualStyleBackColor = true; - this.button13.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button13.Location = new System.Drawing.Point(137, 55); + button13.Name = "button13"; + button13.Size = new System.Drawing.Size(29, 29); + button13.TabIndex = 1; + button13.Text = ">"; + button13.UseVisualStyleBackColor = true; + button13.Click += OpenNumericDistributionForm; // // textBox9 // - this.textBox9.Location = new System.Drawing.Point(6, 56); - this.textBox9.Name = "textBox9"; - this.textBox9.Size = new System.Drawing.Size(125, 27); - this.textBox9.TabIndex = 0; + textBox9.Location = new System.Drawing.Point(6, 56); + textBox9.Name = "textBox9"; + textBox9.Size = new System.Drawing.Size(125, 27); + textBox9.TabIndex = 0; // // groupBox14 // - this.groupBox14.Controls.Add(this.itemDistributionControl9); - this.groupBox14.Controls.Add(this.checkBox22); - this.groupBox14.Location = new System.Drawing.Point(112, 250); - this.groupBox14.Name = "groupBox14"; - this.groupBox14.Size = new System.Drawing.Size(185, 90); - this.groupBox14.TabIndex = 8; - this.groupBox14.TabStop = false; - this.groupBox14.Text = "Damage Category"; + groupBox14.Controls.Add(itemDistributionControl9); + groupBox14.Controls.Add(checkBox22); + groupBox14.Location = new System.Drawing.Point(108, 250); + groupBox14.Name = "groupBox14"; + groupBox14.Size = new System.Drawing.Size(185, 91); + groupBox14.TabIndex = 8; + groupBox14.TabStop = false; + groupBox14.Text = "Damage Category"; // // itemDistributionControl9 // - this.itemDistributionControl9.Location = new System.Drawing.Point(6, 53); - this.itemDistributionControl9.Name = "itemDistributionControl9"; - this.itemDistributionControl9.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl9.TabIndex = 4; - this.itemDistributionControl9.Text = "Damage Category"; - this.itemDistributionControl9.UseVisualStyleBackColor = true; - this.itemDistributionControl9.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl9.Location = new System.Drawing.Point(6, 53); + itemDistributionControl9.Name = "itemDistributionControl9"; + itemDistributionControl9.Size = new System.Drawing.Size(173, 29); + itemDistributionControl9.TabIndex = 4; + itemDistributionControl9.Text = "Damage Category"; + itemDistributionControl9.UseVisualStyleBackColor = true; + itemDistributionControl9.Click += OpenItemDistributionForm; // // checkBox22 // - this.checkBox22.AutoSize = true; - this.checkBox22.Location = new System.Drawing.Point(6, 26); - this.checkBox22.Name = "checkBox22"; - this.checkBox22.Size = new System.Drawing.Size(106, 24); - this.checkBox22.TabIndex = 1; - this.checkBox22.Text = "Randomize"; - this.checkBox22.UseVisualStyleBackColor = true; + checkBox22.AutoSize = true; + checkBox22.Location = new System.Drawing.Point(6, 27); + checkBox22.Name = "checkBox22"; + checkBox22.Size = new System.Drawing.Size(106, 24); + checkBox22.TabIndex = 1; + checkBox22.Text = "Randomize"; + checkBox22.UseVisualStyleBackColor = true; // // groupBox13 // - this.groupBox13.Controls.Add(this.itemDistributionControl8); - this.groupBox13.Controls.Add(this.checkBox21); - this.groupBox13.Location = new System.Drawing.Point(112, 154); - this.groupBox13.Name = "groupBox13"; - this.groupBox13.Size = new System.Drawing.Size(185, 90); - this.groupBox13.TabIndex = 7; - this.groupBox13.TabStop = false; - this.groupBox13.Text = "Move Typing"; + groupBox13.Controls.Add(itemDistributionControl8); + groupBox13.Controls.Add(checkBox21); + groupBox13.Location = new System.Drawing.Point(108, 154); + groupBox13.Name = "groupBox13"; + groupBox13.Size = new System.Drawing.Size(185, 91); + groupBox13.TabIndex = 7; + groupBox13.TabStop = false; + groupBox13.Text = "Move Typing"; // // itemDistributionControl8 // - this.itemDistributionControl8.Location = new System.Drawing.Point(6, 53); - this.itemDistributionControl8.Name = "itemDistributionControl8"; - this.itemDistributionControl8.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl8.TabIndex = 4; - this.itemDistributionControl8.Text = "Typing"; - this.itemDistributionControl8.UseVisualStyleBackColor = true; - this.itemDistributionControl8.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl8.Location = new System.Drawing.Point(6, 53); + itemDistributionControl8.Name = "itemDistributionControl8"; + itemDistributionControl8.Size = new System.Drawing.Size(173, 29); + itemDistributionControl8.TabIndex = 4; + itemDistributionControl8.Text = "Typing"; + itemDistributionControl8.UseVisualStyleBackColor = true; + itemDistributionControl8.Click += OpenItemDistributionForm; // // checkBox21 // - this.checkBox21.AutoSize = true; - this.checkBox21.Location = new System.Drawing.Point(6, 26); - this.checkBox21.Name = "checkBox21"; - this.checkBox21.Size = new System.Drawing.Size(106, 24); - this.checkBox21.TabIndex = 1; - this.checkBox21.Text = "Randomize"; - this.checkBox21.UseVisualStyleBackColor = true; + checkBox21.AutoSize = true; + checkBox21.Location = new System.Drawing.Point(6, 27); + checkBox21.Name = "checkBox21"; + checkBox21.Size = new System.Drawing.Size(106, 24); + checkBox21.TabIndex = 1; + checkBox21.Text = "Randomize"; + checkBox21.UseVisualStyleBackColor = true; // // tabPage3 // - this.tabPage3.Controls.Add(this.groupBox18); - this.tabPage3.Controls.Add(this.groupBox16); - this.tabPage3.Controls.Add(this.groupBox15); - this.tabPage3.Location = new System.Drawing.Point(4, 29); - this.tabPage3.Name = "tabPage3"; - this.tabPage3.Padding = new System.Windows.Forms.Padding(3); - this.tabPage3.Size = new System.Drawing.Size(1039, 616); - this.tabPage3.TabIndex = 2; - this.tabPage3.Text = "Encounters"; - this.tabPage3.UseVisualStyleBackColor = true; + tabPage3.Controls.Add(groupBox18); + tabPage3.Controls.Add(groupBox16); + tabPage3.Controls.Add(groupBox15); + tabPage3.Location = new System.Drawing.Point(4, 29); + tabPage3.Name = "tabPage3"; + tabPage3.Padding = new System.Windows.Forms.Padding(3); + tabPage3.Size = new System.Drawing.Size(1018, 616); + tabPage3.TabIndex = 2; + tabPage3.Text = "Encounters"; + tabPage3.UseVisualStyleBackColor = true; // // groupBox18 // - this.groupBox18.Controls.Add(this.groupBox24); - this.groupBox18.Controls.Add(this.numericDistributionControl17); - this.groupBox18.Controls.Add(this.numericDistributionControl16); - this.groupBox18.Controls.Add(this.groupBox22); - this.groupBox18.Controls.Add(this.groupBox21); - this.groupBox18.Controls.Add(this.groupBox20); - this.groupBox18.Controls.Add(this.numericDistributionControl15); - this.groupBox18.Controls.Add(this.groupBox19); - this.groupBox18.Controls.Add(this.groupBox17); - this.groupBox18.Controls.Add(this.numericDistributionControl14); - this.groupBox18.Location = new System.Drawing.Point(334, 46); - this.groupBox18.Name = "groupBox18"; - this.groupBox18.Size = new System.Drawing.Size(570, 516); - this.groupBox18.TabIndex = 13; - this.groupBox18.TabStop = false; - this.groupBox18.Text = "Trainer Pokémon"; + groupBox18.Controls.Add(groupBox24); + groupBox18.Controls.Add(numericDistributionControl17); + groupBox18.Controls.Add(numericDistributionControl16); + groupBox18.Controls.Add(groupBox22); + groupBox18.Controls.Add(groupBox21); + groupBox18.Controls.Add(groupBox20); + groupBox18.Controls.Add(numericDistributionControl15); + groupBox18.Controls.Add(groupBox19); + groupBox18.Controls.Add(groupBox17); + groupBox18.Controls.Add(numericDistributionControl14); + groupBox18.Location = new System.Drawing.Point(325, 46); + groupBox18.Name = "groupBox18"; + groupBox18.Size = new System.Drawing.Size(570, 516); + groupBox18.TabIndex = 13; + groupBox18.TabStop = false; + groupBox18.Text = "Trainer Pokémon"; // // groupBox24 // - this.groupBox24.Controls.Add(this.checkBox49); - this.groupBox24.Controls.Add(this.itemDistributionControl17); - this.groupBox24.Controls.Add(this.checkBox48); - this.groupBox24.Location = new System.Drawing.Point(197, 353); - this.groupBox24.Name = "groupBox24"; - this.groupBox24.Size = new System.Drawing.Size(185, 125); - this.groupBox24.TabIndex = 24; - this.groupBox24.TabStop = false; - this.groupBox24.Text = "Abilities"; + groupBox24.Controls.Add(checkBox49); + groupBox24.Controls.Add(itemDistributionControl17); + groupBox24.Controls.Add(checkBox48); + groupBox24.Location = new System.Drawing.Point(197, 353); + groupBox24.Name = "groupBox24"; + groupBox24.Size = new System.Drawing.Size(185, 125); + groupBox24.TabIndex = 24; + groupBox24.TabStop = false; + groupBox24.Text = "Abilities"; // // checkBox49 // - this.checkBox49.AutoSize = true; - this.checkBox49.Location = new System.Drawing.Point(6, 56); - this.checkBox49.Name = "checkBox49"; - this.checkBox49.Size = new System.Drawing.Size(173, 24); - this.checkBox49.TabIndex = 5; - this.checkBox49.Text = "Include Unobtainable"; - this.checkBox49.UseVisualStyleBackColor = true; + checkBox49.AutoSize = true; + checkBox49.Location = new System.Drawing.Point(6, 56); + checkBox49.Name = "checkBox49"; + checkBox49.Size = new System.Drawing.Size(173, 24); + checkBox49.TabIndex = 5; + checkBox49.Text = "Include Unobtainable"; + checkBox49.UseVisualStyleBackColor = true; // // itemDistributionControl17 // - this.itemDistributionControl17.Location = new System.Drawing.Point(6, 86); - this.itemDistributionControl17.Name = "itemDistributionControl17"; - this.itemDistributionControl17.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl17.TabIndex = 4; - this.itemDistributionControl17.Text = "Abilities"; - this.itemDistributionControl17.UseVisualStyleBackColor = true; - this.itemDistributionControl17.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl17.Location = new System.Drawing.Point(6, 85); + itemDistributionControl17.Name = "itemDistributionControl17"; + itemDistributionControl17.Size = new System.Drawing.Size(173, 29); + itemDistributionControl17.TabIndex = 4; + itemDistributionControl17.Text = "Abilities"; + itemDistributionControl17.UseVisualStyleBackColor = true; + itemDistributionControl17.Click += OpenItemDistributionForm; // // checkBox48 // - this.checkBox48.AutoSize = true; - this.checkBox48.Location = new System.Drawing.Point(6, 26); - this.checkBox48.Name = "checkBox48"; - this.checkBox48.Size = new System.Drawing.Size(106, 24); - this.checkBox48.TabIndex = 1; - this.checkBox48.Text = "Randomize"; - this.checkBox48.UseVisualStyleBackColor = true; + checkBox48.AutoSize = true; + checkBox48.Location = new System.Drawing.Point(6, 27); + checkBox48.Name = "checkBox48"; + checkBox48.Size = new System.Drawing.Size(106, 24); + checkBox48.TabIndex = 1; + checkBox48.Text = "Randomize"; + checkBox48.UseVisualStyleBackColor = true; // // numericDistributionControl17 // - this.numericDistributionControl17.Controls.Add(this.checkBox45); - this.numericDistributionControl17.Controls.Add(this.button21); - this.numericDistributionControl17.Controls.Add(this.textBox18); - this.numericDistributionControl17.Location = new System.Drawing.Point(388, 318); - this.numericDistributionControl17.Name = "numericDistributionControl17"; - this.numericDistributionControl17.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl17.TabIndex = 23; - this.numericDistributionControl17.TabStop = false; - this.numericDistributionControl17.Text = "EVs"; + numericDistributionControl17.Controls.Add(checkBox45); + numericDistributionControl17.Controls.Add(button21); + numericDistributionControl17.Controls.Add(textBox18); + numericDistributionControl17.Location = new System.Drawing.Point(389, 317); + numericDistributionControl17.Name = "numericDistributionControl17"; + numericDistributionControl17.Size = new System.Drawing.Size(173, 91); + numericDistributionControl17.TabIndex = 23; + numericDistributionControl17.TabStop = false; + numericDistributionControl17.Text = "EVs"; // // checkBox45 // - this.checkBox45.AutoSize = true; - this.checkBox45.Location = new System.Drawing.Point(6, 26); - this.checkBox45.Name = "checkBox45"; - this.checkBox45.Size = new System.Drawing.Size(106, 24); - this.checkBox45.TabIndex = 3; - this.checkBox45.Text = "Randomize"; - this.checkBox45.UseVisualStyleBackColor = true; + checkBox45.AutoSize = true; + checkBox45.Location = new System.Drawing.Point(6, 27); + checkBox45.Name = "checkBox45"; + checkBox45.Size = new System.Drawing.Size(106, 24); + checkBox45.TabIndex = 3; + checkBox45.Text = "Randomize"; + checkBox45.UseVisualStyleBackColor = true; // // button21 // - this.button21.Location = new System.Drawing.Point(137, 55); - this.button21.Name = "button21"; - this.button21.Size = new System.Drawing.Size(29, 29); - this.button21.TabIndex = 1; - this.button21.Text = ">"; - this.button21.UseVisualStyleBackColor = true; - this.button21.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button21.Location = new System.Drawing.Point(137, 55); + button21.Name = "button21"; + button21.Size = new System.Drawing.Size(29, 29); + button21.TabIndex = 1; + button21.Text = ">"; + button21.UseVisualStyleBackColor = true; + button21.Click += OpenNumericDistributionForm; // // textBox18 // - this.textBox18.Location = new System.Drawing.Point(6, 56); - this.textBox18.Name = "textBox18"; - this.textBox18.Size = new System.Drawing.Size(125, 27); - this.textBox18.TabIndex = 0; + textBox18.Location = new System.Drawing.Point(6, 56); + textBox18.Name = "textBox18"; + textBox18.Size = new System.Drawing.Size(125, 27); + textBox18.TabIndex = 0; // // numericDistributionControl16 // - this.numericDistributionControl16.Controls.Add(this.checkBox44); - this.numericDistributionControl16.Controls.Add(this.button20); - this.numericDistributionControl16.Controls.Add(this.textBox17); - this.numericDistributionControl16.Location = new System.Drawing.Point(387, 222); - this.numericDistributionControl16.Name = "numericDistributionControl16"; - this.numericDistributionControl16.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl16.TabIndex = 22; - this.numericDistributionControl16.TabStop = false; - this.numericDistributionControl16.Text = "IVs"; + numericDistributionControl16.Controls.Add(checkBox44); + numericDistributionControl16.Controls.Add(button20); + numericDistributionControl16.Controls.Add(textBox17); + numericDistributionControl16.Location = new System.Drawing.Point(387, 221); + numericDistributionControl16.Name = "numericDistributionControl16"; + numericDistributionControl16.Size = new System.Drawing.Size(173, 91); + numericDistributionControl16.TabIndex = 22; + numericDistributionControl16.TabStop = false; + numericDistributionControl16.Text = "IVs"; // // checkBox44 // - this.checkBox44.AutoSize = true; - this.checkBox44.Location = new System.Drawing.Point(6, 26); - this.checkBox44.Name = "checkBox44"; - this.checkBox44.Size = new System.Drawing.Size(106, 24); - this.checkBox44.TabIndex = 3; - this.checkBox44.Text = "Randomize"; - this.checkBox44.UseVisualStyleBackColor = true; + checkBox44.AutoSize = true; + checkBox44.Location = new System.Drawing.Point(6, 27); + checkBox44.Name = "checkBox44"; + checkBox44.Size = new System.Drawing.Size(106, 24); + checkBox44.TabIndex = 3; + checkBox44.Text = "Randomize"; + checkBox44.UseVisualStyleBackColor = true; // // button20 // - this.button20.Location = new System.Drawing.Point(137, 55); - this.button20.Name = "button20"; - this.button20.Size = new System.Drawing.Size(29, 29); - this.button20.TabIndex = 1; - this.button20.Text = ">"; - this.button20.UseVisualStyleBackColor = true; - this.button20.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button20.Location = new System.Drawing.Point(137, 55); + button20.Name = "button20"; + button20.Size = new System.Drawing.Size(29, 29); + button20.TabIndex = 1; + button20.Text = ">"; + button20.UseVisualStyleBackColor = true; + button20.Click += OpenNumericDistributionForm; // // textBox17 // - this.textBox17.Location = new System.Drawing.Point(6, 56); - this.textBox17.Name = "textBox17"; - this.textBox17.Size = new System.Drawing.Size(125, 27); - this.textBox17.TabIndex = 0; + textBox17.Location = new System.Drawing.Point(6, 56); + textBox17.Name = "textBox17"; + textBox17.Size = new System.Drawing.Size(125, 27); + textBox17.TabIndex = 0; // // groupBox22 // - this.groupBox22.Controls.Add(this.checkBox43); - this.groupBox22.Controls.Add(this.itemDistributionControl15); - this.groupBox22.Controls.Add(this.checkBox42); - this.groupBox22.Location = new System.Drawing.Point(6, 222); - this.groupBox22.Name = "groupBox22"; - this.groupBox22.Size = new System.Drawing.Size(185, 125); - this.groupBox22.TabIndex = 21; - this.groupBox22.TabStop = false; - this.groupBox22.Text = "Held Items"; + groupBox22.Controls.Add(checkBox43); + groupBox22.Controls.Add(itemDistributionControl15); + groupBox22.Controls.Add(checkBox42); + groupBox22.Location = new System.Drawing.Point(6, 221); + groupBox22.Name = "groupBox22"; + groupBox22.Size = new System.Drawing.Size(185, 125); + groupBox22.TabIndex = 21; + groupBox22.TabStop = false; + groupBox22.Text = "Held Items"; // // checkBox43 // - this.checkBox43.AutoSize = true; - this.checkBox43.Location = new System.Drawing.Point(6, 56); - this.checkBox43.Name = "checkBox43"; - this.checkBox43.Size = new System.Drawing.Size(177, 24); - this.checkBox43.TabIndex = 5; - this.checkBox43.Text = "High Level Held Items"; - this.checkBox43.UseVisualStyleBackColor = true; + checkBox43.AutoSize = true; + checkBox43.Location = new System.Drawing.Point(6, 56); + checkBox43.Name = "checkBox43"; + checkBox43.Size = new System.Drawing.Size(177, 24); + checkBox43.TabIndex = 5; + checkBox43.Text = "High Level Held Items"; + checkBox43.UseVisualStyleBackColor = true; // // itemDistributionControl15 // - this.itemDistributionControl15.Location = new System.Drawing.Point(6, 86); - this.itemDistributionControl15.Name = "itemDistributionControl15"; - this.itemDistributionControl15.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl15.TabIndex = 4; - this.itemDistributionControl15.Text = "Held Items"; - this.itemDistributionControl15.UseVisualStyleBackColor = true; - this.itemDistributionControl15.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl15.Location = new System.Drawing.Point(6, 85); + itemDistributionControl15.Name = "itemDistributionControl15"; + itemDistributionControl15.Size = new System.Drawing.Size(173, 29); + itemDistributionControl15.TabIndex = 4; + itemDistributionControl15.Text = "Held Items"; + itemDistributionControl15.UseVisualStyleBackColor = true; + itemDistributionControl15.Click += OpenItemDistributionForm; // // checkBox42 // - this.checkBox42.AutoSize = true; - this.checkBox42.Location = new System.Drawing.Point(6, 26); - this.checkBox42.Name = "checkBox42"; - this.checkBox42.Size = new System.Drawing.Size(106, 24); - this.checkBox42.TabIndex = 1; - this.checkBox42.Text = "Randomize"; - this.checkBox42.UseVisualStyleBackColor = true; + checkBox42.AutoSize = true; + checkBox42.Location = new System.Drawing.Point(6, 27); + checkBox42.Name = "checkBox42"; + checkBox42.Size = new System.Drawing.Size(106, 24); + checkBox42.TabIndex = 1; + checkBox42.Text = "Randomize"; + checkBox42.UseVisualStyleBackColor = true; // // groupBox21 // - this.groupBox21.Controls.Add(this.label7); - this.groupBox21.Controls.Add(this.numericUpDown7); - this.groupBox21.Controls.Add(this.comboBox1); - this.groupBox21.Controls.Add(this.itemDistributionControl14); - this.groupBox21.Location = new System.Drawing.Point(197, 26); - this.groupBox21.Name = "groupBox21"; - this.groupBox21.Size = new System.Drawing.Size(185, 190); - this.groupBox21.TabIndex = 20; - this.groupBox21.TabStop = false; - this.groupBox21.Text = "Moves"; + groupBox21.Controls.Add(label7); + groupBox21.Controls.Add(numericUpDown7); + groupBox21.Controls.Add(comboBox1); + groupBox21.Controls.Add(itemDistributionControl14); + groupBox21.Location = new System.Drawing.Point(197, 27); + groupBox21.Name = "groupBox21"; + groupBox21.Size = new System.Drawing.Size(185, 189); + groupBox21.TabIndex = 20; + groupBox21.TabStop = false; + groupBox21.Text = "Moves"; // // label7 // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(6, 92); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(87, 20); - this.label7.TabIndex = 11; - this.label7.Text = "Type Bias %"; + label7.AutoSize = true; + label7.Location = new System.Drawing.Point(6, 92); + label7.Name = "label7"; + label7.Size = new System.Drawing.Size(87, 20); + label7.TabIndex = 11; + label7.Text = "Type Bias %"; // // numericUpDown7 // - this.numericUpDown7.DecimalPlaces = 3; - this.numericUpDown7.Location = new System.Drawing.Point(6, 115); - this.numericUpDown7.Name = "numericUpDown7"; - this.numericUpDown7.Size = new System.Drawing.Size(173, 27); - this.numericUpDown7.TabIndex = 10; + numericUpDown7.DecimalPlaces = 3; + numericUpDown7.Location = new System.Drawing.Point(6, 115); + numericUpDown7.Name = "numericUpDown7"; + numericUpDown7.Size = new System.Drawing.Size(173, 27); + numericUpDown7.TabIndex = 10; // // comboBox1 // - this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBox1.FormattingEnabled = true; - this.comboBox1.Items.AddRange(new object[] { - "Unchanged", - "Last Level Up Moves", - "Random"}); - this.comboBox1.Location = new System.Drawing.Point(6, 24); - this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(173, 28); - this.comboBox1.TabIndex = 5; + comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + comboBox1.FormattingEnabled = true; + comboBox1.Items.AddRange(new object[] { "Unchanged", "Last Level Up Moves", "Random" }); + comboBox1.Location = new System.Drawing.Point(6, 24); + comboBox1.Name = "comboBox1"; + comboBox1.Size = new System.Drawing.Size(173, 28); + comboBox1.TabIndex = 5; // // itemDistributionControl14 // - this.itemDistributionControl14.Location = new System.Drawing.Point(6, 150); - this.itemDistributionControl14.Name = "itemDistributionControl14"; - this.itemDistributionControl14.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl14.TabIndex = 4; - this.itemDistributionControl14.Text = "Moves"; - this.itemDistributionControl14.UseVisualStyleBackColor = true; - this.itemDistributionControl14.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl14.Location = new System.Drawing.Point(6, 149); + itemDistributionControl14.Name = "itemDistributionControl14"; + itemDistributionControl14.Size = new System.Drawing.Size(173, 29); + itemDistributionControl14.TabIndex = 4; + itemDistributionControl14.Text = "Moves"; + itemDistributionControl14.UseVisualStyleBackColor = true; + itemDistributionControl14.Click += OpenItemDistributionForm; // // groupBox20 // - this.groupBox20.Controls.Add(this.itemDistributionControl13); - this.groupBox20.Controls.Add(this.checkBox41); - this.groupBox20.Location = new System.Drawing.Point(6, 353); - this.groupBox20.Name = "groupBox20"; - this.groupBox20.Size = new System.Drawing.Size(185, 94); - this.groupBox20.TabIndex = 19; - this.groupBox20.TabStop = false; - this.groupBox20.Text = "Natures"; + groupBox20.Controls.Add(itemDistributionControl13); + groupBox20.Controls.Add(checkBox41); + groupBox20.Location = new System.Drawing.Point(6, 353); + groupBox20.Name = "groupBox20"; + groupBox20.Size = new System.Drawing.Size(185, 93); + groupBox20.TabIndex = 19; + groupBox20.TabStop = false; + groupBox20.Text = "Natures"; // // itemDistributionControl13 // - this.itemDistributionControl13.Location = new System.Drawing.Point(6, 53); - this.itemDistributionControl13.Name = "itemDistributionControl13"; - this.itemDistributionControl13.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl13.TabIndex = 4; - this.itemDistributionControl13.Text = "Natures"; - this.itemDistributionControl13.UseVisualStyleBackColor = true; - this.itemDistributionControl13.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl13.Location = new System.Drawing.Point(6, 53); + itemDistributionControl13.Name = "itemDistributionControl13"; + itemDistributionControl13.Size = new System.Drawing.Size(173, 29); + itemDistributionControl13.TabIndex = 4; + itemDistributionControl13.Text = "Natures"; + itemDistributionControl13.UseVisualStyleBackColor = true; + itemDistributionControl13.Click += OpenItemDistributionForm; // // checkBox41 // - this.checkBox41.AutoSize = true; - this.checkBox41.Location = new System.Drawing.Point(6, 26); - this.checkBox41.Name = "checkBox41"; - this.checkBox41.Size = new System.Drawing.Size(106, 24); - this.checkBox41.TabIndex = 1; - this.checkBox41.Text = "Randomize"; - this.checkBox41.UseVisualStyleBackColor = true; + checkBox41.AutoSize = true; + checkBox41.Location = new System.Drawing.Point(6, 27); + checkBox41.Name = "checkBox41"; + checkBox41.Size = new System.Drawing.Size(106, 24); + checkBox41.TabIndex = 1; + checkBox41.Text = "Randomize"; + checkBox41.UseVisualStyleBackColor = true; // // numericDistributionControl15 // - this.numericDistributionControl15.Controls.Add(this.checkBox40); - this.numericDistributionControl15.Controls.Add(this.button19); - this.numericDistributionControl15.Controls.Add(this.textBox16); - this.numericDistributionControl15.Location = new System.Drawing.Point(388, 126); - this.numericDistributionControl15.Name = "numericDistributionControl15"; - this.numericDistributionControl15.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl15.TabIndex = 18; - this.numericDistributionControl15.TabStop = false; - this.numericDistributionControl15.Text = "Levels"; + numericDistributionControl15.Controls.Add(checkBox40); + numericDistributionControl15.Controls.Add(button19); + numericDistributionControl15.Controls.Add(textBox16); + numericDistributionControl15.Location = new System.Drawing.Point(389, 125); + numericDistributionControl15.Name = "numericDistributionControl15"; + numericDistributionControl15.Size = new System.Drawing.Size(173, 91); + numericDistributionControl15.TabIndex = 18; + numericDistributionControl15.TabStop = false; + numericDistributionControl15.Text = "Levels"; // // checkBox40 // - this.checkBox40.AutoSize = true; - this.checkBox40.Location = new System.Drawing.Point(6, 26); - this.checkBox40.Name = "checkBox40"; - this.checkBox40.Size = new System.Drawing.Size(106, 24); - this.checkBox40.TabIndex = 3; - this.checkBox40.Text = "Randomize"; - this.checkBox40.UseVisualStyleBackColor = true; + checkBox40.AutoSize = true; + checkBox40.Location = new System.Drawing.Point(6, 27); + checkBox40.Name = "checkBox40"; + checkBox40.Size = new System.Drawing.Size(106, 24); + checkBox40.TabIndex = 3; + checkBox40.Text = "Randomize"; + checkBox40.UseVisualStyleBackColor = true; // // button19 // - this.button19.Location = new System.Drawing.Point(137, 55); - this.button19.Name = "button19"; - this.button19.Size = new System.Drawing.Size(29, 29); - this.button19.TabIndex = 1; - this.button19.Text = ">"; - this.button19.UseVisualStyleBackColor = true; - this.button19.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button19.Location = new System.Drawing.Point(137, 55); + button19.Name = "button19"; + button19.Size = new System.Drawing.Size(29, 29); + button19.TabIndex = 1; + button19.Text = ">"; + button19.UseVisualStyleBackColor = true; + button19.Click += OpenNumericDistributionForm; // // textBox16 // - this.textBox16.Location = new System.Drawing.Point(6, 56); - this.textBox16.Name = "textBox16"; - this.textBox16.Size = new System.Drawing.Size(125, 27); - this.textBox16.TabIndex = 0; + textBox16.Location = new System.Drawing.Point(6, 56); + textBox16.Name = "textBox16"; + textBox16.Size = new System.Drawing.Size(125, 27); + textBox16.TabIndex = 0; // // groupBox19 // - this.groupBox19.Controls.Add(this.label6); - this.groupBox19.Controls.Add(this.numericUpDown6); - this.groupBox19.Controls.Add(this.checkBox39); - this.groupBox19.Location = new System.Drawing.Point(197, 222); - this.groupBox19.Name = "groupBox19"; - this.groupBox19.Size = new System.Drawing.Size(185, 125); - this.groupBox19.TabIndex = 17; - this.groupBox19.TabStop = false; - this.groupBox19.Text = "Shininess"; + groupBox19.Controls.Add(label6); + groupBox19.Controls.Add(numericUpDown6); + groupBox19.Controls.Add(checkBox39); + groupBox19.Location = new System.Drawing.Point(197, 221); + groupBox19.Name = "groupBox19"; + groupBox19.Size = new System.Drawing.Size(185, 125); + groupBox19.TabIndex = 17; + groupBox19.TabStop = false; + groupBox19.Text = "Shininess"; // // label6 // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(6, 65); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(60, 20); - this.label6.TabIndex = 17; - this.label6.Text = "Shiny %"; + label6.AutoSize = true; + label6.Location = new System.Drawing.Point(6, 65); + label6.Name = "label6"; + label6.Size = new System.Drawing.Size(60, 20); + label6.TabIndex = 17; + label6.Text = "Shiny %"; // // numericUpDown6 // - this.numericUpDown6.DecimalPlaces = 3; - this.numericUpDown6.Location = new System.Drawing.Point(6, 86); - this.numericUpDown6.Name = "numericUpDown6"; - this.numericUpDown6.Size = new System.Drawing.Size(173, 27); - this.numericUpDown6.TabIndex = 16; + numericUpDown6.DecimalPlaces = 3; + numericUpDown6.Location = new System.Drawing.Point(6, 85); + numericUpDown6.Name = "numericUpDown6"; + numericUpDown6.Size = new System.Drawing.Size(173, 27); + numericUpDown6.TabIndex = 16; // // checkBox39 // - this.checkBox39.AutoSize = true; - this.checkBox39.Location = new System.Drawing.Point(6, 26); - this.checkBox39.Name = "checkBox39"; - this.checkBox39.Size = new System.Drawing.Size(137, 24); - this.checkBox39.TabIndex = 15; - this.checkBox39.Text = "Random Shinies"; - this.checkBox39.UseVisualStyleBackColor = true; + checkBox39.AutoSize = true; + checkBox39.Location = new System.Drawing.Point(6, 27); + checkBox39.Name = "checkBox39"; + checkBox39.Size = new System.Drawing.Size(137, 24); + checkBox39.TabIndex = 15; + checkBox39.Text = "Random Shinies"; + checkBox39.UseVisualStyleBackColor = true; // // groupBox17 // - this.groupBox17.Controls.Add(this.checkBox38); - this.groupBox17.Controls.Add(this.checkBox34); - this.groupBox17.Controls.Add(this.checkBox35); - this.groupBox17.Controls.Add(this.itemDistributionControl12); - this.groupBox17.Controls.Add(this.checkBox37); - this.groupBox17.Location = new System.Drawing.Point(6, 26); - this.groupBox17.Name = "groupBox17"; - this.groupBox17.Size = new System.Drawing.Size(185, 190); - this.groupBox17.TabIndex = 12; - this.groupBox17.TabStop = false; - this.groupBox17.Text = "Pokemon Species"; + groupBox17.Controls.Add(checkBox38); + groupBox17.Controls.Add(checkBox34); + groupBox17.Controls.Add(checkBox35); + groupBox17.Controls.Add(itemDistributionControl12); + groupBox17.Controls.Add(checkBox37); + groupBox17.Location = new System.Drawing.Point(6, 27); + groupBox17.Name = "groupBox17"; + groupBox17.Size = new System.Drawing.Size(185, 189); + groupBox17.TabIndex = 12; + groupBox17.TabStop = false; + groupBox17.Text = "Pokemon Species"; // // checkBox38 // - this.checkBox38.AutoSize = true; - this.checkBox38.Location = new System.Drawing.Point(6, 86); - this.checkBox38.Name = "checkBox38"; - this.checkBox38.Size = new System.Drawing.Size(117, 24); - this.checkBox38.TabIndex = 19; - this.checkBox38.Text = "Type Themes"; - this.checkBox38.UseVisualStyleBackColor = true; + checkBox38.AutoSize = true; + checkBox38.Location = new System.Drawing.Point(6, 85); + checkBox38.Name = "checkBox38"; + checkBox38.Size = new System.Drawing.Size(117, 24); + checkBox38.TabIndex = 19; + checkBox38.Text = "Type Themes"; + checkBox38.UseVisualStyleBackColor = true; // // checkBox34 // - this.checkBox34.AutoSize = true; - this.checkBox34.Location = new System.Drawing.Point(6, 56); - this.checkBox34.Name = "checkBox34"; - this.checkBox34.Size = new System.Drawing.Size(160, 24); - this.checkBox34.TabIndex = 18; - this.checkBox34.Text = "High Level Legends"; - this.checkBox34.UseVisualStyleBackColor = true; + checkBox34.AutoSize = true; + checkBox34.Location = new System.Drawing.Point(6, 56); + checkBox34.Name = "checkBox34"; + checkBox34.Size = new System.Drawing.Size(160, 24); + checkBox34.TabIndex = 18; + checkBox34.Text = "High Level Legends"; + checkBox34.UseVisualStyleBackColor = true; // // checkBox35 // - this.checkBox35.AutoSize = true; - this.checkBox35.Location = new System.Drawing.Point(6, 116); - this.checkBox35.Name = "checkBox35"; - this.checkBox35.Size = new System.Drawing.Size(133, 24); - this.checkBox35.TabIndex = 17; - this.checkBox35.Text = "Evolution Logic"; - this.checkBox35.UseVisualStyleBackColor = true; + checkBox35.AutoSize = true; + checkBox35.Location = new System.Drawing.Point(6, 116); + checkBox35.Name = "checkBox35"; + checkBox35.Size = new System.Drawing.Size(133, 24); + checkBox35.TabIndex = 17; + checkBox35.Text = "Evolution Logic"; + checkBox35.UseVisualStyleBackColor = true; // // itemDistributionControl12 // - this.itemDistributionControl12.Location = new System.Drawing.Point(6, 150); - this.itemDistributionControl12.Name = "itemDistributionControl12"; - this.itemDistributionControl12.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl12.TabIndex = 15; - this.itemDistributionControl12.Text = "Pokémon"; - this.itemDistributionControl12.UseVisualStyleBackColor = true; - this.itemDistributionControl12.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl12.Location = new System.Drawing.Point(6, 149); + itemDistributionControl12.Name = "itemDistributionControl12"; + itemDistributionControl12.Size = new System.Drawing.Size(173, 29); + itemDistributionControl12.TabIndex = 15; + itemDistributionControl12.Text = "Pokémon"; + itemDistributionControl12.UseVisualStyleBackColor = true; + itemDistributionControl12.Click += OpenItemDistributionForm; // // checkBox37 // - this.checkBox37.AutoSize = true; - this.checkBox37.Location = new System.Drawing.Point(6, 26); - this.checkBox37.Name = "checkBox37"; - this.checkBox37.Size = new System.Drawing.Size(152, 24); - this.checkBox37.TabIndex = 14; - this.checkBox37.Text = "Random Pokémon"; - this.checkBox37.UseVisualStyleBackColor = true; + checkBox37.AutoSize = true; + checkBox37.Location = new System.Drawing.Point(6, 27); + checkBox37.Name = "checkBox37"; + checkBox37.Size = new System.Drawing.Size(152, 24); + checkBox37.TabIndex = 14; + checkBox37.Text = "Random Pokémon"; + checkBox37.UseVisualStyleBackColor = true; // // numericDistributionControl14 // - this.numericDistributionControl14.Controls.Add(this.checkBox36); - this.numericDistributionControl14.Controls.Add(this.button18); - this.numericDistributionControl14.Controls.Add(this.textBox15); - this.numericDistributionControl14.Location = new System.Drawing.Point(388, 26); - this.numericDistributionControl14.Name = "numericDistributionControl14"; - this.numericDistributionControl14.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl14.TabIndex = 16; - this.numericDistributionControl14.TabStop = false; - this.numericDistributionControl14.Text = "Pokémon Count"; + numericDistributionControl14.Controls.Add(checkBox36); + numericDistributionControl14.Controls.Add(button18); + numericDistributionControl14.Controls.Add(textBox15); + numericDistributionControl14.Location = new System.Drawing.Point(389, 27); + numericDistributionControl14.Name = "numericDistributionControl14"; + numericDistributionControl14.Size = new System.Drawing.Size(173, 91); + numericDistributionControl14.TabIndex = 16; + numericDistributionControl14.TabStop = false; + numericDistributionControl14.Text = "Pokémon Count"; // // checkBox36 // - this.checkBox36.AutoSize = true; - this.checkBox36.Location = new System.Drawing.Point(6, 26); - this.checkBox36.Name = "checkBox36"; - this.checkBox36.Size = new System.Drawing.Size(106, 24); - this.checkBox36.TabIndex = 3; - this.checkBox36.Text = "Randomize"; - this.checkBox36.UseVisualStyleBackColor = true; + checkBox36.AutoSize = true; + checkBox36.Location = new System.Drawing.Point(6, 27); + checkBox36.Name = "checkBox36"; + checkBox36.Size = new System.Drawing.Size(106, 24); + checkBox36.TabIndex = 3; + checkBox36.Text = "Randomize"; + checkBox36.UseVisualStyleBackColor = true; // // button18 // - this.button18.Location = new System.Drawing.Point(137, 55); - this.button18.Name = "button18"; - this.button18.Size = new System.Drawing.Size(29, 29); - this.button18.TabIndex = 1; - this.button18.Text = ">"; - this.button18.UseVisualStyleBackColor = true; - this.button18.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button18.Location = new System.Drawing.Point(137, 55); + button18.Name = "button18"; + button18.Size = new System.Drawing.Size(29, 29); + button18.TabIndex = 1; + button18.Text = ">"; + button18.UseVisualStyleBackColor = true; + button18.Click += OpenNumericDistributionForm; // // textBox15 // - this.textBox15.Location = new System.Drawing.Point(6, 56); - this.textBox15.Name = "textBox15"; - this.textBox15.Size = new System.Drawing.Size(125, 27); - this.textBox15.TabIndex = 0; + textBox15.Location = new System.Drawing.Point(6, 56); + textBox15.Name = "textBox15"; + textBox15.Size = new System.Drawing.Size(125, 27); + textBox15.TabIndex = 0; // // groupBox16 // - this.groupBox16.Controls.Add(this.numericDistributionControl13); - this.groupBox16.Controls.Add(this.itemDistributionControl11); - this.groupBox16.Controls.Add(this.checkBox32); - this.groupBox16.Location = new System.Drawing.Point(143, 307); - this.groupBox16.Name = "groupBox16"; - this.groupBox16.Size = new System.Drawing.Size(185, 255); - this.groupBox16.TabIndex = 11; - this.groupBox16.TabStop = false; - this.groupBox16.Text = "Trainer Items"; + groupBox16.Controls.Add(numericDistributionControl13); + groupBox16.Controls.Add(itemDistributionControl11); + groupBox16.Controls.Add(checkBox32); + groupBox16.Location = new System.Drawing.Point(134, 308); + groupBox16.Name = "groupBox16"; + groupBox16.Size = new System.Drawing.Size(185, 255); + groupBox16.TabIndex = 11; + groupBox16.TabStop = false; + groupBox16.Text = "Trainer Items"; // // numericDistributionControl13 // - this.numericDistributionControl13.Controls.Add(this.checkBox33); - this.numericDistributionControl13.Controls.Add(this.button4); - this.numericDistributionControl13.Controls.Add(this.textBox14); - this.numericDistributionControl13.Location = new System.Drawing.Point(6, 153); - this.numericDistributionControl13.Name = "numericDistributionControl13"; - this.numericDistributionControl13.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl13.TabIndex = 13; - this.numericDistributionControl13.TabStop = false; - this.numericDistributionControl13.Text = "Item Count"; + numericDistributionControl13.Controls.Add(checkBox33); + numericDistributionControl13.Controls.Add(button4); + numericDistributionControl13.Controls.Add(textBox14); + numericDistributionControl13.Location = new System.Drawing.Point(6, 153); + numericDistributionControl13.Name = "numericDistributionControl13"; + numericDistributionControl13.Size = new System.Drawing.Size(173, 91); + numericDistributionControl13.TabIndex = 13; + numericDistributionControl13.TabStop = false; + numericDistributionControl13.Text = "Item Count"; // // checkBox33 // - this.checkBox33.AutoSize = true; - this.checkBox33.Location = new System.Drawing.Point(6, 26); - this.checkBox33.Name = "checkBox33"; - this.checkBox33.Size = new System.Drawing.Size(106, 24); - this.checkBox33.TabIndex = 3; - this.checkBox33.Text = "Randomize"; - this.checkBox33.UseVisualStyleBackColor = true; + checkBox33.AutoSize = true; + checkBox33.Location = new System.Drawing.Point(6, 27); + checkBox33.Name = "checkBox33"; + checkBox33.Size = new System.Drawing.Size(106, 24); + checkBox33.TabIndex = 3; + checkBox33.Text = "Randomize"; + checkBox33.UseVisualStyleBackColor = true; // // button4 // - this.button4.Location = new System.Drawing.Point(137, 55); - this.button4.Name = "button4"; - this.button4.Size = new System.Drawing.Size(29, 29); - this.button4.TabIndex = 1; - this.button4.Text = ">"; - this.button4.UseVisualStyleBackColor = true; - this.button4.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button4.Location = new System.Drawing.Point(137, 55); + button4.Name = "button4"; + button4.Size = new System.Drawing.Size(29, 29); + button4.TabIndex = 1; + button4.Text = ">"; + button4.UseVisualStyleBackColor = true; + button4.Click += OpenNumericDistributionForm; // // textBox14 // - this.textBox14.Location = new System.Drawing.Point(6, 56); - this.textBox14.Name = "textBox14"; - this.textBox14.Size = new System.Drawing.Size(125, 27); - this.textBox14.TabIndex = 0; + textBox14.Location = new System.Drawing.Point(6, 56); + textBox14.Name = "textBox14"; + textBox14.Size = new System.Drawing.Size(125, 27); + textBox14.TabIndex = 0; // // itemDistributionControl11 // - this.itemDistributionControl11.Location = new System.Drawing.Point(6, 118); - this.itemDistributionControl11.Name = "itemDistributionControl11"; - this.itemDistributionControl11.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl11.TabIndex = 12; - this.itemDistributionControl11.Text = "Trainer Items"; - this.itemDistributionControl11.UseVisualStyleBackColor = true; - this.itemDistributionControl11.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl11.Location = new System.Drawing.Point(6, 117); + itemDistributionControl11.Name = "itemDistributionControl11"; + itemDistributionControl11.Size = new System.Drawing.Size(173, 29); + itemDistributionControl11.TabIndex = 12; + itemDistributionControl11.Text = "Trainer Items"; + itemDistributionControl11.UseVisualStyleBackColor = true; + itemDistributionControl11.Click += OpenItemDistributionForm; // // checkBox32 // - this.checkBox32.AutoSize = true; - this.checkBox32.Location = new System.Drawing.Point(6, 26); - this.checkBox32.Name = "checkBox32"; - this.checkBox32.Size = new System.Drawing.Size(127, 24); - this.checkBox32.TabIndex = 0; - this.checkBox32.Text = "Random Items"; - this.checkBox32.UseVisualStyleBackColor = true; + checkBox32.AutoSize = true; + checkBox32.Location = new System.Drawing.Point(6, 27); + checkBox32.Name = "checkBox32"; + checkBox32.Size = new System.Drawing.Size(127, 24); + checkBox32.TabIndex = 0; + checkBox32.Text = "Random Items"; + checkBox32.UseVisualStyleBackColor = true; // // groupBox15 // - this.groupBox15.Controls.Add(this.checkBox31); - this.groupBox15.Controls.Add(this.checkBox30); - this.groupBox15.Controls.Add(this.numericDistributionControl12); - this.groupBox15.Controls.Add(this.itemDistributionControl10); - this.groupBox15.Controls.Add(this.checkBox29); - this.groupBox15.Location = new System.Drawing.Point(143, 46); - this.groupBox15.Name = "groupBox15"; - this.groupBox15.Size = new System.Drawing.Size(185, 255); - this.groupBox15.TabIndex = 10; - this.groupBox15.TabStop = false; - this.groupBox15.Text = "Wild Encounters"; + groupBox15.Controls.Add(checkBox31); + groupBox15.Controls.Add(checkBox30); + groupBox15.Controls.Add(numericDistributionControl12); + groupBox15.Controls.Add(itemDistributionControl10); + groupBox15.Controls.Add(checkBox29); + groupBox15.Location = new System.Drawing.Point(134, 46); + groupBox15.Name = "groupBox15"; + groupBox15.Size = new System.Drawing.Size(185, 255); + groupBox15.TabIndex = 10; + groupBox15.TabStop = false; + groupBox15.Text = "Wild Encounters"; // // checkBox31 // - this.checkBox31.AutoSize = true; - this.checkBox31.Location = new System.Drawing.Point(6, 56); - this.checkBox31.Name = "checkBox31"; - this.checkBox31.Size = new System.Drawing.Size(160, 24); - this.checkBox31.TabIndex = 13; - this.checkBox31.Text = "High Level Legends"; - this.checkBox31.UseVisualStyleBackColor = true; + checkBox31.AutoSize = true; + checkBox31.Location = new System.Drawing.Point(6, 56); + checkBox31.Name = "checkBox31"; + checkBox31.Size = new System.Drawing.Size(160, 24); + checkBox31.TabIndex = 13; + checkBox31.Text = "High Level Legends"; + checkBox31.UseVisualStyleBackColor = true; // // checkBox30 // - this.checkBox30.AutoSize = true; - this.checkBox30.Location = new System.Drawing.Point(6, 86); - this.checkBox30.Name = "checkBox30"; - this.checkBox30.Size = new System.Drawing.Size(133, 24); - this.checkBox30.TabIndex = 12; - this.checkBox30.Text = "Evolution Logic"; - this.checkBox30.UseVisualStyleBackColor = true; + checkBox30.AutoSize = true; + checkBox30.Location = new System.Drawing.Point(6, 85); + checkBox30.Name = "checkBox30"; + checkBox30.Size = new System.Drawing.Size(133, 24); + checkBox30.TabIndex = 12; + checkBox30.Text = "Evolution Logic"; + checkBox30.UseVisualStyleBackColor = true; // // numericDistributionControl12 // - this.numericDistributionControl12.Controls.Add(this.checkBox28); - this.numericDistributionControl12.Controls.Add(this.button17); - this.numericDistributionControl12.Controls.Add(this.textBox13); - this.numericDistributionControl12.Location = new System.Drawing.Point(6, 153); - this.numericDistributionControl12.Name = "numericDistributionControl12"; - this.numericDistributionControl12.Size = new System.Drawing.Size(173, 90); - this.numericDistributionControl12.TabIndex = 11; - this.numericDistributionControl12.TabStop = false; - this.numericDistributionControl12.Text = "Levels"; + numericDistributionControl12.Controls.Add(checkBox28); + numericDistributionControl12.Controls.Add(button17); + numericDistributionControl12.Controls.Add(textBox13); + numericDistributionControl12.Location = new System.Drawing.Point(6, 153); + numericDistributionControl12.Name = "numericDistributionControl12"; + numericDistributionControl12.Size = new System.Drawing.Size(173, 91); + numericDistributionControl12.TabIndex = 11; + numericDistributionControl12.TabStop = false; + numericDistributionControl12.Text = "Levels"; // // checkBox28 // - this.checkBox28.AutoSize = true; - this.checkBox28.Location = new System.Drawing.Point(6, 26); - this.checkBox28.Name = "checkBox28"; - this.checkBox28.Size = new System.Drawing.Size(106, 24); - this.checkBox28.TabIndex = 3; - this.checkBox28.Text = "Randomize"; - this.checkBox28.UseVisualStyleBackColor = true; + checkBox28.AutoSize = true; + checkBox28.Location = new System.Drawing.Point(6, 27); + checkBox28.Name = "checkBox28"; + checkBox28.Size = new System.Drawing.Size(106, 24); + checkBox28.TabIndex = 3; + checkBox28.Text = "Randomize"; + checkBox28.UseVisualStyleBackColor = true; // // button17 // - this.button17.Location = new System.Drawing.Point(137, 55); - this.button17.Name = "button17"; - this.button17.Size = new System.Drawing.Size(29, 29); - this.button17.TabIndex = 1; - this.button17.Text = ">"; - this.button17.UseVisualStyleBackColor = true; - this.button17.Click += new System.EventHandler(this.OpenNumericDistributionForm); + button17.Location = new System.Drawing.Point(137, 55); + button17.Name = "button17"; + button17.Size = new System.Drawing.Size(29, 29); + button17.TabIndex = 1; + button17.Text = ">"; + button17.UseVisualStyleBackColor = true; + button17.Click += OpenNumericDistributionForm; // // textBox13 // - this.textBox13.Location = new System.Drawing.Point(6, 56); - this.textBox13.Name = "textBox13"; - this.textBox13.Size = new System.Drawing.Size(125, 27); - this.textBox13.TabIndex = 0; + textBox13.Location = new System.Drawing.Point(6, 56); + textBox13.Name = "textBox13"; + textBox13.Size = new System.Drawing.Size(125, 27); + textBox13.TabIndex = 0; // // itemDistributionControl10 // - this.itemDistributionControl10.Location = new System.Drawing.Point(6, 118); - this.itemDistributionControl10.Name = "itemDistributionControl10"; - this.itemDistributionControl10.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl10.TabIndex = 4; - this.itemDistributionControl10.Text = "Wild Encounters"; - this.itemDistributionControl10.UseVisualStyleBackColor = true; - this.itemDistributionControl10.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl10.Location = new System.Drawing.Point(6, 117); + itemDistributionControl10.Name = "itemDistributionControl10"; + itemDistributionControl10.Size = new System.Drawing.Size(173, 29); + itemDistributionControl10.TabIndex = 4; + itemDistributionControl10.Text = "Wild Encounters"; + itemDistributionControl10.UseVisualStyleBackColor = true; + itemDistributionControl10.Click += OpenItemDistributionForm; // // checkBox29 // - this.checkBox29.AutoSize = true; - this.checkBox29.Location = new System.Drawing.Point(6, 26); - this.checkBox29.Name = "checkBox29"; - this.checkBox29.Size = new System.Drawing.Size(152, 24); - this.checkBox29.TabIndex = 1; - this.checkBox29.Text = "Random Pokémon"; - this.checkBox29.UseVisualStyleBackColor = true; + checkBox29.AutoSize = true; + checkBox29.Location = new System.Drawing.Point(6, 27); + checkBox29.Name = "checkBox29"; + checkBox29.Size = new System.Drawing.Size(152, 24); + checkBox29.TabIndex = 1; + checkBox29.Text = "Random Pokémon"; + checkBox29.UseVisualStyleBackColor = true; // // tabPage4 // - this.tabPage4.Controls.Add(this.groupBox33); - this.tabPage4.Controls.Add(this.groupBox31); - this.tabPage4.Controls.Add(this.groupBox30); - this.tabPage4.Controls.Add(this.groupBox29); - this.tabPage4.Controls.Add(this.groupBox27); - this.tabPage4.Location = new System.Drawing.Point(4, 29); - this.tabPage4.Name = "tabPage4"; - this.tabPage4.Padding = new System.Windows.Forms.Padding(3); - this.tabPage4.Size = new System.Drawing.Size(1039, 616); - this.tabPage4.TabIndex = 3; - this.tabPage4.Text = "Misc."; - this.tabPage4.UseVisualStyleBackColor = true; + tabPage4.Controls.Add(groupBox33); + tabPage4.Controls.Add(groupBox31); + tabPage4.Controls.Add(groupBox30); + tabPage4.Controls.Add(groupBox29); + tabPage4.Controls.Add(groupBox27); + tabPage4.Location = new System.Drawing.Point(4, 29); + tabPage4.Name = "tabPage4"; + tabPage4.Padding = new System.Windows.Forms.Padding(3); + tabPage4.Size = new System.Drawing.Size(1018, 616); + tabPage4.TabIndex = 3; + tabPage4.Text = "Misc."; + tabPage4.UseVisualStyleBackColor = true; // // groupBox33 // - this.groupBox33.Controls.Add(this.itemDistributionControl5); - this.groupBox33.Controls.Add(this.checkBox63); - this.groupBox33.Location = new System.Drawing.Point(133, 53); - this.groupBox33.Name = "groupBox33"; - this.groupBox33.Size = new System.Drawing.Size(185, 120); - this.groupBox33.TabIndex = 5; - this.groupBox33.TabStop = false; - this.groupBox33.Text = "Type Matchups"; + groupBox33.Controls.Add(itemDistributionControl5); + groupBox33.Controls.Add(checkBox63); + groupBox33.Location = new System.Drawing.Point(133, 43); + groupBox33.Name = "groupBox33"; + groupBox33.Size = new System.Drawing.Size(185, 120); + groupBox33.TabIndex = 5; + groupBox33.TabStop = false; + groupBox33.Text = "Type Matchups"; // // itemDistributionControl5 // - this.itemDistributionControl5.Location = new System.Drawing.Point(6, 56); - this.itemDistributionControl5.Name = "itemDistributionControl5"; - this.itemDistributionControl5.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl5.TabIndex = 6; - this.itemDistributionControl5.Text = "Type Matchups"; - this.itemDistributionControl5.UseVisualStyleBackColor = true; - this.itemDistributionControl5.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl5.Location = new System.Drawing.Point(6, 56); + itemDistributionControl5.Name = "itemDistributionControl5"; + itemDistributionControl5.Size = new System.Drawing.Size(173, 29); + itemDistributionControl5.TabIndex = 6; + itemDistributionControl5.Text = "Type Matchups"; + itemDistributionControl5.UseVisualStyleBackColor = true; + itemDistributionControl5.Click += OpenItemDistributionForm; // // checkBox63 // - this.checkBox63.AutoSize = true; - this.checkBox63.Location = new System.Drawing.Point(6, 26); - this.checkBox63.Name = "checkBox63"; - this.checkBox63.Size = new System.Drawing.Size(155, 24); - this.checkBox63.TabIndex = 5; - this.checkBox63.Text = "Random Matchups"; - this.checkBox63.UseVisualStyleBackColor = true; + checkBox63.AutoSize = true; + checkBox63.Location = new System.Drawing.Point(6, 27); + checkBox63.Name = "checkBox63"; + checkBox63.Size = new System.Drawing.Size(155, 24); + checkBox63.TabIndex = 5; + checkBox63.Text = "Random Matchups"; + checkBox63.UseVisualStyleBackColor = true; // // groupBox31 // - this.groupBox31.Controls.Add(this.absoluteBoundaryDataGridView); - this.groupBox31.Location = new System.Drawing.Point(515, 53); - this.groupBox31.Name = "groupBox31"; - this.groupBox31.Size = new System.Drawing.Size(376, 532); - this.groupBox31.TabIndex = 4; - this.groupBox31.TabStop = false; - this.groupBox31.Text = "Absolute Boundaries"; + groupBox31.Controls.Add(absoluteBoundaryDataGridView); + groupBox31.Location = new System.Drawing.Point(515, 43); + groupBox31.Name = "groupBox31"; + groupBox31.Size = new System.Drawing.Size(376, 532); + groupBox31.TabIndex = 4; + groupBox31.TabStop = false; + groupBox31.Text = "Absolute Boundaries"; // // absoluteBoundaryDataGridView // - this.absoluteBoundaryDataGridView.AllowUserToAddRows = false; - this.absoluteBoundaryDataGridView.AllowUserToDeleteRows = false; - this.absoluteBoundaryDataGridView.AllowUserToResizeRows = false; - this.absoluteBoundaryDataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.absoluteBoundaryDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.absoluteBoundaryDataGridView.Location = new System.Drawing.Point(6, 26); - this.absoluteBoundaryDataGridView.Name = "absoluteBoundaryDataGridView"; - this.absoluteBoundaryDataGridView.RowHeadersVisible = false; - this.absoluteBoundaryDataGridView.RowHeadersWidth = 51; - this.absoluteBoundaryDataGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; - this.absoluteBoundaryDataGridView.RowTemplate.Height = 29; - this.absoluteBoundaryDataGridView.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.absoluteBoundaryDataGridView.Size = new System.Drawing.Size(364, 499); - this.absoluteBoundaryDataGridView.TabIndex = 3; - this.absoluteBoundaryDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.DataError); + absoluteBoundaryDataGridView.AllowUserToAddRows = false; + absoluteBoundaryDataGridView.AllowUserToDeleteRows = false; + absoluteBoundaryDataGridView.AllowUserToResizeRows = false; + absoluteBoundaryDataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + absoluteBoundaryDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + absoluteBoundaryDataGridView.Location = new System.Drawing.Point(6, 27); + absoluteBoundaryDataGridView.Name = "absoluteBoundaryDataGridView"; + absoluteBoundaryDataGridView.RowHeadersVisible = false; + absoluteBoundaryDataGridView.RowHeadersWidth = 51; + absoluteBoundaryDataGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; + absoluteBoundaryDataGridView.RowTemplate.Height = 29; + absoluteBoundaryDataGridView.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + absoluteBoundaryDataGridView.Size = new System.Drawing.Size(363, 499); + absoluteBoundaryDataGridView.TabIndex = 3; + absoluteBoundaryDataGridView.DataError += DataError; // // groupBox30 // - this.groupBox30.Controls.Add(this.label9); - this.groupBox30.Controls.Add(this.numericUpDown8); - this.groupBox30.Controls.Add(this.checkBox60); - this.groupBox30.Controls.Add(this.checkBox59); - this.groupBox30.Controls.Add(this.checkBox58); - this.groupBox30.Controls.Add(this.label8); - this.groupBox30.Controls.Add(this.checkBox57); - this.groupBox30.Location = new System.Drawing.Point(324, 179); - this.groupBox30.Name = "groupBox30"; - this.groupBox30.Size = new System.Drawing.Size(185, 406); - this.groupBox30.TabIndex = 2; - this.groupBox30.TabStop = false; - this.groupBox30.Text = "Level Multiplier"; + groupBox30.Controls.Add(label9); + groupBox30.Controls.Add(numericUpDown8); + groupBox30.Controls.Add(checkBox60); + groupBox30.Controls.Add(checkBox59); + groupBox30.Controls.Add(checkBox58); + groupBox30.Controls.Add(label8); + groupBox30.Controls.Add(checkBox57); + groupBox30.Location = new System.Drawing.Point(325, 169); + groupBox30.Name = "groupBox30"; + groupBox30.Size = new System.Drawing.Size(185, 405); + groupBox30.TabIndex = 2; + groupBox30.TabStop = false; + groupBox30.Text = "Level Multiplier"; // // label9 // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(6, 183); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(119, 20); - this.label9.TabIndex = 13; - this.label9.Text = "Level Coefficient"; + label9.AutoSize = true; + label9.Location = new System.Drawing.Point(6, 183); + label9.Name = "label9"; + label9.Size = new System.Drawing.Size(119, 20); + label9.TabIndex = 13; + label9.Text = "Level Coefficient"; // // numericUpDown8 // - this.numericUpDown8.DecimalPlaces = 3; - this.numericUpDown8.Increment = new decimal(new int[] { - 1, - 0, - 0, - 65536}); - this.numericUpDown8.Location = new System.Drawing.Point(6, 206); - this.numericUpDown8.Name = "numericUpDown8"; - this.numericUpDown8.Size = new System.Drawing.Size(173, 27); - this.numericUpDown8.TabIndex = 12; - this.numericUpDown8.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); + numericUpDown8.DecimalPlaces = 3; + numericUpDown8.Increment = new decimal(new int[] { 1, 0, 0, 65536 }); + numericUpDown8.Location = new System.Drawing.Point(6, 205); + numericUpDown8.Name = "numericUpDown8"; + numericUpDown8.Size = new System.Drawing.Size(173, 27); + numericUpDown8.TabIndex = 12; + numericUpDown8.Value = new decimal(new int[] { 1, 0, 0, 0 }); // // checkBox60 // - this.checkBox60.AutoSize = true; - this.checkBox60.Location = new System.Drawing.Point(6, 156); - this.checkBox60.Name = "checkBox60"; - this.checkBox60.Size = new System.Drawing.Size(141, 24); - this.checkBox60.TabIndex = 4; - this.checkBox60.Text = "Trainer Pokémon"; - this.checkBox60.UseVisualStyleBackColor = true; + checkBox60.AutoSize = true; + checkBox60.Location = new System.Drawing.Point(6, 156); + checkBox60.Name = "checkBox60"; + checkBox60.Size = new System.Drawing.Size(141, 24); + checkBox60.TabIndex = 4; + checkBox60.Text = "Trainer Pokémon"; + checkBox60.UseVisualStyleBackColor = true; // // checkBox59 // - this.checkBox59.AutoSize = true; - this.checkBox59.Location = new System.Drawing.Point(6, 126); - this.checkBox59.Name = "checkBox59"; - this.checkBox59.Size = new System.Drawing.Size(138, 24); - this.checkBox59.TabIndex = 3; - this.checkBox59.Text = "Wild Encounters"; - this.checkBox59.UseVisualStyleBackColor = true; + checkBox59.AutoSize = true; + checkBox59.Location = new System.Drawing.Point(6, 125); + checkBox59.Name = "checkBox59"; + checkBox59.Size = new System.Drawing.Size(138, 24); + checkBox59.TabIndex = 3; + checkBox59.Text = "Wild Encounters"; + checkBox59.UseVisualStyleBackColor = true; // // checkBox58 // - this.checkBox58.AutoSize = true; - this.checkBox58.Location = new System.Drawing.Point(6, 96); - this.checkBox58.Name = "checkBox58"; - this.checkBox58.Size = new System.Drawing.Size(135, 24); - this.checkBox58.TabIndex = 2; - this.checkBox58.Text = "Level Up Moves"; - this.checkBox58.UseVisualStyleBackColor = true; + checkBox58.AutoSize = true; + checkBox58.Location = new System.Drawing.Point(6, 96); + checkBox58.Name = "checkBox58"; + checkBox58.Size = new System.Drawing.Size(135, 24); + checkBox58.TabIndex = 2; + checkBox58.Text = "Level Up Moves"; + checkBox58.UseVisualStyleBackColor = true; // // label8 // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(6, 23); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(159, 40); - this.label8.TabIndex = 1; - this.label8.Text = "Takes place before any\r\nrandomizations."; + label8.AutoSize = true; + label8.Location = new System.Drawing.Point(6, 23); + label8.Name = "label8"; + label8.Size = new System.Drawing.Size(159, 40); + label8.TabIndex = 1; + label8.Text = "Takes place before any\r\nrandomizations."; // // checkBox57 // - this.checkBox57.AutoSize = true; - this.checkBox57.Location = new System.Drawing.Point(6, 66); - this.checkBox57.Name = "checkBox57"; - this.checkBox57.Size = new System.Drawing.Size(137, 24); - this.checkBox57.TabIndex = 0; - this.checkBox57.Text = "Evolution Levels"; - this.checkBox57.UseVisualStyleBackColor = true; + checkBox57.AutoSize = true; + checkBox57.Location = new System.Drawing.Point(6, 67); + checkBox57.Name = "checkBox57"; + checkBox57.Size = new System.Drawing.Size(137, 24); + checkBox57.TabIndex = 0; + checkBox57.Text = "Evolution Levels"; + checkBox57.UseVisualStyleBackColor = true; // // groupBox29 // - this.groupBox29.Controls.Add(this.checkBox62); - this.groupBox29.Controls.Add(this.checkBox56); - this.groupBox29.Controls.Add(this.checkBox55); - this.groupBox29.Location = new System.Drawing.Point(324, 53); - this.groupBox29.Name = "groupBox29"; - this.groupBox29.Size = new System.Drawing.Size(185, 120); - this.groupBox29.TabIndex = 1; - this.groupBox29.TabStop = false; - this.groupBox29.Text = "Text and Music"; + groupBox29.Controls.Add(checkBox62); + groupBox29.Controls.Add(checkBox56); + groupBox29.Controls.Add(checkBox55); + groupBox29.Location = new System.Drawing.Point(325, 43); + groupBox29.Name = "groupBox29"; + groupBox29.Size = new System.Drawing.Size(185, 120); + groupBox29.TabIndex = 1; + groupBox29.TabStop = false; + groupBox29.Text = "Text and Music"; // // checkBox62 // - this.checkBox62.AutoSize = true; - this.checkBox62.Location = new System.Drawing.Point(6, 86); - this.checkBox62.Name = "checkBox62"; - this.checkBox62.Size = new System.Drawing.Size(113, 24); - this.checkBox62.TabIndex = 2; - this.checkBox62.Text = "Shuffle BGM"; - this.checkBox62.UseVisualStyleBackColor = true; + checkBox62.AutoSize = true; + checkBox62.Location = new System.Drawing.Point(6, 85); + checkBox62.Name = "checkBox62"; + checkBox62.Size = new System.Drawing.Size(113, 24); + checkBox62.TabIndex = 2; + checkBox62.Text = "Shuffle BGM"; + checkBox62.UseVisualStyleBackColor = true; // // checkBox56 // - this.checkBox56.AutoSize = true; - this.checkBox56.Location = new System.Drawing.Point(6, 56); - this.checkBox56.Name = "checkBox56"; - this.checkBox56.Size = new System.Drawing.Size(178, 24); - this.checkBox56.TabIndex = 1; - this.checkBox56.Text = "Preserve String Length"; - this.checkBox56.UseVisualStyleBackColor = true; + checkBox56.AutoSize = true; + checkBox56.Location = new System.Drawing.Point(6, 56); + checkBox56.Name = "checkBox56"; + checkBox56.Size = new System.Drawing.Size(178, 24); + checkBox56.TabIndex = 1; + checkBox56.Text = "Preserve String Length"; + checkBox56.UseVisualStyleBackColor = true; // // checkBox55 // - this.checkBox55.AutoSize = true; - this.checkBox55.Location = new System.Drawing.Point(6, 26); - this.checkBox55.Name = "checkBox55"; - this.checkBox55.Size = new System.Drawing.Size(108, 24); - this.checkBox55.TabIndex = 0; - this.checkBox55.Text = "Shuffle Text"; - this.checkBox55.UseVisualStyleBackColor = true; + checkBox55.AutoSize = true; + checkBox55.Location = new System.Drawing.Point(6, 27); + checkBox55.Name = "checkBox55"; + checkBox55.Size = new System.Drawing.Size(108, 24); + checkBox55.TabIndex = 0; + checkBox55.Text = "Shuffle Text"; + checkBox55.UseVisualStyleBackColor = true; // // groupBox27 // - this.groupBox27.Controls.Add(this.itemDistributionControl21); - this.groupBox27.Controls.Add(this.checkBox54); - this.groupBox27.Controls.Add(this.itemDistributionControl20); - this.groupBox27.Controls.Add(this.checkBox53); - this.groupBox27.Location = new System.Drawing.Point(133, 179); - this.groupBox27.Name = "groupBox27"; - this.groupBox27.Size = new System.Drawing.Size(185, 406); - this.groupBox27.TabIndex = 0; - this.groupBox27.TabStop = false; - this.groupBox27.Text = "Scripts"; + groupBox27.Controls.Add(itemDistributionControl21); + groupBox27.Controls.Add(checkBox54); + groupBox27.Controls.Add(itemDistributionControl20); + groupBox27.Controls.Add(checkBox53); + groupBox27.Location = new System.Drawing.Point(133, 169); + groupBox27.Name = "groupBox27"; + groupBox27.Size = new System.Drawing.Size(185, 405); + groupBox27.TabIndex = 0; + groupBox27.TabStop = false; + groupBox27.Text = "Scripts"; // // itemDistributionControl21 // - this.itemDistributionControl21.Location = new System.Drawing.Point(6, 121); - this.itemDistributionControl21.Name = "itemDistributionControl21"; - this.itemDistributionControl21.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl21.TabIndex = 6; - this.itemDistributionControl21.Text = "Scripted Items"; - this.itemDistributionControl21.UseVisualStyleBackColor = true; - this.itemDistributionControl21.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl21.Location = new System.Drawing.Point(6, 121); + itemDistributionControl21.Name = "itemDistributionControl21"; + itemDistributionControl21.Size = new System.Drawing.Size(173, 29); + itemDistributionControl21.TabIndex = 6; + itemDistributionControl21.Text = "Scripted Items"; + itemDistributionControl21.UseVisualStyleBackColor = true; + itemDistributionControl21.Click += OpenItemDistributionForm; // // checkBox54 // - this.checkBox54.AutoSize = true; - this.checkBox54.Location = new System.Drawing.Point(6, 91); - this.checkBox54.Name = "checkBox54"; - this.checkBox54.Size = new System.Drawing.Size(127, 24); - this.checkBox54.TabIndex = 5; - this.checkBox54.Text = "Random Items"; - this.checkBox54.UseVisualStyleBackColor = true; + checkBox54.AutoSize = true; + checkBox54.Location = new System.Drawing.Point(6, 91); + checkBox54.Name = "checkBox54"; + checkBox54.Size = new System.Drawing.Size(127, 24); + checkBox54.TabIndex = 5; + checkBox54.Text = "Random Items"; + checkBox54.UseVisualStyleBackColor = true; // // itemDistributionControl20 // - this.itemDistributionControl20.Location = new System.Drawing.Point(6, 56); - this.itemDistributionControl20.Name = "itemDistributionControl20"; - this.itemDistributionControl20.Size = new System.Drawing.Size(173, 29); - this.itemDistributionControl20.TabIndex = 4; - this.itemDistributionControl20.Text = "Scripted Pokémon"; - this.itemDistributionControl20.UseVisualStyleBackColor = true; - this.itemDistributionControl20.Click += new System.EventHandler(this.OpenItemDistributionForm); + itemDistributionControl20.Location = new System.Drawing.Point(6, 56); + itemDistributionControl20.Name = "itemDistributionControl20"; + itemDistributionControl20.Size = new System.Drawing.Size(173, 29); + itemDistributionControl20.TabIndex = 4; + itemDistributionControl20.Text = "Scripted Pokémon"; + itemDistributionControl20.UseVisualStyleBackColor = true; + itemDistributionControl20.Click += OpenItemDistributionForm; // // checkBox53 // - this.checkBox53.AutoSize = true; - this.checkBox53.Location = new System.Drawing.Point(6, 26); - this.checkBox53.Name = "checkBox53"; - this.checkBox53.Size = new System.Drawing.Size(152, 24); - this.checkBox53.TabIndex = 1; - this.checkBox53.Text = "Random Pokémon"; - this.checkBox53.UseVisualStyleBackColor = true; + checkBox53.AutoSize = true; + checkBox53.Location = new System.Drawing.Point(6, 27); + checkBox53.Name = "checkBox53"; + checkBox53.Size = new System.Drawing.Size(152, 24); + checkBox53.TabIndex = 1; + checkBox53.Text = "Random Pokémon"; + checkBox53.UseVisualStyleBackColor = true; // // groupBox28 // - this.groupBox28.Location = new System.Drawing.Point(0, 0); - this.groupBox28.Name = "groupBox28"; - this.groupBox28.Size = new System.Drawing.Size(200, 100); - this.groupBox28.TabIndex = 0; - this.groupBox28.TabStop = false; + groupBox28.Location = new System.Drawing.Point(0, 0); + groupBox28.Name = "groupBox28"; + groupBox28.Size = new System.Drawing.Size(200, 100); + groupBox28.TabIndex = 0; + groupBox28.TabStop = false; // // pokemonEditorButton // - this.pokemonEditorButton.Location = new System.Drawing.Point(6, 26); - this.pokemonEditorButton.Name = "pokemonEditorButton"; - this.pokemonEditorButton.Size = new System.Drawing.Size(173, 29); - this.pokemonEditorButton.TabIndex = 3; - this.pokemonEditorButton.Text = "Pokémon Editor"; - this.pokemonEditorButton.UseVisualStyleBackColor = true; - this.pokemonEditorButton.Click += new System.EventHandler(this.OpenPokemonEditor); + pokemonEditorButton.Location = new System.Drawing.Point(3, 3); + pokemonEditorButton.Name = "pokemonEditorButton"; + pokemonEditorButton.Size = new System.Drawing.Size(173, 29); + pokemonEditorButton.TabIndex = 3; + pokemonEditorButton.Text = "Pokémon Editor"; + pokemonEditorButton.UseVisualStyleBackColor = true; + pokemonEditorButton.Click += OpenPokemonEditor; // // button24 // - this.button24.Location = new System.Drawing.Point(6, 61); - this.button24.Name = "button24"; - this.button24.Size = new System.Drawing.Size(173, 29); - this.button24.TabIndex = 4; - this.button24.Text = "Move Editor"; - this.button24.UseVisualStyleBackColor = true; - this.button24.Click += new System.EventHandler(this.OpenMoveEditor); + button24.Location = new System.Drawing.Point(3, 38); + button24.Name = "button24"; + button24.Size = new System.Drawing.Size(173, 29); + button24.TabIndex = 4; + button24.Text = "Move Editor"; + button24.UseVisualStyleBackColor = true; + button24.Click += OpenMoveEditor; // // button25 // - this.button25.Location = new System.Drawing.Point(6, 96); - this.button25.Name = "button25"; - this.button25.Size = new System.Drawing.Size(173, 29); - this.button25.TabIndex = 5; - this.button25.Text = "TM Editor"; - this.button25.UseVisualStyleBackColor = true; - this.button25.Click += new System.EventHandler(this.OpenTMEditor); + button25.Location = new System.Drawing.Point(3, 73); + button25.Name = "button25"; + button25.Size = new System.Drawing.Size(173, 29); + button25.TabIndex = 5; + button25.Text = "TM Editor"; + button25.UseVisualStyleBackColor = true; + button25.Click += OpenTMEditor; // // button26 // - this.button26.Location = new System.Drawing.Point(6, 131); - this.button26.Name = "button26"; - this.button26.Size = new System.Drawing.Size(173, 29); - this.button26.TabIndex = 6; - this.button26.Text = "Item Editor"; - this.button26.UseVisualStyleBackColor = true; - this.button26.Click += new System.EventHandler(this.OpenItemEditor); + button26.Location = new System.Drawing.Point(3, 108); + button26.Name = "button26"; + button26.Size = new System.Drawing.Size(173, 29); + button26.TabIndex = 6; + button26.Text = "Item Editor"; + button26.UseVisualStyleBackColor = true; + button26.Click += OpenItemEditor; // // button27 // - this.button27.Location = new System.Drawing.Point(6, 166); - this.button27.Name = "button27"; - this.button27.Size = new System.Drawing.Size(173, 29); - this.button27.TabIndex = 7; - this.button27.Text = "Pickup Table Editor"; - this.button27.UseVisualStyleBackColor = true; - this.button27.Click += new System.EventHandler(this.OpenPickupEditor); + button27.Location = new System.Drawing.Point(3, 143); + button27.Name = "button27"; + button27.Size = new System.Drawing.Size(173, 29); + button27.TabIndex = 7; + button27.Text = "Pickup Table Editor"; + button27.UseVisualStyleBackColor = true; + button27.Click += OpenPickupEditor; // // button28 // - this.button28.Location = new System.Drawing.Point(6, 201); - this.button28.Name = "button28"; - this.button28.Size = new System.Drawing.Size(173, 29); - this.button28.TabIndex = 8; - this.button28.Text = "Shop Editor"; - this.button28.UseVisualStyleBackColor = true; - this.button28.Click += new System.EventHandler(this.OpenShopEditor); + button28.Location = new System.Drawing.Point(3, 178); + button28.Name = "button28"; + button28.Size = new System.Drawing.Size(173, 29); + button28.TabIndex = 8; + button28.Text = "Shop Editor"; + button28.UseVisualStyleBackColor = true; + button28.Click += OpenShopEditor; // // wildEncButton // - this.wildEncButton.Location = new System.Drawing.Point(6, 236); - this.wildEncButton.Name = "wildEncButton"; - this.wildEncButton.Size = new System.Drawing.Size(173, 29); - this.wildEncButton.TabIndex = 9; - this.wildEncButton.Text = "Wild Encounter Editor"; - this.wildEncButton.UseVisualStyleBackColor = true; - this.wildEncButton.Click += new System.EventHandler(this.OpenWildEncounterEditors); + wildEncButton.Location = new System.Drawing.Point(3, 213); + wildEncButton.Name = "wildEncButton"; + wildEncButton.Size = new System.Drawing.Size(173, 29); + wildEncButton.TabIndex = 9; + wildEncButton.Text = "Wild Encounter Editor"; + wildEncButton.UseVisualStyleBackColor = true; + wildEncButton.Click += OpenWildEncounterEditors; // // button30 // - this.button30.Location = new System.Drawing.Point(6, 271); - this.button30.Name = "button30"; - this.button30.Size = new System.Drawing.Size(173, 29); - this.button30.TabIndex = 10; - this.button30.Text = "Trainer Editor"; - this.button30.UseVisualStyleBackColor = true; - this.button30.Click += new System.EventHandler(this.OpenTrainerEditor); + button30.Location = new System.Drawing.Point(3, 248); + button30.Name = "button30"; + button30.Size = new System.Drawing.Size(173, 29); + button30.TabIndex = 10; + button30.Text = "Trainer Editor"; + button30.UseVisualStyleBackColor = true; + button30.Click += OpenTrainerEditor; // // groupBox32 // - this.groupBox32.Controls.Add(this.button23); - this.groupBox32.Controls.Add(this.button32); - this.groupBox32.Controls.Add(this.pokemonEditorButton); - this.groupBox32.Controls.Add(this.button30); - this.groupBox32.Controls.Add(this.button24); - this.groupBox32.Controls.Add(this.wildEncButton); - this.groupBox32.Controls.Add(this.button25); - this.groupBox32.Controls.Add(this.button28); - this.groupBox32.Controls.Add(this.button26); - this.groupBox32.Controls.Add(this.button27); - this.groupBox32.Location = new System.Drawing.Point(12, 158); - this.groupBox32.Name = "groupBox32"; - this.groupBox32.Size = new System.Drawing.Size(185, 380); - this.groupBox32.TabIndex = 5; - this.groupBox32.TabStop = false; - this.groupBox32.Text = "Editors"; + groupBox32.Controls.Add(flowLayoutPanel1); + groupBox32.Location = new System.Drawing.Point(12, 169); + groupBox32.Name = "groupBox32"; + groupBox32.Size = new System.Drawing.Size(206, 366); + groupBox32.TabIndex = 5; + groupBox32.TabStop = false; + groupBox32.Text = "Editors"; + // + // flowLayoutPanel1 + // + flowLayoutPanel1.AutoScroll = true; + flowLayoutPanel1.Controls.Add(pokemonEditorButton); + flowLayoutPanel1.Controls.Add(button24); + flowLayoutPanel1.Controls.Add(button25); + flowLayoutPanel1.Controls.Add(button26); + flowLayoutPanel1.Controls.Add(button27); + flowLayoutPanel1.Controls.Add(button28); + flowLayoutPanel1.Controls.Add(wildEncButton); + flowLayoutPanel1.Controls.Add(button30); + flowLayoutPanel1.Controls.Add(button32); + flowLayoutPanel1.Controls.Add(button23); + flowLayoutPanel1.Controls.Add(button34); + flowLayoutPanel1.Controls.Add(button35); + flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + flowLayoutPanel1.Location = new System.Drawing.Point(3, 23); + flowLayoutPanel1.Name = "flowLayoutPanel1"; + flowLayoutPanel1.Size = new System.Drawing.Size(200, 340); + flowLayoutPanel1.TabIndex = 14; // - // button23 + // button32 // - this.button23.Location = new System.Drawing.Point(6, 341); - this.button23.Name = "button23"; - this.button23.Size = new System.Drawing.Size(173, 29); - this.button23.TabIndex = 12; - this.button23.Text = "Global Metadata Editor"; - this.button23.UseVisualStyleBackColor = true; - this.button23.Click += new System.EventHandler(this.OpenGlobalMetadataEditor); + button32.Location = new System.Drawing.Point(3, 283); + button32.Name = "button32"; + button32.Size = new System.Drawing.Size(173, 29); + button32.TabIndex = 11; + button32.Text = "Type Matchup Editor"; + button32.UseVisualStyleBackColor = true; + button32.Click += OpenTypeMatchupEditor; // - // button32 + // button23 // - this.button32.Location = new System.Drawing.Point(6, 306); - this.button32.Name = "button32"; - this.button32.Size = new System.Drawing.Size(173, 29); - this.button32.TabIndex = 11; - this.button32.Text = "Type Matchup Editor"; - this.button32.UseVisualStyleBackColor = true; - this.button32.Click += new System.EventHandler(this.OpenTypeMatchupEditor); + button23.Location = new System.Drawing.Point(3, 318); + button23.Name = "button23"; + button23.Size = new System.Drawing.Size(173, 29); + button23.TabIndex = 12; + button23.Text = "Global Metadata Editor"; + button23.UseVisualStyleBackColor = true; + button23.Click += OpenGlobalMetadataEditor; + // + // button34 + // + button34.Location = new System.Drawing.Point(3, 353); + button34.Name = "button34"; + button34.Size = new System.Drawing.Size(173, 29); + button34.TabIndex = 11; + button34.Text = "BT Trainer Editor"; + button34.UseVisualStyleBackColor = true; + button34.Click += Button34_Click; + // + // button35 + // + button35.Location = new System.Drawing.Point(3, 388); + button35.Name = "button35"; + button35.Size = new System.Drawing.Size(173, 29); + button35.TabIndex = 13; + button35.Text = "BT Pokémon Editor"; + button35.UseVisualStyleBackColor = true; + button35.Click += Button35_Click_1; // // groupBox34 // - this.groupBox34.Controls.Add(this.button33); - this.groupBox34.Controls.Add(this.button29); - this.groupBox34.Location = new System.Drawing.Point(12, 544); - this.groupBox34.Name = "groupBox34"; - this.groupBox34.Size = new System.Drawing.Size(185, 117); - this.groupBox34.TabIndex = 6; - this.groupBox34.TabStop = false; - this.groupBox34.Text = "Other Tools"; + groupBox34.AutoSize = true; + groupBox34.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + groupBox34.Controls.Add(button33); + groupBox34.Controls.Add(button29); + groupBox34.Location = new System.Drawing.Point(12, 541); + groupBox34.Name = "groupBox34"; + groupBox34.Size = new System.Drawing.Size(206, 120); + groupBox34.TabIndex = 6; + groupBox34.TabStop = false; + groupBox34.Text = "Other Tools"; // - // button29 + // button33 // - this.button29.Location = new System.Drawing.Point(6, 26); - this.button29.Name = "button29"; - this.button29.Size = new System.Drawing.Size(173, 29); - this.button29.TabIndex = 13; - this.button29.Text = "Pokémon Inserter"; - this.button29.UseVisualStyleBackColor = true; - this.button29.Click += new System.EventHandler(this.OpenPokemonInserter); + button33.Location = new System.Drawing.Point(6, 65); + button33.Name = "button33"; + button33.Size = new System.Drawing.Size(194, 29); + button33.TabIndex = 14; + button33.Text = "JSON Converter"; + button33.UseVisualStyleBackColor = true; + button33.Click += OpenJsonConverter; // - // button33 + // button29 // - this.button33.Location = new System.Drawing.Point(6, 61); - this.button33.Name = "button33"; - this.button33.Size = new System.Drawing.Size(173, 29); - this.button33.TabIndex = 14; - this.button33.Text = "JSON Converter"; - this.button33.UseVisualStyleBackColor = true; - this.button33.Click += new System.EventHandler(this.OpenJsonConverter); + button29.Location = new System.Drawing.Point(6, 27); + button29.Name = "button29"; + button29.Size = new System.Drawing.Size(194, 29); + button29.TabIndex = 13; + button29.Text = "Pokémon Inserter"; + button29.UseVisualStyleBackColor = true; + button29.Click += OpenPokemonInserter; // // MainForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1262, 673); - this.Controls.Add(this.groupBox34); - this.Controls.Add(this.groupBox32); - this.Controls.Add(this.tabControl1); - this.Controls.Add(this.groupBox2); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MaximizeBox = false; - this.Name = "MainForm"; - this.Text = "Imposter\'s Ordeal"; - this.Load += new System.EventHandler(this.MainForm_Load); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.groupBox2.ResumeLayout(false); - this.tabControl1.ResumeLayout(false); - this.tabPage1.ResumeLayout(false); - this.groupBox12.ResumeLayout(false); - this.numericDistributionControl2.ResumeLayout(false); - this.numericDistributionControl2.PerformLayout(); - this.numericDistributionControl4.ResumeLayout(false); - this.numericDistributionControl4.PerformLayout(); - this.numericDistributionControl3.ResumeLayout(false); - this.numericDistributionControl3.PerformLayout(); - this.numericDistributionControl5.ResumeLayout(false); - this.numericDistributionControl5.PerformLayout(); - this.groupBox11.ResumeLayout(false); - this.groupBox11.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit(); - this.numericDistributionControl9.ResumeLayout(false); - this.numericDistributionControl9.PerformLayout(); - this.groupBox10.ResumeLayout(false); - this.groupBox10.PerformLayout(); - this.numericDistributionControl7.ResumeLayout(false); - this.numericDistributionControl7.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit(); - this.numericDistributionControl6.ResumeLayout(false); - this.numericDistributionControl6.PerformLayout(); - this.groupBox9.ResumeLayout(false); - this.groupBox9.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit(); - this.groupBox8.ResumeLayout(false); - this.groupBox8.PerformLayout(); - this.groupBox7.ResumeLayout(false); - this.groupBox7.PerformLayout(); - this.groupBox6.ResumeLayout(false); - this.groupBox6.PerformLayout(); - this.groupBox5.ResumeLayout(false); - this.groupBox5.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); - this.groupBox4.ResumeLayout(false); - this.groupBox4.PerformLayout(); - this.numericDistributionControl1.ResumeLayout(false); - this.numericDistributionControl1.PerformLayout(); - this.groupBox3.ResumeLayout(false); - this.groupBox3.PerformLayout(); - this.tabPage2.ResumeLayout(false); - this.groupBox26.ResumeLayout(false); - this.groupBox26.PerformLayout(); - this.groupBox25.ResumeLayout(false); - this.groupBox25.PerformLayout(); - this.groupBox23.ResumeLayout(false); - this.groupBox23.PerformLayout(); - this.numericDistributionControl18.ResumeLayout(false); - this.numericDistributionControl18.PerformLayout(); - this.numericDistributionControl11.ResumeLayout(false); - this.numericDistributionControl11.PerformLayout(); - this.numericDistributionControl10.ResumeLayout(false); - this.numericDistributionControl10.PerformLayout(); - this.numericDistributionControl8.ResumeLayout(false); - this.numericDistributionControl8.PerformLayout(); - this.groupBox14.ResumeLayout(false); - this.groupBox14.PerformLayout(); - this.groupBox13.ResumeLayout(false); - this.groupBox13.PerformLayout(); - this.tabPage3.ResumeLayout(false); - this.groupBox18.ResumeLayout(false); - this.groupBox24.ResumeLayout(false); - this.groupBox24.PerformLayout(); - this.numericDistributionControl17.ResumeLayout(false); - this.numericDistributionControl17.PerformLayout(); - this.numericDistributionControl16.ResumeLayout(false); - this.numericDistributionControl16.PerformLayout(); - this.groupBox22.ResumeLayout(false); - this.groupBox22.PerformLayout(); - this.groupBox21.ResumeLayout(false); - this.groupBox21.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).EndInit(); - this.groupBox20.ResumeLayout(false); - this.groupBox20.PerformLayout(); - this.numericDistributionControl15.ResumeLayout(false); - this.numericDistributionControl15.PerformLayout(); - this.groupBox19.ResumeLayout(false); - this.groupBox19.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).EndInit(); - this.groupBox17.ResumeLayout(false); - this.groupBox17.PerformLayout(); - this.numericDistributionControl14.ResumeLayout(false); - this.numericDistributionControl14.PerformLayout(); - this.groupBox16.ResumeLayout(false); - this.groupBox16.PerformLayout(); - this.numericDistributionControl13.ResumeLayout(false); - this.numericDistributionControl13.PerformLayout(); - this.groupBox15.ResumeLayout(false); - this.groupBox15.PerformLayout(); - this.numericDistributionControl12.ResumeLayout(false); - this.numericDistributionControl12.PerformLayout(); - this.tabPage4.ResumeLayout(false); - this.groupBox33.ResumeLayout(false); - this.groupBox33.PerformLayout(); - this.groupBox31.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.absoluteBoundaryDataGridView)).EndInit(); - this.groupBox30.ResumeLayout(false); - this.groupBox30.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).EndInit(); - this.groupBox29.ResumeLayout(false); - this.groupBox29.PerformLayout(); - this.groupBox27.ResumeLayout(false); - this.groupBox27.PerformLayout(); - this.groupBox32.ResumeLayout(false); - this.groupBox34.ResumeLayout(false); - this.ResumeLayout(false); - + AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + ClientSize = new System.Drawing.Size(1262, 673); + Controls.Add(groupBox34); + Controls.Add(groupBox32); + Controls.Add(tabControl1); + Controls.Add(groupBox2); + FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon"); + MaximizeBox = false; + Name = "MainForm"; + Text = "Imposter's Ordeal"; + Load += MainForm_Load; + groupBox1.ResumeLayout(false); + groupBox1.PerformLayout(); + groupBox2.ResumeLayout(false); + tabControl1.ResumeLayout(false); + tabPage1.ResumeLayout(false); + groupBox12.ResumeLayout(false); + numericDistributionControl2.ResumeLayout(false); + numericDistributionControl2.PerformLayout(); + numericDistributionControl4.ResumeLayout(false); + numericDistributionControl4.PerformLayout(); + numericDistributionControl3.ResumeLayout(false); + numericDistributionControl3.PerformLayout(); + numericDistributionControl5.ResumeLayout(false); + numericDistributionControl5.PerformLayout(); + groupBox11.ResumeLayout(false); + groupBox11.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown5).EndInit(); + numericDistributionControl9.ResumeLayout(false); + numericDistributionControl9.PerformLayout(); + groupBox10.ResumeLayout(false); + groupBox10.PerformLayout(); + numericDistributionControl7.ResumeLayout(false); + numericDistributionControl7.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown4).EndInit(); + numericDistributionControl6.ResumeLayout(false); + numericDistributionControl6.PerformLayout(); + groupBox9.ResumeLayout(false); + groupBox9.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown2).EndInit(); + ((System.ComponentModel.ISupportInitialize)numericUpDown3).EndInit(); + groupBox8.ResumeLayout(false); + groupBox8.PerformLayout(); + groupBox7.ResumeLayout(false); + groupBox7.PerformLayout(); + groupBox6.ResumeLayout(false); + groupBox6.PerformLayout(); + groupBox5.ResumeLayout(false); + groupBox5.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown1).EndInit(); + groupBox4.ResumeLayout(false); + groupBox4.PerformLayout(); + numericDistributionControl1.ResumeLayout(false); + numericDistributionControl1.PerformLayout(); + groupBox3.ResumeLayout(false); + groupBox3.PerformLayout(); + tabPage2.ResumeLayout(false); + groupBox26.ResumeLayout(false); + groupBox26.PerformLayout(); + groupBox25.ResumeLayout(false); + groupBox25.PerformLayout(); + groupBox23.ResumeLayout(false); + groupBox23.PerformLayout(); + numericDistributionControl18.ResumeLayout(false); + numericDistributionControl18.PerformLayout(); + numericDistributionControl11.ResumeLayout(false); + numericDistributionControl11.PerformLayout(); + numericDistributionControl10.ResumeLayout(false); + numericDistributionControl10.PerformLayout(); + numericDistributionControl8.ResumeLayout(false); + numericDistributionControl8.PerformLayout(); + groupBox14.ResumeLayout(false); + groupBox14.PerformLayout(); + groupBox13.ResumeLayout(false); + groupBox13.PerformLayout(); + tabPage3.ResumeLayout(false); + groupBox18.ResumeLayout(false); + groupBox24.ResumeLayout(false); + groupBox24.PerformLayout(); + numericDistributionControl17.ResumeLayout(false); + numericDistributionControl17.PerformLayout(); + numericDistributionControl16.ResumeLayout(false); + numericDistributionControl16.PerformLayout(); + groupBox22.ResumeLayout(false); + groupBox22.PerformLayout(); + groupBox21.ResumeLayout(false); + groupBox21.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown7).EndInit(); + groupBox20.ResumeLayout(false); + groupBox20.PerformLayout(); + numericDistributionControl15.ResumeLayout(false); + numericDistributionControl15.PerformLayout(); + groupBox19.ResumeLayout(false); + groupBox19.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown6).EndInit(); + groupBox17.ResumeLayout(false); + groupBox17.PerformLayout(); + numericDistributionControl14.ResumeLayout(false); + numericDistributionControl14.PerformLayout(); + groupBox16.ResumeLayout(false); + groupBox16.PerformLayout(); + numericDistributionControl13.ResumeLayout(false); + numericDistributionControl13.PerformLayout(); + groupBox15.ResumeLayout(false); + groupBox15.PerformLayout(); + numericDistributionControl12.ResumeLayout(false); + numericDistributionControl12.PerformLayout(); + tabPage4.ResumeLayout(false); + groupBox33.ResumeLayout(false); + groupBox33.PerformLayout(); + groupBox31.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)absoluteBoundaryDataGridView).EndInit(); + groupBox30.ResumeLayout(false); + groupBox30.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)numericUpDown8).EndInit(); + groupBox29.ResumeLayout(false); + groupBox29.PerformLayout(); + groupBox27.ResumeLayout(false); + groupBox27.PerformLayout(); + groupBox32.ResumeLayout(false); + flowLayoutPanel1.ResumeLayout(false); + groupBox34.ResumeLayout(false); + ResumeLayout(false); + PerformLayout(); } #endregion @@ -2890,5 +2920,8 @@ private void InitializeComponent() private System.Windows.Forms.GroupBox groupBox34; public System.Windows.Forms.Button button29; public System.Windows.Forms.Button button33; + public System.Windows.Forms.Button button34; + public System.Windows.Forms.Button button35; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; } } \ No newline at end of file diff --git a/Forms/MainForm.cs b/Forms/MainForm.cs index 5a630e5..82ceeb3 100644 --- a/Forms/MainForm.cs +++ b/Forms/MainForm.cs @@ -1,7 +1,9 @@ -using System; +using ImpostersOrdeal.Forms; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; +using System.Diagnostics; using System.Drawing; using System.Linq; using System.Text; @@ -85,7 +87,7 @@ public class RandomizerSetupConfig public class NumericDistributionControl : GroupBox { public IDistribution[] distributions = new IDistribution[] - { + { new UniformConstant(100, 0, 100), new UniformRelative(100, -25, 25), new UniformProportional(100, 0.5, 1.5), @@ -357,7 +359,7 @@ private void Randomize(object sender, EventArgs e) "Randomize again anyway?", "Again?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) return; - + loadingForm = new("Makin' a mess...", flavor.GetThought()); loadingDisplay = new(StartLoadingDisplay); loadingDisplay.Start(); @@ -456,6 +458,8 @@ private void OpenTrainerEditor(object sender, EventArgs e) gameData.SetModified(GameDataSet.DataField.Trainers); } + + private void OpenTypeMatchupEditor(object sender, EventArgs e) { TypeMatchupEditorForm tmef = new(); @@ -481,5 +485,27 @@ private void OpenJsonConverter(object sender, EventArgs e) JsonConverterForm jcf = new(); jcf.Show(); } + + //Battle Tower Trainer Button + private void Button34_Click(object sender, EventArgs e) + { + BattleTowerTrainerEditorForm tef = new(); + tef.Show(); + gameData.SetModified(GameDataSet.DataField.Trainers); + } + //Battle Tower Pokemon Button + /* private void button35_Click(object sender, EventArgs e) + { + BattleTowerPokemonForm tef = new(); + tef.Show(); + gameData.SetModified(GameDataSet.DataField.Trainers); + }*/ + + private void Button35_Click_1(object sender, EventArgs e) + { + BattleTowerPokemonForm tef = new(); + tef.Show(); + gameData.SetModified(GameDataSet.DataField.Trainers); + } } } diff --git a/Forms/TrainerEditorForm.resx b/Forms/TrainerEditorForm.resx index 8627398..386b24c 100644 --- a/Forms/TrainerEditorForm.resx +++ b/Forms/TrainerEditorForm.resx @@ -1,4 +1,64 @@ - + + + diff --git a/GlobalData.cs b/GlobalData.cs index 60cf073..c1ec10d 100644 --- a/GlobalData.cs +++ b/GlobalData.cs @@ -21,6 +21,9 @@ public class GameDataSet public List pickupItems; public ShopTables shopTables; public List trainers; + public List battleTowerTrainers; + public List battleTowerTrainersDouble; + public List battleTowerTrainerPokemons; public EncounterTableFile[] encounterTableFiles; public MessageFileSet[] messageFileSets; public List growthRates; @@ -66,6 +69,8 @@ public enum DataField PickupItems, ShopTables, Trainers, + BattleTowerTrainers, + battleTowerTrainerPokemons, EncounterTableFiles, MessageFileSets, GrowthRates, diff --git a/Imposter's Ordeal.csproj b/Imposter's Ordeal.csproj index e899888..78f72a2 100644 --- a/Imposter's Ordeal.csproj +++ b/Imposter's Ordeal.csproj @@ -1,5 +1,4 @@ - - + WinExe net5.0-windows @@ -7,19 +6,19 @@ true Imposter's Ordeal 132.ico + 40 + C:\Users\Lukas\Desktop\BDSP\Imposters-Ordeal-master\Backup\ + 2.0 - - AssetAssistant.dll - True @@ -27,12 +26,10 @@ Resources.resx - ResXFileCodeGenerator Resources.Designer.cs - \ No newline at end of file diff --git a/Imposter's Ordeal.sln b/Imposter's Ordeal.sln index fda6036..f24e351 100644 --- a/Imposter's Ordeal.sln +++ b/Imposter's Ordeal.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.32014.148 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30907.101 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Imposter's Ordeal", "Imposter's Ordeal.csproj", "{27560681-17C2-4754-9CAA-FFC73AAA0DE9}" EndProject diff --git a/Structs/GameDataTypes.cs b/Structs/GameDataTypes.cs index 00a9508..93baa94 100644 --- a/Structs/GameDataTypes.cs +++ b/Structs/GameDataTypes.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Text; using System.Text.RegularExpressions; @@ -349,6 +350,215 @@ public void SetEVs(int[] evs) } } + public class BattleTowerTrainerPokemon + { + public uint pokemonID; + public int dexID; + public uint formID; + public byte isRare; + public byte level; + public byte sex; + public int natureID; + public int abilityID; + public int moveID1; + public int moveID2; + public int moveID3; + public int moveID4; + public ushort itemID; + public byte ballID; + public int seal; + public byte hpIV; + public byte atkIV; + public byte defIV; + public byte spAtkIV; + public byte spDefIV; + public byte spdIV; + public byte hpEV; + public byte atkEV; + public byte defEV; + public byte spAtkEV; + public byte spDefEV; + public byte spdEV; + + + public BattleTowerTrainerPokemon() { } + + public BattleTowerTrainerPokemon(BattleTowerTrainerPokemon tp) + { + dexID = tp.dexID; + formID = tp.formID; + isRare = tp.isRare; + level = tp.level; + sex = tp.sex; + natureID = tp.natureID; + abilityID = tp.abilityID; + moveID1 = tp.moveID1; + moveID2 = tp.moveID2; + moveID3 = tp.moveID3; + moveID4 = tp.moveID4; + itemID = tp.itemID; + ballID = tp.ballID; + seal = tp.seal; + hpIV = tp.hpIV; + atkIV = tp.atkIV; + defIV = tp.defIV; + spdIV = tp.spdIV; + spAtkIV = tp.spAtkIV; + spDefIV = tp.spDefIV; + hpEV = tp.hpEV; + atkEV = tp.atkEV; + defEV = tp.defEV; + spdEV = tp.spdEV; + spAtkEV = tp.spAtkEV; + spDefEV = tp.spDefEV; + + } + + public List GetMoves() + { + List moves = new(); + if (moveID1 > 0) + moves.Add(moveID1); + if (moveID2 > 0) + moves.Add(moveID2); + if (moveID3 > 0) + moves.Add(moveID3); + if (moveID4 > 0) + moves.Add(moveID4); + return moves; + } + + public void SetMoves(List moves) + { + moveID1 = (ushort)(moves.Count > 0 ? moves[0] : 0); + moveID2 = (ushort)(moves.Count > 1 ? moves[1] : 0); + moveID3 = (ushort)(moves.Count > 2 ? moves[2] : 0); + moveID4 = (ushort)(moves.Count > 3 ? moves[3] : 0); + } + + public int[] GetIVs() + { + return new int[] + { + hpIV, + atkIV, + defIV, + spAtkIV, + spDefIV, + spdIV + }; + } + + public int[] GetEVs() + { + return new int[] + { + hpEV, + atkEV, + defEV, + spAtkEV, + spDefEV, + spdEV + }; + } + + public void SetEVs(int[] evs) + { + hpEV = (byte)evs[0]; + atkEV = (byte)evs[1]; + defEV = (byte)evs[2]; + spAtkEV = (byte)evs[3]; + spDefEV = (byte)evs[4]; + spdEV = (byte)evs[5]; + } + public uint GetID() + { + return pokemonID; + } + + public int GetName() + { + return dexID; + } + } + + public class BattleTowerTrainer : INamedEntity + { + public uint trainerID2; + public int trainerTypeID; + public int trainerTypeID2; + public uint battleTowerPokemonID1; + public uint battleTowerPokemonID2; + public uint battleTowerPokemonID3; + public uint battleTowerPokemonID4 = 0; + public string battleBGM; + public string winBGM; + public bool isDouble; + public string nameLabel; + public string nameLabel2; + public bool wasCalled = false; + + //Readonly + public int trainerID; + public string name; + public string name2; + public BattleTowerTrainer() { } + + public BattleTowerTrainer(BattleTowerTrainer t) + { + SetAll(t); + } + + public void SetAll(BattleTowerTrainer t) + { + trainerID2 = t.trainerID2; + trainerTypeID = t.trainerTypeID; + if (t.trainerTypeID2 != -1) + { + trainerTypeID2 = t.trainerTypeID2; + } + battleTowerPokemonID1 = t.battleTowerPokemonID1; + battleTowerPokemonID2 = t.battleTowerPokemonID2; + battleTowerPokemonID3 = t.battleTowerPokemonID3; + if(t.battleTowerPokemonID4 != 0) + { + battleTowerPokemonID4 = t.battleTowerPokemonID4; + } + battleBGM = t.battleBGM; + winBGM = t.winBGM; + name = t.name; + // name2 = t.name2; + } + + public int GetID() + { + return trainerTypeID; + } + + public string GetInternalID() + { + return trainerID2.ToString(); + } + + public string GetName() + { + if (name2 == null) + { + } + else if(wasCalled == false) + { + name = name + " & " + name2; + wasCalled = true; + } + return name.ToString(); + } + + public bool IsValid() + { + return true; + } + } + public class TrainerType : INamedEntity { public int trainerTypeID;