From f139959b951b1de8c8bf001488d8b1844c63b208 Mon Sep 17 00:00:00 2001 From: cadon Date: Wed, 22 May 2024 22:25:07 +0200 Subject: [PATCH 01/36] automatically determine all species fullStatsRaw when enough exportGunFiles are given (drag&drop on label in multiplierTester) --- ARKBreedingStats/ARKBreedingStats.csproj | 2 + ARKBreedingStats/Ark.cs | 17 -- ARKBreedingStats/Form1.collection.cs | 2 +- ARKBreedingStats/Form1.exportGun.cs | 4 +- .../ExportGunFileExtensions.cs | 32 +++ .../importExportGun/ImportExportGun.cs | 149 +++++++------ .../SpeciesStatsExtractor.cs | 196 ++++++++++++++++++ .../StatsMultiplierTesting.Designer.cs | 86 +++++--- .../StatsMultiplierTesting.cs | 116 ++++++++++- .../multiplierTesting/TaTmSolver.cs | 101 ++++++--- ARKBreedingStats/settings/Settings.cs | 24 +-- ARKBreedingStats/species/Species.cs | 34 ++- ARKBreedingStats/values/ServerMultipliers.cs | 27 +++ ARKBreedingStats/values/Values.cs | 26 +-- 14 files changed, 648 insertions(+), 168 deletions(-) create mode 100644 ARKBreedingStats/importExportGun/ExportGunFileExtensions.cs create mode 100644 ARKBreedingStats/multiplierTesting/SpeciesStatsExtractor.cs diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj index 5c12179e..6fe68616 100644 --- a/ARKBreedingStats/ARKBreedingStats.csproj +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -92,6 +92,7 @@ Form + @@ -105,6 +106,7 @@ + diff --git a/ARKBreedingStats/Ark.cs b/ARKBreedingStats/Ark.cs index 336f644c..8bdd647c 100644 --- a/ARKBreedingStats/Ark.cs +++ b/ARKBreedingStats/Ark.cs @@ -180,23 +180,6 @@ public static class Stats public const int TemperatureFortitude = 10; public const int CraftingSpeedMultiplier = 11; - /// - /// Index of additive taming multiplier in stat multipliers. - /// - public const int IndexTamingAdd = 0; - /// - /// Index of multiplicative taming multiplier in stat multipliers. - /// - public const int IndexTamingMult = 1; - /// - /// Index of domesticated level multiplier in stat multipliers. - /// - public const int IndexLevelDom = 2; - /// - /// Index of wild level multiplier in stat multipliers. - /// - public const int IndexLevelWild = 3; - /// /// Returns the stat-index for the given order index (like it is ordered in game). /// diff --git a/ARKBreedingStats/Form1.collection.cs b/ARKBreedingStats/Form1.collection.cs index 8e97ab62..f6b8b341 100644 --- a/ARKBreedingStats/Form1.collection.cs +++ b/ARKBreedingStats/Form1.collection.cs @@ -855,7 +855,7 @@ private Creature ImportExportGunFiles(string[] filePaths, bool addCreatures, out var esm = ImportExportGun.ReadServerMultipliers(filePath, out var serverImportResultTemp); if (esm != null) { - multipliersImportSuccessful = ImportExportGun.SetServerMultipliers(_creatureCollection, esm, Path.GetFileNameWithoutExtension(filePath)); + multipliersImportSuccessful = ImportExportGun.SetCollectionMultipliers(_creatureCollection, esm, Path.GetFileNameWithoutExtension(filePath)); serverImportResult = serverImportResultTemp; if (multipliersImportSuccessful == true) continue; diff --git a/ARKBreedingStats/Form1.exportGun.cs b/ARKBreedingStats/Form1.exportGun.cs index 3dbfce26..e85c9ff6 100644 --- a/ARKBreedingStats/Form1.exportGun.cs +++ b/ARKBreedingStats/Form1.exportGun.cs @@ -91,7 +91,7 @@ private void AsbServerDataSent(ProgressReportAsbServer data) if (displayPopup) popupMessage = message + Environment.NewLine + tokenInfo - + Environment.NewLine + Environment.NewLine + "Enable Streamer mode in Settings -> General to mask the token in future"; + + Environment.NewLine + Environment.NewLine + "Enable Streamer mode in Settings -> General to mask the token in the future"; message += tokenInfo; } @@ -111,7 +111,7 @@ private void AsbServerDataSent(ProgressReportAsbServer data) if (string.IsNullOrEmpty(data.ServerHash)) { // import creature - var creature = ImportExportGun.LoadCreatureFromJson(data.JsonText, null, out resultText, out _, out _); + var creature = ImportExportGun.LoadCreatureFromExportGunJson(data.JsonText, out resultText, out _); if (creature == null) { SetMessageLabelText(resultText, MessageBoxIcon.Error); diff --git a/ARKBreedingStats/importExportGun/ExportGunFileExtensions.cs b/ARKBreedingStats/importExportGun/ExportGunFileExtensions.cs new file mode 100644 index 00000000..71bef665 --- /dev/null +++ b/ARKBreedingStats/importExportGun/ExportGunFileExtensions.cs @@ -0,0 +1,32 @@ +namespace ARKBreedingStats.importExportGun +{ + internal static class ExportGunFileExtensions + { + public static bool IsWild(this ExportGunCreatureFile ec) + // wild creatures have a TE of 100 %, so don't use that here + => string.IsNullOrEmpty(ec.DinoName) + && string.IsNullOrEmpty(ec.TribeName) + && string.IsNullOrEmpty(ec.TamerString) + && string.IsNullOrEmpty(ec.OwningPlayerName) + && string.IsNullOrEmpty(ec.ImprinterName) + && ec.OwningPlayerID == 0 + ; + + public static bool IsBred(this ExportGunCreatureFile ec) + => !string.IsNullOrEmpty(ec.ImprinterName) || (ec.DinoImprintingQuality > 0 && ec.TameEffectiveness > 0.9999); + + + public static string Owner(this ExportGunCreatureFile ec) + => !string.IsNullOrEmpty(ec.OwningPlayerName) ? ec.OwningPlayerName + : !string.IsNullOrEmpty(ec.ImprinterName) ? ec.ImprinterName + : ec.TamerString; + + /// + /// Returns the stat value of this creature considering the offset for percentage based stats. + /// If a stat is percentage based, Ark and this object internally store it as offset from 100 %. + /// ASB expects the absolute value. + /// + public static float GetStatValue(this ExportGunCreatureFile ec, int statIndex) + => ec.Stats[statIndex].Value + (Stats.IsPercentage(statIndex) ? 1 : 0); + } +} diff --git a/ARKBreedingStats/importExportGun/ImportExportGun.cs b/ARKBreedingStats/importExportGun/ImportExportGun.cs index 6a3cbd6d..4a3863a5 100644 --- a/ARKBreedingStats/importExportGun/ImportExportGun.cs +++ b/ARKBreedingStats/importExportGun/ImportExportGun.cs @@ -1,7 +1,6 @@ using System; using System.IO; using System.Threading; -using System.Windows.Forms.VisualStyles; using ARKBreedingStats.Library; using ARKBreedingStats.values; using Newtonsoft.Json; @@ -18,10 +17,30 @@ internal static class ImportExportGun /// Supports .sav files (ASE) and .json files (ASA). /// The out parameter statValues contains the stat values of the export file. /// - public static Creature LoadCreature(string filePath, out string resultText, out string serverMultipliersHash, out double[] statValues, bool allowUnknownSpecies = false) + public static Creature LoadCreature(string filePath, out string resultText, out string serverMultipliersHash, + out double[] statValues, bool allowUnknownSpecies = false) + { + var exportedCreature = LoadCreatureFile(filePath, out resultText, out serverMultipliersHash); + + if (exportedCreature == null) + { + statValues = null; + return null; + } + + var creature = ConvertExportGunToCreature(exportedCreature, out resultText, out statValues, allowUnknownSpecies); + if (creature != null) + creature.domesticatedAt = File.GetLastWriteTime(filePath); + return creature; + } + + /// + /// Load exportGunCreatureFile from file created with the export gun (mod). + /// Supports .sav files (ASE) and .json files (ASA). + /// + public static ExportGunCreatureFile LoadCreatureFile(string filePath, out string resultText, out string serverMultipliersHash) { resultText = null; - statValues = null; serverMultipliersHash = null; if (string.IsNullOrEmpty(filePath) || !File.Exists(filePath)) return null; @@ -44,9 +63,8 @@ public static Creature LoadCreature(string filePath, out string resultText, out break; } - var creature = LoadCreatureFromJson(jsonText, resultText, out resultText, out serverMultipliersHash, out statValues, filePath, allowUnknownSpecies); - if (creature == null) return null; - creature.domesticatedAt = File.GetLastWriteTime(filePath); + var creature = LoadExportGunCreatureFromJson(jsonText, resultText, out resultText, out serverMultipliersHash, filePath); + return creature; } catch (IOException) when (tryIndex < tryLoadCount - 1) @@ -64,10 +82,21 @@ public static Creature LoadCreature(string filePath, out string resultText, out return null; } - public static Creature LoadCreatureFromJson(string jsonText, string resultSoFar, out string resultText, out string serverMultipliersHash, out double[] statValues, string filePath = null, bool allowUnknownSpecies = false) + public static Creature LoadCreatureFromExportGunJson(string jsonText, out string resultText, out string serverMultipliersHash, string filePath = null, bool allowUnknownSpecies = false) + { + var exportGunFile = LoadExportGunCreatureFromJson(jsonText, null, out resultText, + out serverMultipliersHash, filePath); + if (exportGunFile == null) + { + return null; + } + + return ConvertExportGunToCreature(exportGunFile, out resultText, out double[] statValues, allowUnknownSpecies); + } + + public static ExportGunCreatureFile LoadExportGunCreatureFromJson(string jsonText, string resultSoFar, out string resultText, out string serverMultipliersHash, string filePath = null) { resultText = resultSoFar; - statValues = null; serverMultipliersHash = null; if (string.IsNullOrEmpty(jsonText)) { @@ -88,8 +117,7 @@ public static Creature LoadCreatureFromJson(string jsonText, string resultSoFar, } serverMultipliersHash = exportedCreature.ServerMultipliersHash; - - return ConvertExportGunToCreature(exportedCreature, out resultText, out statValues, allowUnknownSpecies); + return exportedCreature; } private static Creature ConvertExportGunToCreature(ExportGunCreatureFile ec, out string error, out double[] statValues, bool allowUnknownSpecies = false) @@ -101,7 +129,7 @@ private static Creature ConvertExportGunToCreature(ExportGunCreatureFile ec, out var species = Values.V.SpeciesByBlueprint(ec.BlueprintPath, true); if (species == null) { - error = $"Unknown species. The blueprintpath {ec.BlueprintPath} couldn't be found, maybe you need to load a mod values file."; + error = $"Unknown species. The blueprint path {ec.BlueprintPath} couldn't be found, maybe you need to load a mod values file."; if (!allowUnknownSpecies) return null; } @@ -122,24 +150,8 @@ private static Creature ConvertExportGunToCreature(ExportGunCreatureFile ec, out var arkId = Utils.ConvertArkIdsToLongArkId(ec.DinoId1Int, ec.DinoId2Int); - // wild creatures have a TE of 100 %, so don't use that here - var isWild = string.IsNullOrEmpty(ec.DinoName) - && string.IsNullOrEmpty(ec.TribeName) - && string.IsNullOrEmpty(ec.TamerString) - && string.IsNullOrEmpty(ec.OwningPlayerName) - && string.IsNullOrEmpty(ec.ImprinterName) - && ec.OwningPlayerID == 0 - ; - - var isBred = !string.IsNullOrEmpty(ec.ImprinterName) - || (ec.DinoImprintingQuality > 0 && ec.TameEffectiveness > 0.9999); - - var owner = !string.IsNullOrEmpty(ec.OwningPlayerName) ? ec.OwningPlayerName - : !string.IsNullOrEmpty(ec.ImprinterName) ? ec.ImprinterName - : ec.TamerString; - - var c = new Creature(species, ec.DinoName, owner, ec.TribeName, species?.noGender != false ? Sex.Unknown : ec.IsFemale ? Sex.Female : Sex.Male, - wildLevels, domLevels, mutLevels, isWild ? -3 : ec.TameEffectiveness, isBred, ec.DinoImprintingQuality, + var c = new Creature(species, ec.DinoName, ec.Owner(), ec.TribeName, species?.noGender != false ? Sex.Unknown : ec.IsFemale ? Sex.Female : Sex.Male, + wildLevels, domLevels, mutLevels, ec.IsWild() ? -3 : ec.TameEffectiveness, ec.IsBred(), ec.DinoImprintingQuality, CreatureCollection.CurrentCreatureCollection?.wildLevelStep) { ArkId = arkId, @@ -189,7 +201,7 @@ public static ExportGunCreatureFile ConvertCreatureToExportGunFile(Creature c, o Wild = c.levelsWild?[si] ?? 0, Tamed = c.levelsDom?[si] ?? 0, Mutated = c.levelsMutated?[si] ?? 0, - Value = (float)c.valuesDom[si] + Value = (float)(c.valuesDom[si] - (Stats.IsPercentage(si) ? 1 : 0)) }; } @@ -242,7 +254,7 @@ public static bool ImportServerMultipliers(CreatureCollection cc, string filePat { var exportedServerMultipliers = ReadServerMultipliers(filePath, out resultText); if (exportedServerMultipliers == null) return false; - return SetServerMultipliers(cc, exportedServerMultipliers, newServerMultipliersHash); + return SetCollectionMultipliers(cc, exportedServerMultipliers, newServerMultipliersHash); } /// @@ -252,7 +264,7 @@ public static bool ImportServerMultipliersFromJson(CreatureCollection cc, string { var exportedServerMultipliers = ReadServerMultipliersFromJson(jsonServerMultipliers, null, out resultText); if (exportedServerMultipliers == null) return false; - return SetServerMultipliers(cc, exportedServerMultipliers, newServerMultipliersHash); + return SetCollectionMultipliers(cc, exportedServerMultipliers, newServerMultipliersHash); } internal static ExportGunServerFile ReadServerMultipliers(string filePath, out string resultText) @@ -326,9 +338,9 @@ public static ExportGunServerFile ReadServerMultipliersFromJson(string jsonText, return exportedServerMultipliers; } - internal static bool SetServerMultipliers(CreatureCollection cc, ExportGunServerFile esm, string newServerMultipliersHash) + internal static bool SetCollectionMultipliers(CreatureCollection cc, ExportGunServerFile esm, string newServerMultipliersHash) { - if (cc == null + if (cc?.serverMultipliers == null || esm?.TameAdd == null || esm.TameAff == null || esm.WildLevel == null @@ -336,38 +348,59 @@ internal static bool SetServerMultipliers(CreatureCollection cc, ExportGunServer ) return false; // invalid server multipliers - const int roundToDigits = 6; + SetServerMultipliers(cc.serverMultipliers, esm); - for (int s = 0; s < Stats.StatsCount; s++) - { - cc.serverMultipliers.statMultipliers[s][Stats.IndexTamingAdd] = Math.Round(esm.TameAdd[s], roundToDigits); - cc.serverMultipliers.statMultipliers[s][Stats.IndexTamingMult] = Math.Round(esm.TameAff[s], roundToDigits); - cc.serverMultipliers.statMultipliers[s][Stats.IndexLevelWild] = Math.Round(esm.WildLevel[s], roundToDigits); - cc.serverMultipliers.statMultipliers[s][Stats.IndexLevelDom] = Math.Round(esm.TameLevel[s], roundToDigits); - } cc.maxWildLevel = (int)Math.Ceiling(esm.MaxWildLevel); cc.maxServerLevel = esm.DestroyTamesOverLevelClamp; - cc.serverMultipliers.TamingSpeedMultiplier = Math.Round(esm.TamingSpeedMultiplier, roundToDigits); - cc.serverMultipliers.DinoCharacterFoodDrainMultiplier = Math.Round(esm.DinoCharacterFoodDrainMultiplier, roundToDigits); - cc.serverMultipliers.WildDinoCharacterFoodDrainMultiplier = Math.Round(esm.WildDinoCharacterFoodDrainMultiplier, roundToDigits); - cc.serverMultipliers.TamedDinoCharacterFoodDrainMultiplier = Math.Round(esm.TamedDinoCharacterFoodDrainMultiplier, roundToDigits); - cc.serverMultipliers.WildDinoTorporDrainMultiplier = Math.Round(esm.WildDinoTorporDrainMultiplier, roundToDigits); - cc.serverMultipliers.MatingSpeedMultiplier = Math.Round(esm.MatingSpeedMultiplier, roundToDigits); - cc.serverMultipliers.MatingIntervalMultiplier = Math.Round(esm.MatingIntervalMultiplier, roundToDigits); - cc.serverMultipliers.EggHatchSpeedMultiplier = Math.Round(esm.EggHatchSpeedMultiplier, roundToDigits); - cc.serverMultipliers.BabyMatureSpeedMultiplier = Math.Round(esm.BabyMatureSpeedMultiplier, roundToDigits); - cc.serverMultipliers.BabyCuddleIntervalMultiplier = Math.Round(esm.BabyCuddleIntervalMultiplier, roundToDigits); - cc.serverMultipliers.BabyImprintAmountMultiplier = Math.Round(esm.BabyImprintAmountMultiplier, roundToDigits); - cc.serverMultipliers.BabyImprintingStatScaleMultiplier = Math.Round(esm.BabyImprintingStatScaleMultiplier, roundToDigits); - cc.serverMultipliers.BabyFoodConsumptionSpeedMultiplier = Math.Round(esm.BabyFoodConsumptionSpeedMultiplier, roundToDigits); - cc.serverMultipliers.AllowSpeedLeveling = esm.AllowSpeedLeveling; - cc.serverMultipliers.AllowFlyerSpeedLeveling = esm.AllowFlyerSpeedLeveling; - cc.serverMultipliers.SinglePlayerSettings = esm.UseSingleplayerSettings; cc.Game = esm.Game; cc.ServerMultipliersHash = newServerMultipliersHash; return true; } + + /// + /// Sets the properties of the exportGunServerFile to the passed ServerMultipliers. + /// + /// The properties of this object are set + /// The properties of this object are used + internal static bool SetServerMultipliers(ServerMultipliers sm, ExportGunServerFile esm) + { + if (sm == null + || esm?.TameAdd == null + || esm.TameAff == null + || esm.WildLevel == null + || esm.TameLevel == null + ) + return false; // invalid server multipliers + + const int roundToDigits = 6; + + for (int s = 0; s < Stats.StatsCount; s++) + { + sm.statMultipliers[s][ServerMultipliers.IndexTamingAdd] = Math.Round(esm.TameAdd[s], roundToDigits); + sm.statMultipliers[s][ServerMultipliers.IndexTamingMult] = Math.Round(esm.TameAff[s], roundToDigits); + sm.statMultipliers[s][ServerMultipliers.IndexLevelWild] = Math.Round(esm.WildLevel[s], roundToDigits); + sm.statMultipliers[s][ServerMultipliers.IndexLevelDom] = Math.Round(esm.TameLevel[s], roundToDigits); + } + sm.TamingSpeedMultiplier = Math.Round(esm.TamingSpeedMultiplier, roundToDigits); + sm.DinoCharacterFoodDrainMultiplier = Math.Round(esm.DinoCharacterFoodDrainMultiplier, roundToDigits); + sm.WildDinoCharacterFoodDrainMultiplier = Math.Round(esm.WildDinoCharacterFoodDrainMultiplier, roundToDigits); + sm.TamedDinoCharacterFoodDrainMultiplier = Math.Round(esm.TamedDinoCharacterFoodDrainMultiplier, roundToDigits); + sm.WildDinoTorporDrainMultiplier = Math.Round(esm.WildDinoTorporDrainMultiplier, roundToDigits); + sm.MatingSpeedMultiplier = Math.Round(esm.MatingSpeedMultiplier, roundToDigits); + sm.MatingIntervalMultiplier = Math.Round(esm.MatingIntervalMultiplier, roundToDigits); + sm.EggHatchSpeedMultiplier = Math.Round(esm.EggHatchSpeedMultiplier, roundToDigits); + sm.BabyMatureSpeedMultiplier = Math.Round(esm.BabyMatureSpeedMultiplier, roundToDigits); + sm.BabyCuddleIntervalMultiplier = Math.Round(esm.BabyCuddleIntervalMultiplier, roundToDigits); + sm.BabyImprintAmountMultiplier = Math.Round(esm.BabyImprintAmountMultiplier, roundToDigits); + sm.BabyImprintingStatScaleMultiplier = Math.Round(esm.BabyImprintingStatScaleMultiplier, roundToDigits); + sm.BabyFoodConsumptionSpeedMultiplier = Math.Round(esm.BabyFoodConsumptionSpeedMultiplier, roundToDigits); + sm.AllowSpeedLeveling = esm.AllowSpeedLeveling; + sm.AllowFlyerSpeedLeveling = esm.AllowFlyerSpeedLeveling; + sm.SinglePlayerSettings = esm.UseSingleplayerSettings; + + return true; + } } } diff --git a/ARKBreedingStats/multiplierTesting/SpeciesStatsExtractor.cs b/ARKBreedingStats/multiplierTesting/SpeciesStatsExtractor.cs new file mode 100644 index 00000000..1689728c --- /dev/null +++ b/ARKBreedingStats/multiplierTesting/SpeciesStatsExtractor.cs @@ -0,0 +1,196 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using ARKBreedingStats.importExportGun; +using ARKBreedingStats.species; +using ARKBreedingStats.values; + +namespace ARKBreedingStats.multiplierTesting +{ + /// + /// Determines stats of a species from a combination of given levels and stat values. + /// + internal static class SpeciesStatsExtractor + { + public static bool ExtractStatValues(IList creatureFiles, ServerMultipliers serverMultipliers, out Species species, out string errorText) + { + if (!CheckInput(creatureFiles, out creatureFiles, serverMultipliers, out species, out errorText)) + return false; + + if (!ExtractValues(creatureFiles, serverMultipliers, species, out errorText)) + return false; + + return true; + } + + private static bool CheckInput(IList creatureFiles, out IList cleanedCreatureFiles, ServerMultipliers serverMultipliers, + out Species species, out string errorText) + { + species = null; + cleanedCreatureFiles = null; + if (serverMultipliers?.statMultipliers == null) + { + errorText = "server multipliers contain no stat multipliers."; + return false; + } + if (creatureFiles?.Any() != true) + { + errorText = "no creature files provided."; + return false; + } + errorText = null; + + // only one species per time, only use species of first file + var blueprintPath = creatureFiles.First().BlueprintPath; + species = new Species + { + blueprintPath = blueprintPath, + fullStatsRaw = new double[Stats.StatsCount][] + }; + species.Initialize(); + cleanedCreatureFiles = creatureFiles.Where(cf => cf.BlueprintPath == blueprintPath).ToArray(); + return true; + } + + private static bool ExtractValues(IList creatureFiles, ServerMultipliers serverMultipliers, Species species, out string errorText) + { + const int roundToDigits = 3; + var wildCreatures = creatureFiles.Where(c => c.IsWild()).ToArray(); + var domCreatures = creatureFiles.Where(c => !c.IsWild()).ToArray(); + + // for the determination of Ta and Tm two creatures with different TE are needed + var creaturesOrderedByTeWithoutDomLevels = domCreatures + .Where(ec => ec.Stats.All(s => s.Tamed == 0 && s.Mutated == 0)) + .OrderBy(ec => ec.TameEffectiveness).ToArray(); + var crHighTe = creaturesOrderedByTeWithoutDomLevels.Last(); + var crLowTe = creaturesOrderedByTeWithoutDomLevels.First(); + + errorText = null; + var errorSb = new StringBuilder(); + var taTmSolver = new TaTmSolver(); + + ServerMultipliers singlePlayerMultipliers = null; + if (serverMultipliers.SinglePlayerSettings) + { + singlePlayerMultipliers = + Values.V.serverMultipliersPresets.GetPreset(ServerMultipliersPresets.Singleplayer); + if (singlePlayerMultipliers == null) + { + errorText = "Singleplayer server multiplier preset not available."; + return false; + } + } + + for (var s = 0; s < Stats.StatsCount; s++) + { + var svStats = serverMultipliers.statMultipliers[s]; + if (singlePlayerMultipliers?.statMultipliers[s] != null) + { + svStats = svStats.ToArray(); // use copy to not alter original server values + for (int i = 0; i < svStats.Length; i++) + { + svStats[i] *= singlePlayerMultipliers.statMultipliers[s][i]; + } + } + + // base stat value + var wildCreatureWithZeroWildLevels = + wildCreatures.FirstOrDefault(ec => ec.Stats[s].Wild == 0 && ec.Stats[s].Mutated == 0); + if (wildCreatureWithZeroWildLevels == null) + { + errorSb.AppendLine( + $"no wild creature with 0 levels in stat [{s}] ({Utils.StatName(s)}) provided. This stat cannot be calculated further"); + continue; + } + + species.fullStatsRaw[s] = new double[5]; + var spStats = species.fullStatsRaw[s]; + var baseValue = wildCreatureWithZeroWildLevels.GetStatValue(s); + if (baseValue == 0) continue; + + spStats[Species.StatsRawIndexBase] = baseValue; + + // inc per wild + var wildCreatureWithNonZeroWildLevels = + wildCreatures.FirstOrDefault(ec => ec.Stats[s].Wild > 0 && ec.Stats[s].Mutated == 0); + if (wildCreatureWithNonZeroWildLevels == null) + { + errorSb.AppendLine( + $"no wild creature with >0 levels in stat [{s}] ({Utils.StatName(s)}), iw cannot be determined and other values of this stat will be skipped."); + continue; + } + + var incPerWild = Math.Round( + (wildCreatureWithNonZeroWildLevels.GetStatValue(s) / spStats[Species.StatsRawIndexBase] - 1) + / (wildCreatureWithNonZeroWildLevels.Stats[s].Wild * svStats[ServerMultipliers.IndexLevelWild]) + , roundToDigits); + spStats[Species.StatsRawIndexIncPerWildLevel] = incPerWild; + + // TBHM + var tbhm = 1; + if (s == Stats.Health) + { + species.TamedBaseHealthMultiplier = 1; + // todo + } + + // ta, tm + taTmSolver.SetFirstEquation(crHighTe.GetStatValue(s), baseValue, + crHighTe.Stats[s].Wild, incPerWild, svStats[ServerMultipliers.IndexLevelWild], + tbhm, crHighTe.DinoImprintingQuality, species.StatImprintMultipliers[s], + serverMultipliers.BabyImprintingStatScaleMultiplier, + crHighTe.TameEffectiveness, crHighTe.Stats[s].Tamed, 0, 0); + + errorText = taTmSolver.CalculateTaTm(crLowTe.GetStatValue(s), baseValue, + crLowTe.Stats[s].Wild, incPerWild, + svStats[ServerMultipliers.IndexLevelWild], + tbhm, crLowTe.DinoImprintingQuality, species.StatImprintMultipliers[s], + serverMultipliers.BabyImprintingStatScaleMultiplier, + crLowTe.TameEffectiveness, crLowTe.Stats[s].Tamed, 0, 0, out var taTaM, out var tmTmM); + if (!string.IsNullOrEmpty(errorText)) + { + errorSb.AppendLine($"Error when calculating ta tm for stat {s}: " + errorText); + } + + if (taTaM != 0 && svStats[ServerMultipliers.IndexTamingAdd] != 0) + spStats[Species.StatsRawIndexAdditiveBonus] = + Math.Round(taTaM / svStats[ServerMultipliers.IndexTamingAdd], roundToDigits); + if (tmTmM != 0 && svStats[ServerMultipliers.IndexTamingMult] != 0) + spStats[Species.StatsRawIndexMultiplicativeBonus] = + Math.Round(tmTmM / svStats[ServerMultipliers.IndexTamingMult], roundToDigits); + + // dom level + var creatureWithNonZeroDomLevels = + domCreatures.FirstOrDefault(ec => ec.Stats[s].Tamed > 0 && ec.Stats[s].Mutated == 0); + if (creatureWithNonZeroDomLevels == null) + { + errorSb.AppendLine( + $"no creature with >0 domestic levels in stat [{s}] ({Utils.StatName(s)}), id cannot be calculated."); + } + else + { + var crStats = creatureWithNonZeroDomLevels.Stats[s]; + spStats[Species.StatsRawIndexIncPerDomLevel] = Math.Round( + (creatureWithNonZeroDomLevels.GetStatValue(s) / + ((spStats[Species.StatsRawIndexBase] * (1 + (crStats.Wild + crStats.Mutated) * incPerWild * + svStats[ServerMultipliers.IndexLevelWild]) * tbhm * (1 + + creatureWithNonZeroDomLevels.DinoImprintingQuality * + species.StatImprintMultipliers[s] * + serverMultipliers.BabyImprintingStatScaleMultiplier) + + spStats[Species.StatsRawIndexAdditiveBonus] * svStats[ServerMultipliers.IndexTamingAdd]) + * (1 + creatureWithNonZeroDomLevels.TameEffectiveness * + spStats[Species.StatsRawIndexMultiplicativeBonus] * + svStats[ServerMultipliers.IndexTamingMult])) - 1) + / (crStats.Tamed * svStats[ServerMultipliers.IndexLevelDom]) + , roundToDigits); + } + } + + species.Initialize(); // initialize second time to set used stats + + errorText = errorSb.ToString(); + return true; + } + } +} diff --git a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs index 802b91bb..0aada95f 100644 --- a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs +++ b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs @@ -83,16 +83,17 @@ private void InitializeComponent() this.idMToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.taMToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.tmMToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.allIwToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.allIdToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.setAllLvlToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.allWildLvlToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.allDomLvlToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.setAllWildLevelsToTheClosestValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.setAllDomLevelsToTheClosestValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); - this.allIwToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.allIdToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.copyStatValuesToClipboardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.LbSpeciesValuesExtractor = new System.Windows.Forms.Label(); this.nudTE = new ARKBreedingStats.uiControls.Nud(); this.nudIBM = new ARKBreedingStats.uiControls.Nud(); this.nudIB = new ARKBreedingStats.uiControls.Nud(); @@ -120,6 +121,7 @@ private void InitializeComponent() this.flowLayoutPanel1.Controls.Add(this.groupBox4); this.flowLayoutPanel1.Controls.Add(this.groupBox5); this.flowLayoutPanel1.Controls.Add(this.btUseMultipliersFromSettings); + this.flowLayoutPanel1.Controls.Add(this.LbSpeciesValuesExtractor); this.flowLayoutPanel1.Controls.Add(this.llStatCalculation); this.flowLayoutPanel1.Controls.Add(this.LbBlueprintPath); this.flowLayoutPanel1.Controls.Add(this.groupBox1); @@ -242,7 +244,7 @@ private void InitializeComponent() // this.llStatCalculation.AutoSize = true; this.flowLayoutPanel1.SetFlowBreak(this.llStatCalculation, true); - this.llStatCalculation.Location = new System.Drawing.Point(835, 16); + this.llStatCalculation.Location = new System.Drawing.Point(252, 93); this.llStatCalculation.Margin = new System.Windows.Forms.Padding(3, 16, 3, 0); this.llStatCalculation.Name = "llStatCalculation"; this.llStatCalculation.Size = new System.Drawing.Size(160, 13); @@ -255,7 +257,7 @@ private void InitializeComponent() // this.flowLayoutPanel1.SetFlowBreak(this.LbBlueprintPath, true); this.LbBlueprintPath.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.LbBlueprintPath.Location = new System.Drawing.Point(3, 77); + this.LbBlueprintPath.Location = new System.Drawing.Point(3, 106); this.LbBlueprintPath.Name = "LbBlueprintPath"; this.LbBlueprintPath.Size = new System.Drawing.Size(901, 21); this.LbBlueprintPath.TabIndex = 14; @@ -266,7 +268,7 @@ private void InitializeComponent() this.groupBox1.Controls.Add(this.rbBred); this.groupBox1.Controls.Add(this.rbTamed); this.groupBox1.Controls.Add(this.rbWild); - this.groupBox1.Location = new System.Drawing.Point(3, 101); + this.groupBox1.Location = new System.Drawing.Point(3, 130); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(167, 49); this.groupBox1.TabIndex = 4; @@ -311,7 +313,7 @@ private void InitializeComponent() this.groupBox2.Controls.Add(this.LbCalculatedWildLevel); this.groupBox2.Controls.Add(this.label1); this.groupBox2.Controls.Add(this.nudTE); - this.groupBox2.Location = new System.Drawing.Point(176, 101); + this.groupBox2.Location = new System.Drawing.Point(176, 130); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(163, 49); this.groupBox2.TabIndex = 5; @@ -341,7 +343,7 @@ private void InitializeComponent() this.groupBox3.Controls.Add(this.label2); this.groupBox3.Controls.Add(this.nudIBM); this.groupBox3.Controls.Add(this.nudIB); - this.groupBox3.Location = new System.Drawing.Point(345, 101); + this.groupBox3.Location = new System.Drawing.Point(345, 130); this.groupBox3.Name = "groupBox3"; this.groupBox3.Size = new System.Drawing.Size(213, 49); this.groupBox3.TabIndex = 6; @@ -360,7 +362,7 @@ private void InitializeComponent() // gbFineAdjustment // this.gbFineAdjustment.Controls.Add(this.tbFineAdjustments); - this.gbFineAdjustment.Location = new System.Drawing.Point(564, 101); + this.gbFineAdjustment.Location = new System.Drawing.Point(564, 130); this.gbFineAdjustment.Name = "gbFineAdjustment"; this.gbFineAdjustment.Size = new System.Drawing.Size(376, 49); this.gbFineAdjustment.TabIndex = 7; @@ -383,7 +385,7 @@ private void InitializeComponent() // this.lBDummyEmptyFlowBreak.AutoSize = true; this.flowLayoutPanel1.SetFlowBreak(this.lBDummyEmptyFlowBreak, true); - this.lBDummyEmptyFlowBreak.Location = new System.Drawing.Point(946, 98); + this.lBDummyEmptyFlowBreak.Location = new System.Drawing.Point(946, 127); this.lBDummyEmptyFlowBreak.Name = "lBDummyEmptyFlowBreak"; this.lBDummyEmptyFlowBreak.Size = new System.Drawing.Size(0, 13); this.lBDummyEmptyFlowBreak.TabIndex = 11; @@ -404,7 +406,7 @@ private void InitializeComponent() this.panel1.Controls.Add(this.LbLw); this.panel1.Controls.Add(this.LbBaseValue); this.flowLayoutPanel1.SetFlowBreak(this.panel1, true); - this.panel1.Location = new System.Drawing.Point(3, 156); + this.panel1.Location = new System.Drawing.Point(3, 185); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(1005, 29); this.panel1.TabIndex = 8; @@ -545,7 +547,7 @@ private void InitializeComponent() this.gbLevel.Controls.Add(this.lbLevelSumWild); this.gbLevel.Controls.Add(this.label16); this.gbLevel.Controls.Add(this.nudCreatureLevel); - this.gbLevel.Location = new System.Drawing.Point(3, 191); + this.gbLevel.Location = new System.Drawing.Point(3, 220); this.gbLevel.Name = "gbLevel"; this.gbLevel.Size = new System.Drawing.Size(200, 81); this.gbLevel.TabIndex = 9; @@ -582,7 +584,7 @@ private void InitializeComponent() // LbAbbreviations // this.LbAbbreviations.AutoSize = true; - this.LbAbbreviations.Location = new System.Drawing.Point(209, 188); + this.LbAbbreviations.Location = new System.Drawing.Point(209, 217); this.LbAbbreviations.Name = "LbAbbreviations"; this.LbAbbreviations.Size = new System.Drawing.Size(780, 39); this.LbAbbreviations.TabIndex = 13; @@ -680,6 +682,25 @@ private void InitializeComponent() this.tmMToolStripMenuItem.Text = "all TmM"; this.tmMToolStripMenuItem.Click += new System.EventHandler(this.tmMToolStripMenuItem_Click); // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(113, 6); + // + // allIwToolStripMenuItem + // + this.allIwToolStripMenuItem.Name = "allIwToolStripMenuItem"; + this.allIwToolStripMenuItem.Size = new System.Drawing.Size(116, 22); + this.allIwToolStripMenuItem.Text = "all Iw"; + this.allIwToolStripMenuItem.Click += new System.EventHandler(this.allIwToolStripMenuItem_Click); + // + // allIdToolStripMenuItem + // + this.allIdToolStripMenuItem.Name = "allIdToolStripMenuItem"; + this.allIdToolStripMenuItem.Size = new System.Drawing.Size(116, 22); + this.allIdToolStripMenuItem.Text = "all Id"; + this.allIdToolStripMenuItem.Click += new System.EventHandler(this.allIdToolStripMenuItem_Click); + // // setAllLvlToToolStripMenuItem // this.setAllLvlToToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -725,32 +746,28 @@ private void InitializeComponent() this.setAllDomLevelsToTheClosestValueToolStripMenuItem.Text = "Set all Dom levels to the closest value"; this.setAllDomLevelsToTheClosestValueToolStripMenuItem.Click += new System.EventHandler(this.setAllDomLevelsToTheClosestValueToolStripMenuItem_Click); // - // toolStripSeparator3 - // - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(113, 6); - // - // allIwToolStripMenuItem - // - this.allIwToolStripMenuItem.Name = "allIwToolStripMenuItem"; - this.allIwToolStripMenuItem.Size = new System.Drawing.Size(116, 22); - this.allIwToolStripMenuItem.Text = "all Iw"; - this.allIwToolStripMenuItem.Click += new System.EventHandler(this.allIwToolStripMenuItem_Click); - // - // allIdToolStripMenuItem - // - this.allIdToolStripMenuItem.Name = "allIdToolStripMenuItem"; - this.allIdToolStripMenuItem.Size = new System.Drawing.Size(116, 22); - this.allIdToolStripMenuItem.Text = "all Id"; - this.allIdToolStripMenuItem.Click += new System.EventHandler(this.allIdToolStripMenuItem_Click); - // // copyStatValuesToClipboardToolStripMenuItem // this.copyStatValuesToClipboardToolStripMenuItem.Name = "copyStatValuesToClipboardToolStripMenuItem"; - this.copyStatValuesToClipboardToolStripMenuItem.Size = new System.Drawing.Size(194, 20); - this.copyStatValuesToClipboardToolStripMenuItem.Text = "Copy raw stat values to clipboard"; + this.copyStatValuesToClipboardToolStripMenuItem.Size = new System.Drawing.Size(235, 20); + this.copyStatValuesToClipboardToolStripMenuItem.Text = "Copy raw species stat values to clipboard"; this.copyStatValuesToClipboardToolStripMenuItem.Click += new System.EventHandler(this.copyStatValuesToClipboardToolStripMenuItem_Click); // + // LbSpeciesValuesExtractor + // + this.LbSpeciesValuesExtractor.AllowDrop = true; + this.LbSpeciesValuesExtractor.AutoSize = true; + this.LbSpeciesValuesExtractor.BackColor = System.Drawing.Color.White; + this.LbSpeciesValuesExtractor.Location = new System.Drawing.Point(3, 77); + this.LbSpeciesValuesExtractor.Name = "LbSpeciesValuesExtractor"; + this.LbSpeciesValuesExtractor.Padding = new System.Windows.Forms.Padding(3, 8, 3, 8); + this.LbSpeciesValuesExtractor.Size = new System.Drawing.Size(243, 29); + this.LbSpeciesValuesExtractor.TabIndex = 15; + this.LbSpeciesValuesExtractor.Text = "Drop exportGun files to determine species values"; + this.LbSpeciesValuesExtractor.DragDrop += new System.Windows.Forms.DragEventHandler(this.LbSpeciesValuesExtractor_DragDrop); + this.LbSpeciesValuesExtractor.DragEnter += new System.Windows.Forms.DragEventHandler(this.LbSpeciesValuesExtractor_DragEnter); + this.LbSpeciesValuesExtractor.DragLeave += new System.EventHandler(this.LbSpeciesValuesExtractor_DragLeave); + // // nudTE // this.nudTE.DecimalPlaces = 3; @@ -939,5 +956,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem allIwToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem allIdToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem copyStatValuesToClipboardToolStripMenuItem; + private System.Windows.Forms.Label LbSpeciesValuesExtractor; } } diff --git a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs index b741c459..991c96a1 100644 --- a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs +++ b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs @@ -254,7 +254,7 @@ public void SetSpecies(Species species, bool forceUpdate = false) for (int s = 0; s < Stats.StatsCount; s++) { _statControls[s].SetStatValues(_selectedSpecies.fullStatsRaw[s], customStatsAvailable ? customStatOverrides?[s] : null, - _selectedSpecies.altBaseStatsRaw != null && _selectedSpecies.altBaseStatsRaw.TryGetValue(s, out var altV) ? altV / _selectedSpecies.fullStatsRaw[s][0] : 1, + _selectedSpecies.altBaseStatsRaw != null && _selectedSpecies.altBaseStatsRaw.TryGetValue(s, out var altV) ? altV / _selectedSpecies.fullStatsRaw[s][Species.StatsRawIndexBase] : 1, s == Stats.SpeedMultiplier && !(CbAllowSpeedLeveling.Checked && (CbAllowFlyerSpeedLeveling.Checked || !species.isFlyer))); _statControls[s].StatImprintingBonusMultiplier = customStatsAvailable ? customStatOverrides?[Stats.StatsCount]?[s] ?? statImprintMultipliers[s] : statImprintMultipliers[s]; _statControls[s].Visible = species.UsesStat(s); @@ -492,7 +492,10 @@ private void cbSingleplayerSettings_CheckedChanged(object sender, EventArgs e) if (spM.statMultipliers[s] == null) _statControls[s].SetSinglePlayerSettings(); else - _statControls[s].SetSinglePlayerSettings(spM.statMultipliers[s][Stats.IndexLevelWild], spM.statMultipliers[s][Stats.IndexLevelDom], spM.statMultipliers[s][Stats.IndexTamingAdd], spM.statMultipliers[s][Stats.IndexTamingMult]); + _statControls[s].SetSinglePlayerSettings(spM.statMultipliers[s][ServerMultipliers.IndexLevelWild], + spM.statMultipliers[s][ServerMultipliers.IndexLevelDom], + spM.statMultipliers[s][ServerMultipliers.IndexTamingAdd], + spM.statMultipliers[s][ServerMultipliers.IndexTamingMult]); } return; } @@ -530,7 +533,9 @@ private void SetAllowSpeedLeveling(bool allowSpeedLeveling, bool allowFlyerSpeed _cc?.CustomSpeciesStats?.TryGetValue(_selectedSpecies.blueprintPath, out customStatOverrides) ?? false; _statControls[Stats.SpeedMultiplier].SetStatValues(_selectedSpecies.fullStatsRaw[Stats.SpeedMultiplier], customStatsAvailable ? customStatOverrides?[Stats.SpeedMultiplier] : null, - _selectedSpecies.altBaseStatsRaw != null && _selectedSpecies.altBaseStatsRaw.TryGetValue(Stats.SpeedMultiplier, out var altV) ? altV / _selectedSpecies.fullStatsRaw[Stats.SpeedMultiplier][0] : 1, + _selectedSpecies.altBaseStatsRaw != null + && _selectedSpecies.altBaseStatsRaw.TryGetValue(Stats.SpeedMultiplier, out var altV) + ? altV / _selectedSpecies.fullStatsRaw[Stats.SpeedMultiplier][Species.StatsRawIndexBase] : 1, !speedLevelingAllowed); } @@ -703,10 +708,46 @@ private void SetServerMultipliers(ExportGunServerFile esm) CheckIfMultipliersAreEqualToSettings(); } + /// + /// Returns the currently set server multipliers in an exportGunServerFile. + /// + private ExportGunServerFile GetServerMultipliers() + { + var esm = new ExportGunServerFile + { + BabyImprintingStatScaleMultiplier = nudIBM.ValueDouble, + UseSingleplayerSettings = cbSingleplayerSettings.Checked, + AllowSpeedLeveling = CbAllowSpeedLeveling.Checked, + AllowFlyerSpeedLeveling = CbAllowFlyerSpeedLeveling.Checked, + WildLevel = new double[Stats.StatsCount], + TameLevel = new double[Stats.StatsCount], + TameAdd = new double[Stats.StatsCount], + TameAff = new double[Stats.StatsCount] + }; + + for (int si = 0; si < Stats.StatsCount; si++) + { + var mults = _statControls[si].StatMultipliers; + esm.WildLevel[si] = mults[3]; + esm.TameLevel[si] = mults[2]; + esm.TameAdd[si] = mults[0]; + esm.TameAff[si] = mults[1]; + } + + return esm; + } + private void copyStatValuesToClipboardToolStripMenuItem_Click(object sender, EventArgs e) + { + CopySpeciesStatsToClipboard(); + } + + private void CopySpeciesStatsToClipboard(string speciesBlueprintPath = null) { // copy stat values in the format of the values.json to clipboard var sb = new StringBuilder(); + if (!string.IsNullOrEmpty(speciesBlueprintPath)) + sb.AppendLine($"\"blueprintPath\": \"{speciesBlueprintPath}\","); sb.AppendLine("\"fullStatsRaw\": ["); for (var s = 0; s < Stats.StatsCount; s++) { @@ -725,5 +766,74 @@ private void copyStatValuesToClipboardToolStripMenuItem_Click(object sender, Eve Clipboard.SetText(sb.ToString()); SetMessageLabelText?.Invoke("Raw stat values copied to clipboard.", MessageBoxIcon.Information); } + + private void LbSpeciesValuesExtractor_DragEnter(object sender, DragEventArgs e) + { + if (!e.Data.GetDataPresent(DataFormats.FileDrop)) return; + e.Effect = DragDropEffects.Copy; + LbSpeciesValuesExtractor.BackColor = Color.LightGreen; + } + + private void LbSpeciesValuesExtractor_DragLeave(object sender, EventArgs e) + { + LbSpeciesValuesExtractor.BackColor = Color.White; + } + + private void LbSpeciesValuesExtractor_DragDrop(object sender, DragEventArgs e) + { + LbSpeciesValuesExtractor.BackColor = Color.White; + if (!(e.Data.GetData(DataFormats.FileDrop) is string[] files && files.Any())) + return; + ExtractSpeciesValuesFromExportFiles(files); + } + + private void ExtractSpeciesValuesFromExportFiles(string[] files) + { + // only export gun files are supported + var creatureFiles = new List(); + ExportGunServerFile serverMultipliersFile = null; + string lastError = null; + + foreach (var filePath in files) + { + var creature = ImportExportGun.LoadCreatureFile(filePath, out lastError, out _); + if (creature != null) + { + creatureFiles.Add(creature); + continue; + } + + var svMults = ImportExportGun.ReadServerMultipliers(filePath, out _); + if (svMults != null) + serverMultipliersFile = svMults; + } + + if (!creatureFiles.Any()) + { + MessageBoxes.ShowMessageBox("No creature files could be read"); + return; + } + + if (serverMultipliersFile != null) + SetServerMultipliers(serverMultipliersFile); + + var sm = new ServerMultipliers(true); + ImportExportGun.SetServerMultipliers(sm, serverMultipliersFile ?? GetServerMultipliers()); + + SpeciesStatsExtractor.ExtractStatValues(creatureFiles, sm, out var species, out var errorText); + SetSpecies(species); + + var extractionSuccessful = string.IsNullOrEmpty(errorText); + if (!extractionSuccessful) + { + SetMessageLabelText?.Invoke("Error while trying to determine the species stats." + Environment.NewLine + errorText, MessageBoxIcon.Error); + return; + } + + CopySpeciesStatsToClipboard(species.blueprintPath); + SetMessageLabelText?.Invoke( + "Extracted the species values and copied them to the clipboard. Note the TBHM and singleplayer is not supported and may lead to wrong values.", + MessageBoxIcon.Information); + } } } diff --git a/ARKBreedingStats/multiplierTesting/TaTmSolver.cs b/ARKBreedingStats/multiplierTesting/TaTmSolver.cs index f83bebc4..ec2c2231 100644 --- a/ARKBreedingStats/multiplierTesting/TaTmSolver.cs +++ b/ARKBreedingStats/multiplierTesting/TaTmSolver.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace ARKBreedingStats.multiplierTesting { @@ -15,53 +11,108 @@ internal class TaTmSolver // V = (B * ( 1 + Lw * Iw * IwM) * TBHM * (1 + IB * IBs * IBM) + Ta * TaM) * (1 + TE * Tm * TmM) * (1 + Ld * Id * IdM) // Assuming all values are known except the products Ta * TaM and Tm * TmM // this is the case for server multiplier determination or species multiplier determination - // Using variables a = B * ( 1 + Lw * Iw * IwM) * TBHM * (1 + IB * IBs * IBM), - // b = 1 + Ld * Id * IdM, - // ta = Ta * TaM, - // tm = Tm * TmM, - // W = V/b + // Using variables + // x = B * ( 1 + Lw * Iw * IwM) * (1 + IB * IBs * IBM), + // h = TBHM + // y = 1 + Ld * Id * IdM, + // a = Ta * TaM, + // m = Tm * TmM, + // W = V/y // the formula is - // W = (a + ta) * (1 + TE * tm) + // W = (x * h + a) * (1 + TE * m) + // for solver W = (x * h + a) * (1 + t * m), U = (x_2 * h + a) * (1 + t_2 * m), V = (x_3 * h + a) * (1 + t_3 * m) for a, m, h // f like first equation, s like second equation private double _fW; - private double _fA; + private double _fX; private double _fTe; + /// + /// Define first equation with distinct taming effectiveness. + /// + /// + /// + /// wild levels + /// increase per wild level of this species + /// increase per wild level server multiplier + /// tamed bonus health multiplier of species + /// imprinting bonus of creature + /// imprinting bonus species stat multiplier + /// imprinting bonus multiplier of server + /// taming effectiveness + /// domestic levels + /// increase per domestic level of species + /// increase per domestic level server multiplier public void SetFirstEquation(double statValue, double baseValue, double lw, double iw, double iwm, double tbhm, double ib, double ibs, double ibm, double te, double ld, double id, double idm) { - _fW = statValue / (1 + ld * id * idm); - _fA = baseValue * (1 + lw * iw * iwm) * tbhm * (1 + ib * ibs * ibm); - _fTe = te; + SetValues(statValue, baseValue, lw, iw, iwm, tbhm, ib, ibs, ibm, te, ld, id, idm, out _fW, out _fX, out _fTe); + } + + private void SetValues(double statValue, double baseValue, double lw, double iw, double iwm, double tbhm, + double ib, double ibs, double ibm, double te, double ld, double id, double idm, out double w, out double x, + out double teOut) + { + w = statValue / (1 + ld * id * idm); + x = baseValue * (1 + lw * iw * iwm) * tbhm * (1 + ib * ibs * ibm); + teOut = te; } /// /// Calculate the products of Ta * TaM and Tm * TmM with a second equation. /// Returns error text or null on success. /// + /// + /// + /// wild levels + /// increase per wild level of this species + /// increase per wild level server multiplier + /// tamed bonus health multiplier of species + /// imprinting bonus of creature + /// imprinting bonus species stat multiplier + /// imprinting bonus multiplier of server + /// taming effectiveness + /// domestic levels + /// increase per domestic level of species + /// increase per domestic level server multiplier + /// product of taming additive bonus of species and server multiplier + /// product of taming multiplicative bonus of species and server multiplier public string CalculateTaTm(double statValue, double baseValue, double lw, double iw, double iwm, double tbhm, double ib, double ibs, double ibm, double te, double ld, double id, double idm, out double taTaM, out double tmTmM) { - var sW = statValue / (1 + ld * id * idm); - var sA = baseValue * (1 + lw * iw * iwm) * tbhm * (1 + ib * ibs * ibm); - var sTe = te; + // TODO use three equations to also determine TBHM + SetValues(statValue, baseValue, lw, iw, iwm, tbhm, ib, ibs, ibm, te, ld, id, idm, out var sW, out var sX, out var sTe); taTaM = 0; tmTmM = 0; - if (_fTe == sTe) + if (Math.Abs(_fTe - sTe) < 0.005) { - return "Both TE values need to be different"; + return $"The taming effectiveness (TE) values need to be more different (given values are {_fTe:p} and {sTe:p})"; } var squareRootPart = Math.Sqrt( - Math.Pow(_fA * _fTe - _fA * sTe + sA * _fTe - sA * sTe - _fTe * sW + sTe * _fW, 2) - 4 * (_fTe - sTe) - * (_fA * sA * _fTe - _fA * sA * sTe - _fA * _fTe * sW + sA * sTe * _fW)); - var secondPart = -_fA * _fTe + _fA * sTe; - var thirdPart = -sA * _fTe + sA * sTe; - var dividend = _fTe * (-squareRootPart + _fA * _fTe - _fA * sTe - sA * _fTe + sA * sTe + _fTe * sW - sTe * _fW); + Math.Pow(_fX * _fTe - _fX * sTe + sX * _fTe - sX * sTe - _fTe * sW + sTe * _fW, 2) - 4 * (_fTe - sTe) + * (_fX * sX * _fTe - _fX * sX * sTe - _fX * _fTe * sW + sX * sTe * _fW)); + var secondPart = -_fX * _fTe + _fX * sTe; + var thirdPart = -sX * _fTe + sX * sTe; + var dividend = _fTe * (+squareRootPart + _fX * _fTe - _fX * sTe - sX * _fTe + sX * sTe + _fTe * sW - sTe * _fW); + var useSecondOption = dividend == 0; + + // there are multiple possible solutions. + // taTaM can be negative, assume tmTmM is always positive + // sometimes both options are possible, by a few tests the second option results in odd values unlikely to be correct, but this might be false + + if (!useSecondOption) + { + // first option + taTaM = (squareRootPart + secondPart + thirdPart + _fTe * sW - sTe * _fW) / (2 * (_fTe - sTe)); + tmTmM = (-squareRootPart + secondPart - thirdPart + 2 * _fTe * _fW - _fTe * sW - sTe * _fW) / dividend; + if (tmTmM >= 0) return null; // no error + } + // second option + dividend = _fTe * (-squareRootPart + _fX * _fTe - _fX * sTe - sX * _fTe + sX * sTe + _fTe * sW - sTe * _fW); if (dividend == 0) { return "div by 0 error"; @@ -70,7 +121,7 @@ public string CalculateTaTm(double statValue, double baseValue, double lw, doubl taTaM = (-squareRootPart + secondPart + thirdPart + _fTe * sW - sTe * _fW) / (2 * (_fTe - sTe)); tmTmM = (squareRootPart + secondPart - thirdPart + 2 * _fTe * _fW - _fTe * sW - sTe * _fW) / dividend; - return null; + return null; // no error } } } diff --git a/ARKBreedingStats/settings/Settings.cs b/ARKBreedingStats/settings/Settings.cs index f88bb355..df33ac36 100644 --- a/ARKBreedingStats/settings/Settings.cs +++ b/ARKBreedingStats/settings/Settings.cs @@ -500,13 +500,13 @@ private void SaveSettings() } } - if (_cc.serverMultipliers.statMultipliers[Stats.Torpidity][Stats.IndexLevelWild] != 1) + if (_cc.serverMultipliers.statMultipliers[Stats.Torpidity][ServerMultipliers.IndexLevelWild] != 1) { // Torpidity is handled differently by the game, IwM has no effect. Set IwM to 1. // See https://github.com/cadon/ARKStatsExtractor/issues/942 for more infos about this. MessageBoxes.ShowMessageBox("The increase per wild level of torpidity setting (PerLevelStatsMultiplier_DinoWild[2]) is ignored by ARK, only the value 1 is used for that setting.\nA different value was entered for that setting.\nSmart Breeding will reset this value to 1, since the game also uses that value, regardless what is entered in the server settings. This is done to prevent extraction issues.", "Torpidity multiplier reset"); - _cc.serverMultipliers.statMultipliers[Stats.Torpidity][Stats.IndexLevelWild] = 1; + _cc.serverMultipliers.statMultipliers[Stats.Torpidity][ServerMultipliers.IndexLevelWild] = 1; } _cc.serverMultipliers.SinglePlayerSettings = cbSingleplayerSettings.Checked; @@ -857,10 +857,10 @@ private void ExtractSettingsFromText(string text, bool doMergeSettings = false) for (int s = 0; s < Stats.StatsCount; s++) { - ParseAndSetStatMultiplier(Stats.IndexTamingAdd, @"PerLevelStatsMultiplier_DinoTamed_Add\[" + s + @"\] ?= ?(\d*\.?\d+)"); - ParseAndSetStatMultiplier(Stats.IndexTamingMult, @"PerLevelStatsMultiplier_DinoTamed_Affinity\[" + s + @"\] ?= ?(\d*\.?\d+)"); - ParseAndSetStatMultiplier(Stats.IndexLevelDom, @"PerLevelStatsMultiplier_DinoTamed\[" + s + @"\] ?= ?(\d*\.?\d+)"); - ParseAndSetStatMultiplier(Stats.IndexLevelWild, @"PerLevelStatsMultiplier_DinoWild\[" + s + @"\] ?= ?(\d*\.?\d+)"); + ParseAndSetStatMultiplier(ServerMultipliers.IndexTamingAdd, @"PerLevelStatsMultiplier_DinoTamed_Add\[" + s + @"\] ?= ?(\d*\.?\d+)"); + ParseAndSetStatMultiplier(ServerMultipliers.IndexTamingMult, @"PerLevelStatsMultiplier_DinoTamed_Affinity\[" + s + @"\] ?= ?(\d*\.?\d+)"); + ParseAndSetStatMultiplier(ServerMultipliers.IndexLevelDom, @"PerLevelStatsMultiplier_DinoTamed\[" + s + @"\] ?= ?(\d*\.?\d+)"); + ParseAndSetStatMultiplier(ServerMultipliers.IndexLevelWild, @"PerLevelStatsMultiplier_DinoWild\[" + s + @"\] ?= ?(\d*\.?\d+)"); void ParseAndSetStatMultiplier(int multiplierIndex, string regexPattern) { @@ -874,7 +874,7 @@ void ParseAndSetStatMultiplier(int multiplierIndex, string regexPattern) } // some server files have a different value for wild level torpor increase, but ARK ignores that value. // reset that value, so no error message pops up, so user is not confused. Error message only on manual input - _multSetter[Stats.Torpidity].SetMultiplier(Stats.IndexLevelWild, 1); + _multSetter[Stats.Torpidity].SetMultiplier(ServerMultipliers.IndexLevelWild, 1); // breeding ParseAndSetValue(nudMatingInterval, @"MatingIntervalMultiplier ?= ?(\d*\.?\d+)"); @@ -1026,14 +1026,14 @@ private void LoadServerMultipliersFromSavFile(string filePath) const int roundToDigits = 6; for (int s = 0; s < Stats.StatsCount; s++) { - _multSetter[s].SetMultiplier(Stats.IndexTamingAdd, Math.Round(esm.TameAdd[s], roundToDigits)); - _multSetter[s].SetMultiplier(Stats.IndexTamingMult, Math.Round(esm.TameAff[s], roundToDigits)); - _multSetter[s].SetMultiplier(Stats.IndexLevelDom, Math.Round(esm.TameLevel[s], roundToDigits)); - _multSetter[s].SetMultiplier(Stats.IndexLevelWild, Math.Round(esm.WildLevel[s], roundToDigits)); + _multSetter[s].SetMultiplier(ServerMultipliers.IndexTamingAdd, Math.Round(esm.TameAdd[s], roundToDigits)); + _multSetter[s].SetMultiplier(ServerMultipliers.IndexTamingMult, Math.Round(esm.TameAff[s], roundToDigits)); + _multSetter[s].SetMultiplier(ServerMultipliers.IndexLevelDom, Math.Round(esm.TameLevel[s], roundToDigits)); + _multSetter[s].SetMultiplier(ServerMultipliers.IndexLevelWild, Math.Round(esm.WildLevel[s], roundToDigits)); } // some server files have a different value for wild level torpor increase, but ARK ignores that value. // reset that value, so no error message pops up, so user is not confused. Error message only on manual input - _multSetter[Stats.Torpidity].SetMultiplier(Stats.IndexLevelWild, 1); + _multSetter[Stats.Torpidity].SetMultiplier(ServerMultipliers.IndexLevelWild, 1); nudMaxWildLevels.ValueSaveDouble = Math.Ceiling(esm.MaxWildLevel); nudWildLevelStep.ValueSaveDouble = Math.Round(esm.WildLevelStepSize, roundToDigits); diff --git a/ARKBreedingStats/species/Species.cs b/ARKBreedingStats/species/Species.cs index 47051e22..d7c78d1f 100644 --- a/ARKBreedingStats/species/Species.cs +++ b/ARKBreedingStats/species/Species.cs @@ -38,6 +38,7 @@ public class Species public string blueprintPath; /// /// The raw stat values without multipliers. + /// For each stat there is 0: baseValue, 1: incPerWildLevel, 2: incPerDomLevel, 3: addBonus, 4: multBonus. /// [JsonProperty] public double[][] fullStatsRaw; @@ -147,7 +148,9 @@ public class Species /// creates properties that are not created during deserialization. They are set later with the raw-values with the multipliers applied. /// [OnDeserialized] - private void Initialize(StreamingContext _) + private void Initialize(StreamingContext _) => Initialize(); + + public void Initialize() { // TODO: Base species are maybe not used in game and may only lead to confusion (e.g. Giganotosaurus). @@ -186,7 +189,7 @@ private void Initialize(StreamingContext _) if (fullStatsRaw[s].Length > i) { completeRaws[s][i] = fullStatsRaw[s]?[i] ?? 0; - if (i == 0 && fullStatsRaw[s][0] > 0) + if (i == 0 && fullStatsRaw[s][StatsRawIndexBase] > 0) { usesStat = true; } @@ -200,7 +203,7 @@ private void Initialize(StreamingContext _) _skipWildLevelStatsWithServerSettings |= statBit; } - if (fullStatsRawLength != -0) + if (fullStatsRawLength != 0) fullStatsRaw = completeRaws; if (colors?.Length == 0) @@ -447,5 +450,30 @@ public void LoadOverrides(Species overrides) Initialize(new StreamingContext()); } + + /// + /// Index of the base value in fullStatsRaw. + /// + public const int StatsRawIndexBase = 0; + + /// + /// Index of the increase per wild level value in fullStatsRaw. + /// + public const int StatsRawIndexIncPerWildLevel = 1; + + /// + /// Index of the increase per dom level value in fullStatsRaw. + /// + public const int StatsRawIndexIncPerDomLevel = 2; + + /// + /// Index of the additive bonus value in fullStatsRaw. + /// + public const int StatsRawIndexAdditiveBonus = 3; + + /// + /// Index of the multiplicative bonus value in fullStatsRaw. + /// + public const int StatsRawIndexMultiplicativeBonus = 4; } } diff --git a/ARKBreedingStats/values/ServerMultipliers.cs b/ARKBreedingStats/values/ServerMultipliers.cs index 01cf7372..38091b98 100644 --- a/ARKBreedingStats/values/ServerMultipliers.cs +++ b/ARKBreedingStats/values/ServerMultipliers.cs @@ -76,6 +76,16 @@ private void DefineNullValues(StreamingContext _) } } + public ServerMultipliers() { } + + public ServerMultipliers(bool withStatMultipliersObject) + { + if (!withStatMultipliersObject) return; + statMultipliers = new double[Stats.StatsCount][]; + for (int s = 0; s < Stats.StatsCount; s++) + statMultipliers[s] = new double[4]; + } + /// /// Returns a copy of the server multipliers /// @@ -131,5 +141,22 @@ public void FixZeroValues() if (BabyCuddleIntervalMultiplier == 0) BabyCuddleIntervalMultiplier = 1; if (BabyImprintAmountMultiplier == 0) BabyImprintAmountMultiplier = 1; } + + /// + /// Index of additive taming multiplier in stat multipliers. + /// + public const int IndexTamingAdd = 0; + /// + /// Index of multiplicative taming multiplier in stat multipliers. + /// + public const int IndexTamingMult = 1; + /// + /// Index of domesticated level multiplier in stat multipliers. + /// + public const int IndexLevelDom = 2; + /// + /// Index of wild level multiplier in stat multipliers. + /// + public const int IndexLevelWild = 3; } } diff --git a/ARKBreedingStats/values/Values.cs b/ARKBreedingStats/values/Values.cs index 6cb0058e..3bb0e6c3 100644 --- a/ARKBreedingStats/values/Values.cs +++ b/ARKBreedingStats/values/Values.cs @@ -526,26 +526,26 @@ public void ApplyMultipliers(CreatureCollection cc, bool eventMultipliers = fals bool customOverrideForThisStatExists = customOverrideExists && customFullStatsRaw[s] != null; - sp.stats[s].BaseValue = GetRawStatValue(s, 0, customOverrideForThisStatExists); + sp.stats[s].BaseValue = GetRawStatValue(s, Species.StatsRawIndexBase, customOverrideForThisStatExists); // don't apply the multiplier if AddWhenTamed is negative (e.g. Giganotosaurus, Griffin) - double addWhenTamed = GetRawStatValue(s, 3, customOverrideForThisStatExists); + double addWhenTamed = GetRawStatValue(s, Species.StatsRawIndexAdditiveBonus, customOverrideForThisStatExists); sp.stats[s].AddWhenTamed = addWhenTamed * (addWhenTamed > 0 ? statMultipliers[0] : 1); // don't apply the multiplier if MultAffinity is negative (e.g. Aberration variants) - double multAffinity = GetRawStatValue(s, 4, customOverrideForThisStatExists); + double multAffinity = GetRawStatValue(s, Species.StatsRawIndexMultiplicativeBonus, customOverrideForThisStatExists); sp.stats[s].MultAffinity = multAffinity * (multAffinity > 0 ? statMultipliers[1] : 1); if (useSpeedLevelup || s != Stats.SpeedMultiplier) { - sp.stats[s].IncPerTamedLevel = GetRawStatValue(s, 2, customOverrideForThisStatExists) * statMultipliers[2]; + sp.stats[s].IncPerTamedLevel = GetRawStatValue(s, Species.StatsRawIndexIncPerDomLevel, customOverrideForThisStatExists) * statMultipliers[2]; } else { sp.stats[s].IncPerTamedLevel = 0; } - sp.stats[s].IncPerWildLevel = GetRawStatValue(s, 1, customOverrideForThisStatExists) * statMultipliers[3]; + sp.stats[s].IncPerWildLevel = GetRawStatValue(s, Species.StatsRawIndexIncPerWildLevel, customOverrideForThisStatExists) * statMultipliers[3]; sp.stats[s].IncPerMutatedLevel = sp.stats[s].IncPerWildLevel; // todo consider adjustments if they're implemented // set troodonism values @@ -568,23 +568,23 @@ public void ApplyMultipliers(CreatureCollection cc, bool eventMultipliers = fals continue; // don't apply the multiplier if AddWhenTamed is negative (e.g. Giganotosaurus, Griffin) - sp.stats[s].AddWhenTamed *= sp.stats[s].AddWhenTamed > 0 ? singlePlayerServerMultipliers.statMultipliers[s][Stats.IndexTamingAdd] : 1; + sp.stats[s].AddWhenTamed *= sp.stats[s].AddWhenTamed > 0 ? singlePlayerServerMultipliers.statMultipliers[s][ServerMultipliers.IndexTamingAdd] : 1; // don't apply the multiplier if MultAffinity is negative (e.g. Aberration variants) - sp.stats[s].MultAffinity *= sp.stats[s].MultAffinity > 0 ? singlePlayerServerMultipliers.statMultipliers[s][Stats.IndexTamingMult] : 1; - sp.stats[s].IncPerTamedLevel *= singlePlayerServerMultipliers.statMultipliers[s][Stats.IndexLevelDom]; - sp.stats[s].IncPerWildLevel *= singlePlayerServerMultipliers.statMultipliers[s][Stats.IndexLevelWild]; + sp.stats[s].MultAffinity *= sp.stats[s].MultAffinity > 0 ? singlePlayerServerMultipliers.statMultipliers[s][ServerMultipliers.IndexTamingMult] : 1; + sp.stats[s].IncPerTamedLevel *= singlePlayerServerMultipliers.statMultipliers[s][ServerMultipliers.IndexLevelDom]; + sp.stats[s].IncPerWildLevel *= singlePlayerServerMultipliers.statMultipliers[s][ServerMultipliers.IndexLevelWild]; // troodonism values if (sp.altStats?[s] != null) { sp.altStats[s].AddWhenTamed *= sp.altStats[s].AddWhenTamed > 0 - ? singlePlayerServerMultipliers.statMultipliers[s][Stats.IndexTamingAdd] + ? singlePlayerServerMultipliers.statMultipliers[s][ServerMultipliers.IndexTamingAdd] : 1; sp.altStats[s].MultAffinity *= sp.altStats[s].MultAffinity > 0 - ? singlePlayerServerMultipliers.statMultipliers[s][Stats.IndexTamingMult] + ? singlePlayerServerMultipliers.statMultipliers[s][ServerMultipliers.IndexTamingMult] : 1; - sp.altStats[s].IncPerTamedLevel *= singlePlayerServerMultipliers.statMultipliers[s][Stats.IndexLevelDom]; - sp.altStats[s].IncPerWildLevel *= singlePlayerServerMultipliers.statMultipliers[s][Stats.IndexLevelWild]; + sp.altStats[s].IncPerTamedLevel *= singlePlayerServerMultipliers.statMultipliers[s][ServerMultipliers.IndexLevelDom]; + sp.altStats[s].IncPerWildLevel *= singlePlayerServerMultipliers.statMultipliers[s][ServerMultipliers.IndexLevelWild]; } double GetRawStatValue(int statIndex, int statValueTypeIndex, bool customOverride) From b322500e63cefe60d9fd6d352ab9a20eeeadbb73 Mon Sep 17 00:00:00 2001 From: cadon Date: Thu, 23 May 2024 18:39:17 +0200 Subject: [PATCH 02/36] libraryInfo added amount of colors available in all regions --- ARKBreedingStats/uiControls/LibraryInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ARKBreedingStats/uiControls/LibraryInfo.cs b/ARKBreedingStats/uiControls/LibraryInfo.cs index 8ea22dc3..343cbf70 100644 --- a/ARKBreedingStats/uiControls/LibraryInfo.cs +++ b/ARKBreedingStats/uiControls/LibraryInfo.cs @@ -171,14 +171,14 @@ void AddParagraph(string text, string suffixForPlainText = null, bool bold = fal if (!speciesUsesAllRegions && ColorsExistInAllUsedRegions.Any()) { AddParagraph($"These colors exist in all regions the {_infoForSpecies.name} uses ({regionsUsedList})", bold: true, relativeFontSize: 1.1f); - AddParagraph("(not necessarily in one creature combined)"); + AddParagraph($"{ColorsExistInAllUsedRegions.Count} colors (each color not necessarily in one creature combined)"); AddParagraph(CreateNumberRanges(ColorsExistInAllUsedRegions)); } if (ColorsExistInAllRegions.Any()) { AddParagraph("These colors exist in all regions", bold: true, relativeFontSize: 1.1f); - AddParagraph("(not necessarily in one creature combined)"); + AddParagraph($"{ColorsExistInAllRegions.Count} colors (each color not necessarily in one creature combined)"); AddParagraph(CreateNumberRanges(ColorsExistInAllRegions)); } From a7f5130ef87ad493f6649b50ef77ec9fe72eb91a Mon Sep 17 00:00:00 2001 From: cadon Date: Thu, 23 May 2024 18:55:08 +0200 Subject: [PATCH 03/36] indicator of stored TE in TaTm solver --- .../StatMultiplierTestingControl.Designer.cs | 380 +++++++++--------- .../StatMultiplierTestingControl.cs | 2 + 2 files changed, 198 insertions(+), 184 deletions(-) diff --git a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs index ca23ffa4..b01676c1 100644 --- a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs +++ b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs @@ -46,6 +46,9 @@ private void InitializeComponent() this.calculateTEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.calculateIBToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.calculateIBMToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); + this.calculateIwToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.calculateIdToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.setWildLevelToClosestValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.setDomLevelToClosestValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -65,19 +68,6 @@ private void InitializeComponent() this.btCalculateDomLevel = new System.Windows.Forms.Button(); this.btResetIdM = new System.Windows.Forms.Button(); this.btCalculateIdM = new System.Windows.Forms.Button(); - this.nudIdM = new ARKBreedingStats.uiControls.Nud(); - this.nudId = new ARKBreedingStats.uiControls.Nud(); - this.nudTmM = new ARKBreedingStats.uiControls.Nud(); - this.nudTm = new ARKBreedingStats.uiControls.Nud(); - this.nudIwM = new ARKBreedingStats.uiControls.Nud(); - this.nudTaM = new ARKBreedingStats.uiControls.Nud(); - this.nudTa = new ARKBreedingStats.uiControls.Nud(); - this.nudTBHM = new ARKBreedingStats.uiControls.Nud(); - this.nudIw = new ARKBreedingStats.uiControls.Nud(); - this.nudB = new ARKBreedingStats.uiControls.Nud(); - this.nudStatValue = new ARKBreedingStats.uiControls.Nud(); - this.nudLd = new ARKBreedingStats.uiControls.Nud(); - this.nudLw = new ARKBreedingStats.uiControls.Nud(); this.panel1 = new System.Windows.Forms.Panel(); this.btCalculateTE = new System.Windows.Forms.Button(); this.btCalculateIB = new System.Windows.Forms.Button(); @@ -91,10 +81,22 @@ private void InitializeComponent() this.BtSolveTaTm = new System.Windows.Forms.Button(); this.BtSolveTaMTmM = new System.Windows.Forms.Button(); this.BtStoreTaTm = new System.Windows.Forms.Button(); - this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); - this.calculateIwToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.calculateIdToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.LbTaTmTeStored = new System.Windows.Forms.Label(); + this.nudIdM = new ARKBreedingStats.uiControls.Nud(); + this.nudId = new ARKBreedingStats.uiControls.Nud(); + this.nudTmM = new ARKBreedingStats.uiControls.Nud(); + this.nudTm = new ARKBreedingStats.uiControls.Nud(); + this.nudIwM = new ARKBreedingStats.uiControls.Nud(); + this.nudTaM = new ARKBreedingStats.uiControls.Nud(); + this.nudTa = new ARKBreedingStats.uiControls.Nud(); + this.nudTBHM = new ARKBreedingStats.uiControls.Nud(); + this.nudIw = new ARKBreedingStats.uiControls.Nud(); + this.nudB = new ARKBreedingStats.uiControls.Nud(); + this.nudStatValue = new ARKBreedingStats.uiControls.Nud(); + this.nudLd = new ARKBreedingStats.uiControls.Nud(); + this.nudLw = new ARKBreedingStats.uiControls.Nud(); this.contextMenuStrip1.SuspendLayout(); + this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudIdM)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudId)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudTmM)).BeginInit(); @@ -108,7 +110,6 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.nudStatValue)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudLd)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudLw)).BeginInit(); - this.groupBox1.SuspendLayout(); this.SuspendLayout(); // // tbVw @@ -212,7 +213,7 @@ private void InitializeComponent() this.resetIdMToolStripMenuItem, this.resetAllMultiplierOfThisStatToolStripMenuItem}); this.contextMenuStrip1.Name = "contextMenuStrip1"; - this.contextMenuStrip1.Size = new System.Drawing.Size(231, 402); + this.contextMenuStrip1.Size = new System.Drawing.Size(231, 380); // // calculateIwMToolStripMenuItem // @@ -268,6 +269,25 @@ private void InitializeComponent() this.calculateIBMToolStripMenuItem.Text = "Calculate IBM"; this.calculateIBMToolStripMenuItem.Click += new System.EventHandler(this.calculateIBMToolStripMenuItem_Click); // + // toolStripSeparator4 + // + this.toolStripSeparator4.Name = "toolStripSeparator4"; + this.toolStripSeparator4.Size = new System.Drawing.Size(227, 6); + // + // calculateIwToolStripMenuItem + // + this.calculateIwToolStripMenuItem.Name = "calculateIwToolStripMenuItem"; + this.calculateIwToolStripMenuItem.Size = new System.Drawing.Size(230, 22); + this.calculateIwToolStripMenuItem.Text = "Calculate Iw"; + this.calculateIwToolStripMenuItem.Click += new System.EventHandler(this.calculateIwToolStripMenuItem_Click); + // + // calculateIdToolStripMenuItem + // + this.calculateIdToolStripMenuItem.Name = "calculateIdToolStripMenuItem"; + this.calculateIdToolStripMenuItem.Size = new System.Drawing.Size(230, 22); + this.calculateIdToolStripMenuItem.Text = "Calculate Id"; + this.calculateIdToolStripMenuItem.Click += new System.EventHandler(this.calculateIdToolStripMenuItem_Click); + // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; @@ -447,6 +467,161 @@ private void InitializeComponent() this.btCalculateIdM.UseVisualStyleBackColor = true; this.btCalculateIdM.Click += new System.EventHandler(this.btCalculateIdM_Click); // + // panel1 + // + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Location = new System.Drawing.Point(0, 73); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(1053, 2); + this.panel1.TabIndex = 32; + // + // btCalculateTE + // + this.btCalculateTE.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btCalculateTE.Location = new System.Drawing.Point(897, 26); + this.btCalculateTE.Margin = new System.Windows.Forms.Padding(0); + this.btCalculateTE.Name = "btCalculateTE"; + this.btCalculateTE.Size = new System.Drawing.Size(41, 20); + this.btCalculateTE.TabIndex = 33; + this.btCalculateTE.Text = "TE"; + this.btCalculateTE.UseVisualStyleBackColor = true; + this.btCalculateTE.Click += new System.EventHandler(this.btCalculateTE_Click); + // + // btCalculateIB + // + this.btCalculateIB.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btCalculateIB.Location = new System.Drawing.Point(938, 26); + this.btCalculateIB.Margin = new System.Windows.Forms.Padding(0); + this.btCalculateIB.Name = "btCalculateIB"; + this.btCalculateIB.Size = new System.Drawing.Size(41, 20); + this.btCalculateIB.TabIndex = 34; + this.btCalculateIB.Text = "IB"; + this.btCalculateIB.UseVisualStyleBackColor = true; + this.btCalculateIB.Click += new System.EventHandler(this.btCalculateIB_Click); + // + // btCalculateIBM + // + this.btCalculateIBM.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btCalculateIBM.Location = new System.Drawing.Point(979, 26); + this.btCalculateIBM.Margin = new System.Windows.Forms.Padding(0); + this.btCalculateIBM.Name = "btCalculateIBM"; + this.btCalculateIBM.Size = new System.Drawing.Size(41, 20); + this.btCalculateIBM.TabIndex = 35; + this.btCalculateIBM.Text = "IBM"; + this.btCalculateIBM.UseVisualStyleBackColor = true; + this.btCalculateIBM.Click += new System.EventHandler(this.btCalculateIBM_Click); + // + // CbTrodB + // + this.CbTrodB.AutoSize = true; + this.CbTrodB.BackColor = System.Drawing.Color.LightPink; + this.CbTrodB.Location = new System.Drawing.Point(80, 28); + this.CbTrodB.Name = "CbTrodB"; + this.CbTrodB.Size = new System.Drawing.Size(58, 17); + this.CbTrodB.TabIndex = 36; + this.CbTrodB.Text = "Trod B"; + this.CbTrodB.UseVisualStyleBackColor = false; + this.CbTrodB.CheckedChanged += new System.EventHandler(this.CbTrodB_CheckedChanged); + // + // CbTrodIw + // + this.CbTrodIw.AutoSize = true; + this.CbTrodIw.BackColor = System.Drawing.Color.LightPink; + this.CbTrodIw.Location = new System.Drawing.Point(243, 28); + this.CbTrodIw.Name = "CbTrodIw"; + this.CbTrodIw.Size = new System.Drawing.Size(62, 17); + this.CbTrodIw.TabIndex = 37; + this.CbTrodIw.Text = "Trod Iw"; + this.CbTrodIw.UseVisualStyleBackColor = false; + this.CbTrodIw.CheckedChanged += new System.EventHandler(this.CbTrodIw_CheckedChanged); + // + // CbTrodTa + // + this.CbTrodTa.AutoSize = true; + this.CbTrodTa.BackColor = System.Drawing.Color.LightPink; + this.CbTrodTa.Location = new System.Drawing.Point(435, 28); + this.CbTrodTa.Name = "CbTrodTa"; + this.CbTrodTa.Size = new System.Drawing.Size(64, 17); + this.CbTrodTa.TabIndex = 38; + this.CbTrodTa.Text = "Trod Ta"; + this.CbTrodTa.UseVisualStyleBackColor = false; + this.CbTrodTa.CheckedChanged += new System.EventHandler(this.CbTrodTa_CheckedChanged); + // + // CbTrodTm + // + this.CbTrodTm.AutoSize = true; + this.CbTrodTm.BackColor = System.Drawing.Color.LightPink; + this.CbTrodTm.Location = new System.Drawing.Point(563, 28); + this.CbTrodTm.Name = "CbTrodTm"; + this.CbTrodTm.Size = new System.Drawing.Size(66, 17); + this.CbTrodTm.TabIndex = 39; + this.CbTrodTm.Text = "Trod Tm"; + this.CbTrodTm.UseVisualStyleBackColor = false; + this.CbTrodTm.CheckedChanged += new System.EventHandler(this.CbTrodTm_CheckedChanged); + // + // CbTrodId + // + this.CbTrodId.AutoSize = true; + this.CbTrodId.BackColor = System.Drawing.Color.LightPink; + this.CbTrodId.Location = new System.Drawing.Point(749, 28); + this.CbTrodId.Name = "CbTrodId"; + this.CbTrodId.Size = new System.Drawing.Size(60, 17); + this.CbTrodId.TabIndex = 40; + this.CbTrodId.Text = "Trod Id"; + this.CbTrodId.UseVisualStyleBackColor = false; + this.CbTrodId.CheckedChanged += new System.EventHandler(this.CbTrodId_CheckedChanged); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.LbTaTmTeStored); + this.groupBox1.Controls.Add(this.BtSolveTaTm); + this.groupBox1.Controls.Add(this.BtSolveTaMTmM); + this.groupBox1.Controls.Add(this.BtStoreTaTm); + this.groupBox1.Location = new System.Drawing.Point(1059, 3); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(126, 69); + this.groupBox1.TabIndex = 41; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Ta-Tm-Solver"; + // + // BtSolveTaTm + // + this.BtSolveTaTm.Location = new System.Drawing.Point(62, 43); + this.BtSolveTaTm.Name = "BtSolveTaTm"; + this.BtSolveTaTm.Size = new System.Drawing.Size(58, 23); + this.BtSolveTaTm.TabIndex = 2; + this.BtSolveTaTm.Text = "Species"; + this.BtSolveTaTm.UseVisualStyleBackColor = true; + this.BtSolveTaTm.Click += new System.EventHandler(this.BtSolveTaTm_Click); + // + // BtSolveTaMTmM + // + this.BtSolveTaMTmM.Location = new System.Drawing.Point(6, 43); + this.BtSolveTaMTmM.Name = "BtSolveTaMTmM"; + this.BtSolveTaMTmM.Size = new System.Drawing.Size(50, 23); + this.BtSolveTaMTmM.TabIndex = 1; + this.BtSolveTaMTmM.Text = "Server"; + this.BtSolveTaMTmM.UseVisualStyleBackColor = true; + this.BtSolveTaMTmM.Click += new System.EventHandler(this.BtSolveTaMTmM_Click); + // + // BtStoreTaTm + // + this.BtStoreTaTm.Location = new System.Drawing.Point(6, 19); + this.BtStoreTaTm.Name = "BtStoreTaTm"; + this.BtStoreTaTm.Size = new System.Drawing.Size(60, 23); + this.BtStoreTaTm.TabIndex = 0; + this.BtStoreTaTm.Text = "Store 1st"; + this.BtStoreTaTm.UseVisualStyleBackColor = true; + this.BtStoreTaTm.Click += new System.EventHandler(this.BtStoreTaTm_Click); + // + // LbTaTmTeStored + // + this.LbTaTmTeStored.AutoSize = true; + this.LbTaTmTeStored.Location = new System.Drawing.Point(68, 26); + this.LbTaTmTeStored.Name = "LbTaTmTeStored"; + this.LbTaTmTeStored.Size = new System.Drawing.Size(0, 13); + this.LbTaTmTeStored.TabIndex = 3; + // // nudIdM // this.nudIdM.DecimalPlaces = 4; @@ -782,171 +957,6 @@ private void InitializeComponent() this.nudLw.TabIndex = 1; this.nudLw.ValueChanged += new System.EventHandler(this.nudLw_ValueChanged); // - // panel1 - // - this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel1.Location = new System.Drawing.Point(0, 73); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(1053, 2); - this.panel1.TabIndex = 32; - // - // btCalculateTE - // - this.btCalculateTE.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btCalculateTE.Location = new System.Drawing.Point(897, 26); - this.btCalculateTE.Margin = new System.Windows.Forms.Padding(0); - this.btCalculateTE.Name = "btCalculateTE"; - this.btCalculateTE.Size = new System.Drawing.Size(41, 20); - this.btCalculateTE.TabIndex = 33; - this.btCalculateTE.Text = "TE"; - this.btCalculateTE.UseVisualStyleBackColor = true; - this.btCalculateTE.Click += new System.EventHandler(this.btCalculateTE_Click); - // - // btCalculateIB - // - this.btCalculateIB.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btCalculateIB.Location = new System.Drawing.Point(938, 26); - this.btCalculateIB.Margin = new System.Windows.Forms.Padding(0); - this.btCalculateIB.Name = "btCalculateIB"; - this.btCalculateIB.Size = new System.Drawing.Size(41, 20); - this.btCalculateIB.TabIndex = 34; - this.btCalculateIB.Text = "IB"; - this.btCalculateIB.UseVisualStyleBackColor = true; - this.btCalculateIB.Click += new System.EventHandler(this.btCalculateIB_Click); - // - // btCalculateIBM - // - this.btCalculateIBM.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btCalculateIBM.Location = new System.Drawing.Point(979, 26); - this.btCalculateIBM.Margin = new System.Windows.Forms.Padding(0); - this.btCalculateIBM.Name = "btCalculateIBM"; - this.btCalculateIBM.Size = new System.Drawing.Size(41, 20); - this.btCalculateIBM.TabIndex = 35; - this.btCalculateIBM.Text = "IBM"; - this.btCalculateIBM.UseVisualStyleBackColor = true; - this.btCalculateIBM.Click += new System.EventHandler(this.btCalculateIBM_Click); - // - // CbTrodB - // - this.CbTrodB.AutoSize = true; - this.CbTrodB.BackColor = System.Drawing.Color.LightPink; - this.CbTrodB.Location = new System.Drawing.Point(80, 28); - this.CbTrodB.Name = "CbTrodB"; - this.CbTrodB.Size = new System.Drawing.Size(58, 17); - this.CbTrodB.TabIndex = 36; - this.CbTrodB.Text = "Trod B"; - this.CbTrodB.UseVisualStyleBackColor = false; - this.CbTrodB.CheckedChanged += new System.EventHandler(this.CbTrodB_CheckedChanged); - // - // CbTrodIw - // - this.CbTrodIw.AutoSize = true; - this.CbTrodIw.BackColor = System.Drawing.Color.LightPink; - this.CbTrodIw.Location = new System.Drawing.Point(243, 28); - this.CbTrodIw.Name = "CbTrodIw"; - this.CbTrodIw.Size = new System.Drawing.Size(62, 17); - this.CbTrodIw.TabIndex = 37; - this.CbTrodIw.Text = "Trod Iw"; - this.CbTrodIw.UseVisualStyleBackColor = false; - this.CbTrodIw.CheckedChanged += new System.EventHandler(this.CbTrodIw_CheckedChanged); - // - // CbTrodTa - // - this.CbTrodTa.AutoSize = true; - this.CbTrodTa.BackColor = System.Drawing.Color.LightPink; - this.CbTrodTa.Location = new System.Drawing.Point(435, 28); - this.CbTrodTa.Name = "CbTrodTa"; - this.CbTrodTa.Size = new System.Drawing.Size(64, 17); - this.CbTrodTa.TabIndex = 38; - this.CbTrodTa.Text = "Trod Ta"; - this.CbTrodTa.UseVisualStyleBackColor = false; - this.CbTrodTa.CheckedChanged += new System.EventHandler(this.CbTrodTa_CheckedChanged); - // - // CbTrodTm - // - this.CbTrodTm.AutoSize = true; - this.CbTrodTm.BackColor = System.Drawing.Color.LightPink; - this.CbTrodTm.Location = new System.Drawing.Point(563, 28); - this.CbTrodTm.Name = "CbTrodTm"; - this.CbTrodTm.Size = new System.Drawing.Size(66, 17); - this.CbTrodTm.TabIndex = 39; - this.CbTrodTm.Text = "Trod Tm"; - this.CbTrodTm.UseVisualStyleBackColor = false; - this.CbTrodTm.CheckedChanged += new System.EventHandler(this.CbTrodTm_CheckedChanged); - // - // CbTrodId - // - this.CbTrodId.AutoSize = true; - this.CbTrodId.BackColor = System.Drawing.Color.LightPink; - this.CbTrodId.Location = new System.Drawing.Point(749, 28); - this.CbTrodId.Name = "CbTrodId"; - this.CbTrodId.Size = new System.Drawing.Size(60, 17); - this.CbTrodId.TabIndex = 40; - this.CbTrodId.Text = "Trod Id"; - this.CbTrodId.UseVisualStyleBackColor = false; - this.CbTrodId.CheckedChanged += new System.EventHandler(this.CbTrodId_CheckedChanged); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.BtSolveTaTm); - this.groupBox1.Controls.Add(this.BtSolveTaMTmM); - this.groupBox1.Controls.Add(this.BtStoreTaTm); - this.groupBox1.Location = new System.Drawing.Point(1059, 3); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(126, 69); - this.groupBox1.TabIndex = 41; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Ta-Tm-Solver"; - // - // BtSolveTaTm - // - this.BtSolveTaTm.Location = new System.Drawing.Point(62, 43); - this.BtSolveTaTm.Name = "BtSolveTaTm"; - this.BtSolveTaTm.Size = new System.Drawing.Size(58, 23); - this.BtSolveTaTm.TabIndex = 2; - this.BtSolveTaTm.Text = "Species"; - this.BtSolveTaTm.UseVisualStyleBackColor = true; - this.BtSolveTaTm.Click += new System.EventHandler(this.BtSolveTaTm_Click); - // - // BtSolveTaMTmM - // - this.BtSolveTaMTmM.Location = new System.Drawing.Point(6, 43); - this.BtSolveTaMTmM.Name = "BtSolveTaMTmM"; - this.BtSolveTaMTmM.Size = new System.Drawing.Size(50, 23); - this.BtSolveTaMTmM.TabIndex = 1; - this.BtSolveTaMTmM.Text = "Server"; - this.BtSolveTaMTmM.UseVisualStyleBackColor = true; - this.BtSolveTaMTmM.Click += new System.EventHandler(this.BtSolveTaMTmM_Click); - // - // BtStoreTaTm - // - this.BtStoreTaTm.Location = new System.Drawing.Point(6, 19); - this.BtStoreTaTm.Name = "BtStoreTaTm"; - this.BtStoreTaTm.Size = new System.Drawing.Size(114, 23); - this.BtStoreTaTm.TabIndex = 0; - this.BtStoreTaTm.Text = "Store 1st"; - this.BtStoreTaTm.UseVisualStyleBackColor = true; - this.BtStoreTaTm.Click += new System.EventHandler(this.BtStoreTaTm_Click); - // - // toolStripSeparator4 - // - this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(227, 6); - // - // calculateIwToolStripMenuItem - // - this.calculateIwToolStripMenuItem.Name = "calculateIwToolStripMenuItem"; - this.calculateIwToolStripMenuItem.Size = new System.Drawing.Size(230, 22); - this.calculateIwToolStripMenuItem.Text = "Calculate Iw"; - this.calculateIwToolStripMenuItem.Click += new System.EventHandler(this.calculateIwToolStripMenuItem_Click); - // - // calculateIdToolStripMenuItem - // - this.calculateIdToolStripMenuItem.Name = "calculateIdToolStripMenuItem"; - this.calculateIdToolStripMenuItem.Size = new System.Drawing.Size(230, 22); - this.calculateIdToolStripMenuItem.Text = "Calculate Id"; - this.calculateIdToolStripMenuItem.Click += new System.EventHandler(this.calculateIdToolStripMenuItem_Click); - // // StatMultiplierTestingControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -996,6 +1006,8 @@ private void InitializeComponent() this.Name = "StatMultiplierTestingControl"; this.Size = new System.Drawing.Size(1188, 75); this.contextMenuStrip1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudIdM)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudId)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudTmM)).EndInit(); @@ -1009,7 +1021,6 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.nudStatValue)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudLd)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudLw)).EndInit(); - this.groupBox1.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -1082,5 +1093,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; private System.Windows.Forms.ToolStripMenuItem calculateIwToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem calculateIdToolStripMenuItem; + private System.Windows.Forms.Label LbTaTmTeStored; } } diff --git a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs index 1cdc065f..f5ae5f53 100644 --- a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs +++ b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs @@ -909,6 +909,8 @@ private void BtStoreTaTm_Click(object sender, EventArgs e) if (_taTmSolver == null) _taTmSolver = new TaTmSolver(); _taTmSolver.SetFirstEquation(nudStatValue.ValueDouble * (_percent ? 0.01 : 1), nudB.ValueDouble, nudLw.ValueDouble, nudIw.ValueDouble, nudIwM.ValueDouble, nudTBHM.ValueDouble, _IB, _sIBM, _IBM, _TE, nudLd.ValueDouble, nudId.ValueDouble, nudIdM.ValueDouble); + LbTaTmTeStored.Text = $"TE: {_TE:p0}"; + LbTaTmTeStored.BackColor = Color.LightGreen; } #endregion From cafafe0e2fbd792ddb54162f2428cd19a278c364 Mon Sep 17 00:00:00 2001 From: cadon Date: Thu, 23 May 2024 21:45:56 +0200 Subject: [PATCH 04/36] error feedback --- ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs | 4 +++- ARKBreedingStats/multiplierTesting/TaTmSolver.cs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs index 991c96a1..a5cb8f16 100644 --- a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs +++ b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs @@ -810,7 +810,9 @@ private void ExtractSpeciesValuesFromExportFiles(string[] files) if (!creatureFiles.Any()) { - MessageBoxes.ShowMessageBox("No creature files could be read"); + if (!string.IsNullOrEmpty(lastError)) + lastError = Environment.NewLine + lastError; + MessageBoxes.ShowMessageBox("No creature files could be read" + lastError); return; } diff --git a/ARKBreedingStats/multiplierTesting/TaTmSolver.cs b/ARKBreedingStats/multiplierTesting/TaTmSolver.cs index ec2c2231..01beb695 100644 --- a/ARKBreedingStats/multiplierTesting/TaTmSolver.cs +++ b/ARKBreedingStats/multiplierTesting/TaTmSolver.cs @@ -80,7 +80,7 @@ private void SetValues(double statValue, double baseValue, double lw, double iw, public string CalculateTaTm(double statValue, double baseValue, double lw, double iw, double iwm, double tbhm, double ib, double ibs, double ibm, double te, double ld, double id, double idm, out double taTaM, out double tmTmM) { - // TODO use three equations to also determine TBHM + // TODO use three equations to also determine TBHM. This is very complex, formula not yet determined SetValues(statValue, baseValue, lw, iw, iwm, tbhm, ib, ibs, ibm, te, ld, id, idm, out var sW, out var sX, out var sTe); taTaM = 0; @@ -88,7 +88,7 @@ public string CalculateTaTm(double statValue, double baseValue, double lw, doubl if (Math.Abs(_fTe - sTe) < 0.005) { - return $"The taming effectiveness (TE) values need to be more different (given values are {_fTe:p} and {sTe:p})"; + return $"The taming effectiveness (TE) values need to be more different (given values are {_fTe:p1} and {sTe:p1})"; } var squareRootPart = Math.Sqrt( From 7bac0eb66a6669fc9bf7fa9d3dbb17969e01bba7 Mon Sep 17 00:00:00 2001 From: cadon Date: Thu, 23 May 2024 23:30:16 +0200 Subject: [PATCH 05/36] species stat extraction added imprinting multiplier --- .../SpeciesStatsExtractor.cs | 103 ++++++++++++++---- .../StatsMultiplierTesting.cs | 30 +++-- ARKBreedingStats/species/Species.cs | 11 +- 3 files changed, 112 insertions(+), 32 deletions(-) diff --git a/ARKBreedingStats/multiplierTesting/SpeciesStatsExtractor.cs b/ARKBreedingStats/multiplierTesting/SpeciesStatsExtractor.cs index 1689728c..f2c1229a 100644 --- a/ARKBreedingStats/multiplierTesting/SpeciesStatsExtractor.cs +++ b/ARKBreedingStats/multiplierTesting/SpeciesStatsExtractor.cs @@ -13,15 +13,15 @@ namespace ARKBreedingStats.multiplierTesting /// internal static class SpeciesStatsExtractor { - public static bool ExtractStatValues(IList creatureFiles, ServerMultipliers serverMultipliers, out Species species, out string errorText) + public static bool ExtractStatValues(IList creatureFiles, ServerMultipliers serverMultipliers, out Species species, out string resultText, out bool isError) { - if (!CheckInput(creatureFiles, out creatureFiles, serverMultipliers, out species, out errorText)) - return false; - - if (!ExtractValues(creatureFiles, serverMultipliers, species, out errorText)) + if (!CheckInput(creatureFiles, out creatureFiles, serverMultipliers, out species, out resultText)) + { + isError = true; return false; + } - return true; + return ExtractValues(creatureFiles, serverMultipliers, species, out resultText, out isError); } private static bool CheckInput(IList creatureFiles, out IList cleanedCreatureFiles, ServerMultipliers serverMultipliers, @@ -53,22 +53,37 @@ private static bool CheckInput(IList creatureFiles, out I return true; } - private static bool ExtractValues(IList creatureFiles, ServerMultipliers serverMultipliers, Species species, out string errorText) + private static bool ExtractValues(IList creatureFiles, ServerMultipliers serverMultipliers, Species species, out string resultText, out bool isError) { const int roundToDigits = 3; + + resultText = null; + isError = false; + var errorSb = new StringBuilder(); + var taTmSolver = new TaTmSolver(); + var wildCreatures = creatureFiles.Where(c => c.IsWild()).ToArray(); var domCreatures = creatureFiles.Where(c => !c.IsWild()).ToArray(); // for the determination of Ta and Tm two creatures with different TE are needed var creaturesOrderedByTeWithoutDomLevels = domCreatures - .Where(ec => ec.Stats.All(s => s.Tamed == 0 && s.Mutated == 0)) + .Where(ec => ec.DinoImprintingQuality == 0 && ec.Stats.All(s => s.Tamed == 0 && s.Mutated == 0)) .OrderBy(ec => ec.TameEffectiveness).ToArray(); var crHighTe = creaturesOrderedByTeWithoutDomLevels.Last(); var crLowTe = creaturesOrderedByTeWithoutDomLevels.First(); - errorText = null; - var errorSb = new StringBuilder(); - var taTmSolver = new TaTmSolver(); + var creaturesWithImprinting = domCreatures + .Where(c => c.DinoImprintingQuality > 0.01) + .OrderByDescending(c => c.DinoImprintingQuality).ToArray(); + + if (!creaturesWithImprinting.Any()) + { + errorSb.AppendLine("No creature with imprinting given. Species specific stat imprinting multipliers cannot be determined and default values are assumed."); + } + else if (creaturesWithImprinting.First().DinoImprintingQuality < 0.1) + { + errorSb.AppendLine($"Creatures with imprinting have low imprinting of {creaturesWithImprinting.First().DinoImprintingQuality:p1}. Stat imprinting multipliers may be unprecise."); + } ServerMultipliers singlePlayerMultipliers = null; if (serverMultipliers.SinglePlayerSettings) @@ -77,11 +92,14 @@ private static bool ExtractValues(IList creatureFiles, Se Values.V.serverMultipliersPresets.GetPreset(ServerMultipliersPresets.Singleplayer); if (singlePlayerMultipliers == null) { - errorText = "Singleplayer server multiplier preset not available."; + resultText = "Singleplayer server multiplier preset not available."; + isError = true; return false; } } + var speciesStatImprintingMultipliers = Species.StatImprintMultipliersDefaultAse.ToArray(); + for (var s = 0; s < Stats.StatsCount; s++) { var svStats = serverMultipliers.statMultipliers[s]; @@ -101,6 +119,7 @@ private static bool ExtractValues(IList creatureFiles, Se { errorSb.AppendLine( $"no wild creature with 0 levels in stat [{s}] ({Utils.StatName(s)}) provided. This stat cannot be calculated further"); + isError = true; continue; } @@ -118,6 +137,7 @@ private static bool ExtractValues(IList creatureFiles, Se { errorSb.AppendLine( $"no wild creature with >0 levels in stat [{s}] ({Utils.StatName(s)}), iw cannot be determined and other values of this stat will be skipped."); + isError = true; continue; } @@ -129,11 +149,11 @@ private static bool ExtractValues(IList creatureFiles, Se // TBHM var tbhm = 1; - if (s == Stats.Health) - { - species.TamedBaseHealthMultiplier = 1; - // todo - } + // todo + //if (s == Stats.Health) + //{ + // species.TamedBaseHealthMultiplier = 1; + //} // ta, tm taTmSolver.SetFirstEquation(crHighTe.GetStatValue(s), baseValue, @@ -142,15 +162,16 @@ private static bool ExtractValues(IList creatureFiles, Se serverMultipliers.BabyImprintingStatScaleMultiplier, crHighTe.TameEffectiveness, crHighTe.Stats[s].Tamed, 0, 0); - errorText = taTmSolver.CalculateTaTm(crLowTe.GetStatValue(s), baseValue, + resultText = taTmSolver.CalculateTaTm(crLowTe.GetStatValue(s), baseValue, crLowTe.Stats[s].Wild, incPerWild, svStats[ServerMultipliers.IndexLevelWild], tbhm, crLowTe.DinoImprintingQuality, species.StatImprintMultipliers[s], serverMultipliers.BabyImprintingStatScaleMultiplier, crLowTe.TameEffectiveness, crLowTe.Stats[s].Tamed, 0, 0, out var taTaM, out var tmTmM); - if (!string.IsNullOrEmpty(errorText)) + if (!string.IsNullOrEmpty(resultText)) { - errorSb.AppendLine($"Error when calculating ta tm for stat {s}: " + errorText); + errorSb.AppendLine($"Error when calculating ta tm for stat {s}: " + resultText); + isError = true; } if (taTaM != 0 && svStats[ServerMultipliers.IndexTamingAdd] != 0) @@ -162,9 +183,10 @@ private static bool ExtractValues(IList creatureFiles, Se // dom level var creatureWithNonZeroDomLevels = - domCreatures.FirstOrDefault(ec => ec.Stats[s].Tamed > 0 && ec.Stats[s].Mutated == 0); + domCreatures.FirstOrDefault(ec => ec.Stats[s].Tamed > 0 && ec.Stats[s].Mutated == 0 && ec.DinoImprintingQuality == 0); if (creatureWithNonZeroDomLevels == null) { + // some levels cannot be levelled, so it's not necessarily an error errorSb.AppendLine( $"no creature with >0 domestic levels in stat [{s}] ({Utils.StatName(s)}), id cannot be calculated."); } @@ -185,11 +207,48 @@ private static bool ExtractValues(IList creatureFiles, Se / (crStats.Tamed * svStats[ServerMultipliers.IndexLevelDom]) , roundToDigits); } + + // imprinting multiplier + if (creaturesWithImprinting.Any()) + { + // if dom levels are not known, only use creature with no dom levels + var creatureWithImprinting = creaturesWithImprinting + .FirstOrDefault(c => creatureWithNonZeroDomLevels != null || c.Stats[s].Tamed == 0); + if (creatureWithImprinting != null) + { + var crStats = creatureWithImprinting.Stats[s]; + speciesStatImprintingMultipliers[s] = Math.Round( + ((creatureWithNonZeroDomLevels.GetStatValue(s) / + ((1 + creatureWithImprinting.TameEffectiveness * + spStats[Species.StatsRawIndexMultiplicativeBonus] * + svStats[ServerMultipliers.IndexTamingMult]) * (1 + crStats.Tamed * spStats[Species.StatsRawIndexIncPerDomLevel] * svStats[ServerMultipliers.IndexLevelDom])) + - spStats[Species.StatsRawIndexAdditiveBonus] * svStats[ServerMultipliers.IndexTamingAdd]) / (spStats[Species.StatsRawIndexBase] * (1 + (crStats.Wild + crStats.Mutated) * incPerWild * + svStats[ServerMultipliers.IndexLevelWild]) * tbhm) - 1) / (creatureWithImprinting.DinoImprintingQuality * + serverMultipliers.BabyImprintingStatScaleMultiplier) + , roundToDigits); + } + else + { + errorSb.AppendLine( + $"For stat [{s}] ({Utils.StatName(s)}) species stat imprinting could not be determined (incPerDomLevel could be determined before)."); + } + } + } + + // if statImprinting is default, no need to save it + var defaultStatImprintingMultipliers = Species.StatImprintMultipliersDefaultAse; + for (var si = 0; si < Stats.StatsCount; si++) + { + if (speciesStatImprintingMultipliers[si] != defaultStatImprintingMultipliers[si]) + { + species.StatImprintMultipliersRaw = speciesStatImprintingMultipliers; + break; + } } species.Initialize(); // initialize second time to set used stats - errorText = errorSb.ToString(); + resultText = errorSb.ToString(); return true; } } diff --git a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs index a5cb8f16..ebd338c4 100644 --- a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs +++ b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs @@ -6,11 +6,13 @@ using System; using System.Collections.Generic; using System.Drawing; +using System.Globalization; using System.IO; using System.Windows.Forms; using ARKBreedingStats.utils; using System.Linq; using System.Text; +using System.Threading; using ARKBreedingStats.importExportGun; namespace ARKBreedingStats.multiplierTesting @@ -742,13 +744,16 @@ private void copyStatValuesToClipboardToolStripMenuItem_Click(object sender, Eve CopySpeciesStatsToClipboard(); } - private void CopySpeciesStatsToClipboard(string speciesBlueprintPath = null) + private void CopySpeciesStatsToClipboard(string speciesBlueprintPath = null, double[] speciesImprintingMultipliers = null) { // copy stat values in the format of the values.json to clipboard var sb = new StringBuilder(); if (!string.IsNullOrEmpty(speciesBlueprintPath)) sb.AppendLine($"\"blueprintPath\": \"{speciesBlueprintPath}\","); sb.AppendLine("\"fullStatsRaw\": ["); + var currentCulture = CultureInfo.CurrentCulture; + CultureInfo.CurrentCulture = CultureInfo.InvariantCulture; + for (var s = 0; s < Stats.StatsCount; s++) { var sv = _statControls[s].StatValues; @@ -758,11 +763,17 @@ private void CopySpeciesStatsToClipboard(string speciesBlueprintPath = null) } else { - sb.AppendLine($" [ {sv[0]}, {sv[1]}, {sv[2]}, {sv[3]}, {sv[4]} ],"); + sb.AppendLine($" [ {string.Join(", ", sv)} ],"); } } + sb.AppendLine("]"); + + if (speciesImprintingMultipliers != null) + { + sb.AppendLine($"\"statImprintMult\": [ {string.Join(", ", speciesBlueprintPath)} ]"); + } - sb.Append("]"); + CultureInfo.CurrentCulture = currentCulture; Clipboard.SetText(sb.ToString()); SetMessageLabelText?.Invoke("Raw stat values copied to clipboard.", MessageBoxIcon.Information); } @@ -822,18 +833,19 @@ private void ExtractSpeciesValuesFromExportFiles(string[] files) var sm = new ServerMultipliers(true); ImportExportGun.SetServerMultipliers(sm, serverMultipliersFile ?? GetServerMultipliers()); - SpeciesStatsExtractor.ExtractStatValues(creatureFiles, sm, out var species, out var errorText); + SpeciesStatsExtractor.ExtractStatValues(creatureFiles, sm, out var species, out var resultText, out var isError); SetSpecies(species); - var extractionSuccessful = string.IsNullOrEmpty(errorText); - if (!extractionSuccessful) + if (isError) { - SetMessageLabelText?.Invoke("Error while trying to determine the species stats." + Environment.NewLine + errorText, MessageBoxIcon.Error); + SetMessageLabelText?.Invoke("Error while trying to determine the species stats." + Environment.NewLine + resultText, MessageBoxIcon.Error); return; } - CopySpeciesStatsToClipboard(species.blueprintPath); - SetMessageLabelText?.Invoke( + CopySpeciesStatsToClipboard(species.blueprintPath, species.StatImprintMultipliersRaw); + if (!string.IsNullOrEmpty(resultText)) + resultText += Environment.NewLine; + SetMessageLabelText?.Invoke(resultText + "Extracted the species values and copied them to the clipboard. Note the TBHM and singleplayer is not supported and may lead to wrong values.", MessageBoxIcon.Information); } diff --git a/ARKBreedingStats/species/Species.cs b/ARKBreedingStats/species/Species.cs index d7c78d1f..b54127da 100644 --- a/ARKBreedingStats/species/Species.cs +++ b/ARKBreedingStats/species/Species.cs @@ -111,6 +111,15 @@ public class Species /// public double[] StatImprintMultipliers; + /// + /// The raw species imprinting stat multipliers. This property should only be used for custom species. + /// + public double[] StatImprintMultipliersRaw + { + get => statImprintMult; + set => statImprintMult = value; + } + [JsonProperty] public ColorRegion[] colors; [JsonProperty] @@ -238,7 +247,7 @@ public void Initialize() /// /// Default values for the stat imprint multipliers in ASE /// - private static readonly double[] StatImprintMultipliersDefaultAse = { 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 }; + internal static readonly double[] StatImprintMultipliersDefaultAse = { 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 }; /// /// Default values for the mutated levels multipliers. From 858645ec10056b95f6269e54083de6e4be38e44e Mon Sep 17 00:00:00 2001 From: cadon Date: Thu, 23 May 2024 23:59:31 +0200 Subject: [PATCH 06/36] troodonism affected species not hardcoded anymore and info about it only appears if an affected stat has an error --- ARKBreedingStats/Form1.extractor.cs | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/ARKBreedingStats/Form1.extractor.cs b/ARKBreedingStats/Form1.extractor.cs index a5ef4d7c..2c831990 100644 --- a/ARKBreedingStats/Form1.extractor.cs +++ b/ARKBreedingStats/Form1.extractor.cs @@ -625,26 +625,14 @@ private void ExtractionFailed(IssueNotes.Issue issues = IssueNotes.Issue.None) redInfoText = Loc.S("lbImprintingFailInfo"); } if (!rbWildExtractor.Checked - && new[]{ - "Desert Titan", - "Desert Titan Flock", - "Ice Titan", - "Gacha", - "Aberrant Electrophorus", - "Electrophorus", - "Aberrant Pulmonoscorpius", - "Pulmonoscorpius", - "Aberrant Titanoboa", - "Titanoboa", - "Pegomastax", - "Procoptodon", - "Troodon" - }.Contains(speciesSelector1.SelectedSpecies.name)) + && speciesSelector1.SelectedSpecies.altBaseStatsRaw? + .Any(kv => _statIOs[kv.Key].Status == StatIOStatus.Error) == true + ) { - // creatures that display wrong stat-values after taming + // creatures that display wrong stat-values after taming (Troodonism bug) redInfoText = (string.IsNullOrEmpty(redInfoText) ? string.Empty : redInfoText + "\n") - + $"The {speciesSelector1.SelectedSpecies.name} is known for displaying wrong stat-values after taming. " + - "This can prevent a successful extraction. Currently there's no known fix for that issue."; + + $"The {speciesSelector1.SelectedSpecies.name} is known for displaying wrong stat-values after taming (Troodonism bug). " + + "This can prevent a successful extraction. The correct stat value should be displayed directly after a server restart and is unreliable else."; } if (!string.IsNullOrEmpty(redInfoText)) From df6adbf49bc3d0fb370939babfa9de6d4fc183de Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 26 May 2024 12:42:09 +0200 Subject: [PATCH 07/36] wip possible extractor troodonism handling --- ARKBreedingStats/ARKBreedingStats.csproj | 3 +- ARKBreedingStats/Extraction.cs | 54 +++++++------- ARKBreedingStats/Form1.extractor.cs | 26 +++++-- ARKBreedingStats/Stats.cs | 35 +++++---- ARKBreedingStats/species/Species.cs | 26 ++++--- .../{CreatureStat.cs => SpeciesStat.cs} | 2 +- ARKBreedingStats/species/Troodonism.cs | 71 +++++++++++++++++++ ARKBreedingStats/uiControls/StatGraphs.cs | 2 +- ARKBreedingStats/values/Values.cs | 25 ++++--- 9 files changed, 181 insertions(+), 63 deletions(-) rename ARKBreedingStats/species/{CreatureStat.cs => SpeciesStat.cs} (91%) create mode 100644 ARKBreedingStats/species/Troodonism.cs diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj index 6fe68616..bc445ac0 100644 --- a/ARKBreedingStats/ARKBreedingStats.csproj +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -117,6 +117,7 @@ + Form @@ -371,7 +372,7 @@ CreatureInfoInput.cs - + diff --git a/ARKBreedingStats/Extraction.cs b/ARKBreedingStats/Extraction.cs index 3ef2ad6b..c1a90e77 100644 --- a/ARKBreedingStats/Extraction.cs +++ b/ARKBreedingStats/Extraction.cs @@ -93,9 +93,12 @@ public void Clear() /// public void ExtractLevels(Species species, int level, StatIO[] statIOs, double lowerTEBound, double upperTEBound, bool tamed, bool bred, double imprintingBonusRounded, bool adjustImprinting, bool allowMoreThanHundredImprinting, double imprintingBonusMultiplier, - bool considerWildLevelSteps, int wildLevelSteps, bool highPrecisionInputs, bool mutagenApplied, out bool imprintingChanged) + bool considerWildLevelSteps, int wildLevelSteps, bool highPrecisionInputs, bool mutagenApplied, out bool imprintingChanged, Troodonism.AffectedStats troodonismStats) { - var stats = species.stats; + var stats = troodonismStats == Troodonism.AffectedStats.None + ? species.stats + : Troodonism.SelectStats(species.stats, species.altStats, troodonismStats); + ValidResults = true; imprintingChanged = false; considerWildLevelSteps = considerWildLevelSteps @@ -117,7 +120,7 @@ public void ExtractLevels(Species species, int level, StatIO[] statIOs, double l } else { - imprintingBonusList = CalculateImprintingBonus(species, imprintingBonusRounded, imprintingBonusMultiplier, statIOs[Stats.Torpidity].Input, statIOs[Stats.Food].Input); + imprintingBonusList = CalculateImprintingBonus(species, stats, imprintingBonusRounded, imprintingBonusMultiplier, statIOs[Stats.Torpidity].Input, statIOs[Stats.Food].Input, troodonismStats); } } if (imprintingBonusList == null) @@ -216,7 +219,7 @@ public void ExtractLevels(Species species, int level, StatIO[] statIOs, double l maxLW = (int)Math.Round( ((inputValue.Max / multAffinityFactor - (PostTamed ? stats[s].AddWhenTamed : 0)) / - statBaseValue - 1) / stats[s].IncPerWildLevel); // floor is too unprecise + statBaseValue - 1) / stats[s].IncPerWildLevel); // floor is too imprecise } else { @@ -235,7 +238,8 @@ public void ExtractLevels(Species species, int level, StatIO[] statIOs, double l { // e.g. Griffin // get lowest wild level at which the creature is alive - while (StatValueCalculation.CalculateValue(species, s, ww, 0, 0, true, lowerTEBound, 0, false) <= 0) + while (StatValueCalculation.CalculateValue(species, s, ww, 0, 0, true, + lowerTEBound, 0, false, troodonismStats) <= 0) { ww++; } @@ -258,8 +262,10 @@ public void ExtractLevels(Species species, int level, StatIO[] statIOs, double l if (stats[s].IncPerWildLevel == 0) { // check if the input value is valid - MinMaxDouble possibleStatValues = new MinMaxDouble(StatValueCalculation.CalculateValue(species, s, 0, 0, 0, PostTamed, lowerTEBound, _imprintingBonusRange.Min, false), - StatValueCalculation.CalculateValue(species, s, 0, 0, 0, PostTamed, upperTEBound, _imprintingBonusRange.Max, false)); + MinMaxDouble possibleStatValues = new MinMaxDouble(StatValueCalculation.CalculateValue(species, s, 0, 0, 0, + PostTamed, lowerTEBound, _imprintingBonusRange.Min, false, troodonismStats), + StatValueCalculation.CalculateValue(species, s, 0, 0, 0, + PostTamed, upperTEBound, _imprintingBonusRange.Max, false, troodonismStats)); if (inputValue.Overlaps(possibleStatValues)) Results[s].Add(new StatResult(0, 0)); } @@ -417,14 +423,14 @@ public void ExtractLevels(Species species, int level, StatIO[] statIOs, double l /// and using the bonus on the Torpidity stat (this cannot be leveled, so the exact bonus is known). /// Due to the high values of the food stat, which is often not leveled, this stat can be used to further improve the precision of the imprinting bonus. /// - private List CalculateImprintingBonus(Species species, double imprintingBonusRounded, double imprintingBonusMultiplier, double torpor, double food) + private List CalculateImprintingBonus(Species species, SpeciesStat[] stats, double imprintingBonusRounded, double imprintingBonusMultiplier, double torpor, double food, Troodonism.AffectedStats useTroodonismStats) { if (imprintingBonusMultiplier == 0) { return new List { new MinMaxDouble(imprintingBonusRounded) }; } - if (species.stats[Stats.Torpidity].BaseValue == 0 || species.stats[Stats.Torpidity].IncPerWildLevel == 0) + if (stats[Stats.Torpidity].BaseValue == 0 || stats[Stats.Torpidity].IncPerWildLevel == 0) { // invalid species-data return new List { new MinMaxDouble(imprintingBonusRounded - 0.005, imprintingBonusRounded + 0.005) }; @@ -467,13 +473,13 @@ private List CalculateImprintingBonus(Species species, double impr } MinMaxInt wildLevelsFromImprintedTorpor = new MinMaxInt( - (int)Math.Round(((((torpor / (1 + species.stats[Stats.Torpidity].MultAffinity)) - species.stats[Stats.Torpidity].AddWhenTamed) / ((1 + (imprintingBonusRounded + 0.005) * statImprintMultipliers[Stats.Torpidity] * imprintingBonusMultiplier) * species.stats[Stats.Torpidity].BaseValue)) - 1) / species.stats[Stats.Torpidity].IncPerWildLevel), - (int)Math.Round(((((torpor / (1 + species.stats[Stats.Torpidity].MultAffinity)) - species.stats[Stats.Torpidity].AddWhenTamed) / ((1 + (imprintingBonusRounded - 0.005) * statImprintMultipliers[Stats.Torpidity] * imprintingBonusMultiplier) * species.stats[Stats.Torpidity].BaseValue)) - 1) / species.stats[Stats.Torpidity].IncPerWildLevel)); + (int)Math.Round(((((torpor / (1 + stats[Stats.Torpidity].MultAffinity)) - stats[Stats.Torpidity].AddWhenTamed) / ((1 + (imprintingBonusRounded + 0.005) * statImprintMultipliers[Stats.Torpidity] * imprintingBonusMultiplier) * stats[Stats.Torpidity].BaseValue)) - 1) / stats[Stats.Torpidity].IncPerWildLevel), + (int)Math.Round(((((torpor / (1 + stats[Stats.Torpidity].MultAffinity)) - stats[Stats.Torpidity].AddWhenTamed) / ((1 + (imprintingBonusRounded - 0.005) * statImprintMultipliers[Stats.Torpidity] * imprintingBonusMultiplier) * stats[Stats.Torpidity].BaseValue)) - 1) / stats[Stats.Torpidity].IncPerWildLevel)); // assuming food has no dom-levels, extract the exact imprinting from this stat. If the range is in the range of the torpor-dependent IB, take this more precise value for the imprinting. (food has higher values and yields more precise results) MinMaxInt wildLevelsFromImprintedFood = new MinMaxInt( - (int)Math.Round(((((food / (1 + species.stats[Stats.Food].MultAffinity)) - species.stats[Stats.Food].AddWhenTamed) / ((1 + (imprintingBonusRounded + 0.005) * statImprintMultipliers[Stats.Food] * imprintingBonusMultiplier) * species.stats[Stats.Food].BaseValue)) - 1) / species.stats[Stats.Food].IncPerWildLevel), - (int)Math.Round(((((food / (1 + species.stats[Stats.Food].MultAffinity)) - species.stats[Stats.Food].AddWhenTamed) / ((1 + (imprintingBonusRounded - 0.005) * statImprintMultipliers[Stats.Food] * imprintingBonusMultiplier) * species.stats[Stats.Food].BaseValue)) - 1) / species.stats[Stats.Food].IncPerWildLevel)); + (int)Math.Round(((((food / (1 + stats[Stats.Food].MultAffinity)) - stats[Stats.Food].AddWhenTamed) / ((1 + (imprintingBonusRounded + 0.005) * statImprintMultipliers[Stats.Food] * imprintingBonusMultiplier) * stats[Stats.Food].BaseValue)) - 1) / stats[Stats.Food].IncPerWildLevel), + (int)Math.Round(((((food / (1 + stats[Stats.Food].MultAffinity)) - stats[Stats.Food].AddWhenTamed) / ((1 + (imprintingBonusRounded - 0.005) * statImprintMultipliers[Stats.Food] * imprintingBonusMultiplier) * stats[Stats.Food].BaseValue)) - 1) / stats[Stats.Food].IncPerWildLevel)); List otherStatsSupportIB = new List(); // the number of other stats that support this IB-range // for high-level creatures the bonus from imprinting is so high, that a displayed and rounded value of the imprinting bonus can be possible with multiple torpor-levels, i.e. 1 %point IB results in a larger change than a level in torpor. @@ -485,8 +491,8 @@ private List CalculateImprintingBonus(Species species, double impr { int support = 0; MinMaxDouble imprintingBonusRange = new MinMaxDouble( - (((torpor - 0.05) / (1 + species.stats[Stats.Torpidity].MultAffinity) - species.stats[Stats.Torpidity].AddWhenTamed) / StatValueCalculation.CalculateValue(species, Stats.Torpidity, torporLevel, 0, 0, false, 0, 0) - 1) / imprintingBonusTorporFinal, - (((torpor + 0.05) / (1 + species.stats[Stats.Torpidity].MultAffinity) - species.stats[Stats.Torpidity].AddWhenTamed) / StatValueCalculation.CalculateValue(species, Stats.Torpidity, torporLevel, 0, 0, false, 0, 0) - 1) / imprintingBonusTorporFinal); + (((torpor - 0.05) / (1 + stats[Stats.Torpidity].MultAffinity) - stats[Stats.Torpidity].AddWhenTamed) / StatValueCalculation.CalculateValue(species, Stats.Torpidity, torporLevel, 0, 0, false, 0, 0, useTroodonismStats: useTroodonismStats) - 1) / imprintingBonusTorporFinal, + (((torpor + 0.05) / (1 + stats[Stats.Torpidity].MultAffinity) - stats[Stats.Torpidity].AddWhenTamed) / StatValueCalculation.CalculateValue(species, Stats.Torpidity, torporLevel, 0, 0, false, 0, 0, useTroodonismStats: useTroodonismStats) - 1) / imprintingBonusTorporFinal); // check for each possible food-level the IB-range and if it can narrow down the range derived from the torpor (deriving from food is more precise, due to the higher values) @@ -497,14 +503,14 @@ private List CalculateImprintingBonus(Species species, double impr foodLevel++) { MinMaxDouble imprintingBonusFromFood = new MinMaxDouble( - (((food - 0.05) / (1 + species.stats[Stats.Food].MultAffinity) - - species.stats[Stats.Food].AddWhenTamed) / - StatValueCalculation.CalculateValue(species, Stats.Food, foodLevel, 0, 0, false, 0, 0) - + (((food - 0.05) / (1 + stats[Stats.Food].MultAffinity) - + stats[Stats.Food].AddWhenTamed) / + StatValueCalculation.CalculateValue(species, Stats.Food, foodLevel, 0, 0, false, 0, 0, useTroodonismStats: useTroodonismStats) - 1) / imprintingBonusFoodFinal, - (((food + 0.05) / (1 + species.stats[Stats.Food].MultAffinity) - - species.stats[Stats.Food].AddWhenTamed) / - StatValueCalculation.CalculateValue(species, Stats.Food, foodLevel, 0, 0, false, 0, 0) - + (((food + 0.05) / (1 + stats[Stats.Food].MultAffinity) - + stats[Stats.Food].AddWhenTamed) / + StatValueCalculation.CalculateValue(species, Stats.Food, foodLevel, 0, 0, false, 0, 0, useTroodonismStats: useTroodonismStats) - 1) / imprintingBonusFoodFinal); @@ -519,9 +525,9 @@ private List CalculateImprintingBonus(Species species, double impr MinMaxDouble intersectionIB = new MinMaxDouble(imprintingBonusRange); intersectionIB.SetToIntersectionWith(imprintingBonusFromFood); if (StatValueCalculation.CalculateValue(species, Stats.Torpidity, torporLevel, 0, 0, true, 1, - intersectionIB.Min) <= torpor + intersectionIB.Min, useTroodonismStats: useTroodonismStats) <= torpor && StatValueCalculation.CalculateValue(species, Stats.Torpidity, torporLevel, 0, 0, true, - 1, intersectionIB.Max) >= torpor) + 1, intersectionIB.Max, useTroodonismStats: useTroodonismStats) >= torpor) { //imprintingBonusFromTorpor = imprintingBonusFromFood; imprintingBonusRange.SetToIntersectionWith(imprintingBonusFromFood); @@ -533,7 +539,7 @@ private List CalculateImprintingBonus(Species species, double impr // if the imprinting bonus value considering only the fixed imprinting gain by cuddles results in a value in the possible range, take this, probably most exact value if (imprintingBonusRange.Includes(imprintingBonusFromGainPerCuddle) - && Math.Abs(StatValueCalculation.CalculateValue(species, Stats.Torpidity, torporLevel, 0, 0, true, 1, imprintingBonusFromGainPerCuddle) - torpor) <= 0.5) + && Math.Abs(StatValueCalculation.CalculateValue(species, Stats.Torpidity, torporLevel, 0, 0, true, 1, imprintingBonusFromGainPerCuddle, useTroodonismStats: useTroodonismStats) - torpor) <= 0.5) { imprintingBonusRange.MinMax = imprintingBonusFromGainPerCuddle; support++; diff --git a/ARKBreedingStats/Form1.extractor.cs b/ARKBreedingStats/Form1.extractor.cs index 2c831990..727728fb 100644 --- a/ARKBreedingStats/Form1.extractor.cs +++ b/ARKBreedingStats/Form1.extractor.cs @@ -280,8 +280,9 @@ private bool ExtractLevels(bool autoExtraction = false, bool statInputsHighPreci var mutagenApplied = possiblyMutagenApplied || creatureInfoInputExtractor.CreatureFlags.HasFlag(CreatureFlags.MutagenApplied); var bred = rbBredExtractor.Checked; bool imprintingBonusChanged = false; + var useTroodonism = Troodonism.AffectedStats.None; - for (int i = 0; i < 2; i++) + while (true) { _extractor.ExtractLevels(speciesSelector1.SelectedSpecies, (int)numericUpDownLevel.Value, _statIOs, (double)numericUpDownLowerTEffBound.Value / 100, (double)numericUpDownUpperTEffBound.Value / 100, @@ -290,14 +291,14 @@ private bool ExtractLevels(bool autoExtraction = false, bool statInputsHighPreci _creatureCollection.allowMoreThanHundredImprinting, _creatureCollection.serverMultipliers.BabyImprintingStatScaleMultiplier, _creatureCollection.considerWildLevelSteps, _creatureCollection.wildLevelStep, - statInputsHighPrecision, mutagenApplied, out imprintingBonusChanged); + statInputsHighPrecision, mutagenApplied, out imprintingBonusChanged, useTroodonism); // wild claimed babies look like bred creatures in the export files, but have to be considered tamed when imported // if the extraction of an exported creature doesn't work, try with tamed settings if (bred && numericUpDownImprintingBonusExtractor.Value == 0 && statInputsHighPrecision) { var someStatsHaveNoResults = false; - var onlyStatsWithTEHaveNoResults = true; + var onlyStatsWithTeHaveNoResults = true; // check if only stats affected by TE have no result for (int s = 0; s < Stats.StatsCount; s++) { @@ -307,12 +308,12 @@ private bool ExtractLevels(bool autoExtraction = false, bool statInputsHighPreci if (!_extractor.StatsWithTE.Contains(s)) { // the issue is not related to TE, so it's a different issue - onlyStatsWithTEHaveNoResults = false; + onlyStatsWithTeHaveNoResults = false; } } } - if (!someStatsHaveNoResults || !onlyStatsWithTEHaveNoResults) break; + if (!someStatsHaveNoResults || !onlyStatsWithTeHaveNoResults) break; // issue could be a wild claimed baby that should be considered tamed _extractor.Clear(); @@ -322,6 +323,19 @@ private bool ExtractLevels(bool autoExtraction = false, bool statInputsHighPreci continue; } + // if extraction failed, it could be due to the troodonism bug. If the creature has alt stats and for one of these stats there is no result, try these + if (useTroodonism == Troodonism.AffectedStats.None + && speciesSelector1.SelectedSpecies.altBaseStatsRaw? + .Any(kv => !_extractor.Results[kv.Key].Any()) == true) + { + if (rbWildExtractor.Checked) + useTroodonism = Troodonism.AffectedStats.WildCombination; + else + useTroodonism = Troodonism.AffectedStats.UncryoCombination; + _extractor.Clear(); + continue; + } + break; } @@ -458,7 +472,7 @@ private bool ExtractLevels(bool autoExtraction = false, bool statInputsHighPreci } if (domLevelsChosenSum != _extractor.LevelDomSum) { - // sum of domlevels is not correct. Try to find another combination + // sum of dom levels is not correct. Try to find another combination domLevelsChosenSum -= _extractor.Results[Stats.MeleeDamageMultiplier][_extractor.ChosenResults[Stats.MeleeDamageMultiplier]].levelDom; bool changeChosenResult = false; int cR = 0; diff --git a/ARKBreedingStats/Stats.cs b/ARKBreedingStats/Stats.cs index 2cfc680b..9a456a01 100644 --- a/ARKBreedingStats/Stats.cs +++ b/ARKBreedingStats/Stats.cs @@ -9,46 +9,55 @@ public static class StatValueCalculation { //private const double ROUND_UP_DELTA = 0.0001; // remove for now. Rounding issues should be handled during extraction with value-ranges. - public static double CalculateValue(Species species, int stat, int levelWild, int levelMut, int levelDom, bool dom, double tamingEff = 0, double imprintingBonus = 0, bool roundToIngamePrecision = true) + /// + /// Calculate the stat value. + /// + public static double CalculateValue(Species species, int statIndex, int levelWild, int levelMut, int levelDom, + bool dom, double tamingEff = 0, double imprintingBonus = 0, bool roundToIngamePrecision = true, + Troodonism.AffectedStats useTroodonismStats = Troodonism.AffectedStats.None) { if (species == null) return 0; + var speciesStat = useTroodonismStats == Troodonism.AffectedStats.None + ? species.stats[statIndex] + : Troodonism.SelectStats(species.stats[statIndex], species.altStats[statIndex], useTroodonismStats); + // if stat is generally available but level is set to -1 (== unknown), return -1 (== unknown) - if (levelWild < 0 && species.stats[stat].IncPerWildLevel != 0) + if (levelWild < 0 && speciesStat.IncPerWildLevel != 0) return -1; double add = 0, domMult = 1, imprintingM = 1, tamedBaseHP = 1; if (dom) { - add = species.stats[stat].AddWhenTamed; - double domMultAffinity = species.stats[stat].MultAffinity; + add = speciesStat.AddWhenTamed; + double domMultAffinity = speciesStat.MultAffinity; // the multiplicative bonus is only multiplied with the TE if it is positive (i.e. negative boni won't get less bad if the TE is low) if (domMultAffinity >= 0) domMultAffinity *= tamingEff; - domMult = (tamingEff >= 0 ? (1 + domMultAffinity) : 1) * (1 + levelDom * species.stats[stat].IncPerTamedLevel); + domMult = (tamingEff >= 0 ? (1 + domMultAffinity) : 1) * (1 + levelDom * speciesStat.IncPerTamedLevel); if (imprintingBonus > 0 - && species.StatImprintMultipliers[stat] != 0 + && species.StatImprintMultipliers[statIndex] != 0 ) - imprintingM = 1 + species.StatImprintMultipliers[stat] * imprintingBonus * Values.V.currentServerMultipliers.BabyImprintingStatScaleMultiplier; - if (stat == Stats.Health) + imprintingM = 1 + species.StatImprintMultipliers[statIndex] * imprintingBonus * Values.V.currentServerMultipliers.BabyImprintingStatScaleMultiplier; + if (statIndex == Stats.Health) tamedBaseHP = species.TamedBaseHealthMultiplier ?? 1; } - //double result = Math.Round((species.stats[stat].BaseValue * tamedBaseHP * (1 + species.stats[stat].IncPerWildLevel * levelWild) * imprintingM + add) * domMult, Utils.precision(stat), MidpointRounding.AwayFromZero); + //double result = Math.Round((stats.BaseValue * tamedBaseHP * (1 + stats.IncPerWildLevel * levelWild) * imprintingM + add) * domMult, Utils.precision(stat), MidpointRounding.AwayFromZero); // double is too precise and results in wrong values due to rounding. float results in better values, probably ARK uses float as well. // or rounding first to a precision of 7, then use the rounding of the precision - //double resultt = Math.Round((species.stats[stat].BaseValue * tamedBaseHP * (1 + species.stats[stat].IncPerWildLevel * levelWild) * imprintingM + add) * domMult, 7); + //double resultt = Math.Round((stats.BaseValue * tamedBaseHP * (1 + stats.IncPerWildLevel * levelWild) * imprintingM + add) * domMult, 7); //resultt = Math.Round(resultt, Utils.precision(stat), MidpointRounding.AwayFromZero); // adding an epsilon to handle rounding-errors - double result = (species.stats[stat].BaseValue * tamedBaseHP * - (1 + species.stats[stat].IncPerWildLevel * levelWild + species.stats[stat].IncPerMutatedLevel * levelMut) * imprintingM + add) * + double result = (speciesStat.BaseValue * tamedBaseHP * + (1 + speciesStat.IncPerWildLevel * levelWild + speciesStat.IncPerMutatedLevel * levelMut) * imprintingM + add) * domMult;// + (Utils.precision(stat) == 3 ? ROUND_UP_DELTA * 0.01 : ROUND_UP_DELTA); if (result <= 0) return 0; if (roundToIngamePrecision) - return Math.Round(result, Stats.Precision(stat), MidpointRounding.AwayFromZero); + return Math.Round(result, Stats.Precision(statIndex), MidpointRounding.AwayFromZero); return result; } diff --git a/ARKBreedingStats/species/Species.cs b/ARKBreedingStats/species/Species.cs index b54127da..9dc17888 100644 --- a/ARKBreedingStats/species/Species.cs +++ b/ARKBreedingStats/species/Species.cs @@ -52,12 +52,12 @@ public class Species /// /// The stat values with all multipliers applied and ready to use. /// - public CreatureStat[] stats; + public SpeciesStat[] stats; /// /// The alternative / Troodonism base stat values with all multipliers applied and ready to use. /// Values depending on the base value, e.g. incPerWild or incPerDom etc. can use either the correct or alternative base value. /// - public CreatureStat[] altStats; + public SpeciesStat[] altStats; /// /// Multipliers for each stat for the mutated levels. Introduced in ASA. @@ -167,9 +167,10 @@ public void Initialize() InitializeNames(); - stats = new CreatureStat[Stats.StatsCount]; - if (altBaseStatsRaw != null) - altStats = new CreatureStat[Stats.StatsCount]; + stats = new SpeciesStat[Stats.StatsCount]; + var altStatsExist = altBaseStatsRaw?.Any() == true; + if (altStatsExist) + altStats = new SpeciesStat[Stats.StatsCount]; var fullStatsRawLength = fullStatsRaw?.Length ?? 0; @@ -185,9 +186,13 @@ public void Initialize() double[][] completeRaws = new double[Stats.StatsCount][]; for (int s = 0; s < Stats.StatsCount; s++) { - stats[s] = new CreatureStat(); - if (altBaseStatsRaw?.ContainsKey(s) ?? false) - altStats[s] = new CreatureStat(); + stats[s] = new SpeciesStat(); + if (altStatsExist) + { + if (altBaseStatsRaw.ContainsKey(s)) + altStats[s] = new SpeciesStat(); + else altStats[s] = stats[s]; + } var usesStat = false; completeRaws[s] = new double[] { 0, 0, 0, 0, 0 }; @@ -416,6 +421,11 @@ public Mod Mod get => _mod; } + /// + /// True if the species has any alternative stats (due to the troodonism bug). + /// + public bool HasAltStats => altBaseStatsRaw?.Any() == true; + /// /// Returns an array of colors for a creature of this species with the naturally occurring colors. /// diff --git a/ARKBreedingStats/species/CreatureStat.cs b/ARKBreedingStats/species/SpeciesStat.cs similarity index 91% rename from ARKBreedingStats/species/CreatureStat.cs rename to ARKBreedingStats/species/SpeciesStat.cs index f48e4bfe..1ec62365 100644 --- a/ARKBreedingStats/species/CreatureStat.cs +++ b/ARKBreedingStats/species/SpeciesStat.cs @@ -3,7 +3,7 @@ namespace ARKBreedingStats.species { [JsonObject] - public class CreatureStat + public class SpeciesStat { public double BaseValue; public double IncPerWildLevel; diff --git a/ARKBreedingStats/species/Troodonism.cs b/ARKBreedingStats/species/Troodonism.cs new file mode 100644 index 00000000..c5c3387f --- /dev/null +++ b/ARKBreedingStats/species/Troodonism.cs @@ -0,0 +1,71 @@ +using System; +using System.Windows.Forms; + +namespace ARKBreedingStats.species +{ + /// + /// Handling the troodonism bug in ARK. + /// + public static class Troodonism + { + /// + /// Flags which part of a stat calculation are affected by troodonism values. + /// + [Flags] + public enum AffectedStats + { + /// + /// All stat parts use the non troodonism values. + /// + None = 0, + /// + /// The base value uses the troodonism value. + /// + Base = 1, + /// + /// The increase per wild level value uses the troodonism value. + /// + IncreaseWild = 2, + /// + /// Combination for a creature when wild. + /// + WildCombination = Base, + /// + /// Combination for a creature after releasing from a cryopod. + /// + UncryoCombination = Base | IncreaseWild, + /// + /// Combination for a creature after a server restart. + /// + ServerRestartCombination = None + } + + /// + /// Returns the stats considering the troodonism stats stated in troodonismStats. + /// + public static SpeciesStat[] SelectStats(SpeciesStat[] speciesStats, SpeciesStat[] speciesAltStats, AffectedStats troodonismStats) + { + if (speciesAltStats == null) return speciesStats; + var stats = new SpeciesStat[Stats.StatsCount]; + for (int s = 0; s < Stats.StatsCount; s++) + stats[s] = SelectStats(speciesStats[s], speciesAltStats[s], troodonismStats); + return stats; + } + + /// + /// Returns the stats considering the troodonism stats stated in troodonismStats. + /// + public static SpeciesStat SelectStats(SpeciesStat speciesStats, SpeciesStat speciesAltStats, AffectedStats troodonismStats) + { + if (speciesAltStats == null) return speciesStats; + return new SpeciesStat + { + BaseValue = (troodonismStats.HasFlag(Troodonism.AffectedStats.Base) ? speciesAltStats : speciesStats).BaseValue, + IncPerWildLevel = (troodonismStats.HasFlag(Troodonism.AffectedStats.IncreaseWild) ? speciesAltStats : speciesStats).IncPerWildLevel, + AddWhenTamed = speciesStats.AddWhenTamed, + MultAffinity = speciesStats.MultAffinity, + IncPerTamedLevel = speciesStats.IncPerTamedLevel + }; + } + } +} diff --git a/ARKBreedingStats/uiControls/StatGraphs.cs b/ARKBreedingStats/uiControls/StatGraphs.cs index 7aced5b7..a6e0fcbf 100644 --- a/ARKBreedingStats/uiControls/StatGraphs.cs +++ b/ARKBreedingStats/uiControls/StatGraphs.cs @@ -22,7 +22,7 @@ public void SetGraph(Species species, int statIndex, int wildLevels, int mutated { if (species != null && statIndex >= 0 && statIndex < 12) { - CreatureStat stat = species.stats[statIndex]; + SpeciesStat stat = species.stats[statIndex]; serie.Points.Clear(); serie.Points.AddXY("Base", stat.BaseValue); serie.Points.AddXY("Wild", StatValueCalculation.CalculateValue(species, statIndex, wildLevels, mutatedLevel, 0, false, 0, 0)); diff --git a/ARKBreedingStats/values/Values.cs b/ARKBreedingStats/values/Values.cs index 3bb0e6c3..a71ed3e9 100644 --- a/ARKBreedingStats/values/Values.cs +++ b/ARKBreedingStats/values/Values.cs @@ -548,21 +548,27 @@ public void ApplyMultipliers(CreatureCollection cc, bool eventMultipliers = fals sp.stats[s].IncPerWildLevel = GetRawStatValue(s, Species.StatsRawIndexIncPerWildLevel, customOverrideForThisStatExists) * statMultipliers[3]; sp.stats[s].IncPerMutatedLevel = sp.stats[s].IncPerWildLevel; // todo consider adjustments if they're implemented + var altBaseValue = 0d; + var thisStatHasAltValues = sp.altBaseStatsRaw?.TryGetValue(s, out altBaseValue) == true; // set troodonism values - if (sp.altStats?[s] != null && sp.stats[s].BaseValue != 0) + if (thisStatHasAltValues + && sp.stats[s].BaseValue != 0 + && sp.altStats != null) { - sp.altStats[s].BaseValue = sp.altBaseStatsRaw[s]; + sp.altStats[s].BaseValue = altBaseValue; // alt / troodonism values depend on the base value - var altFactor = sp.altStats[s].BaseValue / sp.stats[s].BaseValue; + var altFactor = altBaseValue / sp.stats[s].BaseValue; - sp.altStats[s].AddWhenTamed = altFactor * sp.stats[s].AddWhenTamed; - sp.altStats[s].MultAffinity = altFactor * sp.stats[s].MultAffinity; - sp.altStats[s].IncPerTamedLevel = altFactor * sp.stats[s].IncPerTamedLevel; sp.altStats[s].IncPerWildLevel = altFactor * sp.stats[s].IncPerWildLevel; + // maybe not affected, maybe depends on postTame stat value (and then maybe on different troodonism variants) + sp.altStats[s].IncPerTamedLevel = sp.stats[s].IncPerTamedLevel; + // taming bonus probably not affected by troodonism + sp.altStats[s].AddWhenTamed = sp.stats[s].AddWhenTamed; + sp.altStats[s].MultAffinity = sp.stats[s].MultAffinity; } - // single player adjustments if set and available + ///// single player adjustments if set and available if (singlePlayerServerMultipliers?.statMultipliers?[s] == null) continue; @@ -574,8 +580,9 @@ public void ApplyMultipliers(CreatureCollection cc, bool eventMultipliers = fals sp.stats[s].IncPerTamedLevel *= singlePlayerServerMultipliers.statMultipliers[s][ServerMultipliers.IndexLevelDom]; sp.stats[s].IncPerWildLevel *= singlePlayerServerMultipliers.statMultipliers[s][ServerMultipliers.IndexLevelWild]; - // troodonism values - if (sp.altStats?[s] != null) + // troodonism values singleplayer adjustment + if (thisStatHasAltValues + && sp.altStats?[s] != null) { sp.altStats[s].AddWhenTamed *= sp.altStats[s].AddWhenTamed > 0 ? singlePlayerServerMultipliers.statMultipliers[s][ServerMultipliers.IndexTamingAdd] From 6be268f8cf3c96152db3c22a09d60c74944fcdbc Mon Sep 17 00:00:00 2001 From: cadon Date: Tue, 28 May 2024 18:46:56 +0200 Subject: [PATCH 08/36] remember setting of link wild mutated levels in tester --- ARKBreedingStats/App.config | 3 +++ ARKBreedingStats/Form1.cs | 4 ++-- ARKBreedingStats/Form1.tester.cs | 3 +-- ARKBreedingStats/Properties/Settings.Designer.cs | 12 ++++++++++++ ARKBreedingStats/Properties/Settings.settings | 3 +++ 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ARKBreedingStats/App.config b/ARKBreedingStats/App.config index 7a0b2ac4..b935db80 100644 --- a/ARKBreedingStats/App.config +++ b/ARKBreedingStats/App.config @@ -538,6 +538,9 @@ True + + True + diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 42c04fbd..eda49cfa 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -14,14 +14,12 @@ using System.IO; using System.IO.Compression; using System.Linq; -using System.Threading.Tasks; using System.Windows.Forms; using ARKBreedingStats.mods; using ARKBreedingStats.NamePatterns; using ARKBreedingStats.utils; using static ARKBreedingStats.settings.Settings; using Color = System.Drawing.Color; -using ARKBreedingStats.AsbServer; using static ARKBreedingStats.uiControls.StatWeighting; namespace ARKBreedingStats @@ -416,6 +414,8 @@ private void Form1_Load(object sender, EventArgs e) creatureInfoInputExtractor.TribeLock = Properties.Settings.Default.TribeNameLocked; creatureInfoInputExtractor.LockServer = Properties.Settings.Default.ServerNameLocked; + CbLinkWildMutatedLevelsTester.Checked = Properties.Settings.Default.TesterLinkWildMutatedLevels; + // UI loaded // set theme colors diff --git a/ARKBreedingStats/Form1.tester.cs b/ARKBreedingStats/Form1.tester.cs index 5ec22a1b..a7634980 100644 --- a/ARKBreedingStats/Form1.tester.cs +++ b/ARKBreedingStats/Form1.tester.cs @@ -1,12 +1,10 @@ using ARKBreedingStats.Library; -using ARKBreedingStats.species; using System; using System.Drawing; using System.Linq; using System.Windows.Forms; using ARKBreedingStats.library; using ARKBreedingStats.uiControls; -using ARKBreedingStats.utils; namespace ARKBreedingStats { @@ -392,6 +390,7 @@ private void CbLinkWildMutatedLevelsTester_CheckedChanged(object sender, EventAr var linkWildMutated = CbLinkWildMutatedLevelsTester.Checked; for (int s = 0; s < Stats.StatsCount; s++) _testingIOs[s].LinkWildMutated = linkWildMutated; + Properties.Settings.Default.TesterLinkWildMutatedLevels = linkWildMutated; } } } diff --git a/ARKBreedingStats/Properties/Settings.Designer.cs b/ARKBreedingStats/Properties/Settings.Designer.cs index 07c49b4c..9a6b16ab 100644 --- a/ARKBreedingStats/Properties/Settings.Designer.cs +++ b/ARKBreedingStats/Properties/Settings.Designer.cs @@ -2409,5 +2409,17 @@ public bool MoveMutationLevelsOnExtractionIfUnique { this["MoveMutationLevelsOnExtractionIfUnique"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool TesterLinkWildMutatedLevels { + get { + return ((bool)(this["TesterLinkWildMutatedLevels"])); + } + set { + this["TesterLinkWildMutatedLevels"] = value; + } + } } } diff --git a/ARKBreedingStats/Properties/Settings.settings b/ARKBreedingStats/Properties/Settings.settings index adca4e73..906b5767 100644 --- a/ARKBreedingStats/Properties/Settings.settings +++ b/ARKBreedingStats/Properties/Settings.settings @@ -605,5 +605,8 @@ True + + True + \ No newline at end of file From da766e21c38e122f07d78003d961dd12aa648554 Mon Sep 17 00:00:00 2001 From: cadon Date: Wed, 29 May 2024 18:56:20 +0200 Subject: [PATCH 09/36] added species stat calculation for TBHM --- .../SpeciesStatsExtractor.cs | 96 +++++++++++++------ .../multiplierTesting/TaTmSolver.cs | 55 +++++++++-- 2 files changed, 113 insertions(+), 38 deletions(-) diff --git a/ARKBreedingStats/multiplierTesting/SpeciesStatsExtractor.cs b/ARKBreedingStats/multiplierTesting/SpeciesStatsExtractor.cs index f2c1229a..5f8fd961 100644 --- a/ARKBreedingStats/multiplierTesting/SpeciesStatsExtractor.cs +++ b/ARKBreedingStats/multiplierTesting/SpeciesStatsExtractor.cs @@ -147,39 +147,75 @@ private static bool ExtractValues(IList creatureFiles, Se , roundToDigits); spStats[Species.StatsRawIndexIncPerWildLevel] = incPerWild; - // TBHM - var tbhm = 1; - // todo - //if (s == Stats.Health) - //{ - // species.TamedBaseHealthMultiplier = 1; - //} - - // ta, tm - taTmSolver.SetFirstEquation(crHighTe.GetStatValue(s), baseValue, - crHighTe.Stats[s].Wild, incPerWild, svStats[ServerMultipliers.IndexLevelWild], - tbhm, crHighTe.DinoImprintingQuality, species.StatImprintMultipliers[s], - serverMultipliers.BabyImprintingStatScaleMultiplier, - crHighTe.TameEffectiveness, crHighTe.Stats[s].Tamed, 0, 0); - - resultText = taTmSolver.CalculateTaTm(crLowTe.GetStatValue(s), baseValue, - crLowTe.Stats[s].Wild, incPerWild, - svStats[ServerMultipliers.IndexLevelWild], - tbhm, crLowTe.DinoImprintingQuality, species.StatImprintMultipliers[s], - serverMultipliers.BabyImprintingStatScaleMultiplier, - crLowTe.TameEffectiveness, crLowTe.Stats[s].Tamed, 0, 0, out var taTaM, out var tmTmM); - if (!string.IsNullOrEmpty(resultText)) + var tbhm = 1d; + if (s == Stats.Health) { - errorSb.AppendLine($"Error when calculating ta tm for stat {s}: " + resultText); - isError = true; + // assuming TBHM is only for HP and Tm == 0 for HP + // to determine TBHM two creatures with a difference between + // baseValue * (1 + lw * iw * iwm) * (1 + ib * ibs * ibm) + // and without dom levels is needed. Take the creatures with the min and max. + var creaturesOrderedByWildHpLevelsWithoutDomLevels = creaturesOrderedByTeWithoutDomLevels + .OrderBy(c => + baseValue * (1 + c.Stats[Stats.Health].Wild * incPerWild * svStats[ServerMultipliers.IndexLevelWild]) + * (1 + c.DinoImprintingQuality * species.StatImprintMultipliers[s] * serverMultipliers.BabyImprintingStatScaleMultiplier) + ).ToArray(); + var lowLevelHpCreature = creaturesOrderedByWildHpLevelsWithoutDomLevels.First(); + var highLevelHpCreature = creaturesOrderedByWildHpLevelsWithoutDomLevels.Last(); + + taTmSolver.SetFirstEquation(lowLevelHpCreature.GetStatValue(s), baseValue, + lowLevelHpCreature.Stats[s].Wild, incPerWild, svStats[ServerMultipliers.IndexLevelWild], + 1, lowLevelHpCreature.DinoImprintingQuality, species.StatImprintMultipliers[s], + serverMultipliers.BabyImprintingStatScaleMultiplier, + lowLevelHpCreature.TameEffectiveness, lowLevelHpCreature.Stats[s].Tamed, 0, 0); + + resultText = taTmSolver.CalculateTaTbhm(highLevelHpCreature.GetStatValue(s), baseValue, + highLevelHpCreature.Stats[s].Wild, incPerWild, + svStats[ServerMultipliers.IndexLevelWild], + highLevelHpCreature.DinoImprintingQuality, species.StatImprintMultipliers[s], + serverMultipliers.BabyImprintingStatScaleMultiplier, + highLevelHpCreature.TameEffectiveness, highLevelHpCreature.Stats[s].Tamed, 0, 0, out var taTaM, out tbhm); + + if (!string.IsNullOrEmpty(resultText)) + { + errorSb.AppendLine($"Error when calculating ta and tbhm for stat {s}: " + resultText); + isError = true; + } + + if (taTaM != 0 && svStats[ServerMultipliers.IndexTamingAdd] != 0) + spStats[Species.StatsRawIndexAdditiveBonus] = + Math.Round(taTaM / svStats[ServerMultipliers.IndexTamingAdd], roundToDigits); + if (tbhm != 0) + species.TamedBaseHealthMultiplier = (float)tbhm; } + else + { + // ta, tm + taTmSolver.SetFirstEquation(crHighTe.GetStatValue(s), baseValue, + crHighTe.Stats[s].Wild, incPerWild, svStats[ServerMultipliers.IndexLevelWild], + 1, crHighTe.DinoImprintingQuality, species.StatImprintMultipliers[s], + serverMultipliers.BabyImprintingStatScaleMultiplier, + crHighTe.TameEffectiveness, crHighTe.Stats[s].Tamed, 0, 0); - if (taTaM != 0 && svStats[ServerMultipliers.IndexTamingAdd] != 0) - spStats[Species.StatsRawIndexAdditiveBonus] = - Math.Round(taTaM / svStats[ServerMultipliers.IndexTamingAdd], roundToDigits); - if (tmTmM != 0 && svStats[ServerMultipliers.IndexTamingMult] != 0) - spStats[Species.StatsRawIndexMultiplicativeBonus] = - Math.Round(tmTmM / svStats[ServerMultipliers.IndexTamingMult], roundToDigits); + resultText = taTmSolver.CalculateTaTm(crLowTe.GetStatValue(s), baseValue, + crLowTe.Stats[s].Wild, incPerWild, + svStats[ServerMultipliers.IndexLevelWild], + 1, crLowTe.DinoImprintingQuality, species.StatImprintMultipliers[s], + serverMultipliers.BabyImprintingStatScaleMultiplier, + crLowTe.TameEffectiveness, crLowTe.Stats[s].Tamed, 0, 0, out var taTaM, out var tmTmM); + + if (!string.IsNullOrEmpty(resultText)) + { + errorSb.AppendLine($"Error when calculating ta tm for stat {s}: " + resultText); + isError = true; + } + + if (taTaM != 0 && svStats[ServerMultipliers.IndexTamingAdd] != 0) + spStats[Species.StatsRawIndexAdditiveBonus] = + Math.Round(taTaM / svStats[ServerMultipliers.IndexTamingAdd], roundToDigits); + if (tmTmM != 0 && svStats[ServerMultipliers.IndexTamingMult] != 0) + spStats[Species.StatsRawIndexMultiplicativeBonus] = + Math.Round(tmTmM / svStats[ServerMultipliers.IndexTamingMult], roundToDigits); + } // dom level var creatureWithNonZeroDomLevels = diff --git a/ARKBreedingStats/multiplierTesting/TaTmSolver.cs b/ARKBreedingStats/multiplierTesting/TaTmSolver.cs index 01beb695..549e4e25 100644 --- a/ARKBreedingStats/multiplierTesting/TaTmSolver.cs +++ b/ARKBreedingStats/multiplierTesting/TaTmSolver.cs @@ -3,7 +3,7 @@ namespace ARKBreedingStats.multiplierTesting { /// - /// Solves Ta*TaM and Tm*TmM with two given equations. + /// Solves Ta*TaM and Tm*TmM or Ta*TaM and TBHM with two given equations. /// internal class TaTmSolver { @@ -20,11 +20,13 @@ internal class TaTmSolver // W = V/y // the formula is // W = (x * h + a) * (1 + TE * m) - // for solver W = (x * h + a) * (1 + t * m), U = (x_2 * h + a) * (1 + t_2 * m), V = (x_3 * h + a) * (1 + t_3 * m) for a, m, h + // for solver W = (x * h + a) * (1 + t * m), U = (x_2 * h + a) * (1 + t_2 * m) for a, m + // for solver W = x * h + a, U = x_2 * h + a for h, a // f like first equation, s like second equation private double _fW; private double _fX; + private double _fXWithoutTbhm; private double _fTe; /// @@ -46,15 +48,16 @@ internal class TaTmSolver public void SetFirstEquation(double statValue, double baseValue, double lw, double iw, double iwm, double tbhm, double ib, double ibs, double ibm, double te, double ld, double id, double idm) { - SetValues(statValue, baseValue, lw, iw, iwm, tbhm, ib, ibs, ibm, te, ld, id, idm, out _fW, out _fX, out _fTe); + SetValues(statValue, baseValue, lw, iw, iwm, tbhm, ib, ibs, ibm, te, ld, id, idm, out _fW, out _fX, out _fXWithoutTbhm, out _fTe); } private void SetValues(double statValue, double baseValue, double lw, double iw, double iwm, double tbhm, - double ib, double ibs, double ibm, double te, double ld, double id, double idm, out double w, out double x, - out double teOut) + double ib, double ibs, double ibm, double te, double ld, double id, double idm, out double w, + out double x, out double xWithoutTbhm, out double teOut) { w = statValue / (1 + ld * id * idm); - x = baseValue * (1 + lw * iw * iwm) * tbhm * (1 + ib * ibs * ibm); + xWithoutTbhm = baseValue * (1 + lw * iw * iwm) * (1 + ib * ibs * ibm); + x = xWithoutTbhm * tbhm; teOut = te; } @@ -80,8 +83,7 @@ private void SetValues(double statValue, double baseValue, double lw, double iw, public string CalculateTaTm(double statValue, double baseValue, double lw, double iw, double iwm, double tbhm, double ib, double ibs, double ibm, double te, double ld, double id, double idm, out double taTaM, out double tmTmM) { - // TODO use three equations to also determine TBHM. This is very complex, formula not yet determined - SetValues(statValue, baseValue, lw, iw, iwm, tbhm, ib, ibs, ibm, te, ld, id, idm, out var sW, out var sX, out var sTe); + SetValues(statValue, baseValue, lw, iw, iwm, tbhm, ib, ibs, ibm, te, ld, id, idm, out var sW, out var sX, out _, out var sTe); taTaM = 0; tmTmM = 0; @@ -123,5 +125,42 @@ public string CalculateTaTm(double statValue, double baseValue, double lw, doubl return null; // no error } + + /// + /// Calculate the products of Ta * TaM and TBHM with a second equation, assuming Tm == 0. + /// Returns error text or null on success. + /// + /// + /// + /// wild levels + /// increase per wild level of this species + /// increase per wild level server multiplier + /// imprinting bonus of creature + /// imprinting bonus species stat multiplier + /// imprinting bonus multiplier of server + /// taming effectiveness + /// domestic levels + /// increase per domestic level of species + /// increase per domestic level server multiplier + /// product of taming additive bonus of species and server multiplier + /// tamed bonus health multiplier of species + public string CalculateTaTbhm(double statValue, double baseValue, double lw, double iw, double iwm, + double ib, double ibs, double ibm, double te, double ld, double id, double idm, out double taTaM, + out double tbhm) + { + SetValues(statValue, baseValue, lw, iw, iwm, 1, ib, ibs, ibm, te, ld, id, idm, out var sW, out _, out var sXWithoutTbhm, out var sTe); + + taTaM = 0; + tbhm = 0; + + if (Math.Abs(_fXWithoutTbhm - sXWithoutTbhm) < 0.005) + { + return "The wild levels need to be more different to calculate TBHM"; + } + + taTaM = (_fW * sXWithoutTbhm - sW * _fXWithoutTbhm) / (sXWithoutTbhm - _fXWithoutTbhm); + tbhm = (sW - _fW) / (sXWithoutTbhm - _fXWithoutTbhm); + return null; // no error + } } } From 487c4f28bd97041e9ab2ad504f330d18503bd44f Mon Sep 17 00:00:00 2001 From: cadon Date: Wed, 29 May 2024 19:18:54 +0200 Subject: [PATCH 10/36] support dropping folders on species stat extractor label --- .../importExportGun/ExportGunFileExtensions.cs | 2 +- .../multiplierTesting/StatsMultiplierTesting.cs | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ARKBreedingStats/importExportGun/ExportGunFileExtensions.cs b/ARKBreedingStats/importExportGun/ExportGunFileExtensions.cs index 71bef665..feccd042 100644 --- a/ARKBreedingStats/importExportGun/ExportGunFileExtensions.cs +++ b/ARKBreedingStats/importExportGun/ExportGunFileExtensions.cs @@ -27,6 +27,6 @@ public static string Owner(this ExportGunCreatureFile ec) /// ASB expects the absolute value. /// public static float GetStatValue(this ExportGunCreatureFile ec, int statIndex) - => ec.Stats[statIndex].Value + (Stats.IsPercentage(statIndex) ? 1 : 0); + => ec == null ? 0 : ec.Stats[statIndex].Value + (Stats.IsPercentage(statIndex) ? 1 : 0); } } diff --git a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs index ebd338c4..eafa3031 100644 --- a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs +++ b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs @@ -805,7 +805,16 @@ private void ExtractSpeciesValuesFromExportFiles(string[] files) ExportGunServerFile serverMultipliersFile = null; string lastError = null; + var filePaths = new List(); foreach (var filePath in files) + { + if (File.Exists(filePath)) + filePaths.Add(filePath); + else if (Directory.Exists(filePath)) + filePaths.AddRange(Directory.GetFiles(filePath, "*", SearchOption.AllDirectories)); + } + + foreach (var filePath in filePaths) { var creature = ImportExportGun.LoadCreatureFile(filePath, out lastError, out _); if (creature != null) From c1e23bc245192c36ced9478b53dc2e6ecb12de52 Mon Sep 17 00:00:00 2001 From: cadon Date: Thu, 30 May 2024 19:38:39 +0200 Subject: [PATCH 11/36] button for TBHM solver. fixes. tooltips --- ARKBreedingStats/Form1.cs | 6 +- ARKBreedingStats/Form1.tester.cs | 3 +- .../StatMultiplierTestingControl.Designer.cs | 47 +++++++----- .../StatMultiplierTestingControl.cs | 63 +++++++++++++--- .../StatsMultiplierTesting.Designer.cs | 71 +++++++++---------- .../StatsMultiplierTesting.cs | 27 ++++--- .../multiplierTesting/TaTmSolver.cs | 10 +-- 7 files changed, 147 insertions(+), 80 deletions(-) diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index eda49cfa..7298bb8f 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -2626,7 +2626,11 @@ private void toolStripButtonCopy2Extractor_Click(object sender, EventArgs e) if (rbBredTester.Checked) rbBredExtractor.Checked = true; else if (rbTamedTester.Checked) + { rbTamedExtractor.Checked = true; + if (numericUpDownLowerTEffBound.Value > NumericUpDownTestingTE.Value) + numericUpDownLowerTEffBound.Value = Math.Floor(NumericUpDownTestingTE.Value); + } else rbWildExtractor.Checked = true; numericUpDownImprintingBonusExtractor.Value = numericUpDownImprintingBonusTester.Value; @@ -3338,7 +3342,7 @@ private void copyToMultiplierTesterToolStripButton_Click(object sender, EventArg { statValues[s] = _statIOs[s].IsActive ? _statIOs[s].Input - : StatValueCalculation.CalculateValue(speciesSelector1.SelectedSpecies, s, 0, 0, 0, tamed || bred); + : StatValueCalculation.CalculateValue(speciesSelector1.SelectedSpecies, s, 0, 0, 0, tamed || bred, roundToIngamePrecision: false); } var wildLevels = GetCurrentWildLevels(false); diff --git a/ARKBreedingStats/Form1.tester.cs b/ARKBreedingStats/Form1.tester.cs index a7634980..a2fb37b3 100644 --- a/ARKBreedingStats/Form1.tester.cs +++ b/ARKBreedingStats/Form1.tester.cs @@ -158,7 +158,7 @@ private void TestingStatIOsRecalculateValue(StatIO sIo) sIo.Input = StatValueCalculation.CalculateValue(speciesSelector1.SelectedSpecies, sIo.statIndex, sIo.LevelWild, sIo.LevelMut, sIo.LevelDom, rbTamedTester.Checked || rbBredTester.Checked, rbBredTester.Checked ? 1 : Math.Max(0, TamingEffectivenessTester), - rbBredTester.Checked ? (double)numericUpDownImprintingBonusTester.Value / 100 : 0); + rbBredTester.Checked ? (double)numericUpDownImprintingBonusTester.Value / 100 : 0, roundToIngamePrecision: false); } private void creatureInfoInputTester_Add2Library_Clicked(CreatureInfoInput sender) @@ -385,6 +385,7 @@ private double TamingEffectivenessTester get => rbWildTester.Checked ? -3 : (double)NumericUpDownTestingTE.Value / 100; set => NumericUpDownTestingTE.ValueSave = (decimal)(value >= 0 ? value * 100 : -1); } + private void CbLinkWildMutatedLevelsTester_CheckedChanged(object sender, EventArgs e) { var linkWildMutated = CbLinkWildMutatedLevelsTester.Checked; diff --git a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs index b01676c1..1cb666ed 100644 --- a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs +++ b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs @@ -78,10 +78,10 @@ private void InitializeComponent() this.CbTrodTm = new System.Windows.Forms.CheckBox(); this.CbTrodId = new System.Windows.Forms.CheckBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.LbTaTmTeStored = new System.Windows.Forms.Label(); this.BtSolveTaTm = new System.Windows.Forms.Button(); this.BtSolveTaMTmM = new System.Windows.Forms.Button(); this.BtStoreTaTm = new System.Windows.Forms.Button(); - this.LbTaTmTeStored = new System.Windows.Forms.Label(); this.nudIdM = new ARKBreedingStats.uiControls.Nud(); this.nudId = new ARKBreedingStats.uiControls.Nud(); this.nudTmM = new ARKBreedingStats.uiControls.Nud(); @@ -95,6 +95,7 @@ private void InitializeComponent() this.nudStatValue = new ARKBreedingStats.uiControls.Nud(); this.nudLd = new ARKBreedingStats.uiControls.Nud(); this.nudLw = new ARKBreedingStats.uiControls.Nud(); + this.BtSolveTaTbhm = new System.Windows.Forms.Button(); this.contextMenuStrip1.SuspendLayout(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudIdM)).BeginInit(); @@ -573,6 +574,7 @@ private void InitializeComponent() // // groupBox1 // + this.groupBox1.Controls.Add(this.BtSolveTaTbhm); this.groupBox1.Controls.Add(this.LbTaTmTeStored); this.groupBox1.Controls.Add(this.BtSolveTaTm); this.groupBox1.Controls.Add(this.BtSolveTaMTmM); @@ -582,31 +584,39 @@ private void InitializeComponent() this.groupBox1.Size = new System.Drawing.Size(126, 69); this.groupBox1.TabIndex = 41; this.groupBox1.TabStop = false; - this.groupBox1.Text = "Ta-Tm-Solver"; + this.groupBox1.Text = "Ta-Tm-TBHM-Solver"; + // + // LbTaTmTeStored + // + this.LbTaTmTeStored.AutoSize = true; + this.LbTaTmTeStored.Location = new System.Drawing.Point(68, 26); + this.LbTaTmTeStored.Name = "LbTaTmTeStored"; + this.LbTaTmTeStored.Size = new System.Drawing.Size(0, 13); + this.LbTaTmTeStored.TabIndex = 3; // // BtSolveTaTm // - this.BtSolveTaTm.Location = new System.Drawing.Point(62, 43); + this.BtSolveTaTm.Location = new System.Drawing.Point(39, 43); this.BtSolveTaTm.Name = "BtSolveTaTm"; - this.BtSolveTaTm.Size = new System.Drawing.Size(58, 23); + this.BtSolveTaTm.Size = new System.Drawing.Size(36, 23); this.BtSolveTaTm.TabIndex = 2; - this.BtSolveTaTm.Text = "Species"; + this.BtSolveTaTm.Text = "Spc"; this.BtSolveTaTm.UseVisualStyleBackColor = true; this.BtSolveTaTm.Click += new System.EventHandler(this.BtSolveTaTm_Click); // // BtSolveTaMTmM // - this.BtSolveTaMTmM.Location = new System.Drawing.Point(6, 43); + this.BtSolveTaMTmM.Location = new System.Drawing.Point(4, 43); this.BtSolveTaMTmM.Name = "BtSolveTaMTmM"; - this.BtSolveTaMTmM.Size = new System.Drawing.Size(50, 23); + this.BtSolveTaMTmM.Size = new System.Drawing.Size(33, 23); this.BtSolveTaMTmM.TabIndex = 1; - this.BtSolveTaMTmM.Text = "Server"; + this.BtSolveTaMTmM.Text = "Srv"; this.BtSolveTaMTmM.UseVisualStyleBackColor = true; this.BtSolveTaMTmM.Click += new System.EventHandler(this.BtSolveTaMTmM_Click); // // BtStoreTaTm // - this.BtStoreTaTm.Location = new System.Drawing.Point(6, 19); + this.BtStoreTaTm.Location = new System.Drawing.Point(4, 19); this.BtStoreTaTm.Name = "BtStoreTaTm"; this.BtStoreTaTm.Size = new System.Drawing.Size(60, 23); this.BtStoreTaTm.TabIndex = 0; @@ -614,14 +624,6 @@ private void InitializeComponent() this.BtStoreTaTm.UseVisualStyleBackColor = true; this.BtStoreTaTm.Click += new System.EventHandler(this.BtStoreTaTm_Click); // - // LbTaTmTeStored - // - this.LbTaTmTeStored.AutoSize = true; - this.LbTaTmTeStored.Location = new System.Drawing.Point(68, 26); - this.LbTaTmTeStored.Name = "LbTaTmTeStored"; - this.LbTaTmTeStored.Size = new System.Drawing.Size(0, 13); - this.LbTaTmTeStored.TabIndex = 3; - // // nudIdM // this.nudIdM.DecimalPlaces = 4; @@ -957,6 +959,16 @@ private void InitializeComponent() this.nudLw.TabIndex = 1; this.nudLw.ValueChanged += new System.EventHandler(this.nudLw_ValueChanged); // + // BtSolveTaTbhm + // + this.BtSolveTaTbhm.Location = new System.Drawing.Point(77, 43); + this.BtSolveTaTbhm.Name = "BtSolveTaTbhm"; + this.BtSolveTaTbhm.Size = new System.Drawing.Size(47, 23); + this.BtSolveTaTbhm.TabIndex = 4; + this.BtSolveTaTbhm.Text = "TBHM"; + this.BtSolveTaTbhm.UseVisualStyleBackColor = true; + this.BtSolveTaTbhm.Click += new System.EventHandler(this.BtSolveTaTbhm_Click); + // // StatMultiplierTestingControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1094,5 +1106,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem calculateIwToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem calculateIdToolStripMenuItem; private System.Windows.Forms.Label LbTaTmTeStored; + private System.Windows.Forms.Button BtSolveTaTbhm; } } diff --git a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs index f5ae5f53..1c0d5791 100644 --- a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs +++ b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs @@ -109,6 +109,19 @@ public StatMultiplierTestingControl() updateValues = true; } + public StatMultiplierTestingControl(ToolTip tt) : this() + { + SetTooltips(tt); + } + + public void SetTooltips(ToolTip tt) + { + if (tt == null) return; + tt.SetToolTip(BtSolveTaTm, "Solves Ta and Tm (species stat multipliers) with two equations"); + tt.SetToolTip(BtSolveTaMTmM, "Solves TaM and TmM (server stat multipliers) with two equations"); + tt.SetToolTip(BtSolveTaTbhm, "Solves Ta and TBHM (species stat multipliers, TBHM used only for HP) with two equations."); + } + private void UpdateCalculations(bool forceUpdate = false) { updateValues = updateValues || forceUpdate; @@ -375,7 +388,7 @@ public bool CalculateIwM(bool silent = true) (double)nudIw.Value, _spIw, (double)nudTBHM.Value, (double)nudTa.Value, (double)nudTaM.Value, _spTa, (double)nudTm.Value, (double)nudTmM.Value, _spTm, _tamed, _bred, _NoIB, _TE, (int)nudLd.Value, (double)nudId.Value, (double)nudIdM.Value * AtlasIdMultiplier, _spId, _IB, _IBM, _sIBM) ?? 0; - nudIwM.ValueSaveDouble = Math.Round(iwM, 5); + nudIwM.ValueSaveDouble = Math.Round(iwM, DecimalPlaces); return true; } if (!silent) MessageBox.Show("Divide by Zero-error, e.g. Lw or Iw needs to be at least 1."); @@ -387,7 +400,7 @@ public bool CalculateIdM(bool silent = true) var idM = CalculateMultipliers.IdM((double)nudStatValue.Value * (_percent ? 0.01 : 1), Vd, (int)nudLd.Value, (double)nudId.Value * AtlasIdMultiplier, _spId); if (idM != null) { - nudIdM.ValueSaveDouble = Math.Round(idM.Value, 5); + nudIdM.ValueSaveDouble = Math.Round(idM.Value, DecimalPlaces); return true; } @@ -405,7 +418,7 @@ public bool CalculateTaM(bool silent = true) if (taM.HasValue) { - nudTaM.ValueSaveDouble = Math.Round(taM.Value, 5); + nudTaM.ValueSaveDouble = Math.Round(taM.Value, DecimalPlaces); return true; } if (!silent) MessageBox.Show("Divide by Zero-error, e.g. Ta needs to be > 0."); @@ -420,7 +433,7 @@ public bool CalculateTmM(bool silent = true) (double)nudIwM.Value, _spIw, (double)nudTBHM.Value, (double)nudTa.Value, (double)nudTaM.Value, _spTa, (double)nudTm.Value, (double)nudTmM.Value, _spTm, _tamed, _bred, _NoIB, _TE, (int)nudLd.Value, (double)nudId.Value, (double)nudIdM.Value * AtlasIdMultiplier, _spId, _IB, _IBM, _sIBM) ?? 0; - nudTmM.ValueSaveDouble = Math.Round(tmM, 5); + nudTmM.ValueSaveDouble = Math.Round(tmM, DecimalPlaces); return true; } if (!silent) MessageBox.Show("Divide by Zero-error, e.g. Tm and TE needs to be > 0."); @@ -436,7 +449,7 @@ public bool CalculateIw(bool silent = true) (double)nudIwM.Value, _spIw, (double)nudTBHM.Value, (double)nudTa.Value, (double)nudTaM.Value, _spTa, (double)nudTm.Value, (double)nudTmM.Value, _spTm, _tamed, _bred, _NoIB, _TE, (int)nudLd.Value, (double)nudId.Value, (double)nudIdM.Value * AtlasIdMultiplier, _spId, _IB, _IBM, _sIBM) ?? 0; - nudIw.ValueSaveDouble = Math.Round(iw, 5); + nudIw.ValueSaveDouble = Math.Round(iw, DecimalPlaces); return true; } if (!silent) MessageBox.Show("Divide by Zero-error, e.g. Lw or IwM needs to be greater than 0."); @@ -448,7 +461,7 @@ public bool CalculateId(bool silent = true) var id = CalculateMultipliers.Id((double)nudStatValue.Value * (_percent ? 0.01 : 1), Vd, (int)nudLd.Value, (double)nudIdM.Value * AtlasIdMultiplier, _spId); if (id != null) { - nudId.ValueSaveDouble = Math.Round(id.Value, 5); + nudId.ValueSaveDouble = Math.Round(id.Value, DecimalPlaces); return true; } @@ -925,6 +938,11 @@ private void BtSolveTaTm_Click(object sender, EventArgs e) SolveTaMTmM(false); } + private void BtSolveTaTbhm_Click(object sender, EventArgs e) + { + SolveTaMTbhm(); + } + /// /// Solve a = Ta * TaM and b = Tm * TmM with two equations. /// @@ -949,17 +967,42 @@ private void SolveTaMTmM(bool serverValues) if (serverValues) { if (nudTa.ValueDouble != 0) - nudTaM.ValueSaveDouble = Math.Round(taTaM / nudTa.ValueDouble, 6); + nudTaM.ValueSaveDouble = Math.Round(taTaM / nudTa.ValueDouble, DecimalPlaces); if (nudTm.ValueDouble != 0) - nudTmM.ValueSaveDouble = Math.Round(tmTmM / nudTm.ValueDouble, 6); + nudTmM.ValueSaveDouble = Math.Round(tmTmM / nudTm.ValueDouble, DecimalPlaces); } else { if (nudTaM.ValueDouble != 0) - nudTa.ValueSaveDouble = Math.Round(taTaM / nudTaM.ValueDouble, 6); + nudTa.ValueSaveDouble = Math.Round(taTaM / nudTaM.ValueDouble, DecimalPlaces); if (nudTmM.ValueDouble != 0) - nudTm.ValueSaveDouble = Math.Round(tmTmM / nudTmM.ValueDouble, 6); + nudTm.ValueSaveDouble = Math.Round(tmTmM / nudTmM.ValueDouble, DecimalPlaces); + } + } + + /// + /// Solve a = Ta * TaM and TBHM with two equations. + /// + private void SolveTaMTbhm() + { + if (_taTmSolver == null) + { + MessageBoxes.ShowMessageBox("Set first equation first"); + return; } + + var errorText = _taTmSolver.CalculateTaTbhm(nudStatValue.ValueDouble * (_percent ? 0.01 : 1), nudB.ValueDouble, nudLw.ValueDouble, nudIw.ValueDouble, + nudIwM.ValueDouble, _IB, _sIBM, _IBM, _TE, nudLd.ValueDouble, nudId.ValueDouble, + nudIdM.ValueDouble, out var taTaM, out var tbhm); + if (!string.IsNullOrEmpty(errorText)) + { + MessageBoxes.ShowMessageBox(errorText); + return; + } + + if (nudTaM.ValueDouble != 0) + nudTa.ValueSaveDouble = Math.Round(taTaM / nudTaM.ValueDouble, DecimalPlaces); + nudTBHM.ValueSaveDouble = Math.Round(tbhm, DecimalPlaces); } } } diff --git a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs index 0aada95f..4b6bbb12 100644 --- a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs +++ b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs @@ -39,7 +39,7 @@ private void InitializeComponent() this.CbAllowFlyerSpeedLeveling = new System.Windows.Forms.CheckBox(); this.cbSingleplayerSettings = new System.Windows.Forms.CheckBox(); this.btUseMultipliersFromSettings = new System.Windows.Forms.Button(); - this.llStatCalculation = new System.Windows.Forms.LinkLabel(); + this.LbSpeciesValuesExtractor = new System.Windows.Forms.Label(); this.LbBlueprintPath = new System.Windows.Forms.Label(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.rbBred = new System.Windows.Forms.RadioButton(); @@ -93,7 +93,7 @@ private void InitializeComponent() this.setAllWildLevelsToTheClosestValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.setAllDomLevelsToTheClosestValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.copyStatValuesToClipboardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.LbSpeciesValuesExtractor = new System.Windows.Forms.Label(); + this.openWikiPageOnStatCalculationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.nudTE = new ARKBreedingStats.uiControls.Nud(); this.nudIBM = new ARKBreedingStats.uiControls.Nud(); this.nudIB = new ARKBreedingStats.uiControls.Nud(); @@ -122,7 +122,6 @@ private void InitializeComponent() this.flowLayoutPanel1.Controls.Add(this.groupBox5); this.flowLayoutPanel1.Controls.Add(this.btUseMultipliersFromSettings); this.flowLayoutPanel1.Controls.Add(this.LbSpeciesValuesExtractor); - this.flowLayoutPanel1.Controls.Add(this.llStatCalculation); this.flowLayoutPanel1.Controls.Add(this.LbBlueprintPath); this.flowLayoutPanel1.Controls.Add(this.groupBox1); this.flowLayoutPanel1.Controls.Add(this.groupBox2); @@ -240,24 +239,27 @@ private void InitializeComponent() this.btUseMultipliersFromSettings.UseVisualStyleBackColor = false; this.btUseMultipliersFromSettings.Click += new System.EventHandler(this.btUseMultipliersFromSettings_Click); // - // llStatCalculation + // LbSpeciesValuesExtractor // - this.llStatCalculation.AutoSize = true; - this.flowLayoutPanel1.SetFlowBreak(this.llStatCalculation, true); - this.llStatCalculation.Location = new System.Drawing.Point(252, 93); - this.llStatCalculation.Margin = new System.Windows.Forms.Padding(3, 16, 3, 0); - this.llStatCalculation.Name = "llStatCalculation"; - this.llStatCalculation.Size = new System.Drawing.Size(160, 13); - this.llStatCalculation.TabIndex = 3; - this.llStatCalculation.TabStop = true; - this.llStatCalculation.Text = "Stat Calculation on the ARK-wiki"; - this.llStatCalculation.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llStatCalculation_LinkClicked); + this.LbSpeciesValuesExtractor.AllowDrop = true; + this.LbSpeciesValuesExtractor.AutoSize = true; + this.LbSpeciesValuesExtractor.BackColor = System.Drawing.Color.White; + this.flowLayoutPanel1.SetFlowBreak(this.LbSpeciesValuesExtractor, true); + this.LbSpeciesValuesExtractor.Location = new System.Drawing.Point(3, 77); + this.LbSpeciesValuesExtractor.Name = "LbSpeciesValuesExtractor"; + this.LbSpeciesValuesExtractor.Padding = new System.Windows.Forms.Padding(3, 12, 3, 12); + this.LbSpeciesValuesExtractor.Size = new System.Drawing.Size(243, 37); + this.LbSpeciesValuesExtractor.TabIndex = 15; + this.LbSpeciesValuesExtractor.Text = "Drop exportGun files to determine species values"; + this.LbSpeciesValuesExtractor.DragDrop += new System.Windows.Forms.DragEventHandler(this.LbSpeciesValuesExtractor_DragDrop); + this.LbSpeciesValuesExtractor.DragEnter += new System.Windows.Forms.DragEventHandler(this.LbSpeciesValuesExtractor_DragEnter); + this.LbSpeciesValuesExtractor.DragLeave += new System.EventHandler(this.LbSpeciesValuesExtractor_DragLeave); // // LbBlueprintPath // this.flowLayoutPanel1.SetFlowBreak(this.LbBlueprintPath, true); this.LbBlueprintPath.ForeColor = System.Drawing.SystemColors.ControlDarkDark; - this.LbBlueprintPath.Location = new System.Drawing.Point(3, 106); + this.LbBlueprintPath.Location = new System.Drawing.Point(3, 114); this.LbBlueprintPath.Name = "LbBlueprintPath"; this.LbBlueprintPath.Size = new System.Drawing.Size(901, 21); this.LbBlueprintPath.TabIndex = 14; @@ -268,7 +270,7 @@ private void InitializeComponent() this.groupBox1.Controls.Add(this.rbBred); this.groupBox1.Controls.Add(this.rbTamed); this.groupBox1.Controls.Add(this.rbWild); - this.groupBox1.Location = new System.Drawing.Point(3, 130); + this.groupBox1.Location = new System.Drawing.Point(3, 138); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(167, 49); this.groupBox1.TabIndex = 4; @@ -313,7 +315,7 @@ private void InitializeComponent() this.groupBox2.Controls.Add(this.LbCalculatedWildLevel); this.groupBox2.Controls.Add(this.label1); this.groupBox2.Controls.Add(this.nudTE); - this.groupBox2.Location = new System.Drawing.Point(176, 130); + this.groupBox2.Location = new System.Drawing.Point(176, 138); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(163, 49); this.groupBox2.TabIndex = 5; @@ -343,7 +345,7 @@ private void InitializeComponent() this.groupBox3.Controls.Add(this.label2); this.groupBox3.Controls.Add(this.nudIBM); this.groupBox3.Controls.Add(this.nudIB); - this.groupBox3.Location = new System.Drawing.Point(345, 130); + this.groupBox3.Location = new System.Drawing.Point(345, 138); this.groupBox3.Name = "groupBox3"; this.groupBox3.Size = new System.Drawing.Size(213, 49); this.groupBox3.TabIndex = 6; @@ -362,7 +364,7 @@ private void InitializeComponent() // gbFineAdjustment // this.gbFineAdjustment.Controls.Add(this.tbFineAdjustments); - this.gbFineAdjustment.Location = new System.Drawing.Point(564, 130); + this.gbFineAdjustment.Location = new System.Drawing.Point(564, 138); this.gbFineAdjustment.Name = "gbFineAdjustment"; this.gbFineAdjustment.Size = new System.Drawing.Size(376, 49); this.gbFineAdjustment.TabIndex = 7; @@ -385,7 +387,7 @@ private void InitializeComponent() // this.lBDummyEmptyFlowBreak.AutoSize = true; this.flowLayoutPanel1.SetFlowBreak(this.lBDummyEmptyFlowBreak, true); - this.lBDummyEmptyFlowBreak.Location = new System.Drawing.Point(946, 127); + this.lBDummyEmptyFlowBreak.Location = new System.Drawing.Point(946, 135); this.lBDummyEmptyFlowBreak.Name = "lBDummyEmptyFlowBreak"; this.lBDummyEmptyFlowBreak.Size = new System.Drawing.Size(0, 13); this.lBDummyEmptyFlowBreak.TabIndex = 11; @@ -406,7 +408,7 @@ private void InitializeComponent() this.panel1.Controls.Add(this.LbLw); this.panel1.Controls.Add(this.LbBaseValue); this.flowLayoutPanel1.SetFlowBreak(this.panel1, true); - this.panel1.Location = new System.Drawing.Point(3, 185); + this.panel1.Location = new System.Drawing.Point(3, 193); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(1005, 29); this.panel1.TabIndex = 8; @@ -547,7 +549,7 @@ private void InitializeComponent() this.gbLevel.Controls.Add(this.lbLevelSumWild); this.gbLevel.Controls.Add(this.label16); this.gbLevel.Controls.Add(this.nudCreatureLevel); - this.gbLevel.Location = new System.Drawing.Point(3, 220); + this.gbLevel.Location = new System.Drawing.Point(3, 228); this.gbLevel.Name = "gbLevel"; this.gbLevel.Size = new System.Drawing.Size(200, 81); this.gbLevel.TabIndex = 9; @@ -584,7 +586,7 @@ private void InitializeComponent() // LbAbbreviations // this.LbAbbreviations.AutoSize = true; - this.LbAbbreviations.Location = new System.Drawing.Point(209, 217); + this.LbAbbreviations.Location = new System.Drawing.Point(209, 225); this.LbAbbreviations.Name = "LbAbbreviations"; this.LbAbbreviations.Size = new System.Drawing.Size(780, 39); this.LbAbbreviations.TabIndex = 13; @@ -596,7 +598,8 @@ private void InitializeComponent() this.statMultipliersToolStripMenuItem, this.calculateToolStripMenuItem, this.setAllLvlToToolStripMenuItem, - this.copyStatValuesToClipboardToolStripMenuItem}); + this.copyStatValuesToClipboardToolStripMenuItem, + this.openWikiPageOnStatCalculationToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Size = new System.Drawing.Size(1011, 24); @@ -753,20 +756,12 @@ private void InitializeComponent() this.copyStatValuesToClipboardToolStripMenuItem.Text = "Copy raw species stat values to clipboard"; this.copyStatValuesToClipboardToolStripMenuItem.Click += new System.EventHandler(this.copyStatValuesToClipboardToolStripMenuItem_Click); // - // LbSpeciesValuesExtractor + // openWikiPageOnStatCalculationToolStripMenuItem // - this.LbSpeciesValuesExtractor.AllowDrop = true; - this.LbSpeciesValuesExtractor.AutoSize = true; - this.LbSpeciesValuesExtractor.BackColor = System.Drawing.Color.White; - this.LbSpeciesValuesExtractor.Location = new System.Drawing.Point(3, 77); - this.LbSpeciesValuesExtractor.Name = "LbSpeciesValuesExtractor"; - this.LbSpeciesValuesExtractor.Padding = new System.Windows.Forms.Padding(3, 8, 3, 8); - this.LbSpeciesValuesExtractor.Size = new System.Drawing.Size(243, 29); - this.LbSpeciesValuesExtractor.TabIndex = 15; - this.LbSpeciesValuesExtractor.Text = "Drop exportGun files to determine species values"; - this.LbSpeciesValuesExtractor.DragDrop += new System.Windows.Forms.DragEventHandler(this.LbSpeciesValuesExtractor_DragDrop); - this.LbSpeciesValuesExtractor.DragEnter += new System.Windows.Forms.DragEventHandler(this.LbSpeciesValuesExtractor_DragEnter); - this.LbSpeciesValuesExtractor.DragLeave += new System.EventHandler(this.LbSpeciesValuesExtractor_DragLeave); + this.openWikiPageOnStatCalculationToolStripMenuItem.Name = "openWikiPageOnStatCalculationToolStripMenuItem"; + this.openWikiPageOnStatCalculationToolStripMenuItem.Size = new System.Drawing.Size(201, 20); + this.openWikiPageOnStatCalculationToolStripMenuItem.Text = "Open wiki page on stat calculation"; + this.openWikiPageOnStatCalculationToolStripMenuItem.Click += new System.EventHandler(this.openWikiPageOnStatCalculationToolStripMenuItem_Click); // // nudTE // @@ -913,7 +908,6 @@ private void InitializeComponent() private System.Windows.Forms.Label LbIw; private System.Windows.Forms.Label LbLw; private System.Windows.Forms.Label LbBaseValue; - private System.Windows.Forms.LinkLabel llStatCalculation; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.RadioButton rbBred; private System.Windows.Forms.RadioButton rbTamed; @@ -957,5 +951,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem allIdToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem copyStatValuesToClipboardToolStripMenuItem; private System.Windows.Forms.Label LbSpeciesValuesExtractor; + private System.Windows.Forms.ToolStripMenuItem openWikiPageOnStatCalculationToolStripMenuItem; } } diff --git a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs index eafa3031..202bead3 100644 --- a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs +++ b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs @@ -37,7 +37,7 @@ public StatsMultiplierTesting() _statControls = new StatMultiplierTestingControl[Stats.StatsCount]; for (int s = 0; s < Stats.StatsCount; s++) { - var sc = new StatMultiplierTestingControl(); + var sc = new StatMultiplierTestingControl(_tt); if (Stats.IsPercentage(s)) sc.Percent = true; sc.OnLevelChanged += Sc_OnLevelChanged; @@ -47,10 +47,10 @@ public StatsMultiplierTesting() _statControls[s] = sc; } // add controls in order like in-game - for (int s = 0; s < Stats.StatsCount; s++) + foreach (var s in Stats.DisplayOrder) { - flowLayoutPanel1.Controls.Add(_statControls[Stats.DisplayOrder[s]]); - flowLayoutPanel1.SetFlowBreak(_statControls[Stats.DisplayOrder[s]], true); + flowLayoutPanel1.Controls.Add(_statControls[s]); + flowLayoutPanel1.SetFlowBreak(_statControls[s], true); } // set bottom controls to bottom @@ -355,11 +355,6 @@ internal void CheckIfMultipliersAreEqualToSettings() btUseMultipliersFromSettings.Visible = showWarning; } - private void llStatCalculation_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) - { - ArkWiki.OpenPage("Creature_stats_calculation"); - } - public CreatureCollection CreatureCollection { set @@ -592,6 +587,15 @@ private void SetToolTips() _tt.SetToolTip(LbIdM, "Increase per domestic level global multiplier | per level stats multiplier dino tamed"); _tt.SetToolTip(LbFinalValue, "Final stat value displayed in the game"); _tt.SetToolTip(LbCalculatedWildLevel, "Calculated pre tame level, dependent on the taming effectiveness and the post tame level"); + _tt.SetToolTip(LbSpeciesValuesExtractor, @"Drop export gun files or folders with export gun files on this label to extract the species stat values. +If one of the files is an export gun server multiplier file, its values are used. +To determine all species values, the files with the following creature combinations are needed +* wild level 1 creature for base values +* wild creature with at least one level in all possible stats +* two tamed creature with no applied levels and different TE (TE difference should be large to avoid rounding errors, at least 10 %points difference should be good) and different wild levels in HP (for TBHM) +* a tamed creature with at least one level in all possible stats +* a creature with imprinting (probably an imprinting value of at least 10 % should result in good results) to determine which stats are effected by imprinting in what extend +"); } private void StatsMultiplierTesting_DragEnter(object sender, DragEventArgs e) @@ -858,5 +862,10 @@ private void ExtractSpeciesValuesFromExportFiles(string[] files) "Extracted the species values and copied them to the clipboard. Note the TBHM and singleplayer is not supported and may lead to wrong values.", MessageBoxIcon.Information); } + + private void openWikiPageOnStatCalculationToolStripMenuItem_Click(object sender, EventArgs e) + { + ArkWiki.OpenPage("Creature stats calculation"); + } } } diff --git a/ARKBreedingStats/multiplierTesting/TaTmSolver.cs b/ARKBreedingStats/multiplierTesting/TaTmSolver.cs index 549e4e25..0936e4db 100644 --- a/ARKBreedingStats/multiplierTesting/TaTmSolver.cs +++ b/ARKBreedingStats/multiplierTesting/TaTmSolver.cs @@ -149,17 +149,19 @@ public string CalculateTaTbhm(double statValue, double baseValue, double lw, dou out double tbhm) { SetValues(statValue, baseValue, lw, iw, iwm, 1, ib, ibs, ibm, te, ld, id, idm, out var sW, out _, out var sXWithoutTbhm, out var sTe); - + taTaM = 0; tbhm = 0; - if (Math.Abs(_fXWithoutTbhm - sXWithoutTbhm) < 0.005) + var dividend = sXWithoutTbhm - _fXWithoutTbhm; + + if (Math.Abs(dividend) < 0.005) { return "The wild levels need to be more different to calculate TBHM"; } - taTaM = (_fW * sXWithoutTbhm - sW * _fXWithoutTbhm) / (sXWithoutTbhm - _fXWithoutTbhm); - tbhm = (sW - _fW) / (sXWithoutTbhm - _fXWithoutTbhm); + taTaM = (_fW * sXWithoutTbhm - sW * _fXWithoutTbhm) / dividend; + tbhm = (sW - _fW) / dividend; return null; // no error } } From e9a7fa8b538026434d1d35c089662a10296c7bfb Mon Sep 17 00:00:00 2001 From: cadon Date: Thu, 30 May 2024 19:40:06 +0200 Subject: [PATCH 12/36] removed unused var --- ARKBreedingStats/multiplierTesting/TaTmSolver.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ARKBreedingStats/multiplierTesting/TaTmSolver.cs b/ARKBreedingStats/multiplierTesting/TaTmSolver.cs index 0936e4db..dddc9bcc 100644 --- a/ARKBreedingStats/multiplierTesting/TaTmSolver.cs +++ b/ARKBreedingStats/multiplierTesting/TaTmSolver.cs @@ -148,7 +148,7 @@ public string CalculateTaTbhm(double statValue, double baseValue, double lw, dou double ib, double ibs, double ibm, double te, double ld, double id, double idm, out double taTaM, out double tbhm) { - SetValues(statValue, baseValue, lw, iw, iwm, 1, ib, ibs, ibm, te, ld, id, idm, out var sW, out _, out var sXWithoutTbhm, out var sTe); + SetValues(statValue, baseValue, lw, iw, iwm, 1, ib, ibs, ibm, te, ld, id, idm, out var sW, out _, out var sXWithoutTbhm, out _); taTaM = 0; tbhm = 0; From 54006bd4464927f3c6d21be843261bac85e10b54 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 9 Jun 2024 17:28:17 +0200 Subject: [PATCH 13/36] fix if displayed stats are not specified --- ARKBreedingStats/RadarChart.cs | 26 ++++++++++++++++++++++---- ARKBreedingStats/species/Species.cs | 7 +++++-- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/ARKBreedingStats/RadarChart.cs b/ARKBreedingStats/RadarChart.cs index 667aefb5..57417a45 100644 --- a/ARKBreedingStats/RadarChart.cs +++ b/ARKBreedingStats/RadarChart.cs @@ -228,10 +228,28 @@ public void SetLevels(int[] levelsWild = null, int[] levelMutations = null, Spec g.FillEllipse(_grBrushBg, _xm - _maxR, _ym - _maxR, 2 * _maxR + 1, 2 * _maxR + 1); - g.FillPolygon(_grBrushMutations, _psm.ToArray()); - g.DrawPolygon(penLine, _psm.ToArray()); - g.FillPolygon(_grBrushFg, _ps.ToArray()); - g.DrawPolygon(penLine, _ps.ToArray()); + switch (_psm.Count) + { + case 0: break; + case 1: + var margin = _psm[0].Y; + var width = 2 * (_ym - margin); + var rectMutationLevel = new Rectangle(margin, margin, width, width); + margin = _ps[0].Y; + width = 2 * (_ym - margin); + var rectWildLevel = new Rectangle(margin, margin, width, width); + g.FillEllipse(_grBrushMutations, rectMutationLevel); + g.DrawEllipse(penLine, rectMutationLevel); + g.FillEllipse(_grBrushFg, rectWildLevel); + g.DrawEllipse(penLine, rectWildLevel); + break; + default: + g.FillPolygon(_grBrushMutations, _psm.ToArray()); + g.DrawPolygon(penLine, _psm.ToArray()); + g.FillPolygon(_grBrushFg, _ps.ToArray()); + g.DrawPolygon(penLine, _ps.ToArray()); + break; + } // grid circles double stepFactor = (double)_step / _maxLevel; diff --git a/ARKBreedingStats/species/Species.cs b/ARKBreedingStats/species/Species.cs index 9dc17888..dbe8f6cb 100644 --- a/ARKBreedingStats/species/Species.cs +++ b/ARKBreedingStats/species/Species.cs @@ -69,7 +69,7 @@ public class Species /// Indicates if a stat is shown in game represented by bit-flags /// [JsonProperty("displayedStats")] - public int DisplayedStats { private set; get; } + public int DisplayedStats { private set; get; } = -1; public const int displayedStatsDefault = 927; /// /// Indicates if a species uses a stat represented by bit-flags @@ -217,6 +217,9 @@ public void Initialize() _skipWildLevelStatsWithServerSettings |= statBit; } + if (DisplayedStats == -1) + DisplayedStats = usedStats; + if (fullStatsRawLength != 0) fullStatsRaw = completeRaws; @@ -455,7 +458,7 @@ public void LoadOverrides(Species overrides) if (overrides.variants != null) variants = overrides.variants; if (overrides.fullStatsRaw != null) fullStatsRaw = overrides.fullStatsRaw; if (overrides.altBaseStatsRaw != null) altBaseStatsRaw = overrides.altBaseStatsRaw; - if (overrides.DisplayedStats != 0) DisplayedStats = overrides.DisplayedStats; + if (overrides.DisplayedStats != -1) DisplayedStats = overrides.DisplayedStats; if (overrides.skipWildLevelStats != 0) skipWildLevelStats = overrides.skipWildLevelStats; if (overrides.TamedBaseHealthMultiplier != null) TamedBaseHealthMultiplier = overrides.TamedBaseHealthMultiplier; if (overrides.statImprintMult != null && overrides.statImprintMult != StatImprintMultipliersDefaultAse) statImprintMult = overrides.statImprintMult.ToArray(); From d7de470c3b6fa10e25a8a23638b36e43042a1b4d Mon Sep 17 00:00:00 2001 From: cadon Date: Mon, 10 Jun 2024 19:07:00 +0200 Subject: [PATCH 14/36] override fix --- ARKBreedingStats/species/Species.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ARKBreedingStats/species/Species.cs b/ARKBreedingStats/species/Species.cs index dbe8f6cb..b00be90c 100644 --- a/ARKBreedingStats/species/Species.cs +++ b/ARKBreedingStats/species/Species.cs @@ -217,7 +217,7 @@ public void Initialize() _skipWildLevelStatsWithServerSettings |= statBit; } - if (DisplayedStats == -1) + if (DisplayedStats == -1 && usedStats != 0) DisplayedStats = usedStats; if (fullStatsRawLength != 0) From d83a9575f955d966990b3c62fbcbc26d6ed2e128 Mon Sep 17 00:00:00 2001 From: cadon Date: Tue, 11 Jun 2024 20:15:54 +0200 Subject: [PATCH 15/36] fix exception if parents are placeholders, fixes #1352 --- ARKBreedingStats/Pedigree/PedigreeCreation.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ARKBreedingStats/Pedigree/PedigreeCreation.cs b/ARKBreedingStats/Pedigree/PedigreeCreation.cs index bfaace5d..5b5ba882 100644 --- a/ARKBreedingStats/Pedigree/PedigreeCreation.cs +++ b/ARKBreedingStats/Pedigree/PedigreeCreation.cs @@ -301,15 +301,20 @@ private static bool CreateParentsChild(Creature creature, List[] lines, L internal static void CreateGeneInheritanceLines(Creature offspring, Creature mother, Creature father, List[] lines, int x, int y) { - if (offspring.levelsWild == null || offspring.valuesDom == null) return; + if (offspring.levelsWild == null + || offspring.valuesDom == null + || (mother?.flags.HasFlag(CreatureFlags.Placeholder) != false + && father?.flags.HasFlag(CreatureFlags.Placeholder) != false) + ) + return; for (int s = 0; s < PedigreeCreature.DisplayedStatsCount; s++) { int si = PedigreeCreature.DisplayedStats[s]; if (offspring.valuesDom[si] <= 0) continue; // don't display arrows for non used stats - var levelMother = mother?.levelsWild[si] ?? -1; - var levelFather = father?.levelsWild[si] ?? -1; + var levelMother = mother?.levelsWild?[si] ?? -1; + var levelFather = father?.levelsWild?[si] ?? -1; var levelMotherMutated = mother?.levelsMutated?[si] ?? -1; var levelFatherMutated = father?.levelsMutated?[si] ?? -1; var levelOffspring = offspring.levelsWild[si]; From 65d9422828702b6979bc768d3ff5e12168f3f262 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 16 Jun 2024 22:13:16 +0200 Subject: [PATCH 16/36] level color profiles wip --- ARKBreedingStats/ARKBreedingStats.csproj | 42 +- ARKBreedingStats/CreatureInfoInput.cs | 1 + ARKBreedingStats/Form1.Designer.cs | 974 +++++++++--------- ARKBreedingStats/Form1.cs | 33 +- ARKBreedingStats/Utils.cs | 165 ++- .../library/CreatureInfoGraphic.cs | 21 +- .../library/ExportImportCreatures.cs | 4 +- .../library/LevelGraphRepresentation.cs | 160 +++ ARKBreedingStats/library/StatOptions.cs | 66 ++ ARKBreedingStats/library/StatWeight.cs | 16 + ARKBreedingStats/library/StatsOptions.cs | 174 ++++ ARKBreedingStats/raising/ParentStats.cs | 4 +- .../uiControls/HueControl.Designer.cs | 152 +++ ARKBreedingStats/uiControls/HueControl.cs | 222 ++++ ARKBreedingStats/uiControls/HueControl.resx | 123 +++ .../uiControls/ScrollForm.Designer.cs | 55 + ARKBreedingStats/uiControls/ScrollForm.cs | 44 + ARKBreedingStats/uiControls/ScrollForm.resx | 120 +++ .../uiControls/StatIO.Designer.cs | 58 +- ARKBreedingStats/uiControls/StatIO.cs | 94 +- .../uiControls/StatOptionsControl.Designer.cs | 122 +++ .../uiControls/StatOptionsControl.cs | 66 ++ .../uiControls/StatOptionsControl.resx | 123 +++ ARKBreedingStats/uiControls/StatPotentials.cs | 3 +- ARKBreedingStats/uiControls/StatSelector.cs | 10 +- .../StatsOptionsControl.Designer.cs | 166 +++ .../uiControls/StatsOptionsControl.cs | 176 ++++ .../uiControls/StatsOptionsControl.resx | 120 +++ ARKBreedingStats/utils/ExtensionMethods.cs | 10 + 29 files changed, 2655 insertions(+), 669 deletions(-) create mode 100644 ARKBreedingStats/library/LevelGraphRepresentation.cs create mode 100644 ARKBreedingStats/library/StatOptions.cs create mode 100644 ARKBreedingStats/library/StatWeight.cs create mode 100644 ARKBreedingStats/library/StatsOptions.cs create mode 100644 ARKBreedingStats/uiControls/HueControl.Designer.cs create mode 100644 ARKBreedingStats/uiControls/HueControl.cs create mode 100644 ARKBreedingStats/uiControls/HueControl.resx create mode 100644 ARKBreedingStats/uiControls/ScrollForm.Designer.cs create mode 100644 ARKBreedingStats/uiControls/ScrollForm.cs create mode 100644 ARKBreedingStats/uiControls/ScrollForm.resx create mode 100644 ARKBreedingStats/uiControls/StatOptionsControl.Designer.cs create mode 100644 ARKBreedingStats/uiControls/StatOptionsControl.cs create mode 100644 ARKBreedingStats/uiControls/StatOptionsControl.resx create mode 100644 ARKBreedingStats/uiControls/StatsOptionsControl.Designer.cs create mode 100644 ARKBreedingStats/uiControls/StatsOptionsControl.cs create mode 100644 ARKBreedingStats/uiControls/StatsOptionsControl.resx diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj index bc445ac0..669137d5 100644 --- a/ARKBreedingStats/ARKBreedingStats.csproj +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -104,7 +104,11 @@ + + + + @@ -139,6 +143,12 @@ Hatching.cs + + UserControl + + + HueControl.cs + Form @@ -155,6 +165,24 @@ Form + + Form + + + ScrollForm.cs + + + UserControl + + + StatOptionsControl.cs + + + UserControl + + + StatsOptionsControl.cs + UserControl @@ -731,12 +759,24 @@ Hatching.cs + + HueControl.cs + LibraryFilterTemplates.cs ParentInheritance.cs + + ScrollForm.cs + + + StatOptionsControl.cs + + + StatsOptionsControl.cs + StatSelector.cs @@ -1005,7 +1045,7 @@ - 49.0.2 + 50.0.1 3.3.4 diff --git a/ARKBreedingStats/CreatureInfoInput.cs b/ARKBreedingStats/CreatureInfoInput.cs index e79b2b15..30f34da9 100644 --- a/ARKBreedingStats/CreatureInfoInput.cs +++ b/ARKBreedingStats/CreatureInfoInput.cs @@ -3,6 +3,7 @@ using System.Drawing; using System.Windows.Forms; using System.Windows.Threading; +using ARKBreedingStats.library; using ARKBreedingStats.Library; using ARKBreedingStats.NamePatterns; using ARKBreedingStats.Properties; diff --git a/ARKBreedingStats/Form1.Designer.cs b/ARKBreedingStats/Form1.Designer.cs index f0f47194..707c621f 100644 --- a/ARKBreedingStats/Form1.Designer.cs +++ b/ARKBreedingStats/Form1.Designer.cs @@ -59,8 +59,6 @@ private void InitializeComponent() this.groupBox1 = new System.Windows.Forms.GroupBox(); this.lbImprintedCount = new System.Windows.Forms.Label(); this.labelImprintingTester = new System.Windows.Forms.Label(); - this.numericUpDownImprintingBonusTester = new ARKBreedingStats.uiControls.Nud(); - this.NumericUpDownTestingTE = new ARKBreedingStats.uiControls.Nud(); this.labelTesterTE = new System.Windows.Forms.Label(); this.groupBoxPossibilities = new System.Windows.Forms.GroupBox(); this.listViewPossibilities = new System.Windows.Forms.ListView(); @@ -73,14 +71,11 @@ private void InitializeComponent() this.cbExactlyImprinting = new System.Windows.Forms.CheckBox(); this.labelImprintingBonus = new System.Windows.Forms.Label(); this.lbImprintingCuddleCountExtractor = new System.Windows.Forms.Label(); - this.numericUpDownImprintingBonusExtractor = new ARKBreedingStats.uiControls.Nud(); this.panelExtrTE = new System.Windows.Forms.Panel(); this.labelTE = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.numericUpDownUpperTEffBound = new ARKBreedingStats.uiControls.Nud(); this.label3 = new System.Windows.Forms.Label(); - this.numericUpDownLowerTEffBound = new ARKBreedingStats.uiControls.Nud(); this.lbLevel = new System.Windows.Forms.Label(); this.lbBreedingValueTester = new System.Windows.Forms.Label(); this.lbTesterWildLevel = new System.Windows.Forms.Label(); @@ -166,9 +161,7 @@ private void InitializeComponent() this.tabPageStatTesting = new System.Windows.Forms.TabPage(); this.CbLinkWildMutatedLevelsTester = new System.Windows.Forms.CheckBox(); this.pictureBoxColorRegionsTester = new System.Windows.Forms.PictureBox(); - this.statPotentials1 = new ARKBreedingStats.uiControls.StatPotentials(); this.gbStatChart = new System.Windows.Forms.GroupBox(); - this.radarChart1 = new ARKBreedingStats.RadarChart(); this.panelWildTamedBredTester = new System.Windows.Forms.Panel(); this.rbBredTester = new System.Windows.Forms.RadioButton(); this.rbTamedTester = new System.Windows.Forms.RadioButton(); @@ -188,7 +181,6 @@ private void InitializeComponent() this.lbCurrentCreature = new System.Windows.Forms.Label(); this.labelCurrentTesterCreature = new System.Windows.Forms.Label(); this.lbTestingInfo = new System.Windows.Forms.Label(); - this.creatureInfoInputTester = new ARKBreedingStats.CreatureInfoInput(); this.tabPageExtractor = new System.Windows.Forms.TabPage(); this.LbAsa = new System.Windows.Forms.Label(); this.LbBlueprintPath = new System.Windows.Forms.Label(); @@ -196,7 +188,6 @@ private void InitializeComponent() this.llOnlineHelpExtractionIssues = new System.Windows.Forms.LinkLabel(); this.PbCreatureColorsExtractor = new System.Windows.Forms.PictureBox(); this.groupBoxRadarChartExtractor = new System.Windows.Forms.GroupBox(); - this.radarChartExtractor = new ARKBreedingStats.RadarChart(); this.lbImprintingFailInfo = new System.Windows.Forms.Label(); this.groupBoxTamingInfo = new System.Windows.Forms.GroupBox(); this.labelTamingInfo = new System.Windows.Forms.Label(); @@ -209,10 +200,6 @@ private void InitializeComponent() this.btExtractLevels = new System.Windows.Forms.Button(); this.cbQuickWildCheck = new System.Windows.Forms.CheckBox(); this.labelErrorHelp = new System.Windows.Forms.Label(); - this.creatureAnalysis1 = new ARKBreedingStats.uiControls.CreatureAnalysis(); - this.parentInheritanceExtractor = new ARKBreedingStats.uiControls.ParentInheritance(); - this.numericUpDownLevel = new ARKBreedingStats.uiControls.Nud(); - this.creatureInfoInputExtractor = new ARKBreedingStats.CreatureInfoInput(); this.tabPageLibrary = new System.Windows.Forms.TabPage(); this.tableLayoutPanelLibrary = new System.Windows.Forms.TableLayoutPanel(); this.listViewLibrary = new System.Windows.Forms.ListView(); @@ -312,36 +299,23 @@ private void InitializeComponent() this.buttonRecalculateTops = new System.Windows.Forms.Button(); this.label17 = new System.Windows.Forms.Label(); this.tabPageLibRadarChart = new System.Windows.Forms.TabPage(); - this.radarChartLibrary = new ARKBreedingStats.RadarChart(); - this.creatureBoxListView = new ARKBreedingStats.CreatureBox(); this.tabPageLibraryInfo = new System.Windows.Forms.TabPage(); this.tlpLibraryInfo = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.CbLibraryInfoUseFilter = new System.Windows.Forms.CheckBox(); this.BtCopyLibraryColorToClipboard = new System.Windows.Forms.Button(); - this.libraryInfoControl1 = new ARKBreedingStats.uiControls.LibraryInfoControl(); this.tabPagePedigree = new System.Windows.Forms.TabPage(); - this.pedigree1 = new ARKBreedingStats.Pedigree.PedigreeControl(); this.tabPageTaming = new System.Windows.Forms.TabPage(); - this.tamingControl1 = new ARKBreedingStats.TamingControl(); this.tabPageBreedingPlan = new System.Windows.Forms.TabPage(); - this.breedingPlan1 = new ARKBreedingStats.BreedingPlanning.BreedingPlan(); this.tabPageHatching = new System.Windows.Forms.TabPage(); - this.hatching1 = new ARKBreedingStats.uiControls.Hatching(); this.tabPageRaising = new System.Windows.Forms.TabPage(); - this.raisingControl1 = new ARKBreedingStats.raising.RaisingControl(); this.tabPageTimer = new System.Windows.Forms.TabPage(); - this.timerList1 = new ARKBreedingStats.TimerControl(); this.tabPagePlayerTribes = new System.Windows.Forms.TabPage(); - this.tribesControl1 = new ARKBreedingStats.TribesControl(); this.tabPageNotes = new System.Windows.Forms.TabPage(); - this.notesControl1 = new ARKBreedingStats.NotesControl(); this.TabPageOCR = new System.Windows.Forms.TabPage(); - this.ocrControl1 = new ARKBreedingStats.ocr.OCRControl(); this.tabPageExtractionTests = new System.Windows.Forms.TabPage(); - this.extractionTestControl1 = new ARKBreedingStats.testCases.ExtractionTestControl(); this.tabPageMultiplierTesting = new System.Windows.Forms.TabPage(); - this.statsMultiplierTesting1 = new ARKBreedingStats.multiplierTesting.StatsMultiplierTesting(); + this.TabPageStatOptions = new System.Windows.Forms.TabPage(); this.btReadValuesFromArk = new System.Windows.Forms.Button(); this.cbEventMultipliers = new System.Windows.Forms.CheckBox(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); @@ -379,7 +353,6 @@ private void InitializeComponent() this.panelToolBar = new System.Windows.Forms.Panel(); this.btImportLastExported = new System.Windows.Forms.Button(); this.pbSpecies = new System.Windows.Forms.PictureBox(); - this.tbSpeciesGlobal = new ARKBreedingStats.uiControls.TextBoxSuggest(); this.cbGuessSpecies = new System.Windows.Forms.CheckBox(); this.cbToggleOverlay = new System.Windows.Forms.CheckBox(); this.lbListening = new System.Windows.Forms.Label(); @@ -392,17 +365,41 @@ private void InitializeComponent() this.collapseMutationsLevelsASEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator27 = new System.Windows.Forms.ToolStripSeparator(); this.resetColumnOrderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.statPotentials1 = new ARKBreedingStats.uiControls.StatPotentials(); + this.radarChart1 = new ARKBreedingStats.RadarChart(); + this.numericUpDownImprintingBonusTester = new ARKBreedingStats.uiControls.Nud(); + this.NumericUpDownTestingTE = new ARKBreedingStats.uiControls.Nud(); + this.creatureInfoInputTester = new ARKBreedingStats.CreatureInfoInput(); + this.radarChartExtractor = new ARKBreedingStats.RadarChart(); + this.numericUpDownImprintingBonusExtractor = new ARKBreedingStats.uiControls.Nud(); + this.numericUpDownUpperTEffBound = new ARKBreedingStats.uiControls.Nud(); + this.numericUpDownLowerTEffBound = new ARKBreedingStats.uiControls.Nud(); + this.creatureAnalysis1 = new ARKBreedingStats.uiControls.CreatureAnalysis(); + this.parentInheritanceExtractor = new ARKBreedingStats.uiControls.ParentInheritance(); + this.numericUpDownLevel = new ARKBreedingStats.uiControls.Nud(); + this.creatureInfoInputExtractor = new ARKBreedingStats.CreatureInfoInput(); + this.radarChartLibrary = new ARKBreedingStats.RadarChart(); + this.creatureBoxListView = new ARKBreedingStats.CreatureBox(); + this.libraryInfoControl1 = new ARKBreedingStats.uiControls.LibraryInfoControl(); + this.pedigree1 = new ARKBreedingStats.Pedigree.PedigreeControl(); + this.tamingControl1 = new ARKBreedingStats.TamingControl(); + this.breedingPlan1 = new ARKBreedingStats.BreedingPlanning.BreedingPlan(); + this.hatching1 = new ARKBreedingStats.uiControls.Hatching(); + this.raisingControl1 = new ARKBreedingStats.raising.RaisingControl(); + this.timerList1 = new ARKBreedingStats.TimerControl(); + this.tribesControl1 = new ARKBreedingStats.TribesControl(); + this.notesControl1 = new ARKBreedingStats.NotesControl(); + this.ocrControl1 = new ARKBreedingStats.ocr.OCRControl(); + this.extractionTestControl1 = new ARKBreedingStats.testCases.ExtractionTestControl(); + this.statsMultiplierTesting1 = new ARKBreedingStats.multiplierTesting.StatsMultiplierTesting(); + this.statsOptionsControl1 = new ARKBreedingStats.uiControls.StatsOptionsControl(); this.speciesSelector1 = new ARKBreedingStats.SpeciesSelector(); + this.tbSpeciesGlobal = new ARKBreedingStats.uiControls.TextBoxSuggest(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).BeginInit(); this.groupBoxPossibilities.SuspendLayout(); this.groupBoxDetailsExtractor.SuspendLayout(); this.panelExtrImpr.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusExtractor)).BeginInit(); this.panelExtrTE.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownUpperTEffBound)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffBound)).BeginInit(); this.menuStrip1.SuspendLayout(); this.panelSums.SuspendLayout(); this.panelWildTamedBred.SuspendLayout(); @@ -410,7 +407,6 @@ private void InitializeComponent() this.tabPageStatTesting.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxColorRegionsTester)).BeginInit(); this.gbStatChart.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).BeginInit(); this.panelWildTamedBredTester.SuspendLayout(); this.groupBox2.SuspendLayout(); this.flowLayoutPanelStatIOsTester.SuspendLayout(); @@ -420,12 +416,10 @@ private void InitializeComponent() this.tabPageExtractor.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.PbCreatureColorsExtractor)).BeginInit(); this.groupBoxRadarChartExtractor.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).BeginInit(); this.groupBoxTamingInfo.SuspendLayout(); this.gbStatsExtractor.SuspendLayout(); this.flowLayoutPanelStatIOsExtractor.SuspendLayout(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLevel)).BeginInit(); this.tabPageLibrary.SuspendLayout(); this.tableLayoutPanelLibrary.SuspendLayout(); this.contextMenuStripLibrary.SuspendLayout(); @@ -435,7 +429,6 @@ private void InitializeComponent() this.tabPage3.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); this.tabPageLibRadarChart.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).BeginInit(); this.tabPageLibraryInfo.SuspendLayout(); this.tlpLibraryInfo.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout(); @@ -450,11 +443,21 @@ private void InitializeComponent() this.TabPageOCR.SuspendLayout(); this.tabPageExtractionTests.SuspendLayout(); this.tabPageMultiplierTesting.SuspendLayout(); + this.TabPageStatOptions.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.toolStrip2.SuspendLayout(); this.panelToolBar.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbSpecies)).BeginInit(); this.contextMenuStripLibraryHeader.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusExtractor)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownUpperTEffBound)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffBound)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLevel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).BeginInit(); this.SuspendLayout(); // // aboutToolStripMenuItem @@ -652,52 +655,6 @@ private void InitializeComponent() this.labelImprintingTester.TabIndex = 5; this.labelImprintingTester.Text = "% Imprinting Bonus"; // - // numericUpDownImprintingBonusTester - // - this.numericUpDownImprintingBonusTester.DecimalPlaces = 5; - this.numericUpDownImprintingBonusTester.Enabled = false; - this.numericUpDownImprintingBonusTester.ForeColor = System.Drawing.SystemColors.GrayText; - this.numericUpDownImprintingBonusTester.Location = new System.Drawing.Point(6, 45); - this.numericUpDownImprintingBonusTester.Maximum = new decimal(new int[] { - 1000, - 0, - 0, - 0}); - this.numericUpDownImprintingBonusTester.Name = "numericUpDownImprintingBonusTester"; - this.numericUpDownImprintingBonusTester.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownImprintingBonusTester.Size = new System.Drawing.Size(75, 20); - this.numericUpDownImprintingBonusTester.TabIndex = 4; - this.numericUpDownImprintingBonusTester.ValueChanged += new System.EventHandler(this.numericUpDownImprintingBonusTester_ValueChanged); - // - // NumericUpDownTestingTE - // - this.NumericUpDownTestingTE.DecimalPlaces = 2; - this.NumericUpDownTestingTE.ForeColor = System.Drawing.SystemColors.WindowText; - this.NumericUpDownTestingTE.Location = new System.Drawing.Point(6, 19); - this.NumericUpDownTestingTE.Minimum = new decimal(new int[] { - 1, - 0, - 0, - -2147483648}); - this.NumericUpDownTestingTE.Name = "NumericUpDownTestingTE"; - this.NumericUpDownTestingTE.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.NumericUpDownTestingTE.Size = new System.Drawing.Size(60, 20); - this.NumericUpDownTestingTE.TabIndex = 0; - this.NumericUpDownTestingTE.Value = new decimal(new int[] { - 80, - 0, - 0, - 0}); - this.NumericUpDownTestingTE.ValueChanged += new System.EventHandler(this.NumericUpDownTestingTE_ValueChanged); - // // labelTesterTE // this.labelTesterTE.AutoSize = true; @@ -809,27 +766,6 @@ private void InitializeComponent() this.lbImprintingCuddleCountExtractor.TabIndex = 50; this.lbImprintingCuddleCountExtractor.Text = "(0×)"; // - // numericUpDownImprintingBonusExtractor - // - this.numericUpDownImprintingBonusExtractor.DecimalPlaces = 5; - this.numericUpDownImprintingBonusExtractor.ForeColor = System.Drawing.SystemColors.GrayText; - this.numericUpDownImprintingBonusExtractor.Location = new System.Drawing.Point(3, 3); - this.numericUpDownImprintingBonusExtractor.Maximum = new decimal(new int[] { - 1000, - 0, - 0, - 0}); - this.numericUpDownImprintingBonusExtractor.Name = "numericUpDownImprintingBonusExtractor"; - this.numericUpDownImprintingBonusExtractor.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownImprintingBonusExtractor.Size = new System.Drawing.Size(77, 20); - this.numericUpDownImprintingBonusExtractor.TabIndex = 6; - this.numericUpDownImprintingBonusExtractor.ValueChanged += new System.EventHandler(this.numericUpDownImprintingBonusExtractor_ValueChanged); - this.numericUpDownImprintingBonusExtractor.Enter += new System.EventHandler(this.numericUpDown_Enter); - // // panelExtrTE // this.panelExtrTE.Controls.Add(this.labelTE); @@ -869,25 +805,6 @@ private void InitializeComponent() this.label1.TabIndex = 5; this.label1.Text = "%"; // - // numericUpDownUpperTEffBound - // - this.numericUpDownUpperTEffBound.ForeColor = System.Drawing.SystemColors.WindowText; - this.numericUpDownUpperTEffBound.Location = new System.Drawing.Point(147, 3); - this.numericUpDownUpperTEffBound.Name = "numericUpDownUpperTEffBound"; - this.numericUpDownUpperTEffBound.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownUpperTEffBound.Size = new System.Drawing.Size(45, 20); - this.numericUpDownUpperTEffBound.TabIndex = 3; - this.numericUpDownUpperTEffBound.Value = new decimal(new int[] { - 100, - 0, - 0, - 0}); - this.numericUpDownUpperTEffBound.Enter += new System.EventHandler(this.numericUpDown_Enter); - // // label3 // this.label3.AutoSize = true; @@ -897,25 +814,6 @@ private void InitializeComponent() this.label3.TabIndex = 2; this.label3.Text = "-"; // - // numericUpDownLowerTEffBound - // - this.numericUpDownLowerTEffBound.ForeColor = System.Drawing.SystemColors.WindowText; - this.numericUpDownLowerTEffBound.Location = new System.Drawing.Point(80, 3); - this.numericUpDownLowerTEffBound.Name = "numericUpDownLowerTEffBound"; - this.numericUpDownLowerTEffBound.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownLowerTEffBound.Size = new System.Drawing.Size(45, 20); - this.numericUpDownLowerTEffBound.TabIndex = 1; - this.numericUpDownLowerTEffBound.Value = new decimal(new int[] { - 80, - 0, - 0, - 0}); - this.numericUpDownLowerTEffBound.Enter += new System.EventHandler(this.numericUpDown_Enter); - // // lbLevel // this.lbLevel.AutoSize = true; @@ -1601,6 +1499,7 @@ private void InitializeComponent() this.tabControlMain.Controls.Add(this.TabPageOCR); this.tabControlMain.Controls.Add(this.tabPageExtractionTests); this.tabControlMain.Controls.Add(this.tabPageMultiplierTesting); + this.tabControlMain.Controls.Add(this.TabPageStatOptions); this.tabControlMain.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControlMain.Location = new System.Drawing.Point(0, 103); this.tabControlMain.Name = "tabControlMain"; @@ -1649,13 +1548,6 @@ private void InitializeComponent() this.pictureBoxColorRegionsTester.TabStop = false; this.pictureBoxColorRegionsTester.Click += new System.EventHandler(this.pictureBoxColorRegionsTester_Click); // - // statPotentials1 - // - this.statPotentials1.Location = new System.Drawing.Point(860, 9); - this.statPotentials1.Name = "statPotentials1"; - this.statPotentials1.Size = new System.Drawing.Size(293, 433); - this.statPotentials1.TabIndex = 12; - // // gbStatChart // this.gbStatChart.Controls.Add(this.radarChart1); @@ -1666,16 +1558,6 @@ private void InitializeComponent() this.gbStatChart.TabStop = false; this.gbStatChart.Text = "Stat-Chart"; // - // radarChart1 - // - this.radarChart1.Image = ((System.Drawing.Image)(resources.GetObject("radarChart1.Image"))); - this.radarChart1.Location = new System.Drawing.Point(6, 19); - this.radarChart1.Name = "radarChart1"; - this.radarChart1.Size = new System.Drawing.Size(200, 200); - this.radarChart1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.radarChart1.TabIndex = 10; - this.radarChart1.TabStop = false; - // // panelWildTamedBredTester // this.panelWildTamedBredTester.Controls.Add(this.rbBredTester); @@ -1872,43 +1754,6 @@ private void InitializeComponent() this.lbTestingInfo.TabIndex = 37; this.lbTestingInfo.Text = "Preview or edit levels of a creature."; // - // creatureInfoInputTester - // - this.creatureInfoInputTester.AlreadyExistingCreature = null; - this.creatureInfoInputTester.ColorIdsAlsoPossible = null; - this.creatureInfoInputTester.CooldownUntil = null; - this.creatureInfoInputTester.CreatureFlags = ARKBreedingStats.Library.CreatureFlags.None; - this.creatureInfoInputTester.CreatureName = ""; - this.creatureInfoInputTester.CreatureNote = ""; - this.creatureInfoInputTester.CreatureOwner = ""; - this.creatureInfoInputTester.CreatureServer = ""; - this.creatureInfoInputTester.CreatureSex = ARKBreedingStats.Library.Sex.Unknown; - this.creatureInfoInputTester.CreatureStatus = ARKBreedingStats.Library.CreatureStatus.Available; - this.creatureInfoInputTester.CreatureTribe = ""; - this.creatureInfoInputTester.DomesticatedAt = new System.DateTime(2014, 12, 31, 0, 0, 0, 0); - this.creatureInfoInputTester.Father = null; - this.creatureInfoInputTester.GrowingUntil = null; - this.creatureInfoInputTester.Location = new System.Drawing.Point(373, 184); - this.creatureInfoInputTester.LockServer = false; - this.creatureInfoInputTester.Mother = null; - this.creatureInfoInputTester.MutationCounterFather = 0; - this.creatureInfoInputTester.MutationCounterMother = 0; - this.creatureInfoInputTester.Name = "creatureInfoInputTester"; - this.creatureInfoInputTester.OwnerLock = false; - this.creatureInfoInputTester.RegionColors = new byte[] { - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0))}; - this.creatureInfoInputTester.Size = new System.Drawing.Size(262, 590); - this.creatureInfoInputTester.TabIndex = 4; - this.creatureInfoInputTester.TribeLock = false; - this.creatureInfoInputTester.Add2LibraryClicked += new System.Action(this.creatureInfoInputTester_Add2Library_Clicked); - this.creatureInfoInputTester.Save2LibraryClicked += new System.Action(this.creatureInfoInputTester_Save2Library_Clicked); - this.creatureInfoInputTester.ParentListRequested += new System.Action(this.CreatureInfoInput_ParentListRequested); - // // tabPageExtractor // this.tabPageExtractor.AutoScroll = true; @@ -2005,17 +1850,6 @@ private void InitializeComponent() this.groupBoxRadarChartExtractor.TabStop = false; this.groupBoxRadarChartExtractor.Text = "Stat-Chart"; // - // radarChartExtractor - // - this.radarChartExtractor.Dock = System.Windows.Forms.DockStyle.Fill; - this.radarChartExtractor.Image = ((System.Drawing.Image)(resources.GetObject("radarChartExtractor.Image"))); - this.radarChartExtractor.Location = new System.Drawing.Point(3, 16); - this.radarChartExtractor.Name = "radarChartExtractor"; - this.radarChartExtractor.Size = new System.Drawing.Size(144, 144); - this.radarChartExtractor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; - this.radarChartExtractor.TabIndex = 10; - this.radarChartExtractor.TabStop = false; - // // lbImprintingFailInfo // this.lbImprintingFailInfo.BackColor = System.Drawing.Color.MistyRose; @@ -2143,81 +1977,7 @@ private void InitializeComponent() this.labelErrorHelp.TabIndex = 40; this.labelErrorHelp.Text = resources.GetString("labelErrorHelp.Text"); // - // creatureAnalysis1 - // - this.creatureAnalysis1.Location = new System.Drawing.Point(903, 265); - this.creatureAnalysis1.Name = "creatureAnalysis1"; - this.creatureAnalysis1.Size = new System.Drawing.Size(346, 199); - this.creatureAnalysis1.TabIndex = 55; - // - // parentInheritanceExtractor - // - this.parentInheritanceExtractor.Location = new System.Drawing.Point(903, 470); - this.parentInheritanceExtractor.Name = "parentInheritanceExtractor"; - this.parentInheritanceExtractor.Size = new System.Drawing.Size(337, 182); - this.parentInheritanceExtractor.TabIndex = 52; - // - // numericUpDownLevel - // - this.numericUpDownLevel.ForeColor = System.Drawing.SystemColors.WindowText; - this.numericUpDownLevel.Location = new System.Drawing.Point(244, 9); - this.numericUpDownLevel.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.numericUpDownLevel.Name = "numericUpDownLevel"; - this.numericUpDownLevel.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownLevel.Size = new System.Drawing.Size(56, 20); - this.numericUpDownLevel.TabIndex = 2; - this.numericUpDownLevel.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numericUpDownLevel.Enter += new System.EventHandler(this.numericUpDown_Enter); - // - // creatureInfoInputExtractor - // - this.creatureInfoInputExtractor.AlreadyExistingCreature = null; - this.creatureInfoInputExtractor.ColorIdsAlsoPossible = null; - this.creatureInfoInputExtractor.CooldownUntil = null; - this.creatureInfoInputExtractor.CreatureFlags = ARKBreedingStats.Library.CreatureFlags.None; - this.creatureInfoInputExtractor.CreatureName = ""; - this.creatureInfoInputExtractor.CreatureNote = ""; - this.creatureInfoInputExtractor.CreatureOwner = ""; - this.creatureInfoInputExtractor.CreatureServer = ""; - this.creatureInfoInputExtractor.CreatureSex = ARKBreedingStats.Library.Sex.Unknown; - this.creatureInfoInputExtractor.CreatureStatus = ARKBreedingStats.Library.CreatureStatus.Available; - this.creatureInfoInputExtractor.CreatureTribe = ""; - this.creatureInfoInputExtractor.DomesticatedAt = new System.DateTime(2014, 12, 31, 0, 0, 0, 0); - this.creatureInfoInputExtractor.Father = null; - this.creatureInfoInputExtractor.GrowingUntil = null; - this.creatureInfoInputExtractor.Location = new System.Drawing.Point(373, 184); - this.creatureInfoInputExtractor.LockServer = false; - this.creatureInfoInputExtractor.Mother = null; - this.creatureInfoInputExtractor.MutationCounterFather = 0; - this.creatureInfoInputExtractor.MutationCounterMother = 0; - this.creatureInfoInputExtractor.Name = "creatureInfoInputExtractor"; - this.creatureInfoInputExtractor.OwnerLock = false; - this.creatureInfoInputExtractor.RegionColors = new byte[] { - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0))}; - this.creatureInfoInputExtractor.Size = new System.Drawing.Size(262, 590); - this.creatureInfoInputExtractor.TabIndex = 7; - this.creatureInfoInputExtractor.TribeLock = false; - this.creatureInfoInputExtractor.Add2LibraryClicked += new System.Action(this.creatureInfoInputExtractor_Add2Library_Clicked); - this.creatureInfoInputExtractor.ParentListRequested += new System.Action(this.CreatureInfoInput_ParentListRequested); - // - // tabPageLibrary + // tabPageLibrary // this.tabPageLibrary.Controls.Add(this.tableLayoutPanelLibrary); this.tabPageLibrary.Location = new System.Drawing.Point(4, 22); @@ -3038,27 +2798,6 @@ private void InitializeComponent() this.tabPageLibRadarChart.Text = "Chart"; this.tabPageLibRadarChart.UseVisualStyleBackColor = true; // - // radarChartLibrary - // - this.radarChartLibrary.Dock = System.Windows.Forms.DockStyle.Top; - this.radarChartLibrary.Image = ((System.Drawing.Image)(resources.GetObject("radarChartLibrary.Image"))); - this.radarChartLibrary.Location = new System.Drawing.Point(3, 3); - this.radarChartLibrary.Name = "radarChartLibrary"; - this.radarChartLibrary.Size = new System.Drawing.Size(175, 287); - this.radarChartLibrary.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.radarChartLibrary.TabIndex = 0; - this.radarChartLibrary.TabStop = false; - // - // creatureBoxListView - // - this.creatureBoxListView.Location = new System.Drawing.Point(3, 3); - this.creatureBoxListView.Name = "creatureBoxListView"; - this.creatureBoxListView.Size = new System.Drawing.Size(189, 406); - this.creatureBoxListView.TabIndex = 0; - this.creatureBoxListView.Changed += new System.Action(this.UpdateDisplayedCreatureValues); - this.creatureBoxListView.GiveParents += new System.Action(this.CreatureBoxListView_FindParents); - this.creatureBoxListView.SelectCreature += new System.Action(this.SelectCreatureInLibrary); - // // tabPageLibraryInfo // this.tabPageLibraryInfo.Controls.Add(this.tlpLibraryInfo); @@ -3122,14 +2861,6 @@ private void InitializeComponent() this.BtCopyLibraryColorToClipboard.UseVisualStyleBackColor = true; this.BtCopyLibraryColorToClipboard.Click += new System.EventHandler(this.BtCopyLibraryColorToClipboard_Click); // - // libraryInfoControl1 - // - this.libraryInfoControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.libraryInfoControl1.Location = new System.Drawing.Point(3, 39); - this.libraryInfoControl1.Name = "libraryInfoControl1"; - this.libraryInfoControl1.Size = new System.Drawing.Size(1858, 736); - this.libraryInfoControl1.TabIndex = 3; - // // tabPagePedigree // this.tabPagePedigree.Controls.Add(this.pedigree1); @@ -3141,16 +2872,6 @@ private void InitializeComponent() this.tabPagePedigree.Text = "Pedigree"; this.tabPagePedigree.UseVisualStyleBackColor = true; // - // pedigree1 - // - this.pedigree1.AutoScroll = true; - this.pedigree1.Dock = System.Windows.Forms.DockStyle.Fill; - this.pedigree1.LeftColumnWidth = 203; - this.pedigree1.Location = new System.Drawing.Point(3, 3); - this.pedigree1.Name = "pedigree1"; - this.pedigree1.Size = new System.Drawing.Size(1864, 778); - this.pedigree1.TabIndex = 0; - // // tabPageTaming // this.tabPageTaming.Controls.Add(this.tamingControl1); @@ -3162,24 +2883,6 @@ private void InitializeComponent() this.tabPageTaming.Text = "Taming"; this.tabPageTaming.UseVisualStyleBackColor = true; // - // tamingControl1 - // - this.tamingControl1.AutoScroll = true; - this.tamingControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tamingControl1.Location = new System.Drawing.Point(3, 3); - this.tamingControl1.Name = "tamingControl1"; - this.tamingControl1.Size = new System.Drawing.Size(1864, 778); - this.tamingControl1.TabIndex = 0; - this.tamingControl1.WeaponDamages = new double[] { - 100D, - 100D, - 100D, - 100D, - 100D, - 100D, - 100D}; - this.tamingControl1.WeaponDamagesEnabled = 3; - // // tabPageBreedingPlan // this.tabPageBreedingPlan.Controls.Add(this.breedingPlan1); @@ -3191,17 +2894,6 @@ private void InitializeComponent() this.tabPageBreedingPlan.Text = "Breeding Plan"; this.tabPageBreedingPlan.UseVisualStyleBackColor = true; // - // breedingPlan1 - // - this.breedingPlan1.AutoScroll = true; - this.breedingPlan1.CurrentSpecies = null; - this.breedingPlan1.Dock = System.Windows.Forms.DockStyle.Fill; - this.breedingPlan1.Location = new System.Drawing.Point(3, 3); - this.breedingPlan1.MutationLimit = 0; - this.breedingPlan1.Name = "breedingPlan1"; - this.breedingPlan1.Size = new System.Drawing.Size(1864, 778); - this.breedingPlan1.TabIndex = 0; - // // tabPageHatching // this.tabPageHatching.Controls.Add(this.hatching1); @@ -3213,14 +2905,6 @@ private void InitializeComponent() this.tabPageHatching.Text = "Hatching"; this.tabPageHatching.UseVisualStyleBackColor = true; // - // hatching1 - // - this.hatching1.Dock = System.Windows.Forms.DockStyle.Fill; - this.hatching1.Location = new System.Drawing.Point(3, 3); - this.hatching1.Name = "hatching1"; - this.hatching1.Size = new System.Drawing.Size(1864, 778); - this.hatching1.TabIndex = 0; - // // tabPageRaising // this.tabPageRaising.Controls.Add(this.raisingControl1); @@ -3232,15 +2916,6 @@ private void InitializeComponent() this.tabPageRaising.Text = "Raising"; this.tabPageRaising.UseVisualStyleBackColor = true; // - // raisingControl1 - // - this.raisingControl1.AutoScroll = true; - this.raisingControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.raisingControl1.Location = new System.Drawing.Point(3, 3); - this.raisingControl1.Name = "raisingControl1"; - this.raisingControl1.Size = new System.Drawing.Size(1864, 778); - this.raisingControl1.TabIndex = 0; - // // tabPageTimer // this.tabPageTimer.Controls.Add(this.timerList1); @@ -3252,15 +2927,6 @@ private void InitializeComponent() this.tabPageTimer.Text = "Timer"; this.tabPageTimer.UseVisualStyleBackColor = true; // - // timerList1 - // - this.timerList1.Dock = System.Windows.Forms.DockStyle.Fill; - this.timerList1.Location = new System.Drawing.Point(3, 3); - this.timerList1.Name = "timerList1"; - this.timerList1.Size = new System.Drawing.Size(1864, 778); - this.timerList1.TabIndex = 0; - this.timerList1.TimerAlertsCSV = ""; - // // tabPagePlayerTribes // this.tabPagePlayerTribes.Controls.Add(this.tribesControl1); @@ -3272,14 +2938,6 @@ private void InitializeComponent() this.tabPagePlayerTribes.Text = "Player"; this.tabPagePlayerTribes.UseVisualStyleBackColor = true; // - // tribesControl1 - // - this.tribesControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tribesControl1.Location = new System.Drawing.Point(3, 3); - this.tribesControl1.Name = "tribesControl1"; - this.tribesControl1.Size = new System.Drawing.Size(1864, 778); - this.tribesControl1.TabIndex = 0; - // // tabPageNotes // this.tabPageNotes.Controls.Add(this.notesControl1); @@ -3291,14 +2949,6 @@ private void InitializeComponent() this.tabPageNotes.Text = "Notes"; this.tabPageNotes.UseVisualStyleBackColor = true; // - // notesControl1 - // - this.notesControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.notesControl1.Location = new System.Drawing.Point(3, 3); - this.notesControl1.Name = "notesControl1"; - this.notesControl1.Size = new System.Drawing.Size(1864, 778); - this.notesControl1.TabIndex = 0; - // // TabPageOCR // this.TabPageOCR.Controls.Add(this.ocrControl1); @@ -3310,14 +2960,6 @@ private void InitializeComponent() this.TabPageOCR.Text = "Experimental OCR"; this.TabPageOCR.UseVisualStyleBackColor = true; // - // ocrControl1 - // - this.ocrControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.ocrControl1.Location = new System.Drawing.Point(3, 3); - this.ocrControl1.Name = "ocrControl1"; - this.ocrControl1.Size = new System.Drawing.Size(1864, 778); - this.ocrControl1.TabIndex = 2; - // // tabPageExtractionTests // this.tabPageExtractionTests.Controls.Add(this.extractionTestControl1); @@ -3329,14 +2971,6 @@ private void InitializeComponent() this.tabPageExtractionTests.Text = "Extraction Tests"; this.tabPageExtractionTests.UseVisualStyleBackColor = true; // - // extractionTestControl1 - // - this.extractionTestControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.extractionTestControl1.Location = new System.Drawing.Point(3, 3); - this.extractionTestControl1.Name = "extractionTestControl1"; - this.extractionTestControl1.Size = new System.Drawing.Size(1864, 778); - this.extractionTestControl1.TabIndex = 0; - // // tabPageMultiplierTesting // this.tabPageMultiplierTesting.Controls.Add(this.statsMultiplierTesting1); @@ -3348,14 +2982,16 @@ private void InitializeComponent() this.tabPageMultiplierTesting.Text = "Multiplier Testing"; this.tabPageMultiplierTesting.UseVisualStyleBackColor = true; // - // statsMultiplierTesting1 + // TabPageStatOptions // - this.statsMultiplierTesting1.AllowDrop = true; - this.statsMultiplierTesting1.Dock = System.Windows.Forms.DockStyle.Fill; - this.statsMultiplierTesting1.Location = new System.Drawing.Point(3, 3); - this.statsMultiplierTesting1.Name = "statsMultiplierTesting1"; - this.statsMultiplierTesting1.Size = new System.Drawing.Size(1864, 778); - this.statsMultiplierTesting1.TabIndex = 0; + this.TabPageStatOptions.Controls.Add(this.statsOptionsControl1); + this.TabPageStatOptions.Location = new System.Drawing.Point(4, 22); + this.TabPageStatOptions.Name = "TabPageStatOptions"; + this.TabPageStatOptions.Padding = new System.Windows.Forms.Padding(3); + this.TabPageStatOptions.Size = new System.Drawing.Size(1870, 784); + this.TabPageStatOptions.TabIndex = 15; + this.TabPageStatOptions.Text = "Stat Options"; + this.TabPageStatOptions.UseVisualStyleBackColor = true; // // btReadValuesFromArk // @@ -3729,18 +3365,6 @@ private void InitializeComponent() this.pbSpecies.TabStop = false; this.pbSpecies.Click += new System.EventHandler(this.pbSpecies_Click); // - // tbSpeciesGlobal - // - this.tbSpeciesGlobal.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.tbSpeciesGlobal.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.tbSpeciesGlobal.Location = new System.Drawing.Point(104, 3); - this.tbSpeciesGlobal.Name = "tbSpeciesGlobal"; - this.tbSpeciesGlobal.Size = new System.Drawing.Size(152, 20); - this.tbSpeciesGlobal.TabIndex = 8; - this.tbSpeciesGlobal.Click += new System.EventHandler(this.tbSpeciesGlobal_Click); - this.tbSpeciesGlobal.Enter += new System.EventHandler(this.tbSpeciesGlobal_Enter); - this.tbSpeciesGlobal.KeyUp += new System.Windows.Forms.KeyEventHandler(this.TbSpeciesGlobal_KeyUp); - // // cbGuessSpecies // this.cbGuessSpecies.AutoSize = true; @@ -3853,54 +3477,448 @@ private void InitializeComponent() this.resetColumnOrderToolStripMenuItem.Text = "Reset column order"; this.resetColumnOrderToolStripMenuItem.Click += new System.EventHandler(this.resetColumnOrderToolStripMenuItem_Click); // - // speciesSelector1 + // statPotentials1 // - this.speciesSelector1.Dock = System.Windows.Forms.DockStyle.Fill; - this.speciesSelector1.LastSpecies = new string[0]; - this.speciesSelector1.Location = new System.Drawing.Point(0, 103); - this.speciesSelector1.Name = "speciesSelector1"; - this.speciesSelector1.Size = new System.Drawing.Size(1878, 810); - this.speciesSelector1.SplitterDistance = 500; - this.speciesSelector1.TabIndex = 0; + this.statPotentials1.Location = new System.Drawing.Point(860, 9); + this.statPotentials1.Name = "statPotentials1"; + this.statPotentials1.Size = new System.Drawing.Size(293, 433); + this.statPotentials1.TabIndex = 12; // - // Form1 + // radarChart1 // - this.AcceptButton = this.btExtractLevels; - this.AllowDrop = true; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1878, 935); - this.Controls.Add(this.tabControlMain); - this.Controls.Add(this.speciesSelector1); - this.Controls.Add(this.panelToolBar); - this.Controls.Add(this.toolStrip2); - this.Controls.Add(this.menuStrip1); - this.Controls.Add(this.statusStrip1); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.KeyPreview = true; - this.MainMenuStrip = this.menuStrip1; - this.Name = "Form1"; - this.Text = "ARK Smart Breeding"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); - this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed); - this.Load += new System.EventHandler(this.Form1_Load); - this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop); - this.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter); - this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown); - this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyUp); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).EndInit(); - this.groupBoxPossibilities.ResumeLayout(false); - this.groupBoxDetailsExtractor.ResumeLayout(false); - this.panelExtrImpr.ResumeLayout(false); - this.panelExtrImpr.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusExtractor)).EndInit(); + this.radarChart1.Image = ((System.Drawing.Image)(resources.GetObject("radarChart1.Image"))); + this.radarChart1.Location = new System.Drawing.Point(6, 19); + this.radarChart1.Name = "radarChart1"; + this.radarChart1.Size = new System.Drawing.Size(200, 200); + this.radarChart1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.radarChart1.TabIndex = 10; + this.radarChart1.TabStop = false; + // + // numericUpDownImprintingBonusTester + // + this.numericUpDownImprintingBonusTester.DecimalPlaces = 5; + this.numericUpDownImprintingBonusTester.Enabled = false; + this.numericUpDownImprintingBonusTester.ForeColor = System.Drawing.SystemColors.GrayText; + this.numericUpDownImprintingBonusTester.Location = new System.Drawing.Point(6, 45); + this.numericUpDownImprintingBonusTester.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.numericUpDownImprintingBonusTester.Name = "numericUpDownImprintingBonusTester"; + this.numericUpDownImprintingBonusTester.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownImprintingBonusTester.Size = new System.Drawing.Size(75, 20); + this.numericUpDownImprintingBonusTester.TabIndex = 4; + this.numericUpDownImprintingBonusTester.ValueChanged += new System.EventHandler(this.numericUpDownImprintingBonusTester_ValueChanged); + // + // NumericUpDownTestingTE + // + this.NumericUpDownTestingTE.DecimalPlaces = 2; + this.NumericUpDownTestingTE.ForeColor = System.Drawing.SystemColors.WindowText; + this.NumericUpDownTestingTE.Location = new System.Drawing.Point(6, 19); + this.NumericUpDownTestingTE.Minimum = new decimal(new int[] { + 1, + 0, + 0, + -2147483648}); + this.NumericUpDownTestingTE.Name = "NumericUpDownTestingTE"; + this.NumericUpDownTestingTE.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.NumericUpDownTestingTE.Size = new System.Drawing.Size(60, 20); + this.NumericUpDownTestingTE.TabIndex = 0; + this.NumericUpDownTestingTE.Value = new decimal(new int[] { + 80, + 0, + 0, + 0}); + this.NumericUpDownTestingTE.ValueChanged += new System.EventHandler(this.NumericUpDownTestingTE_ValueChanged); + // + // creatureInfoInputTester + // + this.creatureInfoInputTester.AlreadyExistingCreature = null; + this.creatureInfoInputTester.ColorIdsAlsoPossible = null; + this.creatureInfoInputTester.CooldownUntil = null; + this.creatureInfoInputTester.CreatureFlags = ARKBreedingStats.Library.CreatureFlags.None; + this.creatureInfoInputTester.CreatureName = ""; + this.creatureInfoInputTester.CreatureNote = ""; + this.creatureInfoInputTester.CreatureOwner = ""; + this.creatureInfoInputTester.CreatureServer = ""; + this.creatureInfoInputTester.CreatureSex = ARKBreedingStats.Library.Sex.Unknown; + this.creatureInfoInputTester.CreatureStatus = ARKBreedingStats.Library.CreatureStatus.Available; + this.creatureInfoInputTester.CreatureTribe = ""; + this.creatureInfoInputTester.DomesticatedAt = new System.DateTime(2014, 12, 31, 0, 0, 0, 0); + this.creatureInfoInputTester.Father = null; + this.creatureInfoInputTester.GrowingUntil = null; + this.creatureInfoInputTester.Location = new System.Drawing.Point(373, 184); + this.creatureInfoInputTester.LockServer = false; + this.creatureInfoInputTester.Mother = null; + this.creatureInfoInputTester.MutationCounterFather = 0; + this.creatureInfoInputTester.MutationCounterMother = 0; + this.creatureInfoInputTester.Name = "creatureInfoInputTester"; + this.creatureInfoInputTester.OwnerLock = false; + this.creatureInfoInputTester.RegionColors = new byte[] { + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0))}; + this.creatureInfoInputTester.Size = new System.Drawing.Size(262, 590); + this.creatureInfoInputTester.TabIndex = 4; + this.creatureInfoInputTester.TribeLock = false; + this.creatureInfoInputTester.Add2LibraryClicked += new System.Action(this.creatureInfoInputTester_Add2Library_Clicked); + this.creatureInfoInputTester.Save2LibraryClicked += new System.Action(this.creatureInfoInputTester_Save2Library_Clicked); + this.creatureInfoInputTester.ParentListRequested += new System.Action(this.CreatureInfoInput_ParentListRequested); + // + // radarChartExtractor + // + this.radarChartExtractor.Dock = System.Windows.Forms.DockStyle.Fill; + this.radarChartExtractor.Image = ((System.Drawing.Image)(resources.GetObject("radarChartExtractor.Image"))); + this.radarChartExtractor.Location = new System.Drawing.Point(3, 16); + this.radarChartExtractor.Name = "radarChartExtractor"; + this.radarChartExtractor.Size = new System.Drawing.Size(144, 144); + this.radarChartExtractor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.radarChartExtractor.TabIndex = 10; + this.radarChartExtractor.TabStop = false; + // + // numericUpDownImprintingBonusExtractor + // + this.numericUpDownImprintingBonusExtractor.DecimalPlaces = 5; + this.numericUpDownImprintingBonusExtractor.ForeColor = System.Drawing.SystemColors.GrayText; + this.numericUpDownImprintingBonusExtractor.Location = new System.Drawing.Point(3, 3); + this.numericUpDownImprintingBonusExtractor.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.numericUpDownImprintingBonusExtractor.Name = "numericUpDownImprintingBonusExtractor"; + this.numericUpDownImprintingBonusExtractor.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownImprintingBonusExtractor.Size = new System.Drawing.Size(77, 20); + this.numericUpDownImprintingBonusExtractor.TabIndex = 6; + this.numericUpDownImprintingBonusExtractor.ValueChanged += new System.EventHandler(this.numericUpDownImprintingBonusExtractor_ValueChanged); + this.numericUpDownImprintingBonusExtractor.Enter += new System.EventHandler(this.numericUpDown_Enter); + // + // numericUpDownUpperTEffBound + // + this.numericUpDownUpperTEffBound.ForeColor = System.Drawing.SystemColors.WindowText; + this.numericUpDownUpperTEffBound.Location = new System.Drawing.Point(147, 3); + this.numericUpDownUpperTEffBound.Name = "numericUpDownUpperTEffBound"; + this.numericUpDownUpperTEffBound.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownUpperTEffBound.Size = new System.Drawing.Size(45, 20); + this.numericUpDownUpperTEffBound.TabIndex = 3; + this.numericUpDownUpperTEffBound.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.numericUpDownUpperTEffBound.Enter += new System.EventHandler(this.numericUpDown_Enter); + // + // numericUpDownLowerTEffBound + // + this.numericUpDownLowerTEffBound.ForeColor = System.Drawing.SystemColors.WindowText; + this.numericUpDownLowerTEffBound.Location = new System.Drawing.Point(80, 3); + this.numericUpDownLowerTEffBound.Name = "numericUpDownLowerTEffBound"; + this.numericUpDownLowerTEffBound.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownLowerTEffBound.Size = new System.Drawing.Size(45, 20); + this.numericUpDownLowerTEffBound.TabIndex = 1; + this.numericUpDownLowerTEffBound.Value = new decimal(new int[] { + 80, + 0, + 0, + 0}); + this.numericUpDownLowerTEffBound.Enter += new System.EventHandler(this.numericUpDown_Enter); + // + // creatureAnalysis1 + // + this.creatureAnalysis1.Location = new System.Drawing.Point(903, 265); + this.creatureAnalysis1.Name = "creatureAnalysis1"; + this.creatureAnalysis1.Size = new System.Drawing.Size(346, 199); + this.creatureAnalysis1.TabIndex = 55; + // + // parentInheritanceExtractor + // + this.parentInheritanceExtractor.Location = new System.Drawing.Point(903, 470); + this.parentInheritanceExtractor.Name = "parentInheritanceExtractor"; + this.parentInheritanceExtractor.Size = new System.Drawing.Size(337, 182); + this.parentInheritanceExtractor.TabIndex = 52; + // + // numericUpDownLevel + // + this.numericUpDownLevel.ForeColor = System.Drawing.SystemColors.WindowText; + this.numericUpDownLevel.Location = new System.Drawing.Point(244, 9); + this.numericUpDownLevel.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.numericUpDownLevel.Name = "numericUpDownLevel"; + this.numericUpDownLevel.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownLevel.Size = new System.Drawing.Size(56, 20); + this.numericUpDownLevel.TabIndex = 2; + this.numericUpDownLevel.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownLevel.Enter += new System.EventHandler(this.numericUpDown_Enter); + // + // creatureInfoInputExtractor + // + this.creatureInfoInputExtractor.AlreadyExistingCreature = null; + this.creatureInfoInputExtractor.ColorIdsAlsoPossible = null; + this.creatureInfoInputExtractor.CooldownUntil = null; + this.creatureInfoInputExtractor.CreatureFlags = ARKBreedingStats.Library.CreatureFlags.None; + this.creatureInfoInputExtractor.CreatureName = ""; + this.creatureInfoInputExtractor.CreatureNote = ""; + this.creatureInfoInputExtractor.CreatureOwner = ""; + this.creatureInfoInputExtractor.CreatureServer = ""; + this.creatureInfoInputExtractor.CreatureSex = ARKBreedingStats.Library.Sex.Unknown; + this.creatureInfoInputExtractor.CreatureStatus = ARKBreedingStats.Library.CreatureStatus.Available; + this.creatureInfoInputExtractor.CreatureTribe = ""; + this.creatureInfoInputExtractor.DomesticatedAt = new System.DateTime(2014, 12, 31, 0, 0, 0, 0); + this.creatureInfoInputExtractor.Father = null; + this.creatureInfoInputExtractor.GrowingUntil = null; + this.creatureInfoInputExtractor.Location = new System.Drawing.Point(373, 184); + this.creatureInfoInputExtractor.LockServer = false; + this.creatureInfoInputExtractor.Mother = null; + this.creatureInfoInputExtractor.MutationCounterFather = 0; + this.creatureInfoInputExtractor.MutationCounterMother = 0; + this.creatureInfoInputExtractor.Name = "creatureInfoInputExtractor"; + this.creatureInfoInputExtractor.OwnerLock = false; + this.creatureInfoInputExtractor.RegionColors = new byte[] { + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0))}; + this.creatureInfoInputExtractor.Size = new System.Drawing.Size(262, 590); + this.creatureInfoInputExtractor.TabIndex = 7; + this.creatureInfoInputExtractor.TribeLock = false; + this.creatureInfoInputExtractor.Add2LibraryClicked += new System.Action(this.creatureInfoInputExtractor_Add2Library_Clicked); + this.creatureInfoInputExtractor.ParentListRequested += new System.Action(this.CreatureInfoInput_ParentListRequested); + // + // radarChartLibrary + // + this.radarChartLibrary.Dock = System.Windows.Forms.DockStyle.Top; + this.radarChartLibrary.Image = ((System.Drawing.Image)(resources.GetObject("radarChartLibrary.Image"))); + this.radarChartLibrary.Location = new System.Drawing.Point(3, 3); + this.radarChartLibrary.Name = "radarChartLibrary"; + this.radarChartLibrary.Size = new System.Drawing.Size(175, 287); + this.radarChartLibrary.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.radarChartLibrary.TabIndex = 0; + this.radarChartLibrary.TabStop = false; + // + // creatureBoxListView + // + this.creatureBoxListView.Location = new System.Drawing.Point(3, 3); + this.creatureBoxListView.Name = "creatureBoxListView"; + this.creatureBoxListView.Size = new System.Drawing.Size(189, 406); + this.creatureBoxListView.TabIndex = 0; + this.creatureBoxListView.Changed += new System.Action(this.UpdateDisplayedCreatureValues); + this.creatureBoxListView.GiveParents += new System.Action(this.CreatureBoxListView_FindParents); + this.creatureBoxListView.SelectCreature += new System.Action(this.SelectCreatureInLibrary); + // + // libraryInfoControl1 + // + this.libraryInfoControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.libraryInfoControl1.Location = new System.Drawing.Point(3, 39); + this.libraryInfoControl1.Name = "libraryInfoControl1"; + this.libraryInfoControl1.Size = new System.Drawing.Size(1858, 736); + this.libraryInfoControl1.TabIndex = 3; + // + // pedigree1 + // + this.pedigree1.AutoScroll = true; + this.pedigree1.Dock = System.Windows.Forms.DockStyle.Fill; + this.pedigree1.LeftColumnWidth = 203; + this.pedigree1.Location = new System.Drawing.Point(3, 3); + this.pedigree1.Name = "pedigree1"; + this.pedigree1.Size = new System.Drawing.Size(1864, 778); + this.pedigree1.TabIndex = 0; + // + // tamingControl1 + // + this.tamingControl1.AutoScroll = true; + this.tamingControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tamingControl1.Location = new System.Drawing.Point(3, 3); + this.tamingControl1.Name = "tamingControl1"; + this.tamingControl1.Size = new System.Drawing.Size(1864, 778); + this.tamingControl1.TabIndex = 0; + this.tamingControl1.WeaponDamages = new double[] { + 100D, + 100D, + 100D, + 100D, + 100D, + 100D, + 100D}; + this.tamingControl1.WeaponDamagesEnabled = 3; + // + // breedingPlan1 + // + this.breedingPlan1.AutoScroll = true; + this.breedingPlan1.CurrentSpecies = null; + this.breedingPlan1.Dock = System.Windows.Forms.DockStyle.Fill; + this.breedingPlan1.Location = new System.Drawing.Point(3, 3); + this.breedingPlan1.MutationLimit = 0; + this.breedingPlan1.Name = "breedingPlan1"; + this.breedingPlan1.Size = new System.Drawing.Size(1864, 778); + this.breedingPlan1.TabIndex = 0; + // + // hatching1 + // + this.hatching1.Dock = System.Windows.Forms.DockStyle.Fill; + this.hatching1.Location = new System.Drawing.Point(3, 3); + this.hatching1.Name = "hatching1"; + this.hatching1.Size = new System.Drawing.Size(1864, 778); + this.hatching1.TabIndex = 0; + // + // raisingControl1 + // + this.raisingControl1.AutoScroll = true; + this.raisingControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.raisingControl1.Location = new System.Drawing.Point(3, 3); + this.raisingControl1.Name = "raisingControl1"; + this.raisingControl1.Size = new System.Drawing.Size(1864, 778); + this.raisingControl1.TabIndex = 0; + // + // timerList1 + // + this.timerList1.Dock = System.Windows.Forms.DockStyle.Fill; + this.timerList1.Location = new System.Drawing.Point(3, 3); + this.timerList1.Name = "timerList1"; + this.timerList1.Size = new System.Drawing.Size(1864, 778); + this.timerList1.TabIndex = 0; + this.timerList1.TimerAlertsCSV = ""; + // + // tribesControl1 + // + this.tribesControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tribesControl1.Location = new System.Drawing.Point(3, 3); + this.tribesControl1.Name = "tribesControl1"; + this.tribesControl1.Size = new System.Drawing.Size(1864, 778); + this.tribesControl1.TabIndex = 0; + // + // notesControl1 + // + this.notesControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.notesControl1.Location = new System.Drawing.Point(3, 3); + this.notesControl1.Name = "notesControl1"; + this.notesControl1.Size = new System.Drawing.Size(1864, 778); + this.notesControl1.TabIndex = 0; + // + // ocrControl1 + // + this.ocrControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.ocrControl1.Location = new System.Drawing.Point(3, 3); + this.ocrControl1.Name = "ocrControl1"; + this.ocrControl1.Size = new System.Drawing.Size(1864, 778); + this.ocrControl1.TabIndex = 2; + // + // extractionTestControl1 + // + this.extractionTestControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.extractionTestControl1.Location = new System.Drawing.Point(3, 3); + this.extractionTestControl1.Name = "extractionTestControl1"; + this.extractionTestControl1.Size = new System.Drawing.Size(1864, 778); + this.extractionTestControl1.TabIndex = 0; + // + // statsMultiplierTesting1 + // + this.statsMultiplierTesting1.AllowDrop = true; + this.statsMultiplierTesting1.Dock = System.Windows.Forms.DockStyle.Fill; + this.statsMultiplierTesting1.Location = new System.Drawing.Point(3, 3); + this.statsMultiplierTesting1.Name = "statsMultiplierTesting1"; + this.statsMultiplierTesting1.Size = new System.Drawing.Size(1864, 778); + this.statsMultiplierTesting1.TabIndex = 0; + // + // statsOptionsControl1 + // + this.statsOptionsControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.statsOptionsControl1.Location = new System.Drawing.Point(3, 3); + this.statsOptionsControl1.Name = "statsOptionsControl1"; + this.statsOptionsControl1.Size = new System.Drawing.Size(1864, 778); + this.statsOptionsControl1.TabIndex = 0; + // + // speciesSelector1 + // + this.speciesSelector1.Dock = System.Windows.Forms.DockStyle.Fill; + this.speciesSelector1.LastSpecies = new string[0]; + this.speciesSelector1.Location = new System.Drawing.Point(0, 103); + this.speciesSelector1.Name = "speciesSelector1"; + this.speciesSelector1.Size = new System.Drawing.Size(1878, 810); + this.speciesSelector1.SplitterDistance = 500; + this.speciesSelector1.TabIndex = 0; + // + // tbSpeciesGlobal + // + this.tbSpeciesGlobal.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; + this.tbSpeciesGlobal.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; + this.tbSpeciesGlobal.Location = new System.Drawing.Point(104, 3); + this.tbSpeciesGlobal.Name = "tbSpeciesGlobal"; + this.tbSpeciesGlobal.Size = new System.Drawing.Size(152, 20); + this.tbSpeciesGlobal.TabIndex = 8; + this.tbSpeciesGlobal.Click += new System.EventHandler(this.tbSpeciesGlobal_Click); + this.tbSpeciesGlobal.Enter += new System.EventHandler(this.tbSpeciesGlobal_Enter); + this.tbSpeciesGlobal.KeyUp += new System.Windows.Forms.KeyEventHandler(this.TbSpeciesGlobal_KeyUp); + // + // Form1 + // + this.AcceptButton = this.btExtractLevels; + this.AllowDrop = true; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1878, 935); + this.Controls.Add(this.tabControlMain); + this.Controls.Add(this.speciesSelector1); + this.Controls.Add(this.panelToolBar); + this.Controls.Add(this.toolStrip2); + this.Controls.Add(this.menuStrip1); + this.Controls.Add(this.statusStrip1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.KeyPreview = true; + this.MainMenuStrip = this.menuStrip1; + this.Name = "Form1"; + this.Text = "ARK Smart Breeding"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed); + this.Load += new System.EventHandler(this.Form1_Load); + this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop); + this.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter); + this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown); + this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyUp); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBoxPossibilities.ResumeLayout(false); + this.groupBoxDetailsExtractor.ResumeLayout(false); + this.panelExtrImpr.ResumeLayout(false); + this.panelExtrImpr.PerformLayout(); this.panelExtrTE.ResumeLayout(false); this.panelExtrTE.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownUpperTEffBound)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffBound)).EndInit(); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); this.panelSums.ResumeLayout(false); @@ -3912,7 +3930,6 @@ private void InitializeComponent() this.tabPageStatTesting.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxColorRegionsTester)).EndInit(); this.gbStatChart.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).EndInit(); this.panelWildTamedBredTester.ResumeLayout(false); this.panelWildTamedBredTester.PerformLayout(); this.groupBox2.ResumeLayout(false); @@ -3927,13 +3944,11 @@ private void InitializeComponent() this.tabPageExtractor.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.PbCreatureColorsExtractor)).EndInit(); this.groupBoxRadarChartExtractor.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).EndInit(); this.groupBoxTamingInfo.ResumeLayout(false); this.gbStatsExtractor.ResumeLayout(false); this.flowLayoutPanelStatIOsExtractor.ResumeLayout(false); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLevel)).EndInit(); this.tabPageLibrary.ResumeLayout(false); this.tableLayoutPanelLibrary.ResumeLayout(false); this.contextMenuStripLibrary.ResumeLayout(false); @@ -3944,7 +3959,6 @@ private void InitializeComponent() this.tableLayoutPanel2.ResumeLayout(false); this.tableLayoutPanel2.PerformLayout(); this.tabPageLibRadarChart.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).EndInit(); this.tabPageLibraryInfo.ResumeLayout(false); this.tlpLibraryInfo.ResumeLayout(false); this.tableLayoutPanel3.ResumeLayout(false); @@ -3960,6 +3974,7 @@ private void InitializeComponent() this.TabPageOCR.ResumeLayout(false); this.tabPageExtractionTests.ResumeLayout(false); this.tabPageMultiplierTesting.ResumeLayout(false); + this.TabPageStatOptions.ResumeLayout(false); this.statusStrip1.ResumeLayout(false); this.statusStrip1.PerformLayout(); this.toolStrip2.ResumeLayout(false); @@ -3968,6 +3983,15 @@ private void InitializeComponent() this.panelToolBar.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbSpecies)).EndInit(); this.contextMenuStripLibraryHeader.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusExtractor)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownUpperTEffBound)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffBound)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLevel)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -4332,5 +4356,7 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem nameGeneratorToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem selectSavegameFileToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem showTokenPopupOnListeningToolStripMenuItem; + private System.Windows.Forms.TabPage TabPageStatOptions; + private uiControls.StatsOptionsControl statsOptionsControl1; } } diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 7298bb8f..d427cf27 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -229,13 +229,12 @@ public Form1() } // add controls in the order they are shown in-game - for (int s = 0; s < Stats.StatsCount; s++) + foreach (var si in Stats.DisplayOrder) { - var displayIndex = Stats.DisplayOrder[s]; - flowLayoutPanelStatIOsExtractor.Controls.Add(_statIOs[displayIndex]); - flowLayoutPanelStatIOsTester.Controls.Add(_testingIOs[displayIndex]); - checkedListBoxConsiderStatTop.Items.Add(Utils.StatName(displayIndex), - _considerStatHighlight[displayIndex]); + flowLayoutPanelStatIOsExtractor.Controls.Add(_statIOs[si]); + flowLayoutPanelStatIOsTester.Controls.Add(_testingIOs[si]); + checkedListBoxConsiderStatTop.Items.Add(Utils.StatName(si), + _considerStatHighlight[si]); } _timerGlobal.Interval = 1000; @@ -363,6 +362,9 @@ private void Form1_Load(object sender, EventArgs e) LbWarningLevel255.Visible = false; + StatsOptions.LoadSettings(); + statsOptionsControl1.InitializeOptions(); + InitializeCollection(); CreatureColored.InitializeSpeciesImageLocation(); @@ -681,14 +683,16 @@ private void SpeciesSelector1OnSpeciesSelected(bool speciesChanged) tbSpeciesGlobal.Text = species.name; LbBlueprintPath.Text = species.blueprintPath; if (!speciesChanged) return; - _clearExtractionCreatureData = - true; // as soon as the user changes the species, it's assumed it's not an exported creature anymore + // as soon as the user changes the species, it's assumed it's not an exported creature anymore + _clearExtractionCreatureData = true; pbSpecies.Image = speciesSelector1.SpeciesImage(); creatureInfoInputExtractor.SelectedSpecies = species; creatureInfoInputTester.SelectedSpecies = species; + statsOptionsControl1.SetSpecies(species); radarChart1.SetLevels(species: species); var statNames = species.statNames; + var levelGraphRepresentations = StatsOptions.GetStatsOptions(species); for (int s = 0; s < Stats.StatsCount; s++) { @@ -702,6 +706,9 @@ private void SpeciesSelector1OnSpeciesSelected(bool speciesChanged) if (!_activeStats[s]) _statIOs[s].Input = 0; _statIOs[s].Title = Utils.StatName(s, false, statNames); _testingIOs[s].Title = Utils.StatName(s, false, statNames); + _statIOs[s].SetStatOptions(levelGraphRepresentations.StatOptions[s]); + _testingIOs[s].SetStatOptions(levelGraphRepresentations.StatOptions[s]); + // don't lock special stats of glow species if ((statNames != null && (s == Stats.Stamina @@ -1401,6 +1408,8 @@ private void Form1_FormClosed(object sender, FormClosedEventArgs e) /////// save settings for next session Properties.Settings.Default.Save(); + StatsOptions.SaveSettings(); + // remove old cache-files CreatureColored.CleanupCache(); @@ -1897,11 +1906,13 @@ private void buttonRecalculateTops_Click(object sender, EventArgs e) int consideredStats = 0; for (int s = 0; s < Stats.StatsCount; s++) { - _considerStatHighlight[Stats.DisplayOrder[s]] = checkedListBoxConsiderStatTop.GetItemChecked(s); + var si = Stats.DisplayOrder[s]; + var statIndexUsed = checkedListBoxConsiderStatTop.GetItemChecked(s); + _considerStatHighlight[si] = statIndexUsed; // save consideredStats - if (_considerStatHighlight[s]) - consideredStats += 1 << s; + if (_considerStatHighlight[si]) + consideredStats += 1 << si; } Properties.Settings.Default.consideredStats = consideredStats; diff --git a/ARKBreedingStats/Utils.cs b/ARKBreedingStats/Utils.cs index 77937df0..61c7eb79 100644 --- a/ARKBreedingStats/Utils.cs +++ b/ARKBreedingStats/Utils.cs @@ -6,7 +6,7 @@ using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; -using System.Windows.Forms.VisualStyles; +using ARKBreedingStats.mods; using ARKBreedingStats.values; namespace ARKBreedingStats @@ -38,19 +38,13 @@ public static string GetARKmlFromPercent(string text, int percent, double light /// /// Returns a string with ARKml tags. Currently that doesn't seem to be supported anymore by the ARK chat. /// - public static string GetARKml(string text, int r, int g, int b) - { - return - $"{text}"; - } + public static string GetARKml(string text, int r, int g, int b) => $"{text}"; /// /// RGB values for a given percentage (0-100). 0 is red, 100 is green. Light can be adjusted (1 bright, 0 default, -1 dark). /// private static void GetRgbFromPercent(out int r, out int g, out int b, int percent, double light = 0) { - if (light > 1) { light = 1; } - if (light < -1) { light = -1; } g = (int)(percent * 5.1); // g = percent * 255 / 50 = percent * 5.1 r = 511 - g; b = 0; @@ -58,6 +52,10 @@ private static void GetRgbFromPercent(out int r, out int g, out int b, int perce if (g < 0) { g = 0; } if (r > 255) { r = 255; } if (g > 255) { g = 255; } + + if (light == 0) return; + if (light > 1) { light = 1; } + if (light < -1) { light = -1; } if (light > 0) { r = (int)((255 - r) * light + r); @@ -76,28 +74,30 @@ private static void GetRgbFromPercent(out int r, out int g, out int b, int perce /// /// Adjusts the lightness of a color. /// - public static Color AdjustColorLight(Color color, double light = 0) + /// Color to adjust + /// -1 very dark, 0 no change, 1 very bright + public static Color AdjustColorLight(Color color, double lightDelta = 0) { - if (light == 0) return color; + if (lightDelta == 0) return color; - if (light > 1) { light = 1; } - if (light < -1) { light = -1; } + if (lightDelta > 1) { lightDelta = 1; } + if (lightDelta < -1) { lightDelta = -1; } byte r = color.R; byte g = color.G; byte b = color.B; - if (light > 0) + if (lightDelta > 0) { - r = (byte)((255 - r) * light + r); - g = (byte)((255 - g) * light + g); - b = (byte)((255 - b) * light + b); + r = (byte)((255 - r) * lightDelta + r); + g = (byte)((255 - g) * lightDelta + g); + b = (byte)((255 - b) * lightDelta + b); } else { - light += 1; - r = (byte)(r * light); - g = (byte)(g * light); - b = (byte)(b * light); + lightDelta += 1; + r = (byte)(r * lightDelta); + g = (byte)(g * lightDelta); + b = (byte)(b * lightDelta); } return Color.FromArgb(r, g, b); } @@ -106,78 +106,77 @@ public static Color AdjustColorLight(Color color, double light = 0) /// Returns a color from a hue value. /// /// red: 0, green: 120, blue: 240 - /// -1 very dark, 0 default, 1 very bright - public static Color ColorFromHue(int hue, double light = 0) + /// -1 very dark, 0 default, 1 very bright + public static Color ColorFromHue(int hue, double lightDelta = 0) + { + return AdjustColorLight(ColorFromHsv(hue), lightDelta); + } + + /// + /// Returns a color from hsl values. + /// + /// red: 0, green: 120, blue: 240 + /// 0…1 gray to colorful + /// 0…1 black to full intensity / white + public static Color ColorFromHsv(double hue, double saturation = 1, double value = 1, double alpha = 1) { hue %= 360; if (hue < 0) hue += 360; - // there are six sections, 0-120, 120-240, 240-360 - // in each section one channel is either ascending, descending, max or 0 - byte sectionPos = (byte)(hue % 60); - byte asc = (byte)(sectionPos * 4.25); // == sectionPos * 255 / 60; - byte desc = (byte)(255 - asc); - const byte zero = 0; - const byte max = 255; + saturation = Math.Max(Math.Min(saturation, 1), 0); + value = Math.Max(Math.Min(value, 1), 0); - byte r, g, b; - - if (hue < 60) + var v = (byte)(value * 255); + if (saturation < double.Epsilon) { - r = max; - g = asc; - b = zero; - } - else if (hue < 120) - { - r = desc; - g = max; - b = zero; - } - else if (hue < 180) - { - r = zero; - g = max; - b = asc; - } - else if (hue < 240) - { - r = zero; - g = desc; - b = max; - } - else if (hue < 300) - { - r = asc; - g = zero; - b = max; - } - else - { - r = max; - g = zero; - b = desc; + return Color.FromArgb(v, v, v); } - if (light != 0) - { - if (light > 1) { light = 1; } - if (light < -1) { light = -1; } + // there are six hue sections from 0 to 360 with each having 60 degrees + // in each section one channel is either ascending, descending, max or min + var sectionPos = hue / 60; + var section = (int)sectionPos; + var sectorFraction = sectionPos - section; - if (light > 0) - { - r = (byte)((255 - r) * light + r); - g = (byte)((255 - g) * light + g); - b = (byte)((255 - b) * light + b); - } - else - { - light += 1; - r = (byte)(r * light); - g = (byte)(g * light); - b = (byte)(b * light); - } + var p = (byte)(255 * value * (1 - saturation)); + var q = (byte)(255 * value * (1 - saturation * sectorFraction)); + var t = (byte)(255 * value * (1 - saturation * (1 - sectorFraction))); + + byte r, g, b; + // go to correct hue section + switch (section) + { + case 0: + r = v; + g = t; + b = p; + break; + case 1: + r = q; + g = v; + b = p; + break; + case 2: + r = p; + g = v; + b = t; + break; + case 3: + r = p; + g = q; + b = v; + break; + case 4: + r = t; + g = p; + b = v; + break; + default: + r = v; + g = p; + b = q; + break; } - return Color.FromArgb(r, g, b); + return Color.FromArgb((int)(255 * alpha), r, g, b); } /// diff --git a/ARKBreedingStats/library/CreatureInfoGraphic.cs b/ARKBreedingStats/library/CreatureInfoGraphic.cs index c5ba8e80..2291cf6d 100644 --- a/ARKBreedingStats/library/CreatureInfoGraphic.cs +++ b/ARKBreedingStats/library/CreatureInfoGraphic.cs @@ -144,10 +144,9 @@ public static Bitmap InfoGraphic(this Creature creature, CreatureCollection cc, if (displayStatValues) g.DrawString(Loc.S("Values", secondaryCulture: secondaryCulture), font, fontBrush, xRightBrValue, currentYPosition, stringFormatRight); int statDisplayIndex = 0; - for (int si = 0; si < Stats.StatsCount; si++) + foreach (var si in Stats.DisplayOrder) { - int statIndex = Stats.DisplayOrder[si]; - if (statIndex == Stats.Torpidity || !creature.Species.UsesStat(statIndex)) + if (si == Stats.Torpidity || !creature.Species.UsesStat(si)) continue; int y = currentYPosition + (height / 9) + (statDisplayIndex++) * statLineHeight; @@ -156,7 +155,7 @@ public static Bitmap InfoGraphic(this Creature creature, CreatureCollection cc, // empty box to show the max possible length using (var b = new SolidBrush(Color.DarkGray)) g.FillRectangle(b, xStatName, y + statLineHeight - 1, maxBoxLength, statBoxHeight); - double levelFractionOfMax = Math.Min(1, (double)creature.levelsWild[statIndex] / maxGraphLevel); + double levelFractionOfMax = Math.Min(1, (double)creature.levelsWild[si] / maxGraphLevel); if (levelFractionOfMax < 0) levelFractionOfMax = 0; int levelPercentageOfMax = (int)(100 * levelFractionOfMax); int statBoxLength = Math.Max((int)(maxBoxLength * levelFractionOfMax), 1); @@ -172,24 +171,24 @@ public static Bitmap InfoGraphic(this Creature creature, CreatureCollection cc, g.DrawRectangle(p, xStatName, y + statLineHeight - 1, statBoxLength, statBoxHeight); // stat name - g.DrawString($"{Utils.StatName(statIndex, true, creature.Species.statNames, secondaryCulture)}", + g.DrawString($"{Utils.StatName(si, true, creature.Species.statNames, secondaryCulture)}", font, fontBrush, xStatName, y); // stat level number - var displayedLevel = creature.levelsWild[statIndex] + (displaySumWildMutLevels && creature.levelsMutated != null && creature.levelsMutated[statIndex] > 0 ? creature.levelsMutated[statIndex] : 0); - g.DrawString($"{(creature.levelsWild[statIndex] < 0 ? "?" : displayedLevel.ToString())}{(displayMutatedLevels || displayWithDomLevels ? " |" : string.Empty)}", + var displayedLevel = creature.levelsWild[si] + (displaySumWildMutLevels && creature.levelsMutated != null && creature.levelsMutated[si] > 0 ? creature.levelsMutated[si] : 0); + g.DrawString($"{(creature.levelsWild[si] < 0 ? "?" : displayedLevel.ToString())}{(displayMutatedLevels || displayWithDomLevels ? " |" : string.Empty)}", font, fontBrush, xRightLevelValue, y, stringFormatRight); if (displayMutatedLevels) - g.DrawString($"{(creature.levelsMutated[statIndex] < 0 ? string.Empty : creature.levelsMutated[statIndex].ToString())}{(displayWithDomLevels ? " |" : string.Empty)}", + g.DrawString($"{(creature.levelsMutated[si] < 0 ? string.Empty : creature.levelsMutated[si].ToString())}{(displayWithDomLevels ? " |" : string.Empty)}", font, fontBrush, xRightLevelMutValue, y, stringFormatRight); // dom level number if (displayWithDomLevels) - g.DrawString($"{creature.levelsDom[statIndex]}", + g.DrawString($"{creature.levelsDom[si]}", font, fontBrush, xRightLevelDomValue, y, stringFormatRight); // stat breeding value if (displayStatValues && creature.valuesBreeding != null) { double displayedValue = - displayWithDomLevels ? creature.valuesDom[statIndex] : creature.valuesBreeding[statIndex]; + displayWithDomLevels ? creature.valuesDom[si] : creature.valuesBreeding[si]; string statValueRepresentation; if (displayedValue < 0) { @@ -197,7 +196,7 @@ public static Bitmap InfoGraphic(this Creature creature, CreatureCollection cc, } else { - if (Stats.IsPercentage(statIndex)) + if (Stats.IsPercentage(si)) { statValueRepresentation = (100 * displayedValue).ToString("0.0"); g.DrawString("%", font, fontBrush, xRightBrValue, y); diff --git a/ARKBreedingStats/library/ExportImportCreatures.cs b/ARKBreedingStats/library/ExportImportCreatures.cs index d89a63db..4f542b90 100644 --- a/ARKBreedingStats/library/ExportImportCreatures.cs +++ b/ARKBreedingStats/library/ExportImportCreatures.cs @@ -234,9 +234,9 @@ private static StringBuilder CreatureStringInfo(Creature c, bool breeding, bool (ARKml ? Utils.GetARKml(c.Species.name, 50, 172, 255) : c.Species.name) + ", Lvl " + (breeding ? c.LevelHatched : c.Level) + modifierText + (c.sex != Sex.Unknown ? ", " + Loc.S(c.sex.ToString(), secondaryCulture: secondaryLanguage) : string.Empty) + "): "); - for (int s = 0; s < Stats.StatsCount; s++) + + foreach (var si in Stats.DisplayOrder) { - int si = Stats.DisplayOrder[s]; if (c.levelsWild[si] >= 0 && c.valuesBreeding[si] > 0) // ignore unknown levels (e.g. oxygen, speed for some species) output.Append(Utils.StatName(si, true, secondaryLanguage: secondaryLanguage) + ": " + diff --git a/ARKBreedingStats/library/LevelGraphRepresentation.cs b/ARKBreedingStats/library/LevelGraphRepresentation.cs new file mode 100644 index 00000000..0855ff2f --- /dev/null +++ b/ARKBreedingStats/library/LevelGraphRepresentation.cs @@ -0,0 +1,160 @@ +using System.Collections.Generic; +using System.Drawing; +using ARKBreedingStats.utils; +using Newtonsoft.Json; + +namespace ARKBreedingStats.library +{ + /// + /// Representation of a level regarding chart scaling and colour. + /// + [JsonObject(MemberSerialization.OptIn)] + public class LevelGraphRepresentation + { + /// + /// Level with the LowerColor color. + /// + [JsonProperty] + public int LowerBound + { + get => _lowerBound; + set + { + _lowerBound = value; + _colorCache?.Clear(); + } + } + + private int _lowerBound; + + /// + /// Level with the UpperColor color. + /// + [JsonProperty] + public int UpperBound + { + get => _upperBound; + set + { + _upperBound = value; + _colorCache?.Clear(); + } + } + + private int _upperBound; + + private Color _lowerColor; + private float _lowerColorH; + private float _lowerColorS; + private float _lowerColorV; + /// + /// Color of the lower bound. + /// + [JsonProperty] + public Color LowerColor + { + get => _lowerColor; + set + { + _lowerColor = value; + _lowerColorH = _lowerColor.GetHue(); + _lowerColorS = _lowerColor.GetSaturation(); + _lowerColorV = _lowerColor.GetValue(); + if (_lowerColorS < float.Epsilon) + _lowerColorH = _upperColorH; + + _colorCache?.Clear(); + } + } + + private Color _upperColor; + private float _upperColorH; + private float _upperColorS; + private float _upperColorV; + /// + /// Color of the upper bound. + /// + [JsonProperty] + public Color UpperColor + { + get => _upperColor; + set + { + _upperColor = value; + _upperColorH = _upperColor.GetHue(); + _upperColorS = _upperColor.GetSaturation(); + _upperColorV = _upperColor.GetValue(); + if (_upperColorS < float.Epsilon) + _upperColorH = _lowerColorH; + + _colorCache?.Clear(); + } + } + + /// + /// If false the hue value increases from the lower color to the upper color. + /// + [JsonProperty("hueRev")] + public bool ColorGradientReversed + { + get => _colorGradientReversed; + set + { + _colorGradientReversed = value; + _colorCache?.Clear(); + } + } + + private bool _colorGradientReversed; + + private Dictionary _colorCache; + + /// + /// Returns the color of a level. + /// + public Color GetLevelColor(int level) + { + if (level <= LowerBound) return LowerColor; + if (level >= UpperBound) return UpperColor; + if (_colorCache?.TryGetValue(level, out var c) == true) + return c; + + var relativePosition = (double)(level - LowerBound) / (UpperBound - LowerBound); + + var h = _lowerColorH + relativePosition * (_upperColorH - _lowerColorH - (ColorGradientReversed ? 360 : 0) + (_upperColorH < _lowerColorH ? 360 : 0)); + var s = _lowerColorS + relativePosition * (_upperColorS - _lowerColorS); + var v = _lowerColorV + relativePosition * (_upperColorV - _lowerColorV); + + c = Utils.ColorFromHsv(h, s, v); + if (_colorCache == null) _colorCache = new Dictionary(); + _colorCache[level] = c; + return c; + } + + public static Color GetStatLevelColor(int level, int statIndex) => + LevelRepresentations[statIndex].GetLevelColor(level); + + public static LevelGraphRepresentation[] LevelRepresentations; + + public static LevelGraphRepresentation GetDefaultValue => new LevelGraphRepresentation + { + //ColorGradientReversed = true, + LowerBound = 0, + UpperBound = 50, + LowerColor = Color.Red, + UpperColor = Color.FromArgb(0, 255, 0) + }; + + public LevelGraphRepresentation Copy() + { + return new LevelGraphRepresentation + { + LowerBound = LowerBound, + UpperBound = UpperBound, + LowerColor = LowerColor, + UpperColor = UpperColor, + ColorGradientReversed = ColorGradientReversed + }; + } + } +} diff --git a/ARKBreedingStats/library/StatOptions.cs b/ARKBreedingStats/library/StatOptions.cs new file mode 100644 index 00000000..25fd5f01 --- /dev/null +++ b/ARKBreedingStats/library/StatOptions.cs @@ -0,0 +1,66 @@ +using System.Drawing; +using Newtonsoft.Json; + +namespace ARKBreedingStats.library +{ + /// + /// Options for a stat regarding breeding weights, top stat calculation and graph representation. + /// + [JsonObject(MemberSerialization.OptIn)] + public class StatOptions + { + /// + /// Use for all levels, or only for even levels if LevelGraphRepresentationOdd is not null. + /// + [JsonProperty("lvl", DefaultValueHandling = DefaultValueHandling.Ignore)] + public LevelGraphRepresentation LevelGraphRepresentation; + + /// + /// If not null use this for odd levels and LevelGraphRepresentation only for even levels. + /// + [JsonProperty("lvlOdd", DefaultValueHandling = DefaultValueHandling.Ignore)] + public LevelGraphRepresentation LevelGraphRepresentationOdd; + + /// + /// If true don't use values of parent but overrides of this object. + /// + public bool OverrideParent; + public bool UseDifferentColorsForOddLevels; + + public StatOptions Copy() + { + var c = new StatOptions + { + LevelGraphRepresentation = LevelGraphRepresentation.Copy(), + LevelGraphRepresentationOdd = LevelGraphRepresentationOdd.Copy(), + OverrideParent = OverrideParent + }; + return c; + } + + public Color GetLevelColor(int level) + { + var levelRepresentations = + UseDifferentColorsForOddLevels + && LevelGraphRepresentationOdd != null + && level % 2 == 1 + ? LevelGraphRepresentationOdd + : LevelGraphRepresentation; + return levelRepresentations.GetLevelColor(level); + } + + public int GetLevelRange(int level, out int lowerBound) + { + var levelRepresentations = + UseDifferentColorsForOddLevels + && LevelGraphRepresentationOdd != null + && level % 2 == 1 + ? LevelGraphRepresentationOdd + : LevelGraphRepresentation; + lowerBound = levelRepresentations.LowerBound; + return levelRepresentations.UpperBound - lowerBound; + } + + // TODO stat weights + } +} diff --git a/ARKBreedingStats/library/StatWeight.cs b/ARKBreedingStats/library/StatWeight.cs new file mode 100644 index 00000000..2493a97e --- /dev/null +++ b/ARKBreedingStats/library/StatWeight.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ARKBreedingStats.library +{ + /// + /// Options for stat weighting regarding breeding and top stat calculation. + /// + internal class StatWeight + { + public bool ConsiderInTopStatCalculation; + } +} diff --git a/ARKBreedingStats/library/StatsOptions.cs b/ARKBreedingStats/library/StatsOptions.cs new file mode 100644 index 00000000..bccbcc7c --- /dev/null +++ b/ARKBreedingStats/library/StatsOptions.cs @@ -0,0 +1,174 @@ +using System; +using ARKBreedingStats.utils; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using ARKBreedingStats.species; +using Newtonsoft.Json; + +namespace ARKBreedingStats.library +{ + /// + /// Options for stats of species, e.g. breeding stat weights and graph representation. + /// + [JsonObject(MemberSerialization.OptIn)] + public class StatsOptions + { + public static Dictionary StatsOptionsDict; + + /// + /// Name of the stats options, usually a species name. + /// + [JsonProperty] + public string Name; + + public override string ToString() => string.IsNullOrEmpty(Name) ? $"<{Loc.S("default")}>" : Name; + + /// + /// Name of the parent setting + /// + [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] + public string ParentName; + + public StatsOptions ParentOptions; + + [JsonProperty] + public StatOptions[] StatOptions; + + /// + /// Load stats options from the settings file. + /// + public static void LoadSettings() + { + var filePath = FileService.GetJsonPath("statOptions.json"); + + string errorMessage = null; + if (!File.Exists(filePath) + || !FileService.LoadJsonFile(filePath, out StatsOptionsDict, out errorMessage)) + { + if (!string.IsNullOrEmpty(errorMessage)) + MessageBoxes.ShowMessageBox(errorMessage); + StatsOptionsDict = new Dictionary(); + } + + // default value + if (!StatsOptionsDict.ContainsKey(string.Empty)) + StatsOptionsDict[string.Empty] = GetDefaultStatOptions(string.Empty); + var rootSettings = StatsOptionsDict[string.Empty]; + + foreach (var o in StatsOptionsDict.Values) + { + // set parent except for root (root has name string.Empty) + if (o.Name != string.Empty) + { + if (o.ParentName != null && StatsOptionsDict.TryGetValue(o.ParentName, out var po)) + o.ParentOptions = po; + else + o.ParentOptions = rootSettings; // root is default parent + } + + foreach (var so in o.StatOptions) + { + if (so.LevelGraphRepresentation != null || so.LevelGraphRepresentationOdd != null) + so.OverrideParent = true; + if (so.LevelGraphRepresentationOdd != null) + so.UseDifferentColorsForOddLevels = true; + } + } + } + + /// + /// Returns the default stat options. + /// + public static StatsOptions GetDefaultStatOptions(string name) => new StatsOptions + { + Name = name, + StatOptions = Enumerable.Range(0, Stats.StatsCount).Select(si => new StatOptions + { + LevelGraphRepresentation = LevelGraphRepresentation.GetDefaultValue + }).ToArray(), + ParentOptions = StatsOptionsDict.TryGetValue(string.Empty, out var p) ? p : null + }; + + /// + /// Save stats options to the settings file. + /// + public static void SaveSettings() + { + var filePath = FileService.GetJsonPath("statOptions.json"); + + // set parent names and clear settings not used + foreach (var o in StatsOptionsDict.Values) + { + if (o.ParentOptions?.Name != o.Name) + o.ParentName = o.ParentOptions?.Name; + else + o.ParentName = null; // don't save direct loop + foreach (var so in o.StatOptions) + { + if (!so.OverrideParent) + { + so.LevelGraphRepresentation = null; + so.LevelGraphRepresentationOdd = null; + } + else if (!so.UseDifferentColorsForOddLevels) + so.LevelGraphRepresentationOdd = null; + } + } + + FileService.SaveJsonFile(filePath, StatsOptionsDict, out var errorMessage); + if (!string.IsNullOrEmpty(errorMessage)) + MessageBoxes.ShowMessageBox(errorMessage); + } + + /// + /// Returns the stats options for a species. + /// + public static StatsOptions GetStatsOptions(Species species) + { + if (species == null || StatsOptionsDict == null) return null; + + if (StatsOptionsDict.TryGetValue(species.blueprintPath, out var o) + || StatsOptionsDict.TryGetValue(species.DescriptiveNameAndMod, out o) + || StatsOptionsDict.TryGetValue(species.DescriptiveName, out o) + || StatsOptionsDict.TryGetValue(species.name, out o)) + return GenerateStatsOptions(o); + if (StatsOptionsDict.TryGetValue(string.Empty, out o)) return o; // default settings + return null; + } + + /// + /// Generates StatsOptions, using the parent's options if not specified explicitly. + /// + private static StatsOptions GenerateStatsOptions(StatsOptions so) + { + var finalStatsOptions = new StatsOptions { StatOptions = new StatOptions[Stats.StatsCount] }; + var parentLine = new HashSet(); // to track parent loops + StatsOptions defaultOptions = null; + for (var si = 0; si < Stats.StatsCount; si++) + { + var useStatsOptions = so; + parentLine.Clear(); + while (useStatsOptions.StatOptions?[si]?.OverrideParent != true + && useStatsOptions.ParentOptions != null + && !parentLine.Contains(useStatsOptions.ParentOptions)) + { + useStatsOptions = useStatsOptions.ParentOptions; + parentLine.Add(useStatsOptions); + } + + var statOptions = useStatsOptions.StatOptions?[si]; + if (statOptions?.LevelGraphRepresentation == null) + { + if (defaultOptions == null && !StatsOptionsDict.TryGetValue(string.Empty, out defaultOptions)) + throw new Exception("no default stats options found"); + statOptions = defaultOptions.StatOptions[si]; + } + + finalStatsOptions.StatOptions[si] = statOptions; + } + + return finalStatsOptions; + } + } +} diff --git a/ARKBreedingStats/raising/ParentStats.cs b/ARKBreedingStats/raising/ParentStats.cs index 3cb6ac44..4b403a70 100644 --- a/ARKBreedingStats/raising/ParentStats.cs +++ b/ARKBreedingStats/raising/ParentStats.cs @@ -26,8 +26,8 @@ public ParentStats() _parentStatValues[s] = psv; flowLayoutPanel1.SetFlowBreak(psv, true); } - for (int s = 0; s < Stats.StatsCount; s++) - flowLayoutPanel1.Controls.Add(_parentStatValues[Stats.DisplayOrder[s]]); + foreach (var si in Stats.DisplayOrder) + flowLayoutPanel1.Controls.Add(_parentStatValues[si]); _lbLevel = new Label { diff --git a/ARKBreedingStats/uiControls/HueControl.Designer.cs b/ARKBreedingStats/uiControls/HueControl.Designer.cs new file mode 100644 index 00000000..37bb1575 --- /dev/null +++ b/ARKBreedingStats/uiControls/HueControl.Designer.cs @@ -0,0 +1,152 @@ +namespace ARKBreedingStats.uiControls +{ + partial class HueControl + { + /// + /// 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 Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.CbReverseGradient = new System.Windows.Forms.CheckBox(); + this.PbColorGradient = new System.Windows.Forms.PictureBox(); + this.BtColorHigh = new System.Windows.Forms.Button(); + this.BtColorLow = new System.Windows.Forms.Button(); + this.colorDialog1 = new System.Windows.Forms.ColorDialog(); + this.NudLevelHigh = new ARKBreedingStats.uiControls.Nud(); + this.NudLevelLow = new ARKBreedingStats.uiControls.Nud(); + ((System.ComponentModel.ISupportInitialize)(this.PbColorGradient)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudLevelHigh)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudLevelLow)).BeginInit(); + this.SuspendLayout(); + // + // CbReverseGradient + // + this.CbReverseGradient.AutoSize = true; + this.CbReverseGradient.Location = new System.Drawing.Point(287, 4); + this.CbReverseGradient.Name = "CbReverseGradient"; + this.CbReverseGradient.Size = new System.Drawing.Size(62, 17); + this.CbReverseGradient.TabIndex = 12; + this.CbReverseGradient.Text = "rev hue"; + this.CbReverseGradient.UseVisualStyleBackColor = true; + this.CbReverseGradient.CheckedChanged += new System.EventHandler(this.CbReverseGradient_CheckedChanged); + // + // PbColorGradient + // + this.PbColorGradient.Location = new System.Drawing.Point(92, 0); + this.PbColorGradient.Margin = new System.Windows.Forms.Padding(0); + this.PbColorGradient.Name = "PbColorGradient"; + this.PbColorGradient.Size = new System.Drawing.Size(100, 23); + this.PbColorGradient.TabIndex = 9; + this.PbColorGradient.TabStop = false; + this.PbColorGradient.MouseDown += new System.Windows.Forms.MouseEventHandler(this.PbColorGradient_MouseDown); + // + // BtColorHigh + // + this.BtColorHigh.Location = new System.Drawing.Point(192, 0); + this.BtColorHigh.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.BtColorHigh.Name = "BtColorHigh"; + this.BtColorHigh.Size = new System.Drawing.Size(38, 23); + this.BtColorHigh.TabIndex = 8; + this.BtColorHigh.UseVisualStyleBackColor = true; + this.BtColorHigh.Click += new System.EventHandler(this.BtColorClick); + // + // BtColorLow + // + this.BtColorLow.Location = new System.Drawing.Point(54, 0); + this.BtColorLow.Margin = new System.Windows.Forms.Padding(3, 3, 0, 3); + this.BtColorLow.Name = "BtColorLow"; + this.BtColorLow.Size = new System.Drawing.Size(38, 23); + this.BtColorLow.TabIndex = 7; + this.BtColorLow.UseVisualStyleBackColor = true; + this.BtColorLow.Click += new System.EventHandler(this.BtColorClick); + // + // NudLevelHigh + // + this.NudLevelHigh.ForeColor = System.Drawing.SystemColors.GrayText; + this.NudLevelHigh.Location = new System.Drawing.Point(236, 3); + this.NudLevelHigh.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.NudLevelHigh.Name = "NudLevelHigh"; + this.NudLevelHigh.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.NudLevelHigh.Size = new System.Drawing.Size(45, 20); + this.NudLevelHigh.TabIndex = 11; + this.NudLevelHigh.ValueChanged += new System.EventHandler(this.NudLevelValueChanged); + // + // NudLevelLow + // + this.NudLevelLow.ForeColor = System.Drawing.SystemColors.GrayText; + this.NudLevelLow.Location = new System.Drawing.Point(3, 3); + this.NudLevelLow.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.NudLevelLow.Name = "NudLevelLow"; + this.NudLevelLow.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.NudLevelLow.Size = new System.Drawing.Size(45, 20); + this.NudLevelLow.TabIndex = 10; + this.NudLevelLow.ValueChanged += new System.EventHandler(this.NudLevelValueChanged); + // + // HueControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.CbReverseGradient); + this.Controls.Add(this.NudLevelHigh); + this.Controls.Add(this.NudLevelLow); + this.Controls.Add(this.PbColorGradient); + this.Controls.Add(this.BtColorHigh); + this.Controls.Add(this.BtColorLow); + this.Name = "HueControl"; + this.Size = new System.Drawing.Size(351, 24); + ((System.ComponentModel.ISupportInitialize)(this.PbColorGradient)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudLevelHigh)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudLevelLow)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.CheckBox CbReverseGradient; + private Nud NudLevelHigh; + private Nud NudLevelLow; + private System.Windows.Forms.PictureBox PbColorGradient; + private System.Windows.Forms.Button BtColorHigh; + private System.Windows.Forms.Button BtColorLow; + private System.Windows.Forms.ColorDialog colorDialog1; + } +} diff --git a/ARKBreedingStats/uiControls/HueControl.cs b/ARKBreedingStats/uiControls/HueControl.cs new file mode 100644 index 00000000..4ac8a2a3 --- /dev/null +++ b/ARKBreedingStats/uiControls/HueControl.cs @@ -0,0 +1,222 @@ +using ARKBreedingStats.library; +using ARKBreedingStats.utils; +using System; +using System.Drawing; +using System.Windows.Forms; +using Newtonsoft.Json; + +namespace ARKBreedingStats.uiControls +{ + public partial class HueControl : UserControl + { + public LevelGraphRepresentation LevelGraphRepresentation; + + public HueControl() + { + InitializeComponent(); + } + + public HueControl(ToolTip tt) : this() => UpdateTooltips(tt); + + public void UpdateTooltips(ToolTip tt) => tt?.SetToolTip(CbReverseGradient, "reverse hue direction"); + + private void NudLevelValueChanged(object sender, EventArgs e) + { + var isHigh = sender == NudLevelHigh; + if (isHigh) + { + var newValue = (int)NudLevelHigh.Value; + if (LevelGraphRepresentation.UpperBound == newValue) return; + LevelGraphRepresentation.UpperBound = newValue; + } + else + { + var newValue = (int)NudLevelLow.Value; + if (LevelGraphRepresentation.LowerBound == newValue) return; + LevelGraphRepresentation.LowerBound = newValue; + } + if (NudLevelHigh.Value >= NudLevelLow.Value) + { + UpdateGradient(); + return; + } + if (isHigh) + NudLevelLow.ValueSave = NudLevelHigh.Value; + else + NudLevelHigh.ValueSave = NudLevelLow.Value; + } + + private void BtColorClick(object sender, EventArgs e) => SelectColor((Button)sender); + + private void SelectColor(Button bt) + { + colorDialog1.Color = bt.BackColor; + if (colorDialog1.ShowDialog() != DialogResult.OK) return; + var cl = colorDialog1.Color; + SetColor(cl, bt == BtColorHigh, bt); + + } + + private void SetColor(Color cl, bool higherColor, Button bt) + { + if (bt.BackColor == cl) return; + bt.BackColor = cl; + if (higherColor) + LevelGraphRepresentation.UpperColor = cl; + else + LevelGraphRepresentation.LowerColor = cl; + UpdateGradient(); + } + + private void CbReverseGradient_CheckedChanged(object sender, EventArgs e) + { + LevelGraphRepresentation.ColorGradientReversed = CbReverseGradient.Checked; + UpdateGradient(); + } + + private void UpdateGradient() + { + if (!(PbColorGradient.Image is Bitmap bmp)) + { + bmp = new Bitmap(PbColorGradient.Width, PbColorGradient.Height); + PbColorGradient.Image = bmp; + } + + var l = bmp.Width; + var levelLow = LevelGraphRepresentation.LowerBound; + var levelHigh = LevelGraphRepresentation.UpperBound; + var levelRange = levelHigh - levelLow + 1; + if (levelRange <= 0) + { + using (var g = Graphics.FromImage(bmp)) + g.FillRectangle(new SolidBrush(LevelGraphRepresentation.GetLevelColor((int)NudLevelHigh.Value)), + 0, 0, bmp.Width, bmp.Height); + PbColorGradient.Invalidate(); + return; + } + var barWidth = Math.Max(1, (float)l / levelRange); + var xBarStart = 0f; + var h = bmp.Height; + using (var g = Graphics.FromImage(bmp)) + using (var b = new SolidBrush(Color.Black)) + { + for (var level = levelLow; level <= levelHigh;) + { + var xBarEnd = xBarStart + barWidth; + b.Color = LevelGraphRepresentation.GetLevelColor(level); + g.FillRectangle(b, xBarStart, 0, barWidth, h); + xBarStart = xBarEnd; + level = (int)(levelLow + levelRange * xBarEnd / l); + } + } + PbColorGradient.Invalidate(); + } + + #region Color gradient scrolling + + private (float h, float s, float v) _colorLowHsv; + private (float h, float s, float v) _colorHighHsv; + + private void PbColorGradient_MouseDown(object sender, MouseEventArgs e) + { + if (ModifierKeys == Keys.Shift) + { + // copy or paste hue setting + if (e.Button == MouseButtons.Right) + CopyHueSetting(); + else if (e.Button == MouseButtons.Left) + PasteHueSetting(); + return; + } + + if (ModifierKeys == Keys.Control) + { + ResetColors(); + return; + } + + // create invisible scroll form to scroll the gradient + var sf = new ScrollForm(); + var startupLocation = Cursor.Position; + startupLocation.Offset(-sf.Width / 2, -sf.Height / 2); + sf.SetLocation(startupLocation); + sf.Moved += UpdateLevelRepresentation; + _colorLowHsv = LevelGraphRepresentation.LowerColor.GetHsv(); + _colorHighHsv = LevelGraphRepresentation.UpperColor.GetHsv(); + if (_colorLowHsv.h > _colorHighHsv.h) + _colorLowHsv.h -= 360; + sf.Show(this); + } + + /// + /// Copy hue settings to clipboard. + /// + private void CopyHueSetting() + { + Clipboard.SetText(JsonConvert.SerializeObject(LevelGraphRepresentation)); + } + + /// + /// Paste hue settings from clipboard. + /// + private void PasteHueSetting() + { + var clipText = Clipboard.GetText(); + if (string.IsNullOrEmpty(clipText)) return; + var levelGraphSettings = JsonConvert.DeserializeObject(clipText); + if (levelGraphSettings == null) return; + SetControlValues(levelGraphSettings); + } + + public void SetControlValues(LevelGraphRepresentation levelGraphSettings) + { + if (levelGraphSettings == null) return; + NudLevelLow.ValueSave = levelGraphSettings.LowerBound; + NudLevelHigh.ValueSave = levelGraphSettings.UpperBound; + SetColor(levelGraphSettings.LowerColor, false, BtColorLow); + SetColor(levelGraphSettings.UpperColor, true, BtColorHigh); + CbReverseGradient.Checked = levelGraphSettings.ColorGradientReversed; + } + + public void SetValues(LevelGraphRepresentation levelGraphSettings) + { + var visible = levelGraphSettings != null; + Visible = visible; + if (!visible) + return; + + LevelGraphRepresentation = levelGraphSettings; + SetControlValues(levelGraphSettings); + UpdateGradient(); + } + + private void UpdateLevelRepresentation(int dx, int dy) + { + var centerHue = (_colorHighHsv.h + _colorLowHsv.h) / 2; + var hueHalfDistance = Math.Abs(centerHue - _colorLowHsv.h) + dy * 0.3; + if (hueHalfDistance >= 179) hueHalfDistance = 179; + if (hueHalfDistance < 0) hueHalfDistance = 0; + if (LevelGraphRepresentation.ColorGradientReversed) + dx = -dx; + var rangeFactor = 1 + dy * 0.005; + dx = (int)(dx * rangeFactor); + centerHue -= dx; + + LevelGraphRepresentation.LowerColor = Utils.ColorFromHsv(centerHue - hueHalfDistance, _colorLowHsv.s, _colorLowHsv.v); + LevelGraphRepresentation.UpperColor = Utils.ColorFromHsv(centerHue + hueHalfDistance, _colorHighHsv.s, _colorHighHsv.v); + + BtColorLow.BackColor = LevelGraphRepresentation.LowerColor; + BtColorHigh.BackColor = LevelGraphRepresentation.UpperColor; + UpdateGradient(); + } + + #endregion + + private void ResetColors() + { + var defaultSettings = LevelGraphRepresentation.GetDefaultValue; + SetColor(defaultSettings.LowerColor, false, BtColorLow); + SetColor(defaultSettings.UpperColor, true, BtColorHigh); + } + } +} diff --git a/ARKBreedingStats/uiControls/HueControl.resx b/ARKBreedingStats/uiControls/HueControl.resx new file mode 100644 index 00000000..aa0ca0f6 --- /dev/null +++ b/ARKBreedingStats/uiControls/HueControl.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 17, 17 + + \ No newline at end of file diff --git a/ARKBreedingStats/uiControls/ScrollForm.Designer.cs b/ARKBreedingStats/uiControls/ScrollForm.Designer.cs new file mode 100644 index 00000000..76aaaf35 --- /dev/null +++ b/ARKBreedingStats/uiControls/ScrollForm.Designer.cs @@ -0,0 +1,55 @@ +namespace ARKBreedingStats.uiControls +{ + partial class ScrollForm + { + /// + /// 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() + { + this.SuspendLayout(); + // + // ScrollForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Black; + this.ClientSize = new System.Drawing.Size(800, 800); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "ScrollForm"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; + this.Text = "ScrollForm"; + this.TopMost = true; + this.TransparencyKey = System.Drawing.Color.Black; + this.MouseLeave += new System.EventHandler(this.ScrollForm_MouseLeave); + this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.ScrollForm_MouseMove); + this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.ScrollForm_MouseUp); + this.ResumeLayout(false); + + } + + #endregion + } +} \ No newline at end of file diff --git a/ARKBreedingStats/uiControls/ScrollForm.cs b/ARKBreedingStats/uiControls/ScrollForm.cs new file mode 100644 index 00000000..67c2fa56 --- /dev/null +++ b/ARKBreedingStats/uiControls/ScrollForm.cs @@ -0,0 +1,44 @@ +using System; +using System.Drawing; +using System.Windows.Forms; + +namespace ARKBreedingStats.uiControls +{ + /// + /// Invisible form for scrolling while holding the left mouse button. + /// + public partial class ScrollForm : Form + { + /// + /// Mouse was moved to coordinates. + /// + public event Action Moved; + + private Point _centerOffset; + + public ScrollForm() + { + InitializeComponent(); + Capture = true; + } + + public void SetLocation(Point p) + { + Location = p; + _centerOffset = PointToScreen(new Point(Width / 2, Height / 2)); + _centerOffset = new Point(-_centerOffset.X, -_centerOffset.Y); + } + + private void ScrollForm_MouseUp(object sender, MouseEventArgs e) => Close(); + + private void ScrollForm_MouseLeave(object sender, EventArgs e) => Close(); + + private void ScrollForm_MouseMove(object sender, MouseEventArgs e) + { + if (Moved == null) return; + var p = Cursor.Position; + p.Offset(_centerOffset); + Moved(p.X, p.Y); + } + } +} diff --git a/ARKBreedingStats/uiControls/ScrollForm.resx b/ARKBreedingStats/uiControls/ScrollForm.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/ARKBreedingStats/uiControls/ScrollForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/ARKBreedingStats/uiControls/StatIO.Designer.cs b/ARKBreedingStats/uiControls/StatIO.Designer.cs index c2d2c506..86a722c0 100644 --- a/ARKBreedingStats/uiControls/StatIO.Designer.cs +++ b/ARKBreedingStats/uiControls/StatIO.Designer.cs @@ -41,16 +41,16 @@ private void InitializeComponent() this.inputPanel = new System.Windows.Forms.Panel(); this.nudLvM = new ARKBreedingStats.uiControls.Nud(); this.labelFinalValue = new System.Windows.Forms.Label(); - this.numLvD = new ARKBreedingStats.uiControls.Nud(); - this.numLvW = new ARKBreedingStats.uiControls.Nud(); + this.nudLvD = new ARKBreedingStats.uiControls.Nud(); + this.nudLvW = new ARKBreedingStats.uiControls.Nud(); this.labelBValue = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); this.panelFinalValue.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownInput)).BeginInit(); this.inputPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudLvM)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numLvD)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numLvW)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudLvD)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudLvW)).BeginInit(); this.SuspendLayout(); // // groupBox1 @@ -181,8 +181,8 @@ private void InitializeComponent() // this.inputPanel.Controls.Add(this.nudLvM); this.inputPanel.Controls.Add(this.labelFinalValue); - this.inputPanel.Controls.Add(this.numLvD); - this.inputPanel.Controls.Add(this.numLvW); + this.inputPanel.Controls.Add(this.nudLvD); + this.inputPanel.Controls.Add(this.nudLvW); this.inputPanel.Location = new System.Drawing.Point(6, 14); this.inputPanel.Name = "inputPanel"; this.inputPanel.Size = new System.Drawing.Size(269, 25); @@ -219,48 +219,48 @@ private void InitializeComponent() // // numLvD // - this.numLvD.ForeColor = System.Drawing.SystemColors.GrayText; - this.numLvD.Location = new System.Drawing.Point(107, 3); - this.numLvD.Maximum = new decimal(new int[] { + this.nudLvD.ForeColor = System.Drawing.SystemColors.GrayText; + this.nudLvD.Location = new System.Drawing.Point(107, 3); + this.nudLvD.Maximum = new decimal(new int[] { 9999, 0, 0, 0}); - this.numLvD.Name = "numLvD"; - this.numLvD.NeutralNumber = new decimal(new int[] { + this.nudLvD.Name = "nudLvD"; + this.nudLvD.NeutralNumber = new decimal(new int[] { 0, 0, 0, 0}); - this.numLvD.Size = new System.Drawing.Size(46, 20); - this.numLvD.TabIndex = 2; - this.numLvD.ValueChanged += new System.EventHandler(this.numLvD_ValueChanged); - this.numLvD.Enter += new System.EventHandler(this.numericUpDown_Enter); + this.nudLvD.Size = new System.Drawing.Size(46, 20); + this.nudLvD.TabIndex = 2; + this.nudLvD.ValueChanged += new System.EventHandler(this.numLvD_ValueChanged); + this.nudLvD.Enter += new System.EventHandler(this.numericUpDown_Enter); // // numLvW // - this.numLvW.ForeColor = System.Drawing.SystemColors.GrayText; - this.numLvW.Location = new System.Drawing.Point(3, 3); - this.numLvW.Maximum = new decimal(new int[] { + this.nudLvW.ForeColor = System.Drawing.SystemColors.GrayText; + this.nudLvW.Location = new System.Drawing.Point(3, 3); + this.nudLvW.Maximum = new decimal(new int[] { 9999, 0, 0, 0}); - this.numLvW.Minimum = new decimal(new int[] { + this.nudLvW.Minimum = new decimal(new int[] { 1, 0, 0, -2147483648}); - this.numLvW.Name = "numLvW"; - this.numLvW.NeutralNumber = new decimal(new int[] { + this.nudLvW.Name = "nudLvW"; + this.nudLvW.NeutralNumber = new decimal(new int[] { 0, 0, 0, 0}); - this.numLvW.Size = new System.Drawing.Size(46, 20); - this.numLvW.TabIndex = 0; - this.numLvW.ValueChanged += new System.EventHandler(this.numLvW_ValueChanged); - this.numLvW.Enter += new System.EventHandler(this.numericUpDown_Enter); + this.nudLvW.Size = new System.Drawing.Size(46, 20); + this.nudLvW.TabIndex = 0; + this.nudLvW.ValueChanged += new System.EventHandler(this.numLvW_ValueChanged); + this.nudLvW.Enter += new System.EventHandler(this.numericUpDown_Enter); // // labelBValue // @@ -285,8 +285,8 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.numericUpDownInput)).EndInit(); this.inputPanel.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.nudLvM)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numLvD)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numLvW)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudLvD)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudLvW)).EndInit(); this.ResumeLayout(false); } @@ -297,8 +297,8 @@ private void InitializeComponent() private System.Windows.Forms.Label labelBValue; private uiControls.Nud numericUpDownInput; private System.Windows.Forms.Panel panelBarWildLevels; - private uiControls.Nud numLvD; - private uiControls.Nud numLvW; + private uiControls.Nud nudLvD; + private uiControls.Nud nudLvW; private System.Windows.Forms.Panel inputPanel; private System.Windows.Forms.Panel panelFinalValue; private System.Windows.Forms.Label labelDomLevel; diff --git a/ARKBreedingStats/uiControls/StatIO.cs b/ARKBreedingStats/uiControls/StatIO.cs index f0110925..c3e2f11f 100644 --- a/ARKBreedingStats/uiControls/StatIO.cs +++ b/ARKBreedingStats/uiControls/StatIO.cs @@ -26,12 +26,14 @@ public partial class StatIO : UserControl private const int MaxBarLength = 335; private bool _linkWildMutated; private int _wildMutatedSum; + private readonly Debouncer _levelChangedDebouncer = new Debouncer(); + private StatOptions _statOptions; public StatIO() { InitializeComponent(); - numLvW.Value = 0; - numLvD.Value = 0; + nudLvW.Value = 0; + nudLvD.Value = 0; labelBValue.Text = string.Empty; postTame = true; percent = false; @@ -73,21 +75,21 @@ public string Title public int LevelWild { - get => (short)numLvW.Value; + get => (short)nudLvW.Value; set { int v = value; if (v < 0) { - numLvW.Value = -1; // value can be unknown if multiple stats are not shown (e.g. wild speed and oxygen) + nudLvW.Value = -1; // value can be unknown if multiple stats are not shown (e.g. wild speed and oxygen) _wildMutatedSum = -1; } else { - if (v > numLvW.Maximum) - v = (int)numLvW.Maximum; + if (v > nudLvW.Maximum) + v = (int)nudLvW.Maximum; _wildMutatedSum = (int)(v + nudLvM.Value); - numLvW.Value = v; + nudLvW.Value = v; } labelWildLevel.Text = (value < 0 ? "?" : v.ToString()); } @@ -99,21 +101,21 @@ public int LevelMut set { labelMutatedLevel.Text = value.ToString(); - if (numLvW.Value < 0) + if (nudLvW.Value < 0) _wildMutatedSum = -1; else - _wildMutatedSum = (int)(numLvW.Value + value); + _wildMutatedSum = (int)(nudLvW.Value + value); nudLvM.Value = value; } } public int LevelDom { - get => (short)numLvD.Value; + get => (short)nudLvD.Value; set { labelDomLevel.Text = value.ToString(); - numLvD.Value = value; + nudLvD.Value = value; } } @@ -270,9 +272,9 @@ public void Clear() { Status = StatIOStatus.Neutral; TopLevel = LevelStatusFlags.LevelStatus.Neutral; - numLvW.Value = 0; + nudLvW.Value = 0; nudLvM.Value = 0; - numLvD.Value = 0; + nudLvD.Value = 0; labelWildLevel.Text = "0"; labelMutatedLevel.Text = "0"; labelDomLevel.Text = "0"; @@ -282,12 +284,12 @@ public void Clear() private void numLvW_ValueChanged(object sender, EventArgs e) { - SetLevelBar(panelBarWildLevels, numLvW.Value); - _tt.SetToolTip(panelBarWildLevels, Utils.LevelPercentile((int)numLvW.Value)); + SetLevelBar(panelBarWildLevels, (int)nudLvW.Value); + _tt.SetToolTip(panelBarWildLevels, Utils.LevelPercentile((int)nudLvW.Value)); if (_linkWildMutated && _wildMutatedSum != -1) { - nudLvM.ValueSave = Math.Max(0, _wildMutatedSum - numLvW.Value); + nudLvM.ValueSave = Math.Max(0, _wildMutatedSum - nudLvW.Value); } if (_inputType != StatIOInputType.FinalValueInputType) @@ -296,11 +298,11 @@ private void numLvW_ValueChanged(object sender, EventArgs e) private void nudLvM_ValueChanged(object sender, EventArgs e) { - SetLevelBar(panelBarMutLevels, nudLvM.Value); + SetLevelBar(panelBarMutLevels, (int)nudLvM.Value); if (_linkWildMutated && _wildMutatedSum != -1) { - numLvW.ValueSave = Math.Max(0, _wildMutatedSum - nudLvM.Value); + nudLvW.ValueSave = Math.Max(0, _wildMutatedSum - nudLvM.Value); } if (_inputType != StatIOInputType.FinalValueInputType) @@ -309,25 +311,25 @@ private void nudLvM_ValueChanged(object sender, EventArgs e) private void numLvD_ValueChanged(object sender, EventArgs e) { - SetLevelBar(panelBarDomLevels, numLvD.Value); + SetLevelBar(panelBarDomLevels, (int)nudLvD.Value); if (_inputType != StatIOInputType.FinalValueInputType) LevelChangedDebouncer(); } - private void SetLevelBar(Panel panel, decimal level) + private void SetLevelBar(Panel panel, int level) { - var lengthPercentage = 100 * (int)level / barMaxLevel; // in percentage of the max bar width + var range = _statOptions.GetLevelRange(level, out var lowerBound); + if (range < 1) range = 1; + var lengthPercentage = 100 * (level - lowerBound) / range; // in percentage of the max bar width if (lengthPercentage > 100) lengthPercentage = 100; else if (lengthPercentage < 0) lengthPercentage = 0; panel.Width = lengthPercentage * MaxBarLength / 100; - panel.BackColor = Utils.GetColorFromPercent(lengthPercentage); + panel.BackColor = _statOptions.GetLevelColor(level); } - private readonly Debouncer _levelChangedDebouncer = new Debouncer(); - private void LevelChangedDebouncer() => _levelChangedDebouncer.Debounce(200, FireLevelChanged, Dispatcher.CurrentDispatcher); private void FireLevelChanged() => LevelChanged?.Invoke(this); @@ -346,15 +348,15 @@ private void numericUpDown_Enter(object sender, EventArgs e) n?.Select(0, n.Text.Length); } - private void groupBox1_Click(object sender, EventArgs e) - { - OnClick(e); - } + private void groupBox1_Click(object sender, EventArgs e) => OnClick(e); - private void labelBValue_Click(object sender, EventArgs e) - { - OnClick(e); - } + private void labelBValue_Click(object sender, EventArgs e) => OnClick(e); + + private void labelDomLevel_Click(object sender, EventArgs e) => OnClick(e); + + private void panelFinalValue_Click(object sender, EventArgs e) => OnClick(e); + + private void panelBar_Click(object sender, EventArgs e) => OnClick(e); private void labelWildLevel_Click(object sender, EventArgs e) { @@ -385,27 +387,12 @@ private int LevelDeltaMutationShift(int remainingLevel) return levelDelta; } - private void labelDomLevel_Click(object sender, EventArgs e) - { - OnClick(e); - } - private void checkBoxFixDomZero_CheckedChanged(object sender, EventArgs e) { _domZeroFixed = checkBoxFixDomZero.Checked; checkBoxFixDomZero.Image = (_domZeroFixed ? Properties.Resources.locked : Properties.Resources.unlocked); } - private void panelFinalValue_Click(object sender, EventArgs e) - { - OnClick(e); - } - - private void panelBar_Click(object sender, EventArgs e) - { - OnClick(e); - } - public bool DomLevelLockedZero { get => _domZeroFixed; @@ -420,9 +407,20 @@ public bool LinkWildMutated set { _linkWildMutated = value; - _wildMutatedSum = (int)(numLvW.Value + nudLvM.Value); + _wildMutatedSum = (int)(nudLvW.Value + nudLvM.Value); } } + + public void SetStatOptions(StatOptions so) + { + _statOptions = so; + if (nudLvW.Value > 0) + SetLevelBar(panelBarWildLevels, (int)nudLvW.Value); + if (nudLvD.Value > 0) + SetLevelBar(panelBarDomLevels, (int)nudLvD.Value); + if (nudLvM.Value > 0) + SetLevelBar(panelBarMutLevels, (int)nudLvM.Value); + } } public enum StatIOStatus diff --git a/ARKBreedingStats/uiControls/StatOptionsControl.Designer.cs b/ARKBreedingStats/uiControls/StatOptionsControl.Designer.cs new file mode 100644 index 00000000..c32c6a7c --- /dev/null +++ b/ARKBreedingStats/uiControls/StatOptionsControl.Designer.cs @@ -0,0 +1,122 @@ +namespace ARKBreedingStats.uiControls +{ + partial class StatOptionsControl + { + /// + /// 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 Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.LbStatName = new System.Windows.Forms.Label(); + this.colorDialog1 = new System.Windows.Forms.ColorDialog(); + this.panel1 = new System.Windows.Forms.Panel(); + this.CbUseDifferentColorsForOddLevels = new System.Windows.Forms.CheckBox(); + this.hueControlOdd = new ARKBreedingStats.uiControls.HueControl(); + this.hueControl = new ARKBreedingStats.uiControls.HueControl(); + this.CbOverrideGraphSettings = new System.Windows.Forms.CheckBox(); + this.SuspendLayout(); + // + // LbStatName + // + this.LbStatName.AutoSize = true; + this.LbStatName.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.LbStatName.Location = new System.Drawing.Point(3, 3); + this.LbStatName.Name = "LbStatName"; + this.LbStatName.Size = new System.Drawing.Size(61, 24); + this.LbStatName.TabIndex = 0; + this.LbStatName.Text = "[0] HP"; + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.Gray; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(950, 1); + this.panel1.TabIndex = 7; + // + // CbUseDifferentColorsForOddLevels + // + this.CbUseDifferentColorsForOddLevels.AutoSize = true; + this.CbUseDifferentColorsForOddLevels.Enabled = false; + this.CbUseDifferentColorsForOddLevels.Location = new System.Drawing.Point(508, 37); + this.CbUseDifferentColorsForOddLevels.Name = "CbUseDifferentColorsForOddLevels"; + this.CbUseDifferentColorsForOddLevels.Size = new System.Drawing.Size(44, 17); + this.CbUseDifferentColorsForOddLevels.TabIndex = 8; + this.CbUseDifferentColorsForOddLevels.Text = "odd"; + this.CbUseDifferentColorsForOddLevels.UseVisualStyleBackColor = true; + this.CbUseDifferentColorsForOddLevels.CheckedChanged += new System.EventHandler(this.CbUseDifferentColorsForOddLevels_CheckedChanged); + // + // hueControlOdd + // + this.hueControlOdd.Location = new System.Drawing.Point(558, 31); + this.hueControlOdd.Name = "hueControlOdd"; + this.hueControlOdd.Size = new System.Drawing.Size(347, 24); + this.hueControlOdd.TabIndex = 10; + // + // hueControl + // + this.hueControl.Location = new System.Drawing.Point(152, 32); + this.hueControl.Name = "hueControl"; + this.hueControl.Size = new System.Drawing.Size(350, 24); + this.hueControl.TabIndex = 9; + // + // CbOverrideGraphSettings + // + this.CbOverrideGraphSettings.AutoSize = true; + this.CbOverrideGraphSettings.Location = new System.Drawing.Point(15, 38); + this.CbOverrideGraphSettings.Name = "CbOverrideGraphSettings"; + this.CbOverrideGraphSettings.Size = new System.Drawing.Size(135, 17); + this.CbOverrideGraphSettings.TabIndex = 11; + this.CbOverrideGraphSettings.Text = "Override graph settings"; + this.CbOverrideGraphSettings.UseVisualStyleBackColor = true; + this.CbOverrideGraphSettings.CheckedChanged += new System.EventHandler(this.CbOverrideGraphSettings_CheckedChanged); + // + // StatOptionsControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.CbOverrideGraphSettings); + this.Controls.Add(this.hueControlOdd); + this.Controls.Add(this.hueControl); + this.Controls.Add(this.CbUseDifferentColorsForOddLevels); + this.Controls.Add(this.panel1); + this.Controls.Add(this.LbStatName); + this.Name = "StatOptionsControl"; + this.Size = new System.Drawing.Size(987, 60); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label LbStatName; + private System.Windows.Forms.ColorDialog colorDialog1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.CheckBox CbUseDifferentColorsForOddLevels; + private HueControl hueControl; + private HueControl hueControlOdd; + private System.Windows.Forms.CheckBox CbOverrideGraphSettings; + } +} diff --git a/ARKBreedingStats/uiControls/StatOptionsControl.cs b/ARKBreedingStats/uiControls/StatOptionsControl.cs new file mode 100644 index 00000000..2528b8b4 --- /dev/null +++ b/ARKBreedingStats/uiControls/StatOptionsControl.cs @@ -0,0 +1,66 @@ +using System; +using System.Windows.Forms; +using ARKBreedingStats.library; + +namespace ARKBreedingStats.uiControls +{ + public partial class StatOptionsControl : UserControl + { + private readonly ToolTip _tt; + private StatOptions _statOptions; + private int _statIndex; + private StatsOptions _parent; + + public StatOptionsControl() + { + InitializeComponent(); + } + + public StatOptionsControl(string name, int statIndex, ToolTip tt) : this() + { + LbStatName.Text = name; + _statIndex = statIndex; + _tt = tt; + hueControl.UpdateTooltips(_tt); + hueControlOdd.UpdateTooltips(_tt); + _tt.SetToolTip(CbUseDifferentColorsForOddLevels, "Use different colors for odd levels"); + } + + public void SetStatOptions(StatOptions so, bool isNotRoot, StatsOptions parent) + { + _statOptions = so; + _parent = parent; + CbUseDifferentColorsForOddLevels.Checked = so?.UseDifferentColorsForOddLevels == true; + hueControl.SetValues(so?.LevelGraphRepresentation); + hueControlOdd.SetValues(so?.LevelGraphRepresentationOdd); + CbOverrideGraphSettings.Checked = so?.OverrideParent == true; + CbOverrideGraphSettings.Visible = isNotRoot; + } + + private void CbOverrideGraphSettings_CheckedChanged(object sender, EventArgs e) + { + var overrideStat = CbOverrideGraphSettings.Checked; + hueControl.Enabled = overrideStat; + hueControlOdd.Enabled = overrideStat; + CbUseDifferentColorsForOddLevels.Enabled = overrideStat; + _statOptions.OverrideParent = overrideStat; + if (overrideStat && _statOptions.LevelGraphRepresentation == null) + { + _statOptions.LevelGraphRepresentation = _parent?.StatOptions[_statIndex].LevelGraphRepresentation.Copy() ?? LevelGraphRepresentation.GetDefaultValue; + hueControl.SetValues(_statOptions.LevelGraphRepresentation); + } + } + + private void CbUseDifferentColorsForOddLevels_CheckedChanged(object sender, EventArgs e) + { + _statOptions.UseDifferentColorsForOddLevels = CbUseDifferentColorsForOddLevels.Checked; + hueControlOdd.Visible = _statOptions.UseDifferentColorsForOddLevels; + if (_statOptions.UseDifferentColorsForOddLevels && _statOptions.LevelGraphRepresentationOdd == null) + { + _statOptions.LevelGraphRepresentationOdd = _parent?.StatOptions[_statIndex].LevelGraphRepresentationOdd?.Copy() + ?? LevelGraphRepresentation.GetDefaultValue; + hueControlOdd.SetValues(_statOptions.LevelGraphRepresentationOdd); + } + } + } +} diff --git a/ARKBreedingStats/uiControls/StatOptionsControl.resx b/ARKBreedingStats/uiControls/StatOptionsControl.resx new file mode 100644 index 00000000..aa0ca0f6 --- /dev/null +++ b/ARKBreedingStats/uiControls/StatOptionsControl.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 17, 17 + + \ No newline at end of file diff --git a/ARKBreedingStats/uiControls/StatPotentials.cs b/ARKBreedingStats/uiControls/StatPotentials.cs index 869b8a6a..412ac28f 100644 --- a/ARKBreedingStats/uiControls/StatPotentials.cs +++ b/ARKBreedingStats/uiControls/StatPotentials.cs @@ -20,9 +20,8 @@ public StatPotentials() StatPotential stat = new StatPotential(s, Stats.IsPercentage(s)); _stats[s] = stat; } - for (int s = 0; s < Stats.StatsCount; s++) + foreach (var si in Stats.DisplayOrder) { - int si = Stats.DisplayOrder[s]; flpStats.Controls.Add(_stats[si]); flpStats.SetFlowBreak(_stats[si], true); } diff --git a/ARKBreedingStats/uiControls/StatSelector.cs b/ARKBreedingStats/uiControls/StatSelector.cs index aceefbef..76bce5d8 100644 --- a/ARKBreedingStats/uiControls/StatSelector.cs +++ b/ARKBreedingStats/uiControls/StatSelector.cs @@ -1,7 +1,6 @@ using System; using System.Windows.Forms; using ARKBreedingStats.species; -using ARKBreedingStats.values; namespace ARKBreedingStats.uiControls { @@ -30,14 +29,13 @@ public StatSelector() r.CheckedChanged += RadioButtonCheckedChanged; flowLayoutPanel1.Controls.Add(r); - for (int si = 0; si < Stats.StatsCount; si++) + foreach (var si in Stats.DisplayOrder) { - var statIndex = Stats.DisplayOrder[si]; - if (statIndex == Stats.Torpidity) continue; + if (si == Stats.Torpidity) continue; r = new RadioButton { - Tag = statIndex, - Text = Utils.StatName(statIndex, true), + Tag = si, + Text = Utils.StatName(si, true), Appearance = Appearance.Button, AutoSize = true, Visible = false diff --git a/ARKBreedingStats/uiControls/StatsOptionsControl.Designer.cs b/ARKBreedingStats/uiControls/StatsOptionsControl.Designer.cs new file mode 100644 index 00000000..43a0c0f8 --- /dev/null +++ b/ARKBreedingStats/uiControls/StatsOptionsControl.Designer.cs @@ -0,0 +1,166 @@ +namespace ARKBreedingStats.uiControls +{ + partial class StatsOptionsControl + { + /// + /// 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 Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.flpStatControls = new System.Windows.Forms.FlowLayoutPanel(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.BtNew = new System.Windows.Forms.Button(); + this.BtRemove = new System.Windows.Forms.Button(); + this.CbbOptions = new System.Windows.Forms.ComboBox(); + this.TbOptionsName = new System.Windows.Forms.TextBox(); + this.LbParent = new System.Windows.Forms.Label(); + this.CbbParent = new System.Windows.Forms.ComboBox(); + this.tableLayoutPanel1.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // flpStatControls + // + this.flpStatControls.AutoScroll = true; + this.flpStatControls.Dock = System.Windows.Forms.DockStyle.Fill; + this.flpStatControls.Location = new System.Drawing.Point(3, 33); + this.flpStatControls.Name = "flpStatControls"; + this.flpStatControls.Size = new System.Drawing.Size(929, 476); + this.flpStatControls.TabIndex = 0; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Controls.Add(this.flpStatControls, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 0); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(935, 512); + this.tableLayoutPanel1.TabIndex = 1; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Controls.Add(this.BtNew); + this.flowLayoutPanel1.Controls.Add(this.BtRemove); + this.flowLayoutPanel1.Controls.Add(this.CbbOptions); + this.flowLayoutPanel1.Controls.Add(this.TbOptionsName); + this.flowLayoutPanel1.Controls.Add(this.LbParent); + this.flowLayoutPanel1.Controls.Add(this.CbbParent); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(929, 24); + this.flowLayoutPanel1.TabIndex = 1; + // + // BtNew + // + this.BtNew.Location = new System.Drawing.Point(3, 3); + this.BtNew.Name = "BtNew"; + this.BtNew.Size = new System.Drawing.Size(20, 20); + this.BtNew.TabIndex = 4; + this.BtNew.UseVisualStyleBackColor = true; + this.BtNew.Click += new System.EventHandler(this.BtNew_Click); + // + // BtRemove + // + this.BtRemove.Location = new System.Drawing.Point(29, 3); + this.BtRemove.Name = "BtRemove"; + this.BtRemove.Size = new System.Drawing.Size(20, 20); + this.BtRemove.TabIndex = 5; + this.BtRemove.UseVisualStyleBackColor = false; + this.BtRemove.Click += new System.EventHandler(this.BtRemove_Click); + // + // CbbOptions + // + this.CbbOptions.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CbbOptions.FormattingEnabled = true; + this.CbbOptions.Location = new System.Drawing.Point(55, 3); + this.CbbOptions.Name = "CbbOptions"; + this.CbbOptions.Size = new System.Drawing.Size(251, 21); + this.CbbOptions.TabIndex = 1; + this.CbbOptions.SelectedIndexChanged += new System.EventHandler(this.CbbOptions_SelectedIndexChanged); + // + // TbOptionsName + // + this.TbOptionsName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; + this.TbOptionsName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; + this.TbOptionsName.Location = new System.Drawing.Point(312, 3); + this.TbOptionsName.Name = "TbOptionsName"; + this.TbOptionsName.Size = new System.Drawing.Size(199, 20); + this.TbOptionsName.TabIndex = 0; + this.TbOptionsName.Leave += new System.EventHandler(this.TbOptionsName_Leave); + // + // LbParent + // + this.LbParent.AutoSize = true; + this.LbParent.Location = new System.Drawing.Point(517, 5); + this.LbParent.Margin = new System.Windows.Forms.Padding(3, 5, 3, 0); + this.LbParent.Name = "LbParent"; + this.LbParent.Size = new System.Drawing.Size(37, 13); + this.LbParent.TabIndex = 3; + this.LbParent.Text = "parent"; + // + // CbbParent + // + this.CbbParent.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CbbParent.FormattingEnabled = true; + this.CbbParent.Location = new System.Drawing.Point(560, 3); + this.CbbParent.Name = "CbbParent"; + this.CbbParent.Size = new System.Drawing.Size(257, 21); + this.CbbParent.TabIndex = 2; + this.CbbParent.SelectedIndexChanged += new System.EventHandler(this.CbbParent_SelectedIndexChanged); + // + // StatsOptionsControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.tableLayoutPanel1); + this.Name = "StatsOptionsControl"; + this.Size = new System.Drawing.Size(935, 512); + this.tableLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.FlowLayoutPanel flpStatControls; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.TextBox TbOptionsName; + private System.Windows.Forms.ComboBox CbbOptions; + private System.Windows.Forms.ComboBox CbbParent; + private System.Windows.Forms.Label LbParent; + private System.Windows.Forms.Button BtNew; + private System.Windows.Forms.Button BtRemove; + } +} diff --git a/ARKBreedingStats/uiControls/StatsOptionsControl.cs b/ARKBreedingStats/uiControls/StatsOptionsControl.cs new file mode 100644 index 00000000..a72d5305 --- /dev/null +++ b/ARKBreedingStats/uiControls/StatsOptionsControl.cs @@ -0,0 +1,176 @@ +using System; +using System.Drawing; +using System.Linq; +using System.Windows.Forms; +using ARKBreedingStats.library; +using ARKBreedingStats.species; +using ARKBreedingStats.utils; + +namespace ARKBreedingStats.uiControls +{ + public partial class StatsOptionsControl : UserControl + { + private StatOptionsControl[] _statOptionsControls; + private readonly ToolTip _tt = new ToolTip(); + private StatsOptions _selectedStatsOptions; + private Species _species; + + public StatsOptionsControl() + { + InitializeComponent(); + InitializeStatControls(); + InitButtonImages(); + } + + private void InitializeStatControls() + { + _statOptionsControls = new StatOptionsControl[Stats.StatsCount]; + foreach (var si in Stats.DisplayOrder) + { + var c = new StatOptionsControl($"[{si}]{Utils.StatName(si, true)}", si, _tt); + _statOptionsControls[si] = c; + flpStatControls.Controls.Add(c); + flpStatControls.SetFlowBreak(c, true); + } + flpStatControls.Controls.Add(new Label + { + Text = @"Drag color gradient with mouse for fast editing. +On color gradients use shift + right click to copy and shift + left click to paste color settings. +Ctrl + left click to reset colors.", + AutoSize = true + }); + _tt.SetToolTip(BtNew, "Create new setting"); + _tt.SetToolTip(BtRemove, "Delete setting"); + } + + public void InitializeOptions() + { + _selectedStatsOptions = null; + CbbOptions.Items.Clear(); + CbbParent.Items.Clear(); + + var statsOptions = StatsOptions.StatsOptionsDict.Values.OrderBy(n => n.Name).ToArray(); + CbbOptions.Items.AddRange(statsOptions); + CbbParent.Items.AddRange(statsOptions); + if (CbbOptions.Items.Count > 0) + CbbOptions.SelectedIndex = 0; + } + + private void CbbOptions_SelectedIndexChanged(object sender, EventArgs e) + { + _selectedStatsOptions = CbbOptions.SelectedItem as StatsOptions; + if (_selectedStatsOptions == null) return; + + this.SuspendDrawing(); + TbOptionsName.Text = _selectedStatsOptions.ToString(); + var isNotRoot = _selectedStatsOptions.Name != string.Empty; + TbOptionsName.Enabled = isNotRoot; + LbParent.Visible = isNotRoot; + CbbParent.Visible = isNotRoot; + BtRemove.Visible = isNotRoot; + for (var si = 0; si < Stats.StatsCount; si++) + _statOptionsControls[si].SetStatOptions(_selectedStatsOptions.StatOptions?[si], isNotRoot, _selectedStatsOptions.ParentOptions); + + CbbParent.SelectedItem = _selectedStatsOptions.ParentOptions; + this.ResumeDrawing(); + } + + private void CbbParent_SelectedIndexChanged(object sender, EventArgs e) + { + _selectedStatsOptions = CbbOptions.SelectedItem as StatsOptions; + if (_selectedStatsOptions == null) return; + _selectedStatsOptions.ParentOptions = CbbParent.SelectedItem as StatsOptions; + } + + private void TbOptionsName_Leave(object sender, EventArgs e) + { + var newNameBase = TbOptionsName.Text; + if (_selectedStatsOptions.Name == newNameBase) return; // nothing to change + var newName = newNameBase; + var suffix = 1; + while (StatsOptions.StatsOptionsDict.ContainsKey(newName)) + newName = newNameBase + "_" + ++suffix; + + TbOptionsName.Text = newName; + StatsOptions.StatsOptionsDict.Remove(_selectedStatsOptions.Name); + _selectedStatsOptions.Name = newName; + StatsOptions.StatsOptionsDict.Add(newName, _selectedStatsOptions); + // update text in combobox + CbbOptions.Items[CbbOptions.SelectedIndex] = _selectedStatsOptions; + } + + private void BtNew_Click(object sender, EventArgs e) + { + var newNameBase = _species?.name ?? "new entry"; + var newName = newNameBase; + var suffix = 1; + while (StatsOptions.StatsOptionsDict.ContainsKey(newName)) + newName = newNameBase + "_" + ++suffix; + var newSettings = StatsOptions.GetDefaultStatOptions(newName); + StatsOptions.StatsOptionsDict.Add(newName, newSettings); + InitializeOptions(); + CbbOptions.SelectedItem = newSettings; + } + + private void BtRemove_Click(object sender, EventArgs e) + { + if (_selectedStatsOptions == null + || MessageBox.Show("Delete stat options\n" + _selectedStatsOptions + "\n?", "Delete?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) + != DialogResult.Yes) return; + + var index = CbbOptions.SelectedIndex; + // set parent of dependant options to parent of this setting + foreach (var so in StatsOptions.StatsOptionsDict.Values) + { + if (so.ParentOptions == _selectedStatsOptions) + so.ParentOptions = _selectedStatsOptions.ParentOptions; + } + + StatsOptions.StatsOptionsDict.Remove(_selectedStatsOptions.Name); + + InitializeOptions(); + if (CbbOptions.Items.Count > 0) + CbbOptions.SelectedIndex = Math.Max(0, index - 1); // select item before deleted one + } + + public void SetSpecies(Species s) + { + _species = s; + if (_species == null) return; + var autoCompleteList = new AutoCompleteStringCollection(); + autoCompleteList.AddRange(new[] + { + _species.name, + _species.DescriptiveName, + _species.DescriptiveNameAndMod, + _species.blueprintPath + }); + + TbOptionsName.AutoCompleteCustomSource = autoCompleteList; + } + + private void InitButtonImages() + { + const int size = 12; + var bmp = new Bitmap(size, size); + using (var g = Graphics.FromImage(bmp)) + using (var p = new Pen(Brushes.DarkGreen)) + { + g.DrawRectangle(p, size / 3, 0, size / 3 - 1, size - 1); + g.DrawRectangle(p, 0, size / 3, size - 1, size / 3 - 1); + g.FillRectangle(Brushes.LightGreen, size / 3 + 1, 1, size / 3 - 2, size - 2); + g.FillRectangle(Brushes.LightGreen, 1, size / 3 + 1, size - 2, size / 3 - 2); + } + BtNew.Image = bmp; + + bmp = new Bitmap(size, size); + using (var g = Graphics.FromImage(bmp)) + using (var p = new Pen(Brushes.DarkRed)) + { + g.DrawRectangle(p, 0, size / 3, size - 1, size / 3 - 1); + g.FillRectangle(Brushes.LightPink, 1, size / 3 + 1, size - 2, size / 3 - 2); + } + BtRemove.Image = bmp; + } + } +} diff --git a/ARKBreedingStats/uiControls/StatsOptionsControl.resx b/ARKBreedingStats/uiControls/StatsOptionsControl.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/ARKBreedingStats/uiControls/StatsOptionsControl.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/ARKBreedingStats/utils/ExtensionMethods.cs b/ARKBreedingStats/utils/ExtensionMethods.cs index fe5c81ca..4607814c 100644 --- a/ARKBreedingStats/utils/ExtensionMethods.cs +++ b/ARKBreedingStats/utils/ExtensionMethods.cs @@ -41,5 +41,15 @@ public static void SetImageAndDisposeOld(this PictureBox pb, Bitmap bmp) pb.Image = bmp; oldBmp?.Dispose(); } + + /// + /// Returns the value part of this color (HSV model). + /// + public static float GetValue(this Color c) => (float)Math.Max(c.R, Math.Max(c.G, c.B)) / byte.MaxValue; + + /// + /// Returns the hsv values of this color. + /// + public static (float h, float s, float v) GetHsv(this Color c) => (c.GetHue(), c.GetSaturation(), c.GetValue()); } } From 2599b7840a29365500c138ae94e760bac12df246 Mon Sep 17 00:00:00 2001 From: cadon Date: Mon, 17 Jun 2024 20:31:29 +0200 Subject: [PATCH 17/36] added mutation name patterns istophp_m etc --- ARKBreedingStats/ARKBreedingStats.csproj | 1 + ARKBreedingStats/CreatureInfoInput.cs | 8 +-- ARKBreedingStats/Form1.collection.cs | 9 +-- ARKBreedingStats/Form1.cs | 20 +++---- ARKBreedingStats/Form1.extractor.cs | 10 +--- ARKBreedingStats/Form1.importExported.cs | 6 +- ARKBreedingStats/Form1.library.cs | 23 ++++---- ARKBreedingStats/NamePatterns/NamePattern.cs | 58 +++++++++++-------- .../NamePatterns/PatternEditor.cs | 39 +++++++------ ARKBreedingStats/library/LevelStatusFlags.cs | 19 ++---- ARKBreedingStats/library/TopLevels.cs | 31 ++++++++++ ARKBreedingStats/uiControls/Hatching.cs | 8 ++- 12 files changed, 127 insertions(+), 105 deletions(-) create mode 100644 ARKBreedingStats/library/TopLevels.cs diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj index 669137d5..81a551d1 100644 --- a/ARKBreedingStats/ARKBreedingStats.csproj +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -109,6 +109,7 @@ + diff --git a/ARKBreedingStats/CreatureInfoInput.cs b/ARKBreedingStats/CreatureInfoInput.cs index 30f34da9..d00b52d8 100644 --- a/ARKBreedingStats/CreatureInfoInput.cs +++ b/ARKBreedingStats/CreatureInfoInput.cs @@ -592,20 +592,20 @@ private void btNamingPatternEditor_Click(object sender, EventArgs e) /// /// Generates a creature name with a given pattern /// - public void GenerateCreatureName(Creature creature, Creature alreadyExistingCreature, int[] speciesTopLevels, int[] speciesLowestLevels, Dictionary customReplacings, bool showDuplicateNameWarning, int namingPatternIndex) + public void GenerateCreatureName(Creature creature, Creature alreadyExistingCreature, TopLevels topLevels, Dictionary customReplacings, bool showDuplicateNameWarning, int namingPatternIndex) { SetCreatureData(creature); - CreatureName = NamePattern.GenerateCreatureName(creature, alreadyExistingCreature, _sameSpecies, speciesTopLevels, speciesLowestLevels, customReplacings, + CreatureName = NamePattern.GenerateCreatureName(creature, alreadyExistingCreature, _sameSpecies, topLevels, customReplacings, showDuplicateNameWarning, namingPatternIndex, false, colorsExisting: ColorAlreadyExistingInformation, libraryCreatureCount: LibraryCreatureCount); if (CreatureName.Length > Ark.MaxCreatureNameLength) SetMessageLabelText?.Invoke($"The generated name is longer than {Ark.MaxCreatureNameLength} characters, the name will look like this in game:\r\n" + CreatureName.Substring(0, Ark.MaxCreatureNameLength), MessageBoxIcon.Error); } - public void OpenNamePatternEditor(Creature creature, int[] speciesTopLevels, int[] speciesLowestLevels, Dictionary customReplacings, int namingPatternIndex, Action reloadCallback) + public void OpenNamePatternEditor(Creature creature, TopLevels topLevels, Dictionary customReplacings, int namingPatternIndex, Action reloadCallback) { if (!parentListValid) ParentListRequested?.Invoke(this); - using (var pe = new PatternEditor(creature, _sameSpecies, speciesTopLevels, speciesLowestLevels, ColorAlreadyExistingInformation, customReplacings, namingPatternIndex, reloadCallback, LibraryCreatureCount)) + using (var pe = new PatternEditor(creature, _sameSpecies, topLevels, ColorAlreadyExistingInformation, customReplacings, namingPatternIndex, reloadCallback, LibraryCreatureCount)) { if (pe.ShowDialog() == DialogResult.OK) { diff --git a/ARKBreedingStats/Form1.collection.cs b/ARKBreedingStats/Form1.collection.cs index f6b8b341..2118da1a 100644 --- a/ARKBreedingStats/Form1.collection.cs +++ b/ARKBreedingStats/Form1.collection.cs @@ -1001,13 +1001,10 @@ private void UpdateListsAfterCreaturesAdded(bool goToLibraryTab) private void DetermineLevelStatusAndSoundFeedback(Creature c, bool playImportSound) { var species = c.Species; - _highestSpeciesLevels.TryGetValue(species, out int[] highSpeciesLevels); - _lowestSpeciesLevels.TryGetValue(species, out int[] lowSpeciesLevels); - _highestSpeciesMutationLevels.TryGetValue(species, out int[] highSpeciesMutationLevels); + _topLevels.TryGetValue(species, out var topLevels); var statWeights = breedingPlan1.StatWeighting.GetWeightingForSpecies(species); - LevelStatusFlags.DetermineLevelStatus(species, highSpeciesLevels, lowSpeciesLevels, highSpeciesMutationLevels, - statWeights, c.levelsWild, c.levelsMutated, c.valuesBreeding, - out _, out _); + LevelStatusFlags.DetermineLevelStatus(species, topLevels, statWeights, + c.levelsWild, c.levelsMutated, c.valuesBreeding, out _, out _); if (playImportSound) { diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index d427cf27..85c764b4 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -31,12 +31,9 @@ public partial class Form1 : Form private bool _collectionDirty; /// - /// List of all highest stats per species + /// List of all top stats per species /// - private readonly Dictionary _highestSpeciesLevels = new Dictionary(); - private readonly Dictionary _lowestSpeciesLevels = new Dictionary(); - private readonly Dictionary _highestSpeciesMutationLevels = new Dictionary(); - private readonly Dictionary _lowestSpeciesMutationLevels = new Dictionary(); + private readonly Dictionary _topLevels = new Dictionary(); private readonly StatIO[] _statIOs = new StatIO[Stats.StatsCount]; private readonly StatIO[] _testingIOs = new StatIO[Stats.StatsCount]; private int _activeStatIndex = -1; @@ -780,7 +777,8 @@ private void SpeciesSelector1OnSpeciesSelected(bool speciesChanged) breedingPlan1.SetSpecies(species); } } - hatching1.SetSpecies(species, _highestSpeciesLevels.TryGetValue(species, out var bl) ? bl : null, _lowestSpeciesLevels.TryGetValue(species, out var ll) ? ll : null); + + hatching1.SetSpecies(species, _topLevels.TryGetValue(species, out var tl) ? tl : null); _hiddenLevelsCreatureTester = 0; @@ -3128,8 +3126,7 @@ private void CreatureInfoInput_CreatureDataRequested(CreatureInfoInput input, bo if (openPatternEditor) { - input.OpenNamePatternEditor(cr, _highestSpeciesLevels.TryGetValue(cr.Species, out var tl) ? tl : null, - _lowestSpeciesLevels.TryGetValue(cr.Species, out var ll) ? ll : null, + input.OpenNamePatternEditor(cr, _topLevels.TryGetValue(cr.Species, out var tl) ? tl : null, _customReplacingNamingPattern, namingPatternIndex, ReloadNamePatternCustomReplacings); UpdatePatternButtons(); @@ -3148,8 +3145,7 @@ private void CreatureInfoInput_CreatureDataRequested(CreatureInfoInput input, bo colorAlreadyExistingInformation = _creatureCollection.ColorAlreadyAvailable(cr.Species, input.RegionColors, out _); input.ColorAlreadyExistingInformation = colorAlreadyExistingInformation; - input.GenerateCreatureName(cr, alreadyExistingCreature, _highestSpeciesLevels.TryGetValue(cr.Species, out var tl) ? tl : null, - _lowestSpeciesLevels.TryGetValue(cr.Species, out var ll) ? ll : null, + input.GenerateCreatureName(cr, alreadyExistingCreature, _topLevels.TryGetValue(cr.Species, out var tl) ? tl : null, _customReplacingNamingPattern, showDuplicateNameWarning, namingPatternIndex); if (Properties.Settings.Default.PatternNameToClipboardAfterManualApplication) { @@ -3597,9 +3593,7 @@ private void GenerateCreatureNames() sameSpecies = _creatureCollection.creatures.Where(c => c.Species == cr.Species).ToArray(); // set new name - cr.name = NamePattern.GenerateCreatureName(cr, cr, sameSpecies, - _highestSpeciesLevels.TryGetValue(cr.Species, out var highestSpeciesLevels) ? highestSpeciesLevels : null, - _lowestSpeciesLevels.TryGetValue(cr.Species, out var lowestSpeciesLevels) ? lowestSpeciesLevels : null, + cr.name = NamePattern.GenerateCreatureName(cr, cr, sameSpecies, _topLevels.TryGetValue(cr.Species, out var tl) ? tl : null, _customReplacingNamingPattern, false, 0, libraryCreatureCount: libraryCreatureCount); creaturesToUpdate.Add(cr); diff --git a/ARKBreedingStats/Form1.extractor.cs b/ARKBreedingStats/Form1.extractor.cs index 727728fb..16cad63c 100644 --- a/ARKBreedingStats/Form1.extractor.cs +++ b/ARKBreedingStats/Form1.extractor.cs @@ -155,16 +155,12 @@ private void UpdateStatusInfoOfExtractorCreature() radarChartExtractor.SetLevels(_statIOs.Select(s => s.LevelWild).ToArray(), _statIOs.Select(s => s.LevelMut).ToArray(), speciesSelector1.SelectedSpecies); cbExactlyImprinting.BackColor = Color.Transparent; var species = speciesSelector1.SelectedSpecies; - _highestSpeciesLevels.TryGetValue(species, out int[] highSpeciesLevels); - _lowestSpeciesLevels.TryGetValue(species, out int[] lowSpeciesLevels); - _highestSpeciesMutationLevels.TryGetValue(species, out int[] highSpeciesMutationLevels); - //_lowestSpeciesMutationLevels.TryGetValue(species, out int[] lowSpeciesMutationLevels); + _topLevels.TryGetValue(species, out var topLevels); var statWeights = breedingPlan1.StatWeighting.GetWeightingForSpecies(species); - LevelStatusFlags.DetermineLevelStatus(species, highSpeciesLevels, lowSpeciesLevels, highSpeciesMutationLevels, - statWeights, GetCurrentWildLevels(), GetCurrentMutLevels(), GetCurrentBreedingValues(), - out var topStatsText, out var newTopStatsText); + LevelStatusFlags.DetermineLevelStatus(species, topLevels, statWeights, GetCurrentWildLevels(), GetCurrentMutLevels(), + GetCurrentBreedingValues(), out var topStatsText, out var newTopStatsText); for (var s = 0; s < Stats.StatsCount; s++) { diff --git a/ARKBreedingStats/Form1.importExported.cs b/ARKBreedingStats/Form1.importExported.cs index 1a4fbb2e..272c7467 100644 --- a/ARKBreedingStats/Form1.importExported.cs +++ b/ARKBreedingStats/Form1.importExported.cs @@ -262,8 +262,7 @@ private Creature ImportExportedAddIfPossible(string filePath) string newFileName = Properties.Settings.Default.AutoImportedExportFileRename && !string.IsNullOrWhiteSpace(namePattern) ? NamePattern.GenerateCreatureName(creature, alreadyExistingCreature, - creaturesOfSpecies ?? _creatureCollection.creatures.Where(c => c.Species == creature.Species).ToArray(), - null, null, + creaturesOfSpecies ?? _creatureCollection.creatures.Where(c => c.Species == creature.Species).ToArray(), null, _customReplacingNamingPattern, false, -1, false, namePattern, libraryCreatureCount: _creatureCollection.GetTotalCreatureCount()) : Path.GetFileName(filePath); @@ -332,8 +331,7 @@ private bool SetNameOfImportedCreature(Creature creature, Creature[] creaturesOf totalCreatureCount = _creatureCollection.GetTotalCreatureCount(); creature.name = NamePattern.GenerateCreatureName(creature, alreadyExistingCreature, creaturesOfSpecies, - _highestSpeciesLevels.TryGetValue(creature.Species, out var topLevels) ? topLevels : null, - _lowestSpeciesLevels.TryGetValue(creature.Species, out var lowestLevels) ? lowestLevels : null, + _topLevels.TryGetValue(creature.Species, out var topLevels) ? topLevels : null, _customReplacingNamingPattern, false, 0, libraryCreatureCount: totalCreatureCount); if (alreadyExistingCreature != null) alreadyExistingCreature.name = creature.name; // if alreadyExistingCreature was already updated and creature is not used anymore make sure name is not lost diff --git a/ARKBreedingStats/Form1.library.cs b/ARKBreedingStats/Form1.library.cs index 514142f5..0e04103c 100644 --- a/ARKBreedingStats/Form1.library.cs +++ b/ARKBreedingStats/Form1.library.cs @@ -283,17 +283,11 @@ private void CalculateTopStats(List creatures, Species onlySpecies = n if (onlySpecies == null) { // if all creatures are recalculated, clear all - _highestSpeciesLevels.Clear(); - _lowestSpeciesLevels.Clear(); - _highestSpeciesMutationLevels.Clear(); - _lowestSpeciesMutationLevels.Clear(); + _topLevels.Clear(); } else { - _highestSpeciesLevels.Remove(onlySpecies); - _lowestSpeciesLevels.Remove(onlySpecies); - _highestSpeciesMutationLevels.Remove(onlySpecies); - _lowestSpeciesMutationLevels.Remove(onlySpecies); + _topLevels.Remove(onlySpecies); } var filteredCreaturesHash = Properties.Settings.Default.useFiltersInTopStatCalculation ? new HashSet(ApplyLibraryFilterSettings(creatures)) : null; @@ -438,10 +432,13 @@ private void CalculateTopStats(List creatures, Species onlySpecies = n } } - _highestSpeciesLevels[species] = highestLevels; - _lowestSpeciesLevels[species] = lowestLevels; - _highestSpeciesMutationLevels[species] = highestMutationLevels; - _lowestSpeciesMutationLevels[species] = lowestMutationLevels; + var topLevels = new TopLevels(); + _topLevels[species] = topLevels; + + topLevels.WildLevelsHighest = highestLevels; + topLevels.WildLevelsLowest = lowestLevels; + topLevels.MutationLevelsHighest = highestMutationLevels; + topLevels.MutationLevelsLowest = lowestMutationLevels; // bestStat and bestCreatures now contain the best stats and creatures for each stat. @@ -570,7 +567,7 @@ private void CalculateTopStats(List creatures, Species onlySpecies = n var selectedSpecies = speciesSelector1.SelectedSpecies; if (selectedSpecies != null) - hatching1.SetSpecies(selectedSpecies, _highestSpeciesLevels.TryGetValue(selectedSpecies, out var tl) ? tl : null, _lowestSpeciesLevels.TryGetValue(selectedSpecies, out var ll) ? ll : null); + hatching1.SetSpecies(selectedSpecies, _topLevels.TryGetValue(selectedSpecies, out var tl) ? tl : null); } /// diff --git a/ARKBreedingStats/NamePatterns/NamePattern.cs b/ARKBreedingStats/NamePatterns/NamePattern.cs index 010e3ddf..074c2ed8 100644 --- a/ARKBreedingStats/NamePatterns/NamePattern.cs +++ b/ARKBreedingStats/NamePatterns/NamePattern.cs @@ -3,6 +3,7 @@ using System.Linq; using System.Text.RegularExpressions; using System.Windows.Forms; +using ARKBreedingStats.library; using ARKBreedingStats.Library; using ARKBreedingStats.utils; using static ARKBreedingStats.Library.CreatureCollection; @@ -22,7 +23,7 @@ public static class NamePattern /// Generate a creature name with the naming pattern. /// /// If the creature already exists in the library, null if the creature is new. - public static string GenerateCreatureName(Creature creature, Creature alreadyExistingCreature, Creature[] sameSpecies, int[] speciesTopLevels, int[] speciesLowestLevels, Dictionary customReplacings, + public static string GenerateCreatureName(Creature creature, Creature alreadyExistingCreature, Creature[] sameSpecies, TopLevels topLevels, Dictionary customReplacings, bool showDuplicateNameWarning, int namingPatternIndex, bool showTooLongWarning = true, string pattern = null, bool displayError = true, Dictionary tokenDictionary = null, CreatureCollection.ColorExisting[] colorsExisting = null, int libraryCreatureCount = 0) { @@ -34,9 +35,11 @@ public static string GenerateCreatureName(Creature creature, Creature alreadyExi pattern = Properties.Settings.Default.NamingPatterns?[namingPatternIndex] ?? string.Empty; } + var levelsWildHighest = topLevels?.WildLevelsHighest; + if (creature.topness == 0) { - if (speciesTopLevels == null) + if (levelsWildHighest == null) { creature.topness = 1000; } @@ -52,7 +55,7 @@ public static string GenerateCreatureName(Creature creature, Creature alreadyExi ) { int creatureLevel = Math.Max(0, creature.levelsWild[s]); - topLevelSum += Math.Max(creatureLevel, speciesTopLevels[s]); + topLevelSum += Math.Max(creatureLevel, levelsWildHighest[s]); creatureLevelSum += creatureLevel; } } @@ -66,7 +69,7 @@ public static string GenerateCreatureName(Creature creature, Creature alreadyExi } if (tokenDictionary == null) - tokenDictionary = CreateTokenDictionary(creature, alreadyExistingCreature, sameSpecies, speciesTopLevels, speciesLowestLevels, libraryCreatureCount); + tokenDictionary = CreateTokenDictionary(creature, alreadyExistingCreature, sameSpecies, topLevels, libraryCreatureCount); // first resolve keys, then functions string name = ResolveFunctions( ResolveKeysToValues(tokenDictionary, pattern.Replace("\r", string.Empty).Replace("\n", string.Empty)), @@ -195,10 +198,9 @@ private static string ResolveFunction(Match m, NamePatternParameters parameters) /// Creature with the data /// If the creature is already existing in the library, i.e. if the name is created for a creature that is updated /// A list of all currently stored creatures of the species - /// top levels of that species - /// lowest levels of that species + /// top levels of that species /// A dictionary containing all tokens and their replacements - public static Dictionary CreateTokenDictionary(Creature creature, Creature alreadyExistingCreature, Creature[] speciesCreatures, int[] speciesTopLevels, int[] speciesLowestLevels, int libraryCreatureCount) + public static Dictionary CreateTokenDictionary(Creature creature, Creature alreadyExistingCreature, Creature[] speciesCreatures, TopLevels topLevels, int libraryCreatureCount) { string dom = creature.isBred ? "B" : "T"; @@ -342,32 +344,42 @@ public static Dictionary CreateTokenDictionary(Creature creature { "status", creature.Status.ToString() } }; - // stat index and according level - var levelOrder = new List<(int, int)>(Stats.StatsCount); + // stat index and according wild and mutation level + var levelOrderWild = new List<(int, int)>(7); + var levelOrderMutated = new List<(int, int)>(7); for (int si = 0; si < Stats.StatsCount; si++) { - if (si != Stats.Torpidity && creature.Species.UsesStat(si)) - levelOrder.Add((si, creature.levelsWild[si])); + if (si == Stats.Torpidity || !creature.Species.UsesStat(si)) continue; + levelOrderWild.Add((si, creature.levelsWild[si])); + levelOrderMutated.Add((si, creature.levelsMutated?[si] ?? 0)); } - levelOrder = levelOrder.OrderByDescending(l => l.Item2).ToList(); - var usedStatsCount = levelOrder.Count; + levelOrderWild = levelOrderWild.OrderByDescending(l => l.Item2).ToList(); + levelOrderMutated = levelOrderMutated.OrderByDescending(l => l.Item2).ToList(); + var usedStatsCount = levelOrderWild.Count; + + var wildLevelsHighest = topLevels.WildLevelsHighest ?? new int[Stats.StatsCount]; + var wildLevelsLowest = topLevels.WildLevelsLowest ?? new int[Stats.StatsCount]; + var mutationLevelsHighest = topLevels.MutationLevelsHighest ?? new int[Stats.StatsCount]; + var mutationLevelsLowest = topLevels.MutationLevelsLowest ?? new int[Stats.StatsCount]; for (int s = 0; s < Stats.StatsCount; s++) { dict.Add(StatAbbreviationFromIndex[s], creature.levelsWild[s].ToString()); dict.Add($"{StatAbbreviationFromIndex[s]}_vb", (creature.valuesBreeding[s] * (Stats.IsPercentage(s) ? 100 : 1)).ToString()); - dict.Add($"istop{StatAbbreviationFromIndex[s]}", speciesTopLevels == null ? (creature.levelsWild[s] > 0 ? "1" : string.Empty) : - creature.levelsWild[s] >= speciesTopLevels[s] ? "1" : string.Empty); - dict.Add($"isnewtop{StatAbbreviationFromIndex[s]}", speciesTopLevels == null ? (creature.levelsWild[s] > 0 ? "1" : string.Empty) : - creature.levelsWild[s] > speciesTopLevels[s] ? "1" : string.Empty); - dict.Add($"islowest{StatAbbreviationFromIndex[s]}", speciesLowestLevels == null ? (creature.levelsWild[s] == 0 ? "1" : string.Empty) : - speciesLowestLevels[s] != -1 && creature.levelsWild[s] != -1 && creature.levelsWild[s] <= speciesLowestLevels[s] ? "1" : string.Empty); - dict.Add($"isnewlowest{StatAbbreviationFromIndex[s]}", speciesLowestLevels == null ? (creature.levelsWild[s] == 0 ? "1" : string.Empty) : - speciesLowestLevels[s] != -1 && creature.levelsWild[s] != -1 && creature.levelsWild[s] < speciesLowestLevels[s] ? "1" : string.Empty); + dict.Add($"istop{StatAbbreviationFromIndex[s]}", creature.levelsWild[s] >= wildLevelsHighest[s] ? "1" : string.Empty); + dict.Add($"isnewtop{StatAbbreviationFromIndex[s]}", creature.levelsWild[s] > wildLevelsHighest[s] ? "1" : string.Empty); + dict.Add($"islowest{StatAbbreviationFromIndex[s]}", wildLevelsLowest[s] != -1 && creature.levelsWild[s] != -1 && creature.levelsWild[s] <= wildLevelsLowest[s] ? "1" : string.Empty); + dict.Add($"isnewlowest{StatAbbreviationFromIndex[s]}", wildLevelsLowest[s] != -1 && creature.levelsWild[s] != -1 && creature.levelsWild[s] < wildLevelsLowest[s] ? "1" : string.Empty); + dict.Add($"istop{StatAbbreviationFromIndex[s]}_m", creature.levelsWild[s] >= mutationLevelsHighest[s] ? "1" : string.Empty); + dict.Add($"isnewtop{StatAbbreviationFromIndex[s]}_m", creature.levelsWild[s] > mutationLevelsHighest[s] ? "1" : string.Empty); + dict.Add($"islowest{StatAbbreviationFromIndex[s]}_m", mutationLevelsLowest[s] != -1 && creature.levelsWild[s] != -1 && creature.levelsWild[s] <= mutationLevelsLowest[s] ? "1" : string.Empty); + dict.Add($"isnewlowest{StatAbbreviationFromIndex[s]}_m", mutationLevelsLowest[s] != -1 && creature.levelsWild[s] != -1 && creature.levelsWild[s] < mutationLevelsLowest[s] ? "1" : string.Empty); // highest stats and according levels - dict.Add("highest" + (s + 1) + "l", usedStatsCount > s ? levelOrder[s].Item2.ToString() : string.Empty); - dict.Add("highest" + (s + 1) + "s", usedStatsCount > s ? Utils.StatName(levelOrder[s].Item1, true, creature.Species.statNames) : string.Empty); + dict.Add("highest" + (s + 1) + "l", s < usedStatsCount ? levelOrderWild[s].Item2.ToString() : string.Empty); + dict.Add("highest" + (s + 1) + "s", s < usedStatsCount ? Utils.StatName(levelOrderWild[s].Item1, true, creature.Species.statNames) : string.Empty); + dict.Add("highest" + (s + 1) + "l_m", s < usedStatsCount ? levelOrderMutated[s].Item2.ToString() : string.Empty); + dict.Add("highest" + (s + 1) + "s_m", s < usedStatsCount ? Utils.StatName(levelOrderMutated[s].Item1, true, creature.Species.statNames) : string.Empty); // mutated levels dict.Add(StatAbbreviationFromIndex[s] + "_m", (creature.levelsMutated?[s] ?? 0).ToString()); diff --git a/ARKBreedingStats/NamePatterns/PatternEditor.cs b/ARKBreedingStats/NamePatterns/PatternEditor.cs index a77b677c..fd77c4f6 100644 --- a/ARKBreedingStats/NamePatterns/PatternEditor.cs +++ b/ARKBreedingStats/NamePatterns/PatternEditor.cs @@ -6,6 +6,7 @@ using System.Linq; using System.Windows.Forms; using System.Windows.Threading; +using ARKBreedingStats.library; using ARKBreedingStats.Library; using ARKBreedingStats.Properties; using ARKBreedingStats.Updater; @@ -18,8 +19,7 @@ public partial class PatternEditor : Form private readonly Creature _creature; private readonly Creature[] _creaturesOfSameSpecies; private readonly Creature _alreadyExistingCreature; - private readonly int[] _speciesTopLevels; - private readonly int[] _speciesLowestLevels; + private readonly TopLevels _topLevels; private readonly int _libraryCreatureCount; private readonly CreatureCollection.ColorExisting[] _colorExistings; private Dictionary _customReplacings; @@ -40,7 +40,7 @@ public PatternEditor() InitializeComponent(); } - public PatternEditor(Creature creature, Creature[] creaturesOfSameSpecies, int[] speciesTopLevels, int[] speciesLowestLevels, CreatureCollection.ColorExisting[] colorExistings, Dictionary customReplacings, int namingPatternIndex, Action reloadCallback, int libraryCreatureCount) : this() + public PatternEditor(Creature creature, Creature[] creaturesOfSameSpecies, TopLevels topLevels, CreatureCollection.ColorExisting[] colorExistings, Dictionary customReplacings, int namingPatternIndex, Action reloadCallback, int libraryCreatureCount) : this() { Utils.SetWindowRectangle(this, Settings.Default.PatternEditorFormRectangle); if (Settings.Default.PatternEditorSplitterDistance > 0) @@ -50,8 +50,7 @@ public PatternEditor(Creature creature, Creature[] creaturesOfSameSpecies, int[] _creature = creature; _creaturesOfSameSpecies = creaturesOfSameSpecies; - _speciesTopLevels = speciesTopLevels; - _speciesLowestLevels = speciesLowestLevels; + _topLevels = topLevels; _colorExistings = colorExistings; _customReplacings = customReplacings; _reloadCallback = reloadCallback; @@ -63,7 +62,7 @@ public PatternEditor(Creature creature, Creature[] creaturesOfSameSpecies, int[] Text = $"Naming Pattern Editor: pattern {namingPatternIndex + 1}"; _alreadyExistingCreature = _creaturesOfSameSpecies?.FirstOrDefault(c => c.guid == creature.guid); - _tokenDictionary = NamePatterns.NamePattern.CreateTokenDictionary(creature, _alreadyExistingCreature, _creaturesOfSameSpecies, _speciesTopLevels, _speciesLowestLevels, _libraryCreatureCount); + _tokenDictionary = NamePatterns.NamePattern.CreateTokenDictionary(creature, _alreadyExistingCreature, _creaturesOfSameSpecies, _topLevels, _libraryCreatureCount); _keyDebouncer = new Debouncer(); _functionDebouncer = new Debouncer(); @@ -457,16 +456,20 @@ private void InsertText(string text) { "fr_vb", "Breeding value of "+ Utils.StatName(Stats.TemperatureFortitude, customStatNames:customStatNames) }, { "cr_vb", "Breeding value of "+ Utils.StatName(Stats.CraftingSpeedMultiplier, customStatNames:customStatNames) }, - { "isTophp", "if hp is top, it will return 1 and nothing if it's not top. Combine with the if-function. All stat name abbreviations are possible, e.g. replace hp with st, to, ox etc."}, - { "isNewTophp", "if hp is higher than the current top hp, it will return 1 and nothing else. Combine with the if-function. All stat name abbreviations are possible."}, - { "isLowesthp", "if hp is the lowest, it will return 1 and nothing if it's not the lowest. Combine with the if-function. All stat name abbreviations are possible, e.g. replace hp with st, to, ox etc."}, - { "isNewLowesthp", "if hp is lower than the current lowest hp, it will return 1 and nothing else. Combine with the if-function. All stat name abbreviations are possible."}, + { "isTopHP", "if hp is top, it will return 1 and nothing if it's not top. Combine with the if-function. All stat name abbreviations are possible, e.g. replace hp with st, to, ox etc."}, + { "isNewTopHP", "if hp is higher than the current top hp, it will return 1 and nothing else. Combine with the if-function. All stat name abbreviations are possible."}, + { "isLowestHP", "if hp is the lowest, it will return 1 and nothing if it's not the lowest. Combine with the if-function. All stat name abbreviations are possible, e.g. replace hp with st, to, ox etc."}, + { "isNewLowestHP", "if hp is lower than the current lowest hp, it will return 1 and nothing else. Combine with the if-function. All stat name abbreviations are possible."}, + { "isTopHP_m", "if hp mutated level is top, it will return 1 and nothing if it's not top. Combine with the if-function. All stat name abbreviations are possible, e.g. replace hp with st, to, ox etc."}, + { "isNewTopHP_m", "if hp mutated level is higher than the current top hp mutated level, it will return 1 and nothing else. Combine with the if-function. All stat name abbreviations are possible."}, + { "isLowestHP_m", "if hp mutated level is the lowest, it will return 1 and nothing if it's not the lowest. Combine with the if-function. All stat name abbreviations are possible, e.g. replace hp with st, to, ox etc."}, + { "isNewLowestHP_m", "if hp mutated level is lower than the current lowest hp mutated level, it will return 1 and nothing else. Combine with the if-function. All stat name abbreviations are possible."}, { "dom", "how the creature was domesticated, \"T\" for tamed, \"B\" for bred" }, { "effImp", "Taming-effectiveness or Imprinting (if tamed / bred)" }, { "effImp_short", "Short Taming-effectiveness or Imprinting (if tamed / bred)"}, { "index", "Index in library (same species)."}, - { "oldname", "the old name of the creature" }, + { "oldName", "the old name of the creature" }, { "sex_lang", "sex (\"Male\", \"Female\", \"Unknown\") by loc" }, { "sex_lang_short", "\"Male\", \"Female\", \"Unknown\" by loc(short)" }, { "sex_lang_gen", "sex (\"Male_gen\", \"Female_gen\", \"Unknown_gen\") by loc" }, @@ -494,15 +497,15 @@ private void InsertText(string text) { "highest1l", "the highest stat-level of this creature (excluding torpidity)" }, { "highest2l", "the second highest stat-level of this creature (excluding torpidity)" }, { "highest3l", "the third highest stat-level of this creature (excluding torpidity)" }, - { "highest4l", "the fourth highest stat-level of this creature (excluding torpidity)" }, - { "highest5l", "the fifth highest stat-level of this creature (excluding torpidity)" }, - { "highest6l", "the sixth highest stat-level of this creature (excluding torpidity)" }, { "highest1s", "the name of the highest stat-level of this creature (excluding torpidity)" }, { "highest2s", "the name of the second highest stat-level of this creature (excluding torpidity)" }, { "highest3s", "the name of the third highest stat-level of this creature (excluding torpidity)" }, - { "highest4s", "the name of the fourth highest stat-level of this creature (excluding torpidity)" }, - { "highest5s", "the name of the fifth highest stat-level of this creature (excluding torpidity)" }, - { "highest6s", "the name of the sixth highest stat-level of this creature (excluding torpidity)" }, + { "highest1l_m", "the highest mutated stat-level of this creature (excluding torpidity)" }, + { "highest2l_m", "the second highest mutated stat-level of this creature (excluding torpidity)" }, + { "highest3l_m", "the third highest mutated stat-level of this creature (excluding torpidity)" }, + { "highest1s_m", "the name of the highest mutated stat-level of this creature (excluding torpidity)" }, + { "highest2s_m", "the name of the second highest mutated stat-level of this creature (excluding torpidity)" }, + { "highest3s_m", "the name of the third highest mutated stat-level of this creature (excluding torpidity)" }, { "hp_m", "Mutated levels of " + Utils.StatName(Stats.Health, customStatNames:customStatNames) }, { "st_m", "Mutated levels of " + Utils.StatName(Stats.Stamina, customStatNames:customStatNames) }, @@ -572,7 +575,7 @@ private void txtboxPattern_TextChanged(object sender, EventArgs e) private void DisplayPreview() { - cbPreview.Text = NamePatterns.NamePattern.GenerateCreatureName(_creature, _alreadyExistingCreature, _creaturesOfSameSpecies, _speciesTopLevels, _speciesLowestLevels, _customReplacings, + cbPreview.Text = NamePatterns.NamePattern.GenerateCreatureName(_creature, _alreadyExistingCreature, _creaturesOfSameSpecies, _topLevels, _customReplacings, false, -1, false, txtboxPattern.Text, false, _tokenDictionary, _colorExistings, _libraryCreatureCount); } diff --git a/ARKBreedingStats/library/LevelStatusFlags.cs b/ARKBreedingStats/library/LevelStatusFlags.cs index 5795124f..451240d6 100644 --- a/ARKBreedingStats/library/LevelStatusFlags.cs +++ b/ARKBreedingStats/library/LevelStatusFlags.cs @@ -23,24 +23,15 @@ public static class LevelStatusFlags /// /// Determines if the wild and mutated levels of a creature are equal or higher than the current top levels of that species. /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - public static void DetermineLevelStatus(Species species, int[] highSpeciesLevels, int[] lowSpeciesLevels, int[] highSpeciesMutationLevels, + public static void DetermineLevelStatus(Species species, TopLevels topLevels, (double[], StatValueEvenOdd[]) statWeights, int[] levelsWild, int[] levelsMutated, double[] valuesBreeding, out List topStatsText, out List newTopStatsText) { // if there are no creatures of the species yet, assume 0 levels to be the current best and worst - if (highSpeciesLevels == null) highSpeciesLevels = new int[Stats.StatsCount]; - if (lowSpeciesLevels == null) lowSpeciesLevels = new int[Stats.StatsCount]; - if (highSpeciesMutationLevels == null) highSpeciesMutationLevels = new int[Stats.StatsCount]; + if (topLevels == null) topLevels = new TopLevels(); + var highSpeciesLevels = topLevels.WildLevelsHighest ?? new int[Stats.StatsCount]; + var lowSpeciesLevels = topLevels.WildLevelsLowest ?? new int[Stats.StatsCount]; + var highSpeciesMutationLevels = topLevels.MutationLevelsHighest ?? new int[Stats.StatsCount]; newTopStatsText = new List(); topStatsText = new List(); diff --git a/ARKBreedingStats/library/TopLevels.cs b/ARKBreedingStats/library/TopLevels.cs new file mode 100644 index 00000000..d0e9a980 --- /dev/null +++ b/ARKBreedingStats/library/TopLevels.cs @@ -0,0 +1,31 @@ +namespace ARKBreedingStats.library +{ + /// + /// Top levels per species. + /// + public class TopLevels + { + private readonly int[][] _levels = new int[4][]; + + public int[] WildLevelsHighest + { + get => _levels?[0]; + set => _levels[0] = value; + } + public int[] WildLevelsLowest + { + get => _levels?[1]; + set => _levels[1] = value; + } + public int[] MutationLevelsHighest + { + get => _levels?[2]; + set => _levels[2] = value; + } + public int[] MutationLevelsLowest + { + get => _levels?[3]; + set => _levels[3] = value; + } + } +} diff --git a/ARKBreedingStats/uiControls/Hatching.cs b/ARKBreedingStats/uiControls/Hatching.cs index 5ddbf49d..5cee537c 100644 --- a/ARKBreedingStats/uiControls/Hatching.cs +++ b/ARKBreedingStats/uiControls/Hatching.cs @@ -1,4 +1,5 @@ using System.Windows.Forms; +using ARKBreedingStats.library; using ARKBreedingStats.species; namespace ARKBreedingStats.uiControls @@ -13,7 +14,7 @@ public Hatching() /// /// Set a species to display the stats of the current top levels. This can help in determine if a new creature is good. /// - public void SetSpecies(Species species, int[] highLevels, int[] lowLevels) + public void SetSpecies(Species species, TopLevels topLevels) { if (species == null) { @@ -26,8 +27,9 @@ public void SetSpecies(Species species, int[] highLevels, int[] lowLevels) return; } - if (highLevels == null) highLevels = new int[Stats.StatsCount]; - if (lowLevels == null) lowLevels = new int[Stats.StatsCount]; + if (topLevels == null) topLevels = new TopLevels(); + var highLevels = topLevels.WildLevelsHighest ?? new int[Stats.StatsCount]; + var lowLevels = topLevels.WildLevelsLowest ?? new int[Stats.StatsCount]; LbHeader.Text = $"Best stat values for bred creatures without imprinting of the species {species.DescriptiveNameAndMod} in this library."; string sbNames = null; From b1ecb28db5cd155acc42eaf0800bf2ddffd4ef55 Mon Sep 17 00:00:00 2001 From: cadon Date: Tue, 18 Jun 2024 22:46:10 +0200 Subject: [PATCH 18/36] adjusted imprintingPerCuddle formula, probably more correctly --- ARKBreedingStats/Ark.cs | 21 +++++++++++++++++++++ ARKBreedingStats/Extraction.cs | 2 +- ARKBreedingStats/Form1.cs | 6 +++--- ARKBreedingStats/Utils.cs | 16 ---------------- 4 files changed, 25 insertions(+), 20 deletions(-) diff --git a/ARKBreedingStats/Ark.cs b/ARKBreedingStats/Ark.cs index 8bdd647c..c2c0cdd5 100644 --- a/ARKBreedingStats/Ark.cs +++ b/ARKBreedingStats/Ark.cs @@ -1,4 +1,5 @@ using ARKBreedingStats.values; +using System; namespace ARKBreedingStats { @@ -155,6 +156,26 @@ public enum Game /// Collection indicator for ARK: Survival Ascended, also the mod tag id for the ASA values. /// public const string Asa = "ASA"; + + /// + /// The default cuddle interval is 8 hours. + /// + private const int DefaultCuddleIntervalInSeconds = 8 * 60 * 60; + + /// + /// Returns the imprinting gain per cuddle, dependent on the maturation time and the cuddle interval multiplier. + /// + /// Maturation time in seconds + public static double ImprintingGainPerCuddle(double maturationTime) + { + var multipliers = Values.V.currentServerMultipliers; + // this is assumed to be the used formula + var maxPossibleCuddles = maturationTime / (DefaultCuddleIntervalInSeconds * multipliers.BabyImprintAmountMultiplier); + var denominator = maxPossibleCuddles - 0.25; + if (denominator < 0) return 0; + if (denominator < multipliers.BabyCuddleIntervalMultiplier) return 1; + return Math.Min(1, multipliers.BabyCuddleIntervalMultiplier / denominator); + } } /// diff --git a/ARKBreedingStats/Extraction.cs b/ARKBreedingStats/Extraction.cs index c1a90e77..7860e0f2 100644 --- a/ARKBreedingStats/Extraction.cs +++ b/ARKBreedingStats/Extraction.cs @@ -467,7 +467,7 @@ private List CalculateImprintingBonus(Species species, SpeciesStat double imprintingBonusFromGainPerCuddle = 0; if (species.breeding != null) { - double imprintingGainPerCuddle = Utils.ImprintingGainPerCuddle(species.breeding.maturationTimeAdjusted); + double imprintingGainPerCuddle = Ark.ImprintingGainPerCuddle(species.breeding.maturationTimeAdjusted); if (imprintingGainPerCuddle > 0) imprintingBonusFromGainPerCuddle = Math.Round(imprintingBonusRounded / imprintingGainPerCuddle) * imprintingGainPerCuddle; } diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 85c764b4..35e18da9 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -1741,7 +1741,7 @@ private void numericUpDownImprintingBonusTester_ValueChanged(object sender, Even lbImprintedCount.Text = "(" + Math.Round( (double)numericUpDownImprintingBonusTester.Value / (100 * - Utils.ImprintingGainPerCuddle( + Ark.ImprintingGainPerCuddle( speciesSelector1.SelectedSpecies .breeding.maturationTimeAdjusted)), 2) + "×)"; @@ -1756,7 +1756,7 @@ private void numericUpDownImprintingBonusExtractor_ValueChanged(object sender, E lbImprintingCuddleCountExtractor.Text = "(" + Math.Round( (double)numericUpDownImprintingBonusExtractor.Value / - (100 * Utils.ImprintingGainPerCuddle(speciesSelector1 + (100 * Ark.ImprintingGainPerCuddle(speciesSelector1 .SelectedSpecies.breeding.maturationTimeAdjusted))) + "×)"; else lbImprintingCuddleCountExtractor.Text = string.Empty; @@ -2762,7 +2762,7 @@ private void labelImprintedCount_MouseClick(object sender, MouseEventArgs e) speciesSelector1.SelectedSpecies.breeding.maturationTimeAdjusted > 0) { double imprintingGainPerCuddle = - Utils.ImprintingGainPerCuddle(speciesSelector1.SelectedSpecies.breeding.maturationTimeAdjusted); + Ark.ImprintingGainPerCuddle(speciesSelector1.SelectedSpecies.breeding.maturationTimeAdjusted); int cuddleCount = (int)Math.Round((double)numericUpDownImprintingBonusTester.Value / (100 * imprintingGainPerCuddle)); double imprintingBonus; diff --git a/ARKBreedingStats/Utils.cs b/ARKBreedingStats/Utils.cs index 61c7eb79..74890731 100644 --- a/ARKBreedingStats/Utils.cs +++ b/ARKBreedingStats/Utils.cs @@ -437,22 +437,6 @@ public static string TimeLeft(DateTime dt) return dt < DateTime.Now ? "-" : Duration(dt.Subtract(DateTime.Now)); } - /// - /// By default the cuddle interval is 8 hours. - /// - private const int DefaultCuddleIntervalInSeconds = 8 * 60 * 60; - - /// - /// Returns the imprinting gain per cuddle, dependent on the maturation time and the cuddle interval multiplier. - /// - /// Maturation time in seconds - /// - public static double ImprintingGainPerCuddle(double maturationTime) - { - var multipliers = Values.V.currentServerMultipliers; - return Math.Min(1, DefaultCuddleIntervalInSeconds * multipliers.BabyCuddleIntervalMultiplier * multipliers.BabyImprintAmountMultiplier / maturationTime); - } - /// /// Returns either black or white, depending on the backColor, so text can be read well. /// From f2399c0ed05f4aba8ec5fe455c82de6d48ee34ff Mon Sep 17 00:00:00 2001 From: cadon Date: Tue, 18 Jun 2024 23:07:34 +0200 Subject: [PATCH 19/36] topstats fixes --- ARKBreedingStats/NamePatterns/NamePattern.cs | 25 ++++++++++---------- ARKBreedingStats/library/LevelStatusFlags.cs | 10 ++++---- ARKBreedingStats/library/TopLevels.cs | 19 ++++++++++----- ARKBreedingStats/uiControls/Hatching.cs | 4 ++-- 4 files changed, 33 insertions(+), 25 deletions(-) diff --git a/ARKBreedingStats/NamePatterns/NamePattern.cs b/ARKBreedingStats/NamePatterns/NamePattern.cs index 074c2ed8..f7e7080e 100644 --- a/ARKBreedingStats/NamePatterns/NamePattern.cs +++ b/ARKBreedingStats/NamePatterns/NamePattern.cs @@ -357,23 +357,24 @@ public static Dictionary CreateTokenDictionary(Creature creature levelOrderMutated = levelOrderMutated.OrderByDescending(l => l.Item2).ToList(); var usedStatsCount = levelOrderWild.Count; - var wildLevelsHighest = topLevels.WildLevelsHighest ?? new int[Stats.StatsCount]; - var wildLevelsLowest = topLevels.WildLevelsLowest ?? new int[Stats.StatsCount]; - var mutationLevelsHighest = topLevels.MutationLevelsHighest ?? new int[Stats.StatsCount]; - var mutationLevelsLowest = topLevels.MutationLevelsLowest ?? new int[Stats.StatsCount]; + if (topLevels == null) topLevels = new TopLevels(); + var wildLevelsHighest = topLevels.WildLevelsHighest; + var wildLevelsLowest = topLevels.WildLevelsLowest; + var mutationLevelsHighest = topLevels.MutationLevelsHighest; + var mutationLevelsLowest = topLevels.MutationLevelsLowest; for (int s = 0; s < Stats.StatsCount; s++) { dict.Add(StatAbbreviationFromIndex[s], creature.levelsWild[s].ToString()); dict.Add($"{StatAbbreviationFromIndex[s]}_vb", (creature.valuesBreeding[s] * (Stats.IsPercentage(s) ? 100 : 1)).ToString()); - dict.Add($"istop{StatAbbreviationFromIndex[s]}", creature.levelsWild[s] >= wildLevelsHighest[s] ? "1" : string.Empty); - dict.Add($"isnewtop{StatAbbreviationFromIndex[s]}", creature.levelsWild[s] > wildLevelsHighest[s] ? "1" : string.Empty); - dict.Add($"islowest{StatAbbreviationFromIndex[s]}", wildLevelsLowest[s] != -1 && creature.levelsWild[s] != -1 && creature.levelsWild[s] <= wildLevelsLowest[s] ? "1" : string.Empty); - dict.Add($"isnewlowest{StatAbbreviationFromIndex[s]}", wildLevelsLowest[s] != -1 && creature.levelsWild[s] != -1 && creature.levelsWild[s] < wildLevelsLowest[s] ? "1" : string.Empty); - dict.Add($"istop{StatAbbreviationFromIndex[s]}_m", creature.levelsWild[s] >= mutationLevelsHighest[s] ? "1" : string.Empty); - dict.Add($"isnewtop{StatAbbreviationFromIndex[s]}_m", creature.levelsWild[s] > mutationLevelsHighest[s] ? "1" : string.Empty); - dict.Add($"islowest{StatAbbreviationFromIndex[s]}_m", mutationLevelsLowest[s] != -1 && creature.levelsWild[s] != -1 && creature.levelsWild[s] <= mutationLevelsLowest[s] ? "1" : string.Empty); - dict.Add($"isnewlowest{StatAbbreviationFromIndex[s]}_m", mutationLevelsLowest[s] != -1 && creature.levelsWild[s] != -1 && creature.levelsWild[s] < mutationLevelsLowest[s] ? "1" : string.Empty); + dict.Add($"istop{StatAbbreviationFromIndex[s]}", creature.levelsWild[s] != -1 && creature.levelsWild[s] >= wildLevelsHighest[s] ? "1" : string.Empty); + dict.Add($"isnewtop{StatAbbreviationFromIndex[s]}", creature.levelsWild[s] != -1 && creature.levelsWild[s] > wildLevelsHighest[s] ? "1" : string.Empty); + dict.Add($"islowest{StatAbbreviationFromIndex[s]}", creature.levelsWild[s] != -1 && creature.levelsWild[s] <= wildLevelsLowest[s] ? "1" : string.Empty); + dict.Add($"isnewlowest{StatAbbreviationFromIndex[s]}", creature.levelsWild[s] != -1 && creature.levelsWild[s] < wildLevelsLowest[s] ? "1" : string.Empty); + dict.Add($"istop{StatAbbreviationFromIndex[s]}_m", creature.levelsMutated[s] >= mutationLevelsHighest[s] ? "1" : string.Empty); + dict.Add($"isnewtop{StatAbbreviationFromIndex[s]}_m", creature.levelsMutated[s] > mutationLevelsHighest[s] ? "1" : string.Empty); + dict.Add($"islowest{StatAbbreviationFromIndex[s]}_m", creature.levelsMutated[s] <= mutationLevelsLowest[s] ? "1" : string.Empty); + dict.Add($"isnewlowest{StatAbbreviationFromIndex[s]}_m", creature.levelsMutated[s] < mutationLevelsLowest[s] ? "1" : string.Empty); // highest stats and according levels dict.Add("highest" + (s + 1) + "l", s < usedStatsCount ? levelOrderWild[s].Item2.ToString() : string.Empty); diff --git a/ARKBreedingStats/library/LevelStatusFlags.cs b/ARKBreedingStats/library/LevelStatusFlags.cs index 451240d6..d86b7a1b 100644 --- a/ARKBreedingStats/library/LevelStatusFlags.cs +++ b/ARKBreedingStats/library/LevelStatusFlags.cs @@ -29,9 +29,9 @@ public static void DetermineLevelStatus(Species species, TopLevels topLevels, { // if there are no creatures of the species yet, assume 0 levels to be the current best and worst if (topLevels == null) topLevels = new TopLevels(); - var highSpeciesLevels = topLevels.WildLevelsHighest ?? new int[Stats.StatsCount]; - var lowSpeciesLevels = topLevels.WildLevelsLowest ?? new int[Stats.StatsCount]; - var highSpeciesMutationLevels = topLevels.MutationLevelsHighest ?? new int[Stats.StatsCount]; + var highSpeciesLevels = topLevels.WildLevelsHighest; + var lowSpeciesLevels = topLevels.WildLevelsLowest; + var highSpeciesMutationLevels = topLevels.MutationLevelsHighest; newTopStatsText = new List(); topStatsText = new List(); @@ -77,7 +77,7 @@ public static void DetermineLevelStatus(Species species, TopLevels topLevels, topStatsText.Add(statName); sbStatInfoText?.Append($" {Loc.S("topLevel")}"); } - else if (highSpeciesLevels[s] != -1 && levelsWild[s] > highSpeciesLevels[s]) + else if (levelsWild[s] > highSpeciesLevels[s]) { LevelStatusFlagsCurrentNewCreature[s] = LevelStatus.NewTopLevel; CombinedLevelStatusFlags |= LevelStatus.NewTopLevel; @@ -106,7 +106,7 @@ public static void DetermineLevelStatus(Species species, TopLevels topLevels, } if (weighting == StatWeighting.StatValuePreference.High - && levelsMutated[s] > highSpeciesMutationLevels[s]) + && levelsMutated[s] > highSpeciesMutationLevels[s]) { LevelStatusFlagsCurrentNewCreature[s] |= LevelStatus.NewMutation; CombinedLevelStatusFlags |= LevelStatus.NewMutation; diff --git a/ARKBreedingStats/library/TopLevels.cs b/ARKBreedingStats/library/TopLevels.cs index d0e9a980..13b3582f 100644 --- a/ARKBreedingStats/library/TopLevels.cs +++ b/ARKBreedingStats/library/TopLevels.cs @@ -1,30 +1,37 @@ -namespace ARKBreedingStats.library +using System.Linq; + +namespace ARKBreedingStats.library { /// /// Top levels per species. /// public class TopLevels { - private readonly int[][] _levels = new int[4][]; + private readonly int[][] _levels = { + Enumerable.Repeat(-1,Stats.StatsCount).ToArray(), + Enumerable.Repeat(int.MaxValue,Stats.StatsCount).ToArray(), + Enumerable.Repeat(-1,Stats.StatsCount).ToArray(), + Enumerable.Repeat(int.MaxValue,Stats.StatsCount).ToArray() + }; public int[] WildLevelsHighest { - get => _levels?[0]; + get => _levels[0]; set => _levels[0] = value; } public int[] WildLevelsLowest { - get => _levels?[1]; + get => _levels[1]; set => _levels[1] = value; } public int[] MutationLevelsHighest { - get => _levels?[2]; + get => _levels[2]; set => _levels[2] = value; } public int[] MutationLevelsLowest { - get => _levels?[3]; + get => _levels[3]; set => _levels[3] = value; } } diff --git a/ARKBreedingStats/uiControls/Hatching.cs b/ARKBreedingStats/uiControls/Hatching.cs index 5cee537c..3a96df31 100644 --- a/ARKBreedingStats/uiControls/Hatching.cs +++ b/ARKBreedingStats/uiControls/Hatching.cs @@ -28,8 +28,8 @@ public void SetSpecies(Species species, TopLevels topLevels) } if (topLevels == null) topLevels = new TopLevels(); - var highLevels = topLevels.WildLevelsHighest ?? new int[Stats.StatsCount]; - var lowLevels = topLevels.WildLevelsLowest ?? new int[Stats.StatsCount]; + var highLevels = topLevels.WildLevelsHighest; + var lowLevels = topLevels.WildLevelsLowest; LbHeader.Text = $"Best stat values for bred creatures without imprinting of the species {species.DescriptiveNameAndMod} in this library."; string sbNames = null; From b0bf56c889a095c03c2dc612616fbdac20d18a5c Mon Sep 17 00:00:00 2001 From: cadon Date: Wed, 19 Jun 2024 21:11:47 +0200 Subject: [PATCH 20/36] library context menu entry to create addMutations console command --- ARKBreedingStats/Form1.Designer.cs | 980 +++++++++--------- ARKBreedingStats/Form1.library.cs | 18 + .../library/CreatureSpawnCommand.cs | 33 +- 3 files changed, 540 insertions(+), 491 deletions(-) diff --git a/ARKBreedingStats/Form1.Designer.cs b/ARKBreedingStats/Form1.Designer.cs index 707c621f..9d6ff58b 100644 --- a/ARKBreedingStats/Form1.Designer.cs +++ b/ARKBreedingStats/Form1.Designer.cs @@ -59,6 +59,8 @@ private void InitializeComponent() this.groupBox1 = new System.Windows.Forms.GroupBox(); this.lbImprintedCount = new System.Windows.Forms.Label(); this.labelImprintingTester = new System.Windows.Forms.Label(); + this.numericUpDownImprintingBonusTester = new ARKBreedingStats.uiControls.Nud(); + this.NumericUpDownTestingTE = new ARKBreedingStats.uiControls.Nud(); this.labelTesterTE = new System.Windows.Forms.Label(); this.groupBoxPossibilities = new System.Windows.Forms.GroupBox(); this.listViewPossibilities = new System.Windows.Forms.ListView(); @@ -71,11 +73,14 @@ private void InitializeComponent() this.cbExactlyImprinting = new System.Windows.Forms.CheckBox(); this.labelImprintingBonus = new System.Windows.Forms.Label(); this.lbImprintingCuddleCountExtractor = new System.Windows.Forms.Label(); + this.numericUpDownImprintingBonusExtractor = new ARKBreedingStats.uiControls.Nud(); this.panelExtrTE = new System.Windows.Forms.Panel(); this.labelTE = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); + this.numericUpDownUpperTEffBound = new ARKBreedingStats.uiControls.Nud(); this.label3 = new System.Windows.Forms.Label(); + this.numericUpDownLowerTEffBound = new ARKBreedingStats.uiControls.Nud(); this.lbLevel = new System.Windows.Forms.Label(); this.lbBreedingValueTester = new System.Windows.Forms.Label(); this.lbTesterWildLevel = new System.Windows.Forms.Label(); @@ -161,7 +166,9 @@ private void InitializeComponent() this.tabPageStatTesting = new System.Windows.Forms.TabPage(); this.CbLinkWildMutatedLevelsTester = new System.Windows.Forms.CheckBox(); this.pictureBoxColorRegionsTester = new System.Windows.Forms.PictureBox(); + this.statPotentials1 = new ARKBreedingStats.uiControls.StatPotentials(); this.gbStatChart = new System.Windows.Forms.GroupBox(); + this.radarChart1 = new ARKBreedingStats.RadarChart(); this.panelWildTamedBredTester = new System.Windows.Forms.Panel(); this.rbBredTester = new System.Windows.Forms.RadioButton(); this.rbTamedTester = new System.Windows.Forms.RadioButton(); @@ -181,6 +188,7 @@ private void InitializeComponent() this.lbCurrentCreature = new System.Windows.Forms.Label(); this.labelCurrentTesterCreature = new System.Windows.Forms.Label(); this.lbTestingInfo = new System.Windows.Forms.Label(); + this.creatureInfoInputTester = new ARKBreedingStats.CreatureInfoInput(); this.tabPageExtractor = new System.Windows.Forms.TabPage(); this.LbAsa = new System.Windows.Forms.Label(); this.LbBlueprintPath = new System.Windows.Forms.Label(); @@ -188,6 +196,7 @@ private void InitializeComponent() this.llOnlineHelpExtractionIssues = new System.Windows.Forms.LinkLabel(); this.PbCreatureColorsExtractor = new System.Windows.Forms.PictureBox(); this.groupBoxRadarChartExtractor = new System.Windows.Forms.GroupBox(); + this.radarChartExtractor = new ARKBreedingStats.RadarChart(); this.lbImprintingFailInfo = new System.Windows.Forms.Label(); this.groupBoxTamingInfo = new System.Windows.Forms.GroupBox(); this.labelTamingInfo = new System.Windows.Forms.Label(); @@ -200,6 +209,10 @@ private void InitializeComponent() this.btExtractLevels = new System.Windows.Forms.Button(); this.cbQuickWildCheck = new System.Windows.Forms.CheckBox(); this.labelErrorHelp = new System.Windows.Forms.Label(); + this.creatureAnalysis1 = new ARKBreedingStats.uiControls.CreatureAnalysis(); + this.parentInheritanceExtractor = new ARKBreedingStats.uiControls.ParentInheritance(); + this.numericUpDownLevel = new ARKBreedingStats.uiControls.Nud(); + this.creatureInfoInputExtractor = new ARKBreedingStats.CreatureInfoInput(); this.tabPageLibrary = new System.Windows.Forms.TabPage(); this.tableLayoutPanelLibrary = new System.Windows.Forms.TableLayoutPanel(); this.listViewLibrary = new System.Windows.Forms.ListView(); @@ -284,6 +297,7 @@ private void InitializeComponent() this.adminCommandToSetColorsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.adminCommandToSpawnExactDinoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.adminCommandToSpawnExactDinoDS2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.adminCommandSetMutationLevelsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fixColorsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripMenuItemOpenWiki = new System.Windows.Forms.ToolStripMenuItem(); @@ -299,23 +313,38 @@ private void InitializeComponent() this.buttonRecalculateTops = new System.Windows.Forms.Button(); this.label17 = new System.Windows.Forms.Label(); this.tabPageLibRadarChart = new System.Windows.Forms.TabPage(); + this.radarChartLibrary = new ARKBreedingStats.RadarChart(); + this.creatureBoxListView = new ARKBreedingStats.CreatureBox(); this.tabPageLibraryInfo = new System.Windows.Forms.TabPage(); this.tlpLibraryInfo = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.CbLibraryInfoUseFilter = new System.Windows.Forms.CheckBox(); this.BtCopyLibraryColorToClipboard = new System.Windows.Forms.Button(); + this.libraryInfoControl1 = new ARKBreedingStats.uiControls.LibraryInfoControl(); this.tabPagePedigree = new System.Windows.Forms.TabPage(); + this.pedigree1 = new ARKBreedingStats.Pedigree.PedigreeControl(); this.tabPageTaming = new System.Windows.Forms.TabPage(); + this.tamingControl1 = new ARKBreedingStats.TamingControl(); this.tabPageBreedingPlan = new System.Windows.Forms.TabPage(); + this.breedingPlan1 = new ARKBreedingStats.BreedingPlanning.BreedingPlan(); this.tabPageHatching = new System.Windows.Forms.TabPage(); + this.hatching1 = new ARKBreedingStats.uiControls.Hatching(); this.tabPageRaising = new System.Windows.Forms.TabPage(); + this.raisingControl1 = new ARKBreedingStats.raising.RaisingControl(); this.tabPageTimer = new System.Windows.Forms.TabPage(); + this.timerList1 = new ARKBreedingStats.TimerControl(); this.tabPagePlayerTribes = new System.Windows.Forms.TabPage(); + this.tribesControl1 = new ARKBreedingStats.TribesControl(); this.tabPageNotes = new System.Windows.Forms.TabPage(); + this.notesControl1 = new ARKBreedingStats.NotesControl(); this.TabPageOCR = new System.Windows.Forms.TabPage(); + this.ocrControl1 = new ARKBreedingStats.ocr.OCRControl(); this.tabPageExtractionTests = new System.Windows.Forms.TabPage(); + this.extractionTestControl1 = new ARKBreedingStats.testCases.ExtractionTestControl(); this.tabPageMultiplierTesting = new System.Windows.Forms.TabPage(); + this.statsMultiplierTesting1 = new ARKBreedingStats.multiplierTesting.StatsMultiplierTesting(); this.TabPageStatOptions = new System.Windows.Forms.TabPage(); + this.statsOptionsControl1 = new ARKBreedingStats.uiControls.StatsOptionsControl(); this.btReadValuesFromArk = new System.Windows.Forms.Button(); this.cbEventMultipliers = new System.Windows.Forms.CheckBox(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); @@ -353,6 +382,7 @@ private void InitializeComponent() this.panelToolBar = new System.Windows.Forms.Panel(); this.btImportLastExported = new System.Windows.Forms.Button(); this.pbSpecies = new System.Windows.Forms.PictureBox(); + this.tbSpeciesGlobal = new ARKBreedingStats.uiControls.TextBoxSuggest(); this.cbGuessSpecies = new System.Windows.Forms.CheckBox(); this.cbToggleOverlay = new System.Windows.Forms.CheckBox(); this.lbListening = new System.Windows.Forms.Label(); @@ -365,41 +395,18 @@ private void InitializeComponent() this.collapseMutationsLevelsASEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator27 = new System.Windows.Forms.ToolStripSeparator(); this.resetColumnOrderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.statPotentials1 = new ARKBreedingStats.uiControls.StatPotentials(); - this.radarChart1 = new ARKBreedingStats.RadarChart(); - this.numericUpDownImprintingBonusTester = new ARKBreedingStats.uiControls.Nud(); - this.NumericUpDownTestingTE = new ARKBreedingStats.uiControls.Nud(); - this.creatureInfoInputTester = new ARKBreedingStats.CreatureInfoInput(); - this.radarChartExtractor = new ARKBreedingStats.RadarChart(); - this.numericUpDownImprintingBonusExtractor = new ARKBreedingStats.uiControls.Nud(); - this.numericUpDownUpperTEffBound = new ARKBreedingStats.uiControls.Nud(); - this.numericUpDownLowerTEffBound = new ARKBreedingStats.uiControls.Nud(); - this.creatureAnalysis1 = new ARKBreedingStats.uiControls.CreatureAnalysis(); - this.parentInheritanceExtractor = new ARKBreedingStats.uiControls.ParentInheritance(); - this.numericUpDownLevel = new ARKBreedingStats.uiControls.Nud(); - this.creatureInfoInputExtractor = new ARKBreedingStats.CreatureInfoInput(); - this.radarChartLibrary = new ARKBreedingStats.RadarChart(); - this.creatureBoxListView = new ARKBreedingStats.CreatureBox(); - this.libraryInfoControl1 = new ARKBreedingStats.uiControls.LibraryInfoControl(); - this.pedigree1 = new ARKBreedingStats.Pedigree.PedigreeControl(); - this.tamingControl1 = new ARKBreedingStats.TamingControl(); - this.breedingPlan1 = new ARKBreedingStats.BreedingPlanning.BreedingPlan(); - this.hatching1 = new ARKBreedingStats.uiControls.Hatching(); - this.raisingControl1 = new ARKBreedingStats.raising.RaisingControl(); - this.timerList1 = new ARKBreedingStats.TimerControl(); - this.tribesControl1 = new ARKBreedingStats.TribesControl(); - this.notesControl1 = new ARKBreedingStats.NotesControl(); - this.ocrControl1 = new ARKBreedingStats.ocr.OCRControl(); - this.extractionTestControl1 = new ARKBreedingStats.testCases.ExtractionTestControl(); - this.statsMultiplierTesting1 = new ARKBreedingStats.multiplierTesting.StatsMultiplierTesting(); - this.statsOptionsControl1 = new ARKBreedingStats.uiControls.StatsOptionsControl(); this.speciesSelector1 = new ARKBreedingStats.SpeciesSelector(); - this.tbSpeciesGlobal = new ARKBreedingStats.uiControls.TextBoxSuggest(); + this.commandMutationLevelsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).BeginInit(); this.groupBoxPossibilities.SuspendLayout(); this.groupBoxDetailsExtractor.SuspendLayout(); this.panelExtrImpr.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusExtractor)).BeginInit(); this.panelExtrTE.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownUpperTEffBound)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffBound)).BeginInit(); this.menuStrip1.SuspendLayout(); this.panelSums.SuspendLayout(); this.panelWildTamedBred.SuspendLayout(); @@ -407,6 +414,7 @@ private void InitializeComponent() this.tabPageStatTesting.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxColorRegionsTester)).BeginInit(); this.gbStatChart.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).BeginInit(); this.panelWildTamedBredTester.SuspendLayout(); this.groupBox2.SuspendLayout(); this.flowLayoutPanelStatIOsTester.SuspendLayout(); @@ -416,10 +424,12 @@ private void InitializeComponent() this.tabPageExtractor.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.PbCreatureColorsExtractor)).BeginInit(); this.groupBoxRadarChartExtractor.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).BeginInit(); this.groupBoxTamingInfo.SuspendLayout(); this.gbStatsExtractor.SuspendLayout(); this.flowLayoutPanelStatIOsExtractor.SuspendLayout(); this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLevel)).BeginInit(); this.tabPageLibrary.SuspendLayout(); this.tableLayoutPanelLibrary.SuspendLayout(); this.contextMenuStripLibrary.SuspendLayout(); @@ -429,6 +439,7 @@ private void InitializeComponent() this.tabPage3.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); this.tabPageLibRadarChart.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).BeginInit(); this.tabPageLibraryInfo.SuspendLayout(); this.tlpLibraryInfo.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout(); @@ -449,15 +460,6 @@ private void InitializeComponent() this.panelToolBar.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbSpecies)).BeginInit(); this.contextMenuStripLibraryHeader.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusExtractor)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownUpperTEffBound)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffBound)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLevel)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).BeginInit(); this.SuspendLayout(); // // aboutToolStripMenuItem @@ -655,6 +657,52 @@ private void InitializeComponent() this.labelImprintingTester.TabIndex = 5; this.labelImprintingTester.Text = "% Imprinting Bonus"; // + // numericUpDownImprintingBonusTester + // + this.numericUpDownImprintingBonusTester.DecimalPlaces = 5; + this.numericUpDownImprintingBonusTester.Enabled = false; + this.numericUpDownImprintingBonusTester.ForeColor = System.Drawing.SystemColors.GrayText; + this.numericUpDownImprintingBonusTester.Location = new System.Drawing.Point(6, 45); + this.numericUpDownImprintingBonusTester.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.numericUpDownImprintingBonusTester.Name = "numericUpDownImprintingBonusTester"; + this.numericUpDownImprintingBonusTester.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownImprintingBonusTester.Size = new System.Drawing.Size(75, 20); + this.numericUpDownImprintingBonusTester.TabIndex = 4; + this.numericUpDownImprintingBonusTester.ValueChanged += new System.EventHandler(this.numericUpDownImprintingBonusTester_ValueChanged); + // + // NumericUpDownTestingTE + // + this.NumericUpDownTestingTE.DecimalPlaces = 2; + this.NumericUpDownTestingTE.ForeColor = System.Drawing.SystemColors.WindowText; + this.NumericUpDownTestingTE.Location = new System.Drawing.Point(6, 19); + this.NumericUpDownTestingTE.Minimum = new decimal(new int[] { + 1, + 0, + 0, + -2147483648}); + this.NumericUpDownTestingTE.Name = "NumericUpDownTestingTE"; + this.NumericUpDownTestingTE.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.NumericUpDownTestingTE.Size = new System.Drawing.Size(60, 20); + this.NumericUpDownTestingTE.TabIndex = 0; + this.NumericUpDownTestingTE.Value = new decimal(new int[] { + 80, + 0, + 0, + 0}); + this.NumericUpDownTestingTE.ValueChanged += new System.EventHandler(this.NumericUpDownTestingTE_ValueChanged); + // // labelTesterTE // this.labelTesterTE.AutoSize = true; @@ -766,6 +814,27 @@ private void InitializeComponent() this.lbImprintingCuddleCountExtractor.TabIndex = 50; this.lbImprintingCuddleCountExtractor.Text = "(0×)"; // + // numericUpDownImprintingBonusExtractor + // + this.numericUpDownImprintingBonusExtractor.DecimalPlaces = 5; + this.numericUpDownImprintingBonusExtractor.ForeColor = System.Drawing.SystemColors.GrayText; + this.numericUpDownImprintingBonusExtractor.Location = new System.Drawing.Point(3, 3); + this.numericUpDownImprintingBonusExtractor.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.numericUpDownImprintingBonusExtractor.Name = "numericUpDownImprintingBonusExtractor"; + this.numericUpDownImprintingBonusExtractor.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownImprintingBonusExtractor.Size = new System.Drawing.Size(77, 20); + this.numericUpDownImprintingBonusExtractor.TabIndex = 6; + this.numericUpDownImprintingBonusExtractor.ValueChanged += new System.EventHandler(this.numericUpDownImprintingBonusExtractor_ValueChanged); + this.numericUpDownImprintingBonusExtractor.Enter += new System.EventHandler(this.numericUpDown_Enter); + // // panelExtrTE // this.panelExtrTE.Controls.Add(this.labelTE); @@ -805,6 +874,25 @@ private void InitializeComponent() this.label1.TabIndex = 5; this.label1.Text = "%"; // + // numericUpDownUpperTEffBound + // + this.numericUpDownUpperTEffBound.ForeColor = System.Drawing.SystemColors.WindowText; + this.numericUpDownUpperTEffBound.Location = new System.Drawing.Point(147, 3); + this.numericUpDownUpperTEffBound.Name = "numericUpDownUpperTEffBound"; + this.numericUpDownUpperTEffBound.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownUpperTEffBound.Size = new System.Drawing.Size(45, 20); + this.numericUpDownUpperTEffBound.TabIndex = 3; + this.numericUpDownUpperTEffBound.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.numericUpDownUpperTEffBound.Enter += new System.EventHandler(this.numericUpDown_Enter); + // // label3 // this.label3.AutoSize = true; @@ -814,6 +902,25 @@ private void InitializeComponent() this.label3.TabIndex = 2; this.label3.Text = "-"; // + // numericUpDownLowerTEffBound + // + this.numericUpDownLowerTEffBound.ForeColor = System.Drawing.SystemColors.WindowText; + this.numericUpDownLowerTEffBound.Location = new System.Drawing.Point(80, 3); + this.numericUpDownLowerTEffBound.Name = "numericUpDownLowerTEffBound"; + this.numericUpDownLowerTEffBound.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownLowerTEffBound.Size = new System.Drawing.Size(45, 20); + this.numericUpDownLowerTEffBound.TabIndex = 1; + this.numericUpDownLowerTEffBound.Value = new decimal(new int[] { + 80, + 0, + 0, + 0}); + this.numericUpDownLowerTEffBound.Enter += new System.EventHandler(this.numericUpDown_Enter); + // // lbLevel // this.lbLevel.AutoSize = true; @@ -953,6 +1060,7 @@ private void InitializeComponent() this.toolStripSeparator7, this.exactSpawnCommandToolStripMenuItem, this.exactSpawnCommandDS2ToolStripMenuItem, + this.commandMutationLevelsToolStripMenuItem, this.toolStripSeparator25, this.copyCreatureToolStripMenuItem, this.pasteCreatureToolStripMenuItem}); @@ -969,7 +1077,7 @@ private void InitializeComponent() this.forSpreadsheetToolStripMenuItem, this.editSpreadsheetExportFieldsToolStripMenuItem}); this.exportValuesToClipboardToolStripMenuItem.Name = "exportValuesToClipboardToolStripMenuItem"; - this.exportValuesToClipboardToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.exportValuesToClipboardToolStripMenuItem.Size = new System.Drawing.Size(215, 22); this.exportValuesToClipboardToolStripMenuItem.Text = "Export to Clipboard"; // // plainTextcurrentValuesToolStripMenuItem @@ -1008,7 +1116,7 @@ private void InitializeComponent() // toolStripSeparator13 // this.toolStripSeparator13.Name = "toolStripSeparator13"; - this.toolStripSeparator13.Size = new System.Drawing.Size(211, 6); + this.toolStripSeparator13.Size = new System.Drawing.Size(212, 6); // // setStatusToolStripMenuItem // @@ -1018,7 +1126,7 @@ private void InitializeComponent() this.unavailableToolStripMenuItem, this.obeliskToolStripMenuItem1}); this.setStatusToolStripMenuItem.Name = "setStatusToolStripMenuItem"; - this.setStatusToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.setStatusToolStripMenuItem.Size = new System.Drawing.Size(215, 22); this.setStatusToolStripMenuItem.Text = "Set Status"; // // aliveToolStripMenuItem @@ -1052,26 +1160,26 @@ private void InitializeComponent() // multiSetterToolStripMenuItem // this.multiSetterToolStripMenuItem.Name = "multiSetterToolStripMenuItem"; - this.multiSetterToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.multiSetterToolStripMenuItem.Size = new System.Drawing.Size(215, 22); this.multiSetterToolStripMenuItem.Text = "MultiSetter…"; this.multiSetterToolStripMenuItem.Click += new System.EventHandler(this.multiSetterToolStripMenuItem_Click); // // toolStripSeparator5 // this.toolStripSeparator5.Name = "toolStripSeparator5"; - this.toolStripSeparator5.Size = new System.Drawing.Size(211, 6); + this.toolStripSeparator5.Size = new System.Drawing.Size(212, 6); // // deleteSelectedToolStripMenuItem // this.deleteSelectedToolStripMenuItem.Name = "deleteSelectedToolStripMenuItem"; - this.deleteSelectedToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.deleteSelectedToolStripMenuItem.Size = new System.Drawing.Size(215, 22); this.deleteSelectedToolStripMenuItem.Text = "Remove…"; this.deleteSelectedToolStripMenuItem.Click += new System.EventHandler(this.deleteSelectedToolStripMenuItem_Click); // // findDuplicatesToolStripMenuItem // this.findDuplicatesToolStripMenuItem.Name = "findDuplicatesToolStripMenuItem"; - this.findDuplicatesToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.findDuplicatesToolStripMenuItem.Size = new System.Drawing.Size(215, 22); this.findDuplicatesToolStripMenuItem.Text = "Find Duplicates…"; this.findDuplicatesToolStripMenuItem.Visible = false; this.findDuplicatesToolStripMenuItem.Click += new System.EventHandler(this.findDuplicatesToolStripMenuItem_Click); @@ -1079,12 +1187,12 @@ private void InitializeComponent() // toolStripSeparator7 // this.toolStripSeparator7.Name = "toolStripSeparator7"; - this.toolStripSeparator7.Size = new System.Drawing.Size(211, 6); + this.toolStripSeparator7.Size = new System.Drawing.Size(212, 6); // // exactSpawnCommandToolStripMenuItem // this.exactSpawnCommandToolStripMenuItem.Name = "exactSpawnCommandToolStripMenuItem"; - this.exactSpawnCommandToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.exactSpawnCommandToolStripMenuItem.Size = new System.Drawing.Size(215, 22); this.exactSpawnCommandToolStripMenuItem.Text = "ExactSpawnCommand"; this.exactSpawnCommandToolStripMenuItem.ToolTipText = "Creates a spawn command to spawn this creature in game. This command can crash yo" + "ur game"; @@ -1093,7 +1201,7 @@ private void InitializeComponent() // exactSpawnCommandDS2ToolStripMenuItem // this.exactSpawnCommandDS2ToolStripMenuItem.Name = "exactSpawnCommandDS2ToolStripMenuItem"; - this.exactSpawnCommandDS2ToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.exactSpawnCommandDS2ToolStripMenuItem.Size = new System.Drawing.Size(215, 22); this.exactSpawnCommandDS2ToolStripMenuItem.Text = "ExactSpawnCommandDS2"; this.exactSpawnCommandDS2ToolStripMenuItem.ToolTipText = "Creates a spawn command to spawn this creature in game, used with the mod DinoSto" + "rageV2. This command is stable."; @@ -1102,19 +1210,19 @@ private void InitializeComponent() // toolStripSeparator25 // this.toolStripSeparator25.Name = "toolStripSeparator25"; - this.toolStripSeparator25.Size = new System.Drawing.Size(211, 6); + this.toolStripSeparator25.Size = new System.Drawing.Size(212, 6); // // copyCreatureToolStripMenuItem // this.copyCreatureToolStripMenuItem.Name = "copyCreatureToolStripMenuItem"; - this.copyCreatureToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.copyCreatureToolStripMenuItem.Size = new System.Drawing.Size(215, 22); this.copyCreatureToolStripMenuItem.Text = "Copy Creature"; this.copyCreatureToolStripMenuItem.Click += new System.EventHandler(this.copyCreatureToolStripMenuItem_Click); // // pasteCreatureToolStripMenuItem // this.pasteCreatureToolStripMenuItem.Name = "pasteCreatureToolStripMenuItem"; - this.pasteCreatureToolStripMenuItem.Size = new System.Drawing.Size(214, 22); + this.pasteCreatureToolStripMenuItem.Size = new System.Drawing.Size(215, 22); this.pasteCreatureToolStripMenuItem.Text = "Paste Creature"; this.pasteCreatureToolStripMenuItem.Click += new System.EventHandler(this.pasteCreatureToolStripMenuItem_Click); // @@ -1548,6 +1656,13 @@ private void InitializeComponent() this.pictureBoxColorRegionsTester.TabStop = false; this.pictureBoxColorRegionsTester.Click += new System.EventHandler(this.pictureBoxColorRegionsTester_Click); // + // statPotentials1 + // + this.statPotentials1.Location = new System.Drawing.Point(860, 9); + this.statPotentials1.Name = "statPotentials1"; + this.statPotentials1.Size = new System.Drawing.Size(293, 433); + this.statPotentials1.TabIndex = 12; + // // gbStatChart // this.gbStatChart.Controls.Add(this.radarChart1); @@ -1558,6 +1673,16 @@ private void InitializeComponent() this.gbStatChart.TabStop = false; this.gbStatChart.Text = "Stat-Chart"; // + // radarChart1 + // + this.radarChart1.Image = ((System.Drawing.Image)(resources.GetObject("radarChart1.Image"))); + this.radarChart1.Location = new System.Drawing.Point(6, 19); + this.radarChart1.Name = "radarChart1"; + this.radarChart1.Size = new System.Drawing.Size(200, 200); + this.radarChart1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.radarChart1.TabIndex = 10; + this.radarChart1.TabStop = false; + // // panelWildTamedBredTester // this.panelWildTamedBredTester.Controls.Add(this.rbBredTester); @@ -1754,6 +1879,43 @@ private void InitializeComponent() this.lbTestingInfo.TabIndex = 37; this.lbTestingInfo.Text = "Preview or edit levels of a creature."; // + // creatureInfoInputTester + // + this.creatureInfoInputTester.AlreadyExistingCreature = null; + this.creatureInfoInputTester.ColorIdsAlsoPossible = null; + this.creatureInfoInputTester.CooldownUntil = null; + this.creatureInfoInputTester.CreatureFlags = ARKBreedingStats.Library.CreatureFlags.None; + this.creatureInfoInputTester.CreatureName = ""; + this.creatureInfoInputTester.CreatureNote = ""; + this.creatureInfoInputTester.CreatureOwner = ""; + this.creatureInfoInputTester.CreatureServer = ""; + this.creatureInfoInputTester.CreatureSex = ARKBreedingStats.Library.Sex.Unknown; + this.creatureInfoInputTester.CreatureStatus = ARKBreedingStats.Library.CreatureStatus.Available; + this.creatureInfoInputTester.CreatureTribe = ""; + this.creatureInfoInputTester.DomesticatedAt = new System.DateTime(2014, 12, 31, 0, 0, 0, 0); + this.creatureInfoInputTester.Father = null; + this.creatureInfoInputTester.GrowingUntil = null; + this.creatureInfoInputTester.Location = new System.Drawing.Point(373, 184); + this.creatureInfoInputTester.LockServer = false; + this.creatureInfoInputTester.Mother = null; + this.creatureInfoInputTester.MutationCounterFather = 0; + this.creatureInfoInputTester.MutationCounterMother = 0; + this.creatureInfoInputTester.Name = "creatureInfoInputTester"; + this.creatureInfoInputTester.OwnerLock = false; + this.creatureInfoInputTester.RegionColors = new byte[] { + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0))}; + this.creatureInfoInputTester.Size = new System.Drawing.Size(262, 590); + this.creatureInfoInputTester.TabIndex = 4; + this.creatureInfoInputTester.TribeLock = false; + this.creatureInfoInputTester.Add2LibraryClicked += new System.Action(this.creatureInfoInputTester_Add2Library_Clicked); + this.creatureInfoInputTester.Save2LibraryClicked += new System.Action(this.creatureInfoInputTester_Save2Library_Clicked); + this.creatureInfoInputTester.ParentListRequested += new System.Action(this.CreatureInfoInput_ParentListRequested); + // // tabPageExtractor // this.tabPageExtractor.AutoScroll = true; @@ -1850,6 +2012,17 @@ private void InitializeComponent() this.groupBoxRadarChartExtractor.TabStop = false; this.groupBoxRadarChartExtractor.Text = "Stat-Chart"; // + // radarChartExtractor + // + this.radarChartExtractor.Dock = System.Windows.Forms.DockStyle.Fill; + this.radarChartExtractor.Image = ((System.Drawing.Image)(resources.GetObject("radarChartExtractor.Image"))); + this.radarChartExtractor.Location = new System.Drawing.Point(3, 16); + this.radarChartExtractor.Name = "radarChartExtractor"; + this.radarChartExtractor.Size = new System.Drawing.Size(144, 144); + this.radarChartExtractor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.radarChartExtractor.TabIndex = 10; + this.radarChartExtractor.TabStop = false; + // // lbImprintingFailInfo // this.lbImprintingFailInfo.BackColor = System.Drawing.Color.MistyRose; @@ -1977,16 +2150,90 @@ private void InitializeComponent() this.labelErrorHelp.TabIndex = 40; this.labelErrorHelp.Text = resources.GetString("labelErrorHelp.Text"); // - // tabPageLibrary + // creatureAnalysis1 // - this.tabPageLibrary.Controls.Add(this.tableLayoutPanelLibrary); - this.tabPageLibrary.Location = new System.Drawing.Point(4, 22); - this.tabPageLibrary.Name = "tabPageLibrary"; - this.tabPageLibrary.Padding = new System.Windows.Forms.Padding(3); - this.tabPageLibrary.Size = new System.Drawing.Size(1870, 784); - this.tabPageLibrary.TabIndex = 2; - this.tabPageLibrary.Text = "Library"; - this.tabPageLibrary.UseVisualStyleBackColor = true; + this.creatureAnalysis1.Location = new System.Drawing.Point(903, 265); + this.creatureAnalysis1.Name = "creatureAnalysis1"; + this.creatureAnalysis1.Size = new System.Drawing.Size(346, 199); + this.creatureAnalysis1.TabIndex = 55; + // + // parentInheritanceExtractor + // + this.parentInheritanceExtractor.Location = new System.Drawing.Point(903, 470); + this.parentInheritanceExtractor.Name = "parentInheritanceExtractor"; + this.parentInheritanceExtractor.Size = new System.Drawing.Size(337, 182); + this.parentInheritanceExtractor.TabIndex = 52; + // + // numericUpDownLevel + // + this.numericUpDownLevel.ForeColor = System.Drawing.SystemColors.WindowText; + this.numericUpDownLevel.Location = new System.Drawing.Point(244, 9); + this.numericUpDownLevel.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.numericUpDownLevel.Name = "numericUpDownLevel"; + this.numericUpDownLevel.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownLevel.Size = new System.Drawing.Size(56, 20); + this.numericUpDownLevel.TabIndex = 2; + this.numericUpDownLevel.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownLevel.Enter += new System.EventHandler(this.numericUpDown_Enter); + // + // creatureInfoInputExtractor + // + this.creatureInfoInputExtractor.AlreadyExistingCreature = null; + this.creatureInfoInputExtractor.ColorIdsAlsoPossible = null; + this.creatureInfoInputExtractor.CooldownUntil = null; + this.creatureInfoInputExtractor.CreatureFlags = ARKBreedingStats.Library.CreatureFlags.None; + this.creatureInfoInputExtractor.CreatureName = ""; + this.creatureInfoInputExtractor.CreatureNote = ""; + this.creatureInfoInputExtractor.CreatureOwner = ""; + this.creatureInfoInputExtractor.CreatureServer = ""; + this.creatureInfoInputExtractor.CreatureSex = ARKBreedingStats.Library.Sex.Unknown; + this.creatureInfoInputExtractor.CreatureStatus = ARKBreedingStats.Library.CreatureStatus.Available; + this.creatureInfoInputExtractor.CreatureTribe = ""; + this.creatureInfoInputExtractor.DomesticatedAt = new System.DateTime(2014, 12, 31, 0, 0, 0, 0); + this.creatureInfoInputExtractor.Father = null; + this.creatureInfoInputExtractor.GrowingUntil = null; + this.creatureInfoInputExtractor.Location = new System.Drawing.Point(373, 184); + this.creatureInfoInputExtractor.LockServer = false; + this.creatureInfoInputExtractor.Mother = null; + this.creatureInfoInputExtractor.MutationCounterFather = 0; + this.creatureInfoInputExtractor.MutationCounterMother = 0; + this.creatureInfoInputExtractor.Name = "creatureInfoInputExtractor"; + this.creatureInfoInputExtractor.OwnerLock = false; + this.creatureInfoInputExtractor.RegionColors = new byte[] { + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0))}; + this.creatureInfoInputExtractor.Size = new System.Drawing.Size(262, 590); + this.creatureInfoInputExtractor.TabIndex = 7; + this.creatureInfoInputExtractor.TribeLock = false; + this.creatureInfoInputExtractor.Add2LibraryClicked += new System.Action(this.creatureInfoInputExtractor_Add2Library_Clicked); + this.creatureInfoInputExtractor.ParentListRequested += new System.Action(this.CreatureInfoInput_ParentListRequested); + // + // tabPageLibrary + // + this.tabPageLibrary.Controls.Add(this.tableLayoutPanelLibrary); + this.tabPageLibrary.Location = new System.Drawing.Point(4, 22); + this.tabPageLibrary.Name = "tabPageLibrary"; + this.tabPageLibrary.Padding = new System.Windows.Forms.Padding(3); + this.tabPageLibrary.Size = new System.Drawing.Size(1870, 784); + this.tabPageLibrary.TabIndex = 2; + this.tabPageLibrary.Text = "Library"; + this.tabPageLibrary.UseVisualStyleBackColor = true; // // tableLayoutPanelLibrary // @@ -2395,13 +2642,14 @@ private void InitializeComponent() this.adminCommandToSetColorsToolStripMenuItem, this.adminCommandToSpawnExactDinoToolStripMenuItem, this.adminCommandToSpawnExactDinoDS2ToolStripMenuItem, + this.adminCommandSetMutationLevelsToolStripMenuItem, this.fixColorsToolStripMenuItem, this.toolStripSeparator6, this.toolStripMenuItemOpenWiki, this.toolStripSeparator14, this.toolStripMenuItemRemove}); this.contextMenuStripLibrary.Name = "contextMenuStripLibrary"; - this.contextMenuStripLibrary.Size = new System.Drawing.Size(303, 458); + this.contextMenuStripLibrary.Size = new System.Drawing.Size(303, 480); this.contextMenuStripLibrary.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStripLibrary_Opening); // // toolStripMenuItemEdit @@ -2646,6 +2894,13 @@ private void InitializeComponent() this.adminCommandToSpawnExactDinoDS2ToolStripMenuItem.Text = "Admin Command to spawn exact dino DS2"; this.adminCommandToSpawnExactDinoDS2ToolStripMenuItem.Click += new System.EventHandler(this.adminCommandToSpawnExactDinoDS2ToolStripMenuItem_Click); // + // adminCommandSetMutationLevelsToolStripMenuItem + // + this.adminCommandSetMutationLevelsToolStripMenuItem.Name = "adminCommandSetMutationLevelsToolStripMenuItem"; + this.adminCommandSetMutationLevelsToolStripMenuItem.Size = new System.Drawing.Size(302, 22); + this.adminCommandSetMutationLevelsToolStripMenuItem.Text = "Admin Command set mutation levels"; + this.adminCommandSetMutationLevelsToolStripMenuItem.Click += new System.EventHandler(this.adminCommandSetMutationLevelsToolStripMenuItem_Click); + // // fixColorsToolStripMenuItem // this.fixColorsToolStripMenuItem.Name = "fixColorsToolStripMenuItem"; @@ -2735,7 +2990,7 @@ private void InitializeComponent() this.tabPage3.Location = new System.Drawing.Point(4, 22); this.tabPage3.Name = "tabPage3"; this.tabPage3.Padding = new System.Windows.Forms.Padding(3); - this.tabPage3.Size = new System.Drawing.Size(181, 328); + this.tabPage3.Size = new System.Drawing.Size(181, 176); this.tabPage3.TabIndex = 2; this.tabPage3.Text = "Stats"; this.tabPage3.UseVisualStyleBackColor = true; @@ -2754,7 +3009,7 @@ private void InitializeComponent() this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(175, 322); + this.tableLayoutPanel2.Size = new System.Drawing.Size(175, 170); this.tableLayoutPanel2.TabIndex = 0; // // checkedListBoxConsiderStatTop @@ -2764,13 +3019,13 @@ private void InitializeComponent() this.checkedListBoxConsiderStatTop.FormattingEnabled = true; this.checkedListBoxConsiderStatTop.Location = new System.Drawing.Point(3, 35); this.checkedListBoxConsiderStatTop.Name = "checkedListBoxConsiderStatTop"; - this.checkedListBoxConsiderStatTop.Size = new System.Drawing.Size(169, 255); + this.checkedListBoxConsiderStatTop.Size = new System.Drawing.Size(169, 103); this.checkedListBoxConsiderStatTop.TabIndex = 3; // // buttonRecalculateTops // this.buttonRecalculateTops.Dock = System.Windows.Forms.DockStyle.Fill; - this.buttonRecalculateTops.Location = new System.Drawing.Point(3, 296); + this.buttonRecalculateTops.Location = new System.Drawing.Point(3, 144); this.buttonRecalculateTops.Name = "buttonRecalculateTops"; this.buttonRecalculateTops.Size = new System.Drawing.Size(169, 23); this.buttonRecalculateTops.TabIndex = 2; @@ -2793,11 +3048,32 @@ private void InitializeComponent() this.tabPageLibRadarChart.Location = new System.Drawing.Point(4, 22); this.tabPageLibRadarChart.Name = "tabPageLibRadarChart"; this.tabPageLibRadarChart.Padding = new System.Windows.Forms.Padding(3); - this.tabPageLibRadarChart.Size = new System.Drawing.Size(181, 328); + this.tabPageLibRadarChart.Size = new System.Drawing.Size(181, 176); this.tabPageLibRadarChart.TabIndex = 4; this.tabPageLibRadarChart.Text = "Chart"; this.tabPageLibRadarChart.UseVisualStyleBackColor = true; // + // radarChartLibrary + // + this.radarChartLibrary.Dock = System.Windows.Forms.DockStyle.Top; + this.radarChartLibrary.Image = ((System.Drawing.Image)(resources.GetObject("radarChartLibrary.Image"))); + this.radarChartLibrary.Location = new System.Drawing.Point(3, 3); + this.radarChartLibrary.Name = "radarChartLibrary"; + this.radarChartLibrary.Size = new System.Drawing.Size(175, 287); + this.radarChartLibrary.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.radarChartLibrary.TabIndex = 0; + this.radarChartLibrary.TabStop = false; + // + // creatureBoxListView + // + this.creatureBoxListView.Location = new System.Drawing.Point(3, 3); + this.creatureBoxListView.Name = "creatureBoxListView"; + this.creatureBoxListView.Size = new System.Drawing.Size(189, 406); + this.creatureBoxListView.TabIndex = 0; + this.creatureBoxListView.Changed += new System.Action(this.UpdateDisplayedCreatureValues); + this.creatureBoxListView.GiveParents += new System.Action(this.CreatureBoxListView_FindParents); + this.creatureBoxListView.SelectCreature += new System.Action(this.SelectCreatureInLibrary); + // // tabPageLibraryInfo // this.tabPageLibraryInfo.Controls.Add(this.tlpLibraryInfo); @@ -2861,6 +3137,14 @@ private void InitializeComponent() this.BtCopyLibraryColorToClipboard.UseVisualStyleBackColor = true; this.BtCopyLibraryColorToClipboard.Click += new System.EventHandler(this.BtCopyLibraryColorToClipboard_Click); // + // libraryInfoControl1 + // + this.libraryInfoControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.libraryInfoControl1.Location = new System.Drawing.Point(3, 39); + this.libraryInfoControl1.Name = "libraryInfoControl1"; + this.libraryInfoControl1.Size = new System.Drawing.Size(1858, 736); + this.libraryInfoControl1.TabIndex = 3; + // // tabPagePedigree // this.tabPagePedigree.Controls.Add(this.pedigree1); @@ -2872,6 +3156,16 @@ private void InitializeComponent() this.tabPagePedigree.Text = "Pedigree"; this.tabPagePedigree.UseVisualStyleBackColor = true; // + // pedigree1 + // + this.pedigree1.AutoScroll = true; + this.pedigree1.Dock = System.Windows.Forms.DockStyle.Fill; + this.pedigree1.LeftColumnWidth = 203; + this.pedigree1.Location = new System.Drawing.Point(3, 3); + this.pedigree1.Name = "pedigree1"; + this.pedigree1.Size = new System.Drawing.Size(1864, 778); + this.pedigree1.TabIndex = 0; + // // tabPageTaming // this.tabPageTaming.Controls.Add(this.tamingControl1); @@ -2883,6 +3177,24 @@ private void InitializeComponent() this.tabPageTaming.Text = "Taming"; this.tabPageTaming.UseVisualStyleBackColor = true; // + // tamingControl1 + // + this.tamingControl1.AutoScroll = true; + this.tamingControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tamingControl1.Location = new System.Drawing.Point(3, 3); + this.tamingControl1.Name = "tamingControl1"; + this.tamingControl1.Size = new System.Drawing.Size(1864, 778); + this.tamingControl1.TabIndex = 0; + this.tamingControl1.WeaponDamages = new double[] { + 100D, + 100D, + 100D, + 100D, + 100D, + 100D, + 100D}; + this.tamingControl1.WeaponDamagesEnabled = 3; + // // tabPageBreedingPlan // this.tabPageBreedingPlan.Controls.Add(this.breedingPlan1); @@ -2894,6 +3206,17 @@ private void InitializeComponent() this.tabPageBreedingPlan.Text = "Breeding Plan"; this.tabPageBreedingPlan.UseVisualStyleBackColor = true; // + // breedingPlan1 + // + this.breedingPlan1.AutoScroll = true; + this.breedingPlan1.CurrentSpecies = null; + this.breedingPlan1.Dock = System.Windows.Forms.DockStyle.Fill; + this.breedingPlan1.Location = new System.Drawing.Point(3, 3); + this.breedingPlan1.MutationLimit = 0; + this.breedingPlan1.Name = "breedingPlan1"; + this.breedingPlan1.Size = new System.Drawing.Size(1864, 778); + this.breedingPlan1.TabIndex = 0; + // // tabPageHatching // this.tabPageHatching.Controls.Add(this.hatching1); @@ -2905,6 +3228,14 @@ private void InitializeComponent() this.tabPageHatching.Text = "Hatching"; this.tabPageHatching.UseVisualStyleBackColor = true; // + // hatching1 + // + this.hatching1.Dock = System.Windows.Forms.DockStyle.Fill; + this.hatching1.Location = new System.Drawing.Point(3, 3); + this.hatching1.Name = "hatching1"; + this.hatching1.Size = new System.Drawing.Size(1864, 778); + this.hatching1.TabIndex = 0; + // // tabPageRaising // this.tabPageRaising.Controls.Add(this.raisingControl1); @@ -2916,6 +3247,15 @@ private void InitializeComponent() this.tabPageRaising.Text = "Raising"; this.tabPageRaising.UseVisualStyleBackColor = true; // + // raisingControl1 + // + this.raisingControl1.AutoScroll = true; + this.raisingControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.raisingControl1.Location = new System.Drawing.Point(3, 3); + this.raisingControl1.Name = "raisingControl1"; + this.raisingControl1.Size = new System.Drawing.Size(1864, 778); + this.raisingControl1.TabIndex = 0; + // // tabPageTimer // this.tabPageTimer.Controls.Add(this.timerList1); @@ -2927,6 +3267,15 @@ private void InitializeComponent() this.tabPageTimer.Text = "Timer"; this.tabPageTimer.UseVisualStyleBackColor = true; // + // timerList1 + // + this.timerList1.Dock = System.Windows.Forms.DockStyle.Fill; + this.timerList1.Location = new System.Drawing.Point(3, 3); + this.timerList1.Name = "timerList1"; + this.timerList1.Size = new System.Drawing.Size(1864, 778); + this.timerList1.TabIndex = 0; + this.timerList1.TimerAlertsCSV = ""; + // // tabPagePlayerTribes // this.tabPagePlayerTribes.Controls.Add(this.tribesControl1); @@ -2938,6 +3287,14 @@ private void InitializeComponent() this.tabPagePlayerTribes.Text = "Player"; this.tabPagePlayerTribes.UseVisualStyleBackColor = true; // + // tribesControl1 + // + this.tribesControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tribesControl1.Location = new System.Drawing.Point(3, 3); + this.tribesControl1.Name = "tribesControl1"; + this.tribesControl1.Size = new System.Drawing.Size(1864, 778); + this.tribesControl1.TabIndex = 0; + // // tabPageNotes // this.tabPageNotes.Controls.Add(this.notesControl1); @@ -2949,6 +3306,14 @@ private void InitializeComponent() this.tabPageNotes.Text = "Notes"; this.tabPageNotes.UseVisualStyleBackColor = true; // + // notesControl1 + // + this.notesControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.notesControl1.Location = new System.Drawing.Point(3, 3); + this.notesControl1.Name = "notesControl1"; + this.notesControl1.Size = new System.Drawing.Size(1864, 778); + this.notesControl1.TabIndex = 0; + // // TabPageOCR // this.TabPageOCR.Controls.Add(this.ocrControl1); @@ -2960,6 +3325,14 @@ private void InitializeComponent() this.TabPageOCR.Text = "Experimental OCR"; this.TabPageOCR.UseVisualStyleBackColor = true; // + // ocrControl1 + // + this.ocrControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.ocrControl1.Location = new System.Drawing.Point(3, 3); + this.ocrControl1.Name = "ocrControl1"; + this.ocrControl1.Size = new System.Drawing.Size(1864, 778); + this.ocrControl1.TabIndex = 2; + // // tabPageExtractionTests // this.tabPageExtractionTests.Controls.Add(this.extractionTestControl1); @@ -2971,6 +3344,14 @@ private void InitializeComponent() this.tabPageExtractionTests.Text = "Extraction Tests"; this.tabPageExtractionTests.UseVisualStyleBackColor = true; // + // extractionTestControl1 + // + this.extractionTestControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.extractionTestControl1.Location = new System.Drawing.Point(3, 3); + this.extractionTestControl1.Name = "extractionTestControl1"; + this.extractionTestControl1.Size = new System.Drawing.Size(1864, 778); + this.extractionTestControl1.TabIndex = 0; + // // tabPageMultiplierTesting // this.tabPageMultiplierTesting.Controls.Add(this.statsMultiplierTesting1); @@ -2982,6 +3363,15 @@ private void InitializeComponent() this.tabPageMultiplierTesting.Text = "Multiplier Testing"; this.tabPageMultiplierTesting.UseVisualStyleBackColor = true; // + // statsMultiplierTesting1 + // + this.statsMultiplierTesting1.AllowDrop = true; + this.statsMultiplierTesting1.Dock = System.Windows.Forms.DockStyle.Fill; + this.statsMultiplierTesting1.Location = new System.Drawing.Point(3, 3); + this.statsMultiplierTesting1.Name = "statsMultiplierTesting1"; + this.statsMultiplierTesting1.Size = new System.Drawing.Size(1864, 778); + this.statsMultiplierTesting1.TabIndex = 0; + // // TabPageStatOptions // this.TabPageStatOptions.Controls.Add(this.statsOptionsControl1); @@ -2993,6 +3383,14 @@ private void InitializeComponent() this.TabPageStatOptions.Text = "Stat Options"; this.TabPageStatOptions.UseVisualStyleBackColor = true; // + // statsOptionsControl1 + // + this.statsOptionsControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.statsOptionsControl1.Location = new System.Drawing.Point(3, 3); + this.statsOptionsControl1.Name = "statsOptionsControl1"; + this.statsOptionsControl1.Size = new System.Drawing.Size(1864, 778); + this.statsOptionsControl1.TabIndex = 0; + // // btReadValuesFromArk // this.btReadValuesFromArk.Location = new System.Drawing.Point(262, 3); @@ -3365,6 +3763,18 @@ private void InitializeComponent() this.pbSpecies.TabStop = false; this.pbSpecies.Click += new System.EventHandler(this.pbSpecies_Click); // + // tbSpeciesGlobal + // + this.tbSpeciesGlobal.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; + this.tbSpeciesGlobal.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; + this.tbSpeciesGlobal.Location = new System.Drawing.Point(104, 3); + this.tbSpeciesGlobal.Name = "tbSpeciesGlobal"; + this.tbSpeciesGlobal.Size = new System.Drawing.Size(152, 20); + this.tbSpeciesGlobal.TabIndex = 8; + this.tbSpeciesGlobal.Click += new System.EventHandler(this.tbSpeciesGlobal_Click); + this.tbSpeciesGlobal.Enter += new System.EventHandler(this.tbSpeciesGlobal_Enter); + this.tbSpeciesGlobal.KeyUp += new System.Windows.Forms.KeyEventHandler(this.TbSpeciesGlobal_KeyUp); + // // cbGuessSpecies // this.cbGuessSpecies.AutoSize = true; @@ -3477,414 +3887,22 @@ private void InitializeComponent() this.resetColumnOrderToolStripMenuItem.Text = "Reset column order"; this.resetColumnOrderToolStripMenuItem.Click += new System.EventHandler(this.resetColumnOrderToolStripMenuItem_Click); // - // statPotentials1 + // speciesSelector1 // - this.statPotentials1.Location = new System.Drawing.Point(860, 9); - this.statPotentials1.Name = "statPotentials1"; - this.statPotentials1.Size = new System.Drawing.Size(293, 433); - this.statPotentials1.TabIndex = 12; + this.speciesSelector1.Dock = System.Windows.Forms.DockStyle.Fill; + this.speciesSelector1.LastSpecies = new string[0]; + this.speciesSelector1.Location = new System.Drawing.Point(0, 103); + this.speciesSelector1.Name = "speciesSelector1"; + this.speciesSelector1.Size = new System.Drawing.Size(1878, 810); + this.speciesSelector1.SplitterDistance = 500; + this.speciesSelector1.TabIndex = 0; // - // radarChart1 + // commandMutationLevelsToolStripMenuItem // - this.radarChart1.Image = ((System.Drawing.Image)(resources.GetObject("radarChart1.Image"))); - this.radarChart1.Location = new System.Drawing.Point(6, 19); - this.radarChart1.Name = "radarChart1"; - this.radarChart1.Size = new System.Drawing.Size(200, 200); - this.radarChart1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.radarChart1.TabIndex = 10; - this.radarChart1.TabStop = false; - // - // numericUpDownImprintingBonusTester - // - this.numericUpDownImprintingBonusTester.DecimalPlaces = 5; - this.numericUpDownImprintingBonusTester.Enabled = false; - this.numericUpDownImprintingBonusTester.ForeColor = System.Drawing.SystemColors.GrayText; - this.numericUpDownImprintingBonusTester.Location = new System.Drawing.Point(6, 45); - this.numericUpDownImprintingBonusTester.Maximum = new decimal(new int[] { - 1000, - 0, - 0, - 0}); - this.numericUpDownImprintingBonusTester.Name = "numericUpDownImprintingBonusTester"; - this.numericUpDownImprintingBonusTester.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownImprintingBonusTester.Size = new System.Drawing.Size(75, 20); - this.numericUpDownImprintingBonusTester.TabIndex = 4; - this.numericUpDownImprintingBonusTester.ValueChanged += new System.EventHandler(this.numericUpDownImprintingBonusTester_ValueChanged); - // - // NumericUpDownTestingTE - // - this.NumericUpDownTestingTE.DecimalPlaces = 2; - this.NumericUpDownTestingTE.ForeColor = System.Drawing.SystemColors.WindowText; - this.NumericUpDownTestingTE.Location = new System.Drawing.Point(6, 19); - this.NumericUpDownTestingTE.Minimum = new decimal(new int[] { - 1, - 0, - 0, - -2147483648}); - this.NumericUpDownTestingTE.Name = "NumericUpDownTestingTE"; - this.NumericUpDownTestingTE.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.NumericUpDownTestingTE.Size = new System.Drawing.Size(60, 20); - this.NumericUpDownTestingTE.TabIndex = 0; - this.NumericUpDownTestingTE.Value = new decimal(new int[] { - 80, - 0, - 0, - 0}); - this.NumericUpDownTestingTE.ValueChanged += new System.EventHandler(this.NumericUpDownTestingTE_ValueChanged); - // - // creatureInfoInputTester - // - this.creatureInfoInputTester.AlreadyExistingCreature = null; - this.creatureInfoInputTester.ColorIdsAlsoPossible = null; - this.creatureInfoInputTester.CooldownUntil = null; - this.creatureInfoInputTester.CreatureFlags = ARKBreedingStats.Library.CreatureFlags.None; - this.creatureInfoInputTester.CreatureName = ""; - this.creatureInfoInputTester.CreatureNote = ""; - this.creatureInfoInputTester.CreatureOwner = ""; - this.creatureInfoInputTester.CreatureServer = ""; - this.creatureInfoInputTester.CreatureSex = ARKBreedingStats.Library.Sex.Unknown; - this.creatureInfoInputTester.CreatureStatus = ARKBreedingStats.Library.CreatureStatus.Available; - this.creatureInfoInputTester.CreatureTribe = ""; - this.creatureInfoInputTester.DomesticatedAt = new System.DateTime(2014, 12, 31, 0, 0, 0, 0); - this.creatureInfoInputTester.Father = null; - this.creatureInfoInputTester.GrowingUntil = null; - this.creatureInfoInputTester.Location = new System.Drawing.Point(373, 184); - this.creatureInfoInputTester.LockServer = false; - this.creatureInfoInputTester.Mother = null; - this.creatureInfoInputTester.MutationCounterFather = 0; - this.creatureInfoInputTester.MutationCounterMother = 0; - this.creatureInfoInputTester.Name = "creatureInfoInputTester"; - this.creatureInfoInputTester.OwnerLock = false; - this.creatureInfoInputTester.RegionColors = new byte[] { - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0))}; - this.creatureInfoInputTester.Size = new System.Drawing.Size(262, 590); - this.creatureInfoInputTester.TabIndex = 4; - this.creatureInfoInputTester.TribeLock = false; - this.creatureInfoInputTester.Add2LibraryClicked += new System.Action(this.creatureInfoInputTester_Add2Library_Clicked); - this.creatureInfoInputTester.Save2LibraryClicked += new System.Action(this.creatureInfoInputTester_Save2Library_Clicked); - this.creatureInfoInputTester.ParentListRequested += new System.Action(this.CreatureInfoInput_ParentListRequested); - // - // radarChartExtractor - // - this.radarChartExtractor.Dock = System.Windows.Forms.DockStyle.Fill; - this.radarChartExtractor.Image = ((System.Drawing.Image)(resources.GetObject("radarChartExtractor.Image"))); - this.radarChartExtractor.Location = new System.Drawing.Point(3, 16); - this.radarChartExtractor.Name = "radarChartExtractor"; - this.radarChartExtractor.Size = new System.Drawing.Size(144, 144); - this.radarChartExtractor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; - this.radarChartExtractor.TabIndex = 10; - this.radarChartExtractor.TabStop = false; - // - // numericUpDownImprintingBonusExtractor - // - this.numericUpDownImprintingBonusExtractor.DecimalPlaces = 5; - this.numericUpDownImprintingBonusExtractor.ForeColor = System.Drawing.SystemColors.GrayText; - this.numericUpDownImprintingBonusExtractor.Location = new System.Drawing.Point(3, 3); - this.numericUpDownImprintingBonusExtractor.Maximum = new decimal(new int[] { - 1000, - 0, - 0, - 0}); - this.numericUpDownImprintingBonusExtractor.Name = "numericUpDownImprintingBonusExtractor"; - this.numericUpDownImprintingBonusExtractor.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownImprintingBonusExtractor.Size = new System.Drawing.Size(77, 20); - this.numericUpDownImprintingBonusExtractor.TabIndex = 6; - this.numericUpDownImprintingBonusExtractor.ValueChanged += new System.EventHandler(this.numericUpDownImprintingBonusExtractor_ValueChanged); - this.numericUpDownImprintingBonusExtractor.Enter += new System.EventHandler(this.numericUpDown_Enter); - // - // numericUpDownUpperTEffBound - // - this.numericUpDownUpperTEffBound.ForeColor = System.Drawing.SystemColors.WindowText; - this.numericUpDownUpperTEffBound.Location = new System.Drawing.Point(147, 3); - this.numericUpDownUpperTEffBound.Name = "numericUpDownUpperTEffBound"; - this.numericUpDownUpperTEffBound.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownUpperTEffBound.Size = new System.Drawing.Size(45, 20); - this.numericUpDownUpperTEffBound.TabIndex = 3; - this.numericUpDownUpperTEffBound.Value = new decimal(new int[] { - 100, - 0, - 0, - 0}); - this.numericUpDownUpperTEffBound.Enter += new System.EventHandler(this.numericUpDown_Enter); - // - // numericUpDownLowerTEffBound - // - this.numericUpDownLowerTEffBound.ForeColor = System.Drawing.SystemColors.WindowText; - this.numericUpDownLowerTEffBound.Location = new System.Drawing.Point(80, 3); - this.numericUpDownLowerTEffBound.Name = "numericUpDownLowerTEffBound"; - this.numericUpDownLowerTEffBound.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownLowerTEffBound.Size = new System.Drawing.Size(45, 20); - this.numericUpDownLowerTEffBound.TabIndex = 1; - this.numericUpDownLowerTEffBound.Value = new decimal(new int[] { - 80, - 0, - 0, - 0}); - this.numericUpDownLowerTEffBound.Enter += new System.EventHandler(this.numericUpDown_Enter); - // - // creatureAnalysis1 - // - this.creatureAnalysis1.Location = new System.Drawing.Point(903, 265); - this.creatureAnalysis1.Name = "creatureAnalysis1"; - this.creatureAnalysis1.Size = new System.Drawing.Size(346, 199); - this.creatureAnalysis1.TabIndex = 55; - // - // parentInheritanceExtractor - // - this.parentInheritanceExtractor.Location = new System.Drawing.Point(903, 470); - this.parentInheritanceExtractor.Name = "parentInheritanceExtractor"; - this.parentInheritanceExtractor.Size = new System.Drawing.Size(337, 182); - this.parentInheritanceExtractor.TabIndex = 52; - // - // numericUpDownLevel - // - this.numericUpDownLevel.ForeColor = System.Drawing.SystemColors.WindowText; - this.numericUpDownLevel.Location = new System.Drawing.Point(244, 9); - this.numericUpDownLevel.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.numericUpDownLevel.Name = "numericUpDownLevel"; - this.numericUpDownLevel.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownLevel.Size = new System.Drawing.Size(56, 20); - this.numericUpDownLevel.TabIndex = 2; - this.numericUpDownLevel.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numericUpDownLevel.Enter += new System.EventHandler(this.numericUpDown_Enter); - // - // creatureInfoInputExtractor - // - this.creatureInfoInputExtractor.AlreadyExistingCreature = null; - this.creatureInfoInputExtractor.ColorIdsAlsoPossible = null; - this.creatureInfoInputExtractor.CooldownUntil = null; - this.creatureInfoInputExtractor.CreatureFlags = ARKBreedingStats.Library.CreatureFlags.None; - this.creatureInfoInputExtractor.CreatureName = ""; - this.creatureInfoInputExtractor.CreatureNote = ""; - this.creatureInfoInputExtractor.CreatureOwner = ""; - this.creatureInfoInputExtractor.CreatureServer = ""; - this.creatureInfoInputExtractor.CreatureSex = ARKBreedingStats.Library.Sex.Unknown; - this.creatureInfoInputExtractor.CreatureStatus = ARKBreedingStats.Library.CreatureStatus.Available; - this.creatureInfoInputExtractor.CreatureTribe = ""; - this.creatureInfoInputExtractor.DomesticatedAt = new System.DateTime(2014, 12, 31, 0, 0, 0, 0); - this.creatureInfoInputExtractor.Father = null; - this.creatureInfoInputExtractor.GrowingUntil = null; - this.creatureInfoInputExtractor.Location = new System.Drawing.Point(373, 184); - this.creatureInfoInputExtractor.LockServer = false; - this.creatureInfoInputExtractor.Mother = null; - this.creatureInfoInputExtractor.MutationCounterFather = 0; - this.creatureInfoInputExtractor.MutationCounterMother = 0; - this.creatureInfoInputExtractor.Name = "creatureInfoInputExtractor"; - this.creatureInfoInputExtractor.OwnerLock = false; - this.creatureInfoInputExtractor.RegionColors = new byte[] { - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0))}; - this.creatureInfoInputExtractor.Size = new System.Drawing.Size(262, 590); - this.creatureInfoInputExtractor.TabIndex = 7; - this.creatureInfoInputExtractor.TribeLock = false; - this.creatureInfoInputExtractor.Add2LibraryClicked += new System.Action(this.creatureInfoInputExtractor_Add2Library_Clicked); - this.creatureInfoInputExtractor.ParentListRequested += new System.Action(this.CreatureInfoInput_ParentListRequested); - // - // radarChartLibrary - // - this.radarChartLibrary.Dock = System.Windows.Forms.DockStyle.Top; - this.radarChartLibrary.Image = ((System.Drawing.Image)(resources.GetObject("radarChartLibrary.Image"))); - this.radarChartLibrary.Location = new System.Drawing.Point(3, 3); - this.radarChartLibrary.Name = "radarChartLibrary"; - this.radarChartLibrary.Size = new System.Drawing.Size(175, 287); - this.radarChartLibrary.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.radarChartLibrary.TabIndex = 0; - this.radarChartLibrary.TabStop = false; - // - // creatureBoxListView - // - this.creatureBoxListView.Location = new System.Drawing.Point(3, 3); - this.creatureBoxListView.Name = "creatureBoxListView"; - this.creatureBoxListView.Size = new System.Drawing.Size(189, 406); - this.creatureBoxListView.TabIndex = 0; - this.creatureBoxListView.Changed += new System.Action(this.UpdateDisplayedCreatureValues); - this.creatureBoxListView.GiveParents += new System.Action(this.CreatureBoxListView_FindParents); - this.creatureBoxListView.SelectCreature += new System.Action(this.SelectCreatureInLibrary); - // - // libraryInfoControl1 - // - this.libraryInfoControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.libraryInfoControl1.Location = new System.Drawing.Point(3, 39); - this.libraryInfoControl1.Name = "libraryInfoControl1"; - this.libraryInfoControl1.Size = new System.Drawing.Size(1858, 736); - this.libraryInfoControl1.TabIndex = 3; - // - // pedigree1 - // - this.pedigree1.AutoScroll = true; - this.pedigree1.Dock = System.Windows.Forms.DockStyle.Fill; - this.pedigree1.LeftColumnWidth = 203; - this.pedigree1.Location = new System.Drawing.Point(3, 3); - this.pedigree1.Name = "pedigree1"; - this.pedigree1.Size = new System.Drawing.Size(1864, 778); - this.pedigree1.TabIndex = 0; - // - // tamingControl1 - // - this.tamingControl1.AutoScroll = true; - this.tamingControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tamingControl1.Location = new System.Drawing.Point(3, 3); - this.tamingControl1.Name = "tamingControl1"; - this.tamingControl1.Size = new System.Drawing.Size(1864, 778); - this.tamingControl1.TabIndex = 0; - this.tamingControl1.WeaponDamages = new double[] { - 100D, - 100D, - 100D, - 100D, - 100D, - 100D, - 100D}; - this.tamingControl1.WeaponDamagesEnabled = 3; - // - // breedingPlan1 - // - this.breedingPlan1.AutoScroll = true; - this.breedingPlan1.CurrentSpecies = null; - this.breedingPlan1.Dock = System.Windows.Forms.DockStyle.Fill; - this.breedingPlan1.Location = new System.Drawing.Point(3, 3); - this.breedingPlan1.MutationLimit = 0; - this.breedingPlan1.Name = "breedingPlan1"; - this.breedingPlan1.Size = new System.Drawing.Size(1864, 778); - this.breedingPlan1.TabIndex = 0; - // - // hatching1 - // - this.hatching1.Dock = System.Windows.Forms.DockStyle.Fill; - this.hatching1.Location = new System.Drawing.Point(3, 3); - this.hatching1.Name = "hatching1"; - this.hatching1.Size = new System.Drawing.Size(1864, 778); - this.hatching1.TabIndex = 0; - // - // raisingControl1 - // - this.raisingControl1.AutoScroll = true; - this.raisingControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.raisingControl1.Location = new System.Drawing.Point(3, 3); - this.raisingControl1.Name = "raisingControl1"; - this.raisingControl1.Size = new System.Drawing.Size(1864, 778); - this.raisingControl1.TabIndex = 0; - // - // timerList1 - // - this.timerList1.Dock = System.Windows.Forms.DockStyle.Fill; - this.timerList1.Location = new System.Drawing.Point(3, 3); - this.timerList1.Name = "timerList1"; - this.timerList1.Size = new System.Drawing.Size(1864, 778); - this.timerList1.TabIndex = 0; - this.timerList1.TimerAlertsCSV = ""; - // - // tribesControl1 - // - this.tribesControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tribesControl1.Location = new System.Drawing.Point(3, 3); - this.tribesControl1.Name = "tribesControl1"; - this.tribesControl1.Size = new System.Drawing.Size(1864, 778); - this.tribesControl1.TabIndex = 0; - // - // notesControl1 - // - this.notesControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.notesControl1.Location = new System.Drawing.Point(3, 3); - this.notesControl1.Name = "notesControl1"; - this.notesControl1.Size = new System.Drawing.Size(1864, 778); - this.notesControl1.TabIndex = 0; - // - // ocrControl1 - // - this.ocrControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.ocrControl1.Location = new System.Drawing.Point(3, 3); - this.ocrControl1.Name = "ocrControl1"; - this.ocrControl1.Size = new System.Drawing.Size(1864, 778); - this.ocrControl1.TabIndex = 2; - // - // extractionTestControl1 - // - this.extractionTestControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.extractionTestControl1.Location = new System.Drawing.Point(3, 3); - this.extractionTestControl1.Name = "extractionTestControl1"; - this.extractionTestControl1.Size = new System.Drawing.Size(1864, 778); - this.extractionTestControl1.TabIndex = 0; - // - // statsMultiplierTesting1 - // - this.statsMultiplierTesting1.AllowDrop = true; - this.statsMultiplierTesting1.Dock = System.Windows.Forms.DockStyle.Fill; - this.statsMultiplierTesting1.Location = new System.Drawing.Point(3, 3); - this.statsMultiplierTesting1.Name = "statsMultiplierTesting1"; - this.statsMultiplierTesting1.Size = new System.Drawing.Size(1864, 778); - this.statsMultiplierTesting1.TabIndex = 0; - // - // statsOptionsControl1 - // - this.statsOptionsControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.statsOptionsControl1.Location = new System.Drawing.Point(3, 3); - this.statsOptionsControl1.Name = "statsOptionsControl1"; - this.statsOptionsControl1.Size = new System.Drawing.Size(1864, 778); - this.statsOptionsControl1.TabIndex = 0; - // - // speciesSelector1 - // - this.speciesSelector1.Dock = System.Windows.Forms.DockStyle.Fill; - this.speciesSelector1.LastSpecies = new string[0]; - this.speciesSelector1.Location = new System.Drawing.Point(0, 103); - this.speciesSelector1.Name = "speciesSelector1"; - this.speciesSelector1.Size = new System.Drawing.Size(1878, 810); - this.speciesSelector1.SplitterDistance = 500; - this.speciesSelector1.TabIndex = 0; - // - // tbSpeciesGlobal - // - this.tbSpeciesGlobal.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.tbSpeciesGlobal.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.tbSpeciesGlobal.Location = new System.Drawing.Point(104, 3); - this.tbSpeciesGlobal.Name = "tbSpeciesGlobal"; - this.tbSpeciesGlobal.Size = new System.Drawing.Size(152, 20); - this.tbSpeciesGlobal.TabIndex = 8; - this.tbSpeciesGlobal.Click += new System.EventHandler(this.tbSpeciesGlobal_Click); - this.tbSpeciesGlobal.Enter += new System.EventHandler(this.tbSpeciesGlobal_Enter); - this.tbSpeciesGlobal.KeyUp += new System.Windows.Forms.KeyEventHandler(this.TbSpeciesGlobal_KeyUp); + this.commandMutationLevelsToolStripMenuItem.Name = "commandMutationLevelsToolStripMenuItem"; + this.commandMutationLevelsToolStripMenuItem.Size = new System.Drawing.Size(215, 22); + this.commandMutationLevelsToolStripMenuItem.Text = "Command mutation levels"; + this.commandMutationLevelsToolStripMenuItem.Click += new System.EventHandler(this.commandMutationLevelsToolStripMenuItem_Click); // // Form1 // @@ -3913,12 +3931,17 @@ private void InitializeComponent() this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyUp); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).EndInit(); this.groupBoxPossibilities.ResumeLayout(false); this.groupBoxDetailsExtractor.ResumeLayout(false); this.panelExtrImpr.ResumeLayout(false); this.panelExtrImpr.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusExtractor)).EndInit(); this.panelExtrTE.ResumeLayout(false); this.panelExtrTE.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownUpperTEffBound)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffBound)).EndInit(); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); this.panelSums.ResumeLayout(false); @@ -3930,6 +3953,7 @@ private void InitializeComponent() this.tabPageStatTesting.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxColorRegionsTester)).EndInit(); this.gbStatChart.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).EndInit(); this.panelWildTamedBredTester.ResumeLayout(false); this.panelWildTamedBredTester.PerformLayout(); this.groupBox2.ResumeLayout(false); @@ -3944,11 +3968,13 @@ private void InitializeComponent() this.tabPageExtractor.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.PbCreatureColorsExtractor)).EndInit(); this.groupBoxRadarChartExtractor.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).EndInit(); this.groupBoxTamingInfo.ResumeLayout(false); this.gbStatsExtractor.ResumeLayout(false); this.flowLayoutPanelStatIOsExtractor.ResumeLayout(false); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLevel)).EndInit(); this.tabPageLibrary.ResumeLayout(false); this.tableLayoutPanelLibrary.ResumeLayout(false); this.contextMenuStripLibrary.ResumeLayout(false); @@ -3959,6 +3985,7 @@ private void InitializeComponent() this.tableLayoutPanel2.ResumeLayout(false); this.tableLayoutPanel2.PerformLayout(); this.tabPageLibRadarChart.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).EndInit(); this.tabPageLibraryInfo.ResumeLayout(false); this.tlpLibraryInfo.ResumeLayout(false); this.tableLayoutPanel3.ResumeLayout(false); @@ -3983,15 +4010,6 @@ private void InitializeComponent() this.panelToolBar.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbSpecies)).EndInit(); this.contextMenuStripLibraryHeader.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusExtractor)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownUpperTEffBound)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffBound)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLevel)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -4358,5 +4376,7 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem showTokenPopupOnListeningToolStripMenuItem; private System.Windows.Forms.TabPage TabPageStatOptions; private uiControls.StatsOptionsControl statsOptionsControl1; + private System.Windows.Forms.ToolStripMenuItem adminCommandSetMutationLevelsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem commandMutationLevelsToolStripMenuItem; } } diff --git a/ARKBreedingStats/Form1.library.cs b/ARKBreedingStats/Form1.library.cs index 0e04103c..0e182e39 100644 --- a/ARKBreedingStats/Form1.library.cs +++ b/ARKBreedingStats/Form1.library.cs @@ -2023,6 +2023,18 @@ private void adminCommandToSpawnExactDinoDS2ToolStripMenuItem_Click(object sende CreateExactSpawnDS2Command(_creaturesDisplayed[listViewLibrary.SelectedIndices[0]]); } + private void adminCommandSetMutationLevelsToolStripMenuItem_Click(object sender, EventArgs e) + { + if (listViewLibrary.SelectedIndices.Count > 0) + CreateExactMutationLevelCommand(_creaturesDisplayed[listViewLibrary.SelectedIndices[0]]); + } + + private void commandMutationLevelsToolStripMenuItem_Click(object sender, EventArgs e) + { + if (listViewLibrary.SelectedIndices.Count > 0) + CreateExactMutationLevelCommand(_creaturesDisplayed[listViewLibrary.SelectedIndices[0]]); + } + private void exactSpawnCommandToolStripMenuItem_Click(object sender, EventArgs e) { Creature cr = null; @@ -2059,6 +2071,12 @@ private void CreateExactSpawnDS2Command(Creature cr) , MessageBoxIcon.Warning); } + private void CreateExactMutationLevelCommand(Creature cr) + { + CreatureSpawnCommand.MutationLevelCommandToClipboard(cr); + SetMessageLabelText($"The admin console command for adding the mutation levels to the creature {cr.name} ({cr.Species?.name}) was copied to the clipboard."); + } + #endregion #region LibraryFilterPresets diff --git a/ARKBreedingStats/library/CreatureSpawnCommand.cs b/ARKBreedingStats/library/CreatureSpawnCommand.cs index b00a0023..e78a66a2 100644 --- a/ARKBreedingStats/library/CreatureSpawnCommand.cs +++ b/ARKBreedingStats/library/CreatureSpawnCommand.cs @@ -1,8 +1,6 @@ -using System; -using System.Linq; +using System.Linq; using System.Windows.Forms; using ARKBreedingStats.Library; -using ARKBreedingStats.species; namespace ARKBreedingStats.library { @@ -11,6 +9,10 @@ namespace ARKBreedingStats.library /// public static class CreatureSpawnCommand { + public static string CheatPrefix => Properties.Settings.Default.AdminConsoleCommandWithCheat + ? "cheat " + : string.Empty; + /// /// Creates a spawn command that works in the vanilla game, but that command can cause the game to crash if the result of this method is changed. Also the stat values and colors are only correct after cryoing the creature. /// @@ -25,12 +27,7 @@ public static void InstableCommandToClipboard(Creature cr) + $"0 {(cr.flags.HasFlag(CreatureFlags.Neutered) ? "1" : "0")} \"\" \"\" \"{cr.imprinterName}\" 0 {cr.imprintingBonus} " + $"\"{(cr.colors == null ? string.Empty : string.Join(",", cr.colors))}\" {arkIdInGame} {xp} 0 20 20"; - - - var cheatPrefix = Properties.Settings.Default.AdminConsoleCommandWithCheat - ? "cheat " - : string.Empty; - Clipboard.SetText(cheatPrefix + spawnCommand); + Clipboard.SetText(CheatPrefix + spawnCommand); } private static string GetLevelStringForExactSpawningCommand(int[] levels) @@ -54,7 +51,7 @@ private static string GetLevelStringForExactSpawningCommandDS2(int[] wildlvl, in } /// - /// Creates a spawn command that works in the vanilla game, but that command can cause the game to crash if the result of this method is changed. Also the stat values and colors are only correct after cryoing the creature. + /// Creates a spawn command that needs the mod DinoStorageV2. /// public static void DinoStorageV2CommandToClipboard(Creature cr) { @@ -64,7 +61,21 @@ public static void DinoStorageV2CommandToClipboard(Creature cr) + GetLevelStringForExactSpawningCommandDS2(cr.levelsWild, cr.levelsDom) + $"{(cr.colors == null ? "0 0 0 0 0 0" : string.Join(" ", cr.colors))}"; - Clipboard.SetText(spawnCommand); + Clipboard.SetText(CheatPrefix + spawnCommand); + } + + /// + /// Creates a console command that will add the mutation levels of the creature. + /// + public static void MutationLevelCommandToClipboard(Creature cr) + { + string command; + if (cr?.levelsMutated?.Any(l => l > 0) != true) + command = string.Empty; + else + command = $"{CheatPrefix}{string.Join("|", cr.levelsMutated.Select((l, i) => (l, i)).Where(li => li.l > 0).Select(li => $"addmutations {li.i} {li.l}"))}"; + + Clipboard.SetText(command); } } } From 3d70670a81b60f1416d9f3de5e051628a22736ed Mon Sep 17 00:00:00 2001 From: cadon Date: Thu, 20 Jun 2024 21:05:36 +0200 Subject: [PATCH 21/36] better info feedbach if no top stats creatures can be combined in combine breeding mode --- ARKBreedingStats/BreedingPlanning/BreedingPlan.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs b/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs index 9d4c9a18..20f291be 100644 --- a/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs +++ b/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs @@ -289,6 +289,7 @@ private void DoCalculateBreedingScoresAndDisplayPairs() bool considerMutationLimit = nudBPMutationLimit.Value >= 0; bool creaturesMutationsFilteredOut = false; + bool noCreaturesWithTopStatsInBothSexes = false; // only consider creatures with top stats if breeding for that Creature[] females, males; @@ -301,6 +302,7 @@ private void DoCalculateBreedingScoresAndDisplayPairs() { females = _females.Where(c => c.topStatsCountBP > 0).ToArray(); males = _males?.Where(c => c.topStatsCountBP > 0).ToArray(); + noCreaturesWithTopStatsInBothSexes = !females.Any() || (males?.Any() != true && !_currentSpecies.noGender); } // filter by tags @@ -399,7 +401,7 @@ private void DoCalculateBreedingScoresAndDisplayPairs() if (!selectedFemales.Any() || !selectedMales.Any()) { - NoPossiblePairingsFound(creaturesMutationsFilteredOut); + NoPossiblePairingsFound(creaturesMutationsFilteredOut, noCreaturesWithTopStatsInBothSexes); } else { @@ -603,7 +605,7 @@ private void DoCalculateBreedingScoresAndDisplayPairs() /// /// Hide unused controls and display info. /// - private void NoPossiblePairingsFound(bool creaturesMutationsFilteredOut) + private void NoPossiblePairingsFound(bool creaturesMutationsFilteredOut, bool noCreaturesWithTopStatsInBothSexes) { // hide unused controls pedigreeCreature1.Hide(); @@ -615,7 +617,13 @@ private void NoPossiblePairingsFound(bool creaturesMutationsFilteredOut) _pcs[2 * i + 1].Hide(); _pbs[i].Hide(); } - lbBreedingPlanInfo.Text = string.Format(Loc.S("NoPossiblePairingForSpeciesFound"), _currentSpecies); + lbBreedingPlanInfo.Text = (noCreaturesWithTopStatsInBothSexes + ? "The breeding mode is set to combine top stats, but currently there are no pair where top stats can be combined." + + Environment.NewLine + $"You can change the breeding mode to {Loc.S("rbBPHighStats")}" + + Environment.NewLine + Environment.NewLine + : string.Empty) + + string.Format(Loc.S("NoPossiblePairingForSpeciesFound"), _currentSpecies) + ; lbBreedingPlanInfo.Visible = true; if (!cbBPIncludeCryoCreatures.Checked && CreatureCollection.creatures.Any(c From 663812222329db643f5912c38d00157ace24e43c Mon Sep 17 00:00:00 2001 From: cadon Date: Fri, 21 Jun 2024 22:01:20 +0200 Subject: [PATCH 22/36] wording --- .../BreedingPlanning/BreedingPlan.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs b/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs index 20f291be..81feaffc 100644 --- a/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs +++ b/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs @@ -617,13 +617,18 @@ private void NoPossiblePairingsFound(bool creaturesMutationsFilteredOut, bool no _pcs[2 * i + 1].Hide(); _pbs[i].Hide(); } - lbBreedingPlanInfo.Text = (noCreaturesWithTopStatsInBothSexes - ? "The breeding mode is set to combine top stats, but currently there are no pair where top stats can be combined." - + Environment.NewLine + $"You can change the breeding mode to {Loc.S("rbBPHighStats")}" - + Environment.NewLine + Environment.NewLine - : string.Empty) - + string.Format(Loc.S("NoPossiblePairingForSpeciesFound"), _currentSpecies) - ; + + if (noCreaturesWithTopStatsInBothSexes) + { + lbBreedingPlanInfo.Text = $"The breeding mode is set to {Loc.S("rbBPTopStatsCn")}, but currently there is no pair where top stats can be combined." + + Environment.NewLine + $"You can change the breeding mode to {Loc.S("rbBPHighStats")} to get the best recommendations in this situation." + + Environment.NewLine + Environment.NewLine + + string.Format(Loc.S("NoPossiblePairingForSpeciesFound"), _currentSpecies); + } + else + { + lbBreedingPlanInfo.Text = string.Format(Loc.S("NoPossiblePairingForSpeciesFound"), _currentSpecies); + } lbBreedingPlanInfo.Visible = true; if (!cbBPIncludeCryoCreatures.Checked && CreatureCollection.creatures.Any(c From bc44006a7339304841d899b987808784f6c26d23 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 23 Jun 2024 11:49:52 +0200 Subject: [PATCH 23/36] more info when ftp download throws exception --- ARKBreedingStats/ARKBreedingStats.csproj | 1 + ARKBreedingStats/Form1.importSave.cs | 19 ++++++++++------- ARKBreedingStats/utils/ExceptionMessages.cs | 23 +++++++++++++++++++++ ARKBreedingStats/utils/MessageBoxes.cs | 15 ++------------ 4 files changed, 38 insertions(+), 20 deletions(-) create mode 100644 ARKBreedingStats/utils/ExceptionMessages.cs diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj index 81a551d1..0d6534f4 100644 --- a/ARKBreedingStats/ARKBreedingStats.csproj +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -693,6 +693,7 @@ + diff --git a/ARKBreedingStats/Form1.importSave.cs b/ARKBreedingStats/Form1.importSave.cs index d3d5b8cb..c038f2c8 100644 --- a/ARKBreedingStats/Form1.importSave.cs +++ b/ARKBreedingStats/Form1.importSave.cs @@ -238,7 +238,7 @@ private async Task RunSavegameImport(string fileLocation, string conveni await GetLastModifiedFileAsync(client, ftpUri, fileRegex, cancellationTokenSource.Token); if (mostRecentlyModifiedMatch == null) { - throw new Exception($"No file found matching pattern '{fileRegex}'"); + throw new FileNotFoundException($"'{fileRegex}'"); } ftpPath = mostRecentlyModifiedMatch.FullName; @@ -266,22 +266,27 @@ private async Task RunSavegameImport(string fileLocation, string conveni } catch (FtpAuthenticationException ex) { - // if auth fails, clear credentials, alert the user and loop until the either auth succeeds or the user cancels + // if auth fails, clear credentials, alert the user and loop until either auth succeeds or the user cancels progressDialog.StatusText = $"Authentication failed: {ex.Message}"; credentials = null; await Task.Delay(1000); } catch (OperationCanceledException) { - client.Dispose(); + await client.DisposeAsync(); return (null, "aborted by user"); } + catch (FileNotFoundException ex) + { + await client.DisposeAsync(); + return (null, $"File not found using regex pattern {ex.Message}"); + } catch (Exception ex) { - var errorMessage = $"Unexpected error while downloading file\n{ftpPath}:\n{ex.Message}{(string.IsNullOrEmpty(ex.InnerException?.Message) ? null : "\n\nInner Exception:\n" + ex.InnerException?.Message)}"; + var errorMessage = $"Unexpected error while determining and downloading file\n{ftpPath}\n{ExceptionMessages.WithInner(ex)}"; if (progressDialog.IsDisposed) { - client.Dispose(); + await client.DisposeAsync(); return (null, errorMessage); } progressDialog.StatusText = errorMessage + "\n\nTrying again in some seconds."; @@ -289,14 +294,14 @@ private async Task RunSavegameImport(string fileLocation, string conveni } finally { - client.Dispose(); + await client.DisposeAsync(); } } } } /// - /// Loads the encrypted ftp crednetials from settings, decrypts them, then returns them as a hostname to credentials dictionary + /// Loads the encrypted ftp credentials from settings, decrypts them, then returns them as a hostname to credentials dictionary /// private static Dictionary LoadSavedCredentials() { diff --git a/ARKBreedingStats/utils/ExceptionMessages.cs b/ARKBreedingStats/utils/ExceptionMessages.cs new file mode 100644 index 00000000..2ec60a8f --- /dev/null +++ b/ARKBreedingStats/utils/ExceptionMessages.cs @@ -0,0 +1,23 @@ +using System; + +namespace ARKBreedingStats.utils +{ + /// + /// Displays exception message and its inner exceptions if existing. + /// + public static class ExceptionMessages + { + /// + /// Exception message with inner exceptions + /// + public static string WithInner(Exception ex) => + ex.Message + + "\n\n" + ex.GetType() + " in " + ex.Source + + "\n\nMethod throwing the error: " + ex.TargetSite.DeclaringType?.FullName + "." + + ex.TargetSite.Name + + "\n\nStackTrace:\n" + ex.StackTrace + + (ex.InnerException != null + ? "\n\nInner Exception:\n" + WithInner(ex.InnerException) + : string.Empty); + } +} diff --git a/ARKBreedingStats/utils/MessageBoxes.cs b/ARKBreedingStats/utils/MessageBoxes.cs index f4531c58..e34a75b1 100644 --- a/ARKBreedingStats/utils/MessageBoxes.cs +++ b/ARKBreedingStats/utils/MessageBoxes.cs @@ -39,18 +39,7 @@ internal static void ShowMessageBox(string message, string title = null, Message /// /// Displays an error message with info about the exception and the application name and version. /// - internal static void ExceptionMessageBox(Exception ex, string messageBeforeException = null, string title = null) - { - string message = ex.Message - + "\n\n" + ex.GetType() + " in " + ex.Source - + "\n\nMethod throwing the error: " + ex.TargetSite.DeclaringType?.FullName + "." + - ex.TargetSite.Name - + "\n\nStackTrace:\n" + ex.StackTrace - + (ex.InnerException != null - ? "\n\nInner Exception:\n" + ex.InnerException.Message - : string.Empty); - - ShowMessageBox((string.IsNullOrEmpty(messageBeforeException) ? string.Empty : messageBeforeException + "\n\n") + message, title, displayCopyMessageButton: true); - } + internal static void ExceptionMessageBox(Exception ex, string messageBeforeException = null, string title = null) => + ShowMessageBox((string.IsNullOrEmpty(messageBeforeException) ? string.Empty : messageBeforeException + "\n\n") + ExceptionMessages.WithInner(ex), title, displayCopyMessageButton: true); } } From a8cb138fd4dcf72f11e1b2b6c2b185894a52cf85 Mon Sep 17 00:00:00 2001 From: cadon Date: Tue, 25 Jun 2024 22:12:50 +0200 Subject: [PATCH 24/36] shadow with shape of creature, but perspective breaks it, so not enabled --- ARKBreedingStats/species/CreatureColored.cs | 109 +++++++++++++++----- 1 file changed, 82 insertions(+), 27 deletions(-) diff --git a/ARKBreedingStats/species/CreatureColored.cs b/ARKBreedingStats/species/CreatureColored.cs index 092d9c8f..e02d4803 100644 --- a/ARKBreedingStats/species/CreatureColored.cs +++ b/ARKBreedingStats/species/CreatureColored.cs @@ -5,8 +5,13 @@ using System.IO; using System.Linq; using System.Text; +using System.Windows.Media; +using System.Windows.Media.Effects; using ARKBreedingStats.Library; using ARKBreedingStats.utils; +using Color = System.Drawing.Color; +using Pen = System.Drawing.Pen; +using PixelFormat = System.Drawing.Imaging.PixelFormat; namespace ARKBreedingStats.species { @@ -42,7 +47,7 @@ private static string ColoredCreatureCacheFilePath(string speciesName, byte[] co => Path.Combine(_imgCacheFolderPath, speciesName.Substring(0, Math.Min(speciesName.Length, 5)) + "_" + Convert32.ToBase32String(colorIds.Select(ci => ci).Concat(Encoding.UTF8.GetBytes(speciesName)).ToArray()).Replace('/', '-') + (listView ? "_lv" : string.Empty) + Extension); /// - /// Checks if an according species image exists in the cache folder, if not it tries to creates one. Returns false if there's no image. + /// Checks if an according species image exists in the cache folder, if not it tries to create one. Returns false if there's no image. /// internal static (bool imageExists, string imagePath, string speciesListName) SpeciesImageExists(Species species, byte[] colorIds) { @@ -252,31 +257,12 @@ private static bool CreateAndSaveCacheSpeciesFile(byte[] colorIds, bool[] enable using (Bitmap bmpBaseImage = new Bitmap(speciesBaseImageFilePath)) using (Bitmap bmpColoredCreature = new Bitmap(bmpBaseImage.Width, bmpBaseImage.Height, PixelFormat.Format32bppArgb)) + using (Bitmap bmpShadow = new Bitmap(bmpBaseImage.Width, bmpBaseImage.Height, PixelFormat.Format32bppArgb)) using (Graphics graph = Graphics.FromImage(bmpColoredCreature)) { bool imageFine = true; graph.SmoothingMode = SmoothingMode.AntiAlias; - - //// ellipse background shadow - int scx = bmpBaseImage.Width / 2; - int scy = (int)(scx * 1.6); - const double perspectiveFactor = 0.3; - int yStart = scy - (int)(perspectiveFactor * .7 * scx); - int yEnd = (int)(2 * perspectiveFactor * scx); - GraphicsPath pathShadow = new GraphicsPath(); - pathShadow.AddEllipse(0, yStart, bmpBaseImage.Width, yEnd); - var colorBlend = new ColorBlend - { - Colors = new[] { Color.FromArgb(0), Color.FromArgb(40, 0, 0, 0), Color.FromArgb(80, 0, 0, 0) }, - Positions = new[] { 0, 0.6f, 1 } - }; - - using (var pthGrBrush = new PathGradientBrush(pathShadow) - { - InterpolationColors = colorBlend - }) - graph.FillEllipse(pthGrBrush, 0, yStart, bmpBaseImage.Width, yEnd); - // background shadow done + var rectangleShadow = Rectangle.Empty; // if species has color regions, apply colors if (File.Exists(speciesColorMaskFilePath)) @@ -292,11 +278,13 @@ private static bool CreateAndSaveCacheSpeciesFile(byte[] colorIds, bool[] enable rgb[c] = new[] { cl.R, cl.G, cl.B }; } } - imageFine = ApplyColorsUnsafe(rgb, useColorRegions, speciesColorMaskFilePath, bmpBaseImage); + imageFine = ApplyColorsUnsafe(rgb, useColorRegions, speciesColorMaskFilePath, bmpBaseImage, bmpShadow, out rectangleShadow); } if (imageFine) { + DrawShadowSimpleEllipse(graph, bmpShadow); + //DrawShadow(graph, bmpShadow, rectangleShadow); // draw species image on background graph.DrawImage(bmpBaseImage, 0, 0, bmpColoredCreature.Width, bmpColoredCreature.Height); @@ -324,6 +312,51 @@ private static bool CreateAndSaveCacheSpeciesFile(byte[] colorIds, bool[] enable return false; } + private static void DrawShadow(Graphics graph, Bitmap bmpShadow, Rectangle rectangleShadow) + { + graph.CompositingQuality = CompositingQuality.HighQuality; + graph.InterpolationMode = InterpolationMode.HighQualityBicubic; + graph.SmoothingMode = SmoothingMode.HighQuality; + graph.PixelOffsetMode = PixelOffsetMode.HighQuality; + + // destination points of: upper left, upper right, lower left + var upperLeft = new PointF(rectangleShadow.X + rectangleShadow.Width / 3f, rectangleShadow.Y + rectangleShadow.Height / 2f); + var desPoints = new[] + { + upperLeft, + new PointF(upperLeft.X+rectangleShadow.Width, upperLeft.Y), + new PointF(rectangleShadow.Left,rectangleShadow.Bottom) + }; + + // set opacity + var att = new ImageAttributes(); + att.SetColorMatrix(new ColorMatrix { Matrix33 = 0.2f }); + + graph.DrawImage(bmpShadow, desPoints, rectangleShadow, GraphicsUnit.Pixel, att); + } + + private static void DrawShadowSimpleEllipse(Graphics graph, Bitmap bmpBaseImage) + { + int scx = bmpBaseImage.Width / 2; + int scy = (int)(scx * 1.6); + const double perspectiveFactor = 0.3; + int yStart = scy - (int)(perspectiveFactor * .7 * scx); + int yEnd = (int)(2 * perspectiveFactor * scx); + GraphicsPath pathShadow = new GraphicsPath(); + pathShadow.AddEllipse(0, yStart, bmpBaseImage.Width, yEnd); + var colorBlend = new ColorBlend + { + Colors = new[] { Color.FromArgb(0), Color.FromArgb(40, 0, 0, 0), Color.FromArgb(80, 0, 0, 0) }, + Positions = new[] { 0, 0.6f, 1 } + }; + + using (var pthGrBrush = new PathGradientBrush(pathShadow) + { + InterpolationColors = colorBlend + }) + graph.FillEllipse(pthGrBrush, 0, yStart, bmpBaseImage.Width, yEnd); + } + private static bool SaveBitmapToFile(Bitmap bmp, string filePath) { try @@ -342,9 +375,13 @@ private static bool SaveBitmapToFile(Bitmap bmp, string filePath) /// /// Applies the colors to the base image. /// - private static bool ApplyColorsUnsafe(byte[][] rgb, bool[] enabledColorRegions, string speciesColorMaskFilePath, Bitmap bmpBaseImage) + private static bool ApplyColorsUnsafe(byte[][] rgb, bool[] enabledColorRegions, string speciesColorMaskFilePath, Bitmap bmpBaseImage, Bitmap bmpShadow, out Rectangle shadowRect) { var imageFine = false; + var shadowLeft = int.MaxValue; + var shadowRight = -1; + var shadowTop = int.MaxValue; + var shadowBottom = -1; using (Bitmap bmpMask = new Bitmap(bmpBaseImage.Width, bmpBaseImage.Height)) { // get mask in correct size @@ -362,22 +399,27 @@ private static bool ApplyColorsUnsafe(byte[][] rgb, bool[] enabledColorRegions, BitmapData bmpDataMask = bmpMask.LockBits( new Rectangle(0, 0, bmpMask.Width, bmpMask.Height), ImageLockMode.ReadOnly, bmpMask.PixelFormat); + BitmapData bmpDataShadow = bmpShadow.LockBits( + new Rectangle(0, 0, bmpShadow.Width, bmpShadow.Height), ImageLockMode.ReadOnly, + bmpShadow.PixelFormat); int bgBytes = bmpBaseImage.PixelFormat == PixelFormat.Format32bppArgb ? 4 : 3; int msBytes = bmpDataMask.PixelFormat == PixelFormat.Format32bppArgb ? 4 : 3; + int shdBytes = bmpShadow.PixelFormat == PixelFormat.Format32bppArgb ? 4 : 3; - float o = 0; try { unsafe { byte* scan0Bg = (byte*)bmpDataBaseImage.Scan0.ToPointer(); byte* scan0Ms = (byte*)bmpDataMask.Scan0.ToPointer(); + byte* scan0Sh = (byte*)bmpDataShadow.Scan0.ToPointer(); var width = bmpDataBaseImage.Width; var height = bmpDataBaseImage.Height; var strideBaseImage = bmpDataBaseImage.Stride; var strideMask = bmpDataMask.Stride; + var strideShadow = bmpDataShadow.Stride; for (int i = 0; i < width; i++) { @@ -388,6 +430,14 @@ private static bool ApplyColorsUnsafe(byte[][] rgb, bool[] enabledColorRegions, if (dBg[3] == 0) continue; + // set shadow alpha + var shadowPixelPt = scan0Sh + j * strideShadow + i * shdBytes; + shadowPixelPt[3] = dBg[3]; + if (i < shadowLeft) shadowLeft = i; + if (i > shadowRight) shadowRight = i; + if (j < shadowTop) shadowTop = j; + if (j > shadowBottom) shadowBottom = j; + byte* dMs = scan0Ms + j * strideMask + i * msBytes; int r = dMs[2]; @@ -401,6 +451,8 @@ private static bool ApplyColorsUnsafe(byte[][] rgb, bool[] enabledColorRegions, { if (!enabledColorRegions[m]) continue; + + float o; switch (m) { case 0: @@ -421,10 +473,11 @@ private static bool ApplyColorsUnsafe(byte[][] rgb, bool[] enabledColorRegions, case 5: o = Math.Min(r, b) / 255f; break; + default: continue; } - if (o == 0) - continue; + if (o == 0) continue; + // using "grain merge", e.g. see https://docs.gimp.org/en/gimp-concepts-layer-modes.html int rMix = finalR + rgb[m][0] - 128; if (rMix < 0) rMix = 0; @@ -457,7 +510,9 @@ private static bool ApplyColorsUnsafe(byte[][] rgb, bool[] enabledColorRegions, bmpBaseImage.UnlockBits(bmpDataBaseImage); bmpMask.UnlockBits(bmpDataMask); + bmpShadow.UnlockBits(bmpDataShadow); } + shadowRect = shadowLeft != -1 ? new Rectangle(shadowLeft, shadowTop, shadowRight - shadowLeft, shadowBottom - shadowTop) : Rectangle.Empty; return imageFine; } From 1d783b084b9a14cfbb18c3948455841630b2061e Mon Sep 17 00:00:00 2001 From: cadon Date: Tue, 25 Jun 2024 22:48:14 +0200 Subject: [PATCH 25/36] catch rare speech recognition grammar initialize exception (closes #1353) --- ARKBreedingStats/Form1.cs | 19 +++++-- ARKBreedingStats/SpeechRecognition.cs | 76 ++++++++++++--------------- 2 files changed, 47 insertions(+), 48 deletions(-) diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 35e18da9..d1af0c76 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -542,8 +542,8 @@ private void InitializeSpeechRecognition() if (_speechRecognition.Initialized) { speechRecognitionInitialized = true; - _speechRecognition.speechRecognized += TellTamingData; - _speechRecognition.speechCommandRecognized += SpeechCommand; + _speechRecognition.SpeechCreatureRecognized += TellTamingData; + _speechRecognition.SpeechCommandRecognized += SpeechCommand; lbListening.Visible = true; } else @@ -824,9 +824,18 @@ private void ApplySettingsToValues() statPotentials1.LevelDomMax = _creatureCollection.maxDomLevel; statPotentials1.LevelGraphMax = _creatureCollection.maxChartLevel; - _speechRecognition?.SetMaxLevelAndSpecies(_creatureCollection.maxWildLevel, - _creatureCollection.considerWildLevelSteps ? _creatureCollection.wildLevelStep : 1, - Values.V.speciesWithAliasesList); + try + { + _speechRecognition?.SetMaxLevelAndSpecies(_creatureCollection.maxWildLevel, + _creatureCollection.considerWildLevelSteps ? _creatureCollection.wildLevelStep : 1, + Values.V.speciesWithAliasesList); + } + catch (Exception ex) + { + // rarely GrammarBuilder System.Speech.Internal.SrgsParser.XmlParser raised System.FormatException: 'one-of' must contain at least one 'item' element occured + MessageBoxes.ExceptionMessageBox(ex); + } + if (_overlay != null) { _overlay.InfoDuration = Properties.Settings.Default.OverlayInfoDuration; diff --git a/ARKBreedingStats/SpeechRecognition.cs b/ARKBreedingStats/SpeechRecognition.cs index d8d680ad..f0ae8c58 100644 --- a/ARKBreedingStats/SpeechRecognition.cs +++ b/ARKBreedingStats/SpeechRecognition.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Speech.Recognition; using System.Text.RegularExpressions; -using System.Threading.Tasks; using System.Windows.Forms; using ARKBreedingStats.utils; @@ -13,16 +12,11 @@ namespace ARKBreedingStats { public class SpeechRecognition { - public delegate void SpeechRecognizedEventHandler(string species, int level); - - public SpeechRecognizedEventHandler speechRecognized; - - public delegate void SpeechCommandRecognizedEventHandler(Commands command); - - public SpeechCommandRecognizedEventHandler speechCommandRecognized; - private readonly SpeechRecognitionEngine recognizer; + public Action SpeechCreatureRecognized; + public Action SpeechCommandRecognized; + private readonly SpeechRecognitionEngine _recognizer; public readonly Label indicator; - private bool listening; + private bool _listening; private int _maxLevel; private int _levelStep; private int _aliasesCount; @@ -31,24 +25,22 @@ public class SpeechRecognition public SpeechRecognition(int maxLevel, int levelStep, List aliases, Label indicator) { Initialized = false; - if (aliases.Any()) + if (!aliases.Any()) return; + this.indicator = indicator; + _recognizer = new SpeechRecognitionEngine(); + SetMaxLevelAndSpecies(maxLevel, levelStep, aliases); + _recognizer.SpeechRecognized += Sre_SpeechRecognized; + try { - this.indicator = indicator; - recognizer = new SpeechRecognitionEngine(); - SetMaxLevelAndSpecies(maxLevel, levelStep, aliases); - recognizer.SpeechRecognized += Sre_SpeechRecognized; - try - { - recognizer.SetInputToDefaultAudioDevice(); - Initialized = true; - } - catch - { - MessageBoxes.ShowMessageBox("Couldn't set Audio-Input to default-audio device. The speech recognition will not work until a restart.\nTry to change the default-audio-input (e.g. plug-in a microphone).", - $"Microphone Error"); - } - recognizer.SpeechRecognitionRejected += Recognizer_SpeechRecognitionRejected; + _recognizer.SetInputToDefaultAudioDevice(); + Initialized = true; + } + catch + { + MessageBoxes.ShowMessageBox("Couldn't set Audio-Input to default-audio device. The speech recognition will not work until a restart.\nTry to change the default-audio-input (e.g. plug-in a microphone).", + $"Microphone Error"); } + _recognizer.SpeechRecognitionRejected += Recognizer_SpeechRecognitionRejected; } private void Recognizer_SpeechRecognitionRejected(object sender, SpeechRecognitionRejectedEventArgs e) @@ -68,7 +60,7 @@ private void Sre_SpeechRecognized(object sender, SpeechRecognizedEventArgs e) { string species = m.Groups[1].Value; if (int.TryParse(m.Groups[2].Value, out int level)) - speechRecognized?.Invoke(species, level); + SpeechCreatureRecognized?.Invoke(species, level); } /*} else @@ -111,25 +103,25 @@ public bool Listen { set { - listening = value; - if (listening) + _listening = value; + if (_listening) { try { - recognizer.RecognizeAsync(RecognizeMode.Multiple); + _recognizer.RecognizeAsync(RecognizeMode.Multiple); indicator.ForeColor = Color.Red; } catch { MessageBoxes.ShowMessageBox("Couldn't set Audio-Input to default-audio device. The speech recognition will not work until a restart.\nTry to change the default-audio-input (e.g. plug-in a microphone).", $"Microphone Error"); - listening = false; + _listening = false; indicator.ForeColor = SystemColors.GrayText; } } else { - recognizer.RecognizeAsyncStop(); + _recognizer.RecognizeAsyncStop(); indicator.ForeColor = SystemColors.GrayText; } } @@ -143,15 +135,13 @@ public bool Listen /// public void SetMaxLevelAndSpecies(int maxLevel, int levelStep, List aliases) { - if (maxLevel != _maxLevel || levelStep != _levelStep || _aliasesCount != aliases.Count) - { - _maxLevel = maxLevel; - _levelStep = levelStep; - _aliasesCount = aliases.Count; - recognizer.UnloadAllGrammars(); - recognizer.LoadGrammar(CreateTamingGrammar(maxLevel, levelStep, aliases, recognizer.RecognizerInfo.Culture)); - //recognizer.LoadGrammar(CreateCommandsGrammar()); // remove for now, it's too easy to say something that is recognized as "extract" and disturbes the play-flow - } + if (maxLevel == _maxLevel && levelStep == _levelStep && _aliasesCount == aliases.Count) return; + _maxLevel = maxLevel; + _levelStep = levelStep; + _aliasesCount = aliases.Count; + _recognizer.UnloadAllGrammars(); + _recognizer.LoadGrammar(CreateTamingGrammar(maxLevel, levelStep, aliases, _recognizer.RecognizerInfo.Culture)); + //recognizer.LoadGrammar(CreateCommandsGrammar()); // remove for now, it's too easy to say something that is recognized as "extract" and disturbes the play-flow } private Grammar CreateCommandsGrammar() @@ -166,7 +156,7 @@ private Grammar CreateCommandsGrammar() public void ToggleListening() { - Listen = !listening; + Listen = !_listening; } public enum Commands @@ -185,7 +175,7 @@ protected virtual void Dispose(bool disposing) { if (disposing) { - recognizer.Dispose(); + _recognizer.Dispose(); } } } From f263d604b23271cf64d938fabcdcd026c19e4ff0 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 29 Jun 2024 13:41:01 +0200 Subject: [PATCH 26/36] fixed setting creature to mature failed when growing was paused --- ARKBreedingStats/CreatureInfoInput.cs | 9 ++++++--- ARKBreedingStats/library/Creature.cs | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ARKBreedingStats/CreatureInfoInput.cs b/ARKBreedingStats/CreatureInfoInput.cs index d00b52d8..b7345f33 100644 --- a/ARKBreedingStats/CreatureInfoInput.cs +++ b/ARKBreedingStats/CreatureInfoInput.cs @@ -306,7 +306,7 @@ private void dhmsInputGrown_ValueChanged(object sender, TimeSpan ts) private void SetMaturationAccordingToGrownUpIn() { double maturation = 1; - if (_selectedSpecies.breeding != null && _selectedSpecies.breeding.maturationTimeAdjusted > 0) + if (_selectedSpecies?.breeding != null && _selectedSpecies.breeding.maturationTimeAdjusted > 0) { maturation = 1 - dhmsInputGrown.Timespan.TotalSeconds / _selectedSpecies.breeding.maturationTimeAdjusted; if (maturation < 0) maturation = 0; @@ -354,8 +354,11 @@ public DateTime? GrowingUntil get => dhmsInputGrown.changed ? DateTime.Now.Add(dhmsInputGrown.Timespan) : default(DateTime?); set { - if (!value.HasValue) return; - dhmsInputGrown.Timespan = value.Value - DateTime.Now; + if (value.HasValue) + dhmsInputGrown.Timespan = value.Value - DateTime.Now; + else + dhmsInputGrown.Timespan = TimeSpan.Zero; + SetMaturationAccordingToGrownUpIn(); } } diff --git a/ARKBreedingStats/library/Creature.cs b/ARKBreedingStats/library/Creature.cs index a397ecc9..331d9f5a 100644 --- a/ARKBreedingStats/library/Creature.cs +++ b/ARKBreedingStats/library/Creature.cs @@ -196,8 +196,8 @@ public DateTime? growingUntil { set { - if (growingPaused && value != null) - growingLeft = value.Value.Subtract(DateTime.Now); + if (growingPaused) + growingLeft = value?.Subtract(DateTime.Now) ?? TimeSpan.Zero; else _growingUntil = value == null || value <= DateTime.Now ? null : value; } From eb3dfc75e89f6516416b7cb965e8ad18b1b46257 Mon Sep 17 00:00:00 2001 From: cadon Date: Mon, 1 Jul 2024 23:10:56 +0200 Subject: [PATCH 27/36] copy&paste multiple creatures via clipboard between libraries --- ARKBreedingStats/Form1.Designer.cs | 16 ++--- ARKBreedingStats/Form1.cs | 48 ++++++++++---- ARKBreedingStats/Form1.library.cs | 6 ++ ARKBreedingStats/Pedigree/PedigreeCreature.cs | 10 +-- .../library/ExportImportCreatures.cs | 64 ++++++++++--------- ARKBreedingStats/local/strings.de.resx | 6 ++ ARKBreedingStats/local/strings.resx | 6 ++ 7 files changed, 96 insertions(+), 60 deletions(-) diff --git a/ARKBreedingStats/Form1.Designer.cs b/ARKBreedingStats/Form1.Designer.cs index 9d6ff58b..1686fc4a 100644 --- a/ARKBreedingStats/Form1.Designer.cs +++ b/ARKBreedingStats/Form1.Designer.cs @@ -114,6 +114,7 @@ private void InitializeComponent() this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); this.exactSpawnCommandToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exactSpawnCommandDS2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.commandMutationLevelsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator25 = new System.Windows.Forms.ToolStripSeparator(); this.copyCreatureToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.pasteCreatureToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -396,7 +397,6 @@ private void InitializeComponent() this.toolStripSeparator27 = new System.Windows.Forms.ToolStripSeparator(); this.resetColumnOrderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.speciesSelector1 = new ARKBreedingStats.SpeciesSelector(); - this.commandMutationLevelsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).BeginInit(); @@ -1207,6 +1207,13 @@ private void InitializeComponent() "rageV2. This command is stable."; this.exactSpawnCommandDS2ToolStripMenuItem.Click += new System.EventHandler(this.exactSpawnCommandDS2ToolStripMenuItem_Click); // + // commandMutationLevelsToolStripMenuItem + // + this.commandMutationLevelsToolStripMenuItem.Name = "commandMutationLevelsToolStripMenuItem"; + this.commandMutationLevelsToolStripMenuItem.Size = new System.Drawing.Size(215, 22); + this.commandMutationLevelsToolStripMenuItem.Text = "Command mutation levels"; + this.commandMutationLevelsToolStripMenuItem.Click += new System.EventHandler(this.commandMutationLevelsToolStripMenuItem_Click); + // // toolStripSeparator25 // this.toolStripSeparator25.Name = "toolStripSeparator25"; @@ -3897,13 +3904,6 @@ private void InitializeComponent() this.speciesSelector1.SplitterDistance = 500; this.speciesSelector1.TabIndex = 0; // - // commandMutationLevelsToolStripMenuItem - // - this.commandMutationLevelsToolStripMenuItem.Name = "commandMutationLevelsToolStripMenuItem"; - this.commandMutationLevelsToolStripMenuItem.Size = new System.Drawing.Size(215, 22); - this.commandMutationLevelsToolStripMenuItem.Text = "Command mutation levels"; - this.commandMutationLevelsToolStripMenuItem.Click += new System.EventHandler(this.commandMutationLevelsToolStripMenuItem_Click); - // // Form1 // this.AcceptButton = this.btExtractLevels; diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index d1af0c76..88b91b30 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -1831,7 +1831,7 @@ private void ExportSelectedCreatureToClipboard(bool breeding = true, bool ARKml ArkId = input.ArkId }; creature.RecalculateCreatureValues(levelStep); - ExportImportCreatures.ExportToClipboard(creature, breeding, ARKml); + ExportImportCreatures.ExportToClipboard(breeding, ARKml, creature); } else MessageBox.Show(Loc.S("noValidExtractedCreatureToExport"), Loc.S("NoValidData"), @@ -1874,14 +1874,21 @@ private void copyCreatureToolStripMenuItem_Click(object sender, EventArgs e) } /// - /// Copies the values of the first selected creature in the library to the clipboard. + /// Copies the values of the selected creature in the library to the clipboard. /// private void CopySelectedCreatureFromLibraryToClipboard(bool breedingValues = true, bool ARKml = false) { - if (listViewLibrary.SelectedIndices.Count > 0) - ExportImportCreatures.ExportToClipboard(_creaturesDisplayed[listViewLibrary.SelectedIndices[0]], breedingValues, ARKml); - else + var selectedIndices = new List(); + foreach (int i in listViewLibrary.SelectedIndices) + selectedIndices.Add(i); + if (!selectedIndices.Any()) + { MessageBoxes.ShowMessageBox(Loc.S("noCreatureSelectedInLibrary")); + return; + } + + var creatures = selectedIndices.Select(i => _creaturesDisplayed[i]).ToArray(); + ExportImportCreatures.ExportToClipboard(breedingValues, ARKml, creatures); } private void pasteCreatureToolStripMenuItem_Click(object sender, EventArgs e) @@ -1894,18 +1901,31 @@ private void pasteCreatureToolStripMenuItem_Click(object sender, EventArgs e) /// private void PasteCreatureFromClipboard() { - var importedCreature = ExportImportCreatures.ImportFromClipboard(); - if (importedCreature == null) return; + var importedCreatures = ExportImportCreatures.ImportFromClipboard(); + if (importedCreatures?.Any() != true) return; - importedCreature.Species = Values.V.SpeciesByBlueprint(importedCreature.speciesBlueprint); - importedCreature.RecalculateCreatureValues(_creatureCollection?.getWildLevelStep()); - importedCreature.RecalculateNewMutations(); - UpdateParents(new List { importedCreature }); + foreach (var c in importedCreatures) + { + c.Species = Values.V.SpeciesByBlueprint(c.speciesBlueprint); + c.RecalculateCreatureValues(_creatureCollection?.getWildLevelStep()); + c.RecalculateNewMutations(); + } + UpdateParents(importedCreatures); - if (tabControlMain.SelectedTab == tabPageExtractor) - SetCreatureValuesToExtractor(importedCreature); + if (tabControlMain.SelectedTab == tabPageLibrary) + { + if (MessageBox.Show(String.Format(Loc.S("pasteCreaturesToLibrary?"), importedCreatures.Length), Loc.S("paste"), + MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes + || _creatureCollection == null) + return; + _creatureCollection.MergeCreatureList(importedCreatures); + UpdateCreatureParentLinkingSort(); + SelectCreatureInLibrary(importedCreatures[0]); + } + else if (tabControlMain.SelectedTab == tabPageExtractor) + SetCreatureValuesLevelsAndInfoToExtractor(importedCreatures[0]); else - EditCreatureInTester(importedCreature, true); + EditCreatureInTester(importedCreatures[0], true); } private void buttonRecalculateTops_Click(object sender, EventArgs e) diff --git a/ARKBreedingStats/Form1.library.cs b/ARKBreedingStats/Form1.library.cs index 0e182e39..d3ea04d8 100644 --- a/ARKBreedingStats/Form1.library.cs +++ b/ARKBreedingStats/Form1.library.cs @@ -1665,6 +1665,12 @@ private void listViewLibrary_KeyUp(object sender, KeyEventArgs e) case Keys.B when e.Control: CopySelectedCreatureName(); break; + case Keys.C when e.Control: + CopySelectedCreatureFromLibraryToClipboard(false); + break; + case Keys.V when e.Control: + PasteCreatureFromClipboard(); + break; default: return; } diff --git a/ARKBreedingStats/Pedigree/PedigreeCreature.cs b/ARKBreedingStats/Pedigree/PedigreeCreature.cs index fdadd93e..7d0573da 100644 --- a/ARKBreedingStats/Pedigree/PedigreeCreature.cs +++ b/ARKBreedingStats/Pedigree/PedigreeCreature.cs @@ -385,15 +385,9 @@ private void contextMenuStrip1_Opening(object sender, CancelEventArgs e) } } - private void plainTextbreedingValuesToolStripMenuItem_Click(object sender, EventArgs e) - { - ExportImportCreatures.ExportToClipboard(_creature, true, false); - } + private void plainTextbreedingValuesToolStripMenuItem_Click(object sender, EventArgs e) => ExportImportCreatures.ExportToClipboard(true, false, _creature); - private void plainTextcurrentValuesToolStripMenuItem_Click(object sender, EventArgs e) - { - ExportImportCreatures.ExportToClipboard(_creature, false, false); - } + private void plainTextcurrentValuesToolStripMenuItem_Click(object sender, EventArgs e) => ExportImportCreatures.ExportToClipboard(false, false, _creature); private void OpenWikipageInBrowserToolStripMenuItem_Click(object sender, EventArgs e) { diff --git a/ARKBreedingStats/library/ExportImportCreatures.cs b/ARKBreedingStats/library/ExportImportCreatures.cs index 4f542b90..77f41773 100644 --- a/ARKBreedingStats/library/ExportImportCreatures.cs +++ b/ARKBreedingStats/library/ExportImportCreatures.cs @@ -185,21 +185,23 @@ public enum TableExportFields /// /// Export the data of a creature to the clipboard in plain text. /// - /// Creature to export + /// Creatures to export /// Stat values that are inherited /// True if ARKml markup for coloring should be used. That feature was disabled in the ARK-chat. - public static void ExportToClipboard(Creature c, bool breeding = true, bool ARKml = false) + public static void ExportToClipboard(bool breeding = true, bool ARKml = false, params Creature[] creatures) { - if (c == null) return; + if (creatures == null) return; - var creatureString = CreatureStringInfo(c, breeding, ARKml); + var sb = new StringBuilder(); + foreach (var c in creatures) + AddCreatureStringInfo(sb, c, breeding, ARKml); - string creatureSerialized = Newtonsoft.Json.JsonConvert.SerializeObject(c); + string creaturesSerialized = Newtonsoft.Json.JsonConvert.SerializeObject(creatures); DataObject o = new DataObject(); - o.SetData(DataFormats.UnicodeText, creatureString); - if (!string.IsNullOrEmpty(creatureSerialized)) - o.SetData(ClipboardCreatureFormat, creatureSerialized); + o.SetData(DataFormats.UnicodeText, sb.ToString()); + if (!string.IsNullOrEmpty(creaturesSerialized)) + o.SetData(ClipboardCreatureFormat, creaturesSerialized); try { @@ -212,10 +214,12 @@ public static void ExportToClipboard(Creature c, bool breeding = true, bool ARKm } /// - /// Creates a string that describes the creature. + /// Adds creature data to a stringBuilder intended for humans to read. /// - private static StringBuilder CreatureStringInfo(Creature c, bool breeding, bool ARKml) + private static void AddCreatureStringInfo(StringBuilder sb, Creature c, bool breeding, bool ARKml) { + if (sb == null) return; + var maxChartLevel = CreatureCollection.CurrentCreatureCollection?.maxChartLevel ?? 0; double colorFactor = maxChartLevel > 0 ? 100d / maxChartLevel : 1; string modifierText = string.Empty; @@ -230,42 +234,42 @@ private static StringBuilder CreatureStringInfo(Creature c, bool breeding, bool modifierText = ", Impr: " + Math.Round(100 * c.imprintingBonus, 2) + " %"; } - var output = new StringBuilder((string.IsNullOrEmpty(c.name) ? "noName" : c.name) + " (" + - (ARKml ? Utils.GetARKml(c.Species.name, 50, 172, 255) : c.Species.name) - + ", Lvl " + (breeding ? c.LevelHatched : c.Level) + modifierText + - (c.sex != Sex.Unknown ? ", " + Loc.S(c.sex.ToString(), secondaryCulture: secondaryLanguage) : string.Empty) + "): "); + sb.Append((string.IsNullOrEmpty(c.name) ? "noName" : c.name) + " (" + + (ARKml ? Utils.GetARKml(c.Species.name, 50, 172, 255) : c.Species.name) + + ", Lvl " + (breeding ? c.LevelHatched : c.Level) + modifierText + + (c.sex != Sex.Unknown ? ", " + Loc.S(c.sex.ToString(), secondaryCulture: secondaryLanguage) : string.Empty) + "): "); foreach (var si in Stats.DisplayOrder) { if (c.levelsWild[si] >= 0 && c.valuesBreeding[si] > 0) // ignore unknown levels (e.g. oxygen, speed for some species) - output.Append(Utils.StatName(si, true, secondaryLanguage: secondaryLanguage) + ": " + - (breeding ? c.valuesBreeding[si] : c.valuesDom[si]) * (Stats.IsPercentage(si) ? 100 : 1) + - (Stats.IsPercentage(si) ? " %" : string.Empty) + - " (" + (ARKml - ? Utils.GetARKmlFromPercent(c.levelsWild[si].ToString(), - (int)(c.levelsWild[si] * - (si == Stats.Torpidity ? colorFactor / 7 : colorFactor))) - : c.levelsWild[si].ToString()) + - (ARKml ? breeding || si == Stats.Torpidity ? string.Empty : + sb.Append(Utils.StatName(si, true, secondaryLanguage: secondaryLanguage) + ": " + + (breeding ? c.valuesBreeding[si] : c.valuesDom[si]) * (Stats.IsPercentage(si) ? 100 : 1) + + (Stats.IsPercentage(si) ? " %" : string.Empty) + + " (" + (ARKml + ? Utils.GetARKmlFromPercent(c.levelsWild[si].ToString(), + (int)(c.levelsWild[si] * + (si == Stats.Torpidity ? colorFactor / 7 : colorFactor))) + : c.levelsWild[si].ToString()) + + (ARKml ? breeding || si == Stats.Torpidity ? string.Empty : ", " + Utils.GetARKmlFromPercent(c.levelsDom[si].ToString(), (int)(c.levelsDom[si] * colorFactor)) : - breeding || si == Stats.Torpidity ? string.Empty : ", " + c.levelsDom[si]) + - "); "); + breeding || si == Stats.Torpidity ? string.Empty : ", " + c.levelsDom[si]) + + "); "); } - output.Length--; // remove last space - return output; + sb.Length--; // remove last space + sb.AppendLine(); } - public static Creature ImportFromClipboard() + public static Creature[] ImportFromClipboard() { try { var creatureSerialized = Clipboard.GetData(ClipboardCreatureFormat) as string; if (!string.IsNullOrEmpty(creatureSerialized)) - return Newtonsoft.Json.JsonConvert.DeserializeObject(creatureSerialized); - return ParseCreature(Clipboard.GetText()); + return Newtonsoft.Json.JsonConvert.DeserializeObject(creatureSerialized); + return new[] { ParseCreature(Clipboard.GetText()) }; } catch (Exception ex) { diff --git a/ARKBreedingStats/local/strings.de.resx b/ARKBreedingStats/local/strings.de.resx index 28144cab..1c64588a 100644 --- a/ARKBreedingStats/local/strings.de.resx +++ b/ARKBreedingStats/local/strings.de.resx @@ -1340,4 +1340,10 @@ Es ist auch möglich Tiere mit einer Farbe in mehreren möglichen Regionen zu fi Die Einstellung zum Leveln von Bewegungsgeschwindigkeit (AllowSpeedLeveling) oder die Spielversion (ASE oder ASA) ist wahrscheinlich nicht richtig gesetzt. + + {0} Kreaturen direkt in die Bibliothek einfügen? + + + Einfügen + \ No newline at end of file diff --git a/ARKBreedingStats/local/strings.resx b/ARKBreedingStats/local/strings.resx index b59aaaae..38e4e4ca 100644 --- a/ARKBreedingStats/local/strings.resx +++ b/ARKBreedingStats/local/strings.resx @@ -1352,4 +1352,10 @@ It's also possible to filter for creatures with a color in one of multiple possi The Allow speed leveling setting or the game (ASE or ASA) is probably not set correctly. + + Paste {0} creatures directly in the library? + + + paste + \ No newline at end of file From 34b4f695b70dc139092d632b616166f034c5a0d7 Mon Sep 17 00:00:00 2001 From: cadon Date: Thu, 4 Jul 2024 00:03:12 +0200 Subject: [PATCH 28/36] moved stats options to own window --- ARKBreedingStats/ARKBreedingStats.csproj | 17 +- ARKBreedingStats/Form1.Designer.cs | 36 ++-- ARKBreedingStats/Form1.cs | 16 +- .../library/LevelGraphRepresentation.cs | 8 +- ARKBreedingStats/library/StatsOptions.cs | 2 +- .../StatsOptionsControl.Designer.cs | 166 ------------------ .../uiControls/StatsOptionsControl.cs | 118 +++++++++---- .../uiControls/StatsOptionsWindow.Designer.cs | 88 ++++++++++ .../uiControls/StatsOptionsWindow.cs | 20 +++ ...nsControl.resx => StatsOptionsWindow.resx} | 0 10 files changed, 226 insertions(+), 245 deletions(-) delete mode 100644 ARKBreedingStats/uiControls/StatsOptionsControl.Designer.cs create mode 100644 ARKBreedingStats/uiControls/StatsOptionsWindow.Designer.cs create mode 100644 ARKBreedingStats/uiControls/StatsOptionsWindow.cs rename ARKBreedingStats/uiControls/{StatsOptionsControl.resx => StatsOptionsWindow.resx} (100%) diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj index 0d6534f4..84f5a774 100644 --- a/ARKBreedingStats/ARKBreedingStats.csproj +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -179,10 +179,7 @@ StatOptionsControl.cs - UserControl - - - StatsOptionsControl.cs + Component UserControl @@ -190,6 +187,12 @@ StatSelector.cs + + Form + + + StatsOptionsWindow.cs + @@ -776,12 +779,12 @@ StatOptionsControl.cs - - StatsOptionsControl.cs - StatSelector.cs + + StatsOptionsWindow.cs + VariantSelector.cs diff --git a/ARKBreedingStats/Form1.Designer.cs b/ARKBreedingStats/Form1.Designer.cs index 1686fc4a..db831a35 100644 --- a/ARKBreedingStats/Form1.Designer.cs +++ b/ARKBreedingStats/Form1.Designer.cs @@ -344,8 +344,6 @@ private void InitializeComponent() this.extractionTestControl1 = new ARKBreedingStats.testCases.ExtractionTestControl(); this.tabPageMultiplierTesting = new System.Windows.Forms.TabPage(); this.statsMultiplierTesting1 = new ARKBreedingStats.multiplierTesting.StatsMultiplierTesting(); - this.TabPageStatOptions = new System.Windows.Forms.TabPage(); - this.statsOptionsControl1 = new ARKBreedingStats.uiControls.StatsOptionsControl(); this.btReadValuesFromArk = new System.Windows.Forms.Button(); this.cbEventMultipliers = new System.Windows.Forms.CheckBox(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); @@ -397,6 +395,7 @@ private void InitializeComponent() this.toolStripSeparator27 = new System.Windows.Forms.ToolStripSeparator(); this.resetColumnOrderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.speciesSelector1 = new ARKBreedingStats.SpeciesSelector(); + this.statsOptionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).BeginInit(); @@ -454,7 +453,6 @@ private void InitializeComponent() this.TabPageOCR.SuspendLayout(); this.tabPageExtractionTests.SuspendLayout(); this.tabPageMultiplierTesting.SuspendLayout(); - this.TabPageStatOptions.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.toolStrip2.SuspendLayout(); this.panelToolBar.SuspendLayout(); @@ -1259,6 +1257,7 @@ private void InitializeComponent() // this.settingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.openSettingsToolStripMenuItem, + this.statsOptionsToolStripMenuItem, this.toolStripSeparator18, this.modValueManagerToolStripMenuItem, this.customStatOverridesToolStripMenuItem, @@ -1614,7 +1613,6 @@ private void InitializeComponent() this.tabControlMain.Controls.Add(this.TabPageOCR); this.tabControlMain.Controls.Add(this.tabPageExtractionTests); this.tabControlMain.Controls.Add(this.tabPageMultiplierTesting); - this.tabControlMain.Controls.Add(this.TabPageStatOptions); this.tabControlMain.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControlMain.Location = new System.Drawing.Point(0, 103); this.tabControlMain.Name = "tabControlMain"; @@ -3379,25 +3377,6 @@ private void InitializeComponent() this.statsMultiplierTesting1.Size = new System.Drawing.Size(1864, 778); this.statsMultiplierTesting1.TabIndex = 0; // - // TabPageStatOptions - // - this.TabPageStatOptions.Controls.Add(this.statsOptionsControl1); - this.TabPageStatOptions.Location = new System.Drawing.Point(4, 22); - this.TabPageStatOptions.Name = "TabPageStatOptions"; - this.TabPageStatOptions.Padding = new System.Windows.Forms.Padding(3); - this.TabPageStatOptions.Size = new System.Drawing.Size(1870, 784); - this.TabPageStatOptions.TabIndex = 15; - this.TabPageStatOptions.Text = "Stat Options"; - this.TabPageStatOptions.UseVisualStyleBackColor = true; - // - // statsOptionsControl1 - // - this.statsOptionsControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.statsOptionsControl1.Location = new System.Drawing.Point(3, 3); - this.statsOptionsControl1.Name = "statsOptionsControl1"; - this.statsOptionsControl1.Size = new System.Drawing.Size(1864, 778); - this.statsOptionsControl1.TabIndex = 0; - // // btReadValuesFromArk // this.btReadValuesFromArk.Location = new System.Drawing.Point(262, 3); @@ -3904,6 +3883,13 @@ private void InitializeComponent() this.speciesSelector1.SplitterDistance = 500; this.speciesSelector1.TabIndex = 0; // + // statsOptionsToolStripMenuItem + // + this.statsOptionsToolStripMenuItem.Name = "statsOptionsToolStripMenuItem"; + this.statsOptionsToolStripMenuItem.Size = new System.Drawing.Size(226, 22); + this.statsOptionsToolStripMenuItem.Text = "StatsOptions"; + this.statsOptionsToolStripMenuItem.Click += new System.EventHandler(this.statsOptionsToolStripMenuItem_Click); + // // Form1 // this.AcceptButton = this.btExtractLevels; @@ -4001,7 +3987,6 @@ private void InitializeComponent() this.TabPageOCR.ResumeLayout(false); this.tabPageExtractionTests.ResumeLayout(false); this.tabPageMultiplierTesting.ResumeLayout(false); - this.TabPageStatOptions.ResumeLayout(false); this.statusStrip1.ResumeLayout(false); this.statusStrip1.PerformLayout(); this.toolStrip2.ResumeLayout(false); @@ -4374,9 +4359,8 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem nameGeneratorToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem selectSavegameFileToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem showTokenPopupOnListeningToolStripMenuItem; - private System.Windows.Forms.TabPage TabPageStatOptions; - private uiControls.StatsOptionsControl statsOptionsControl1; private System.Windows.Forms.ToolStripMenuItem adminCommandSetMutationLevelsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem commandMutationLevelsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem statsOptionsToolStripMenuItem; } } diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 88b91b30..d2dae224 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -360,7 +360,6 @@ private void Form1_Load(object sender, EventArgs e) LbWarningLevel255.Visible = false; StatsOptions.LoadSettings(); - statsOptionsControl1.InitializeOptions(); InitializeCollection(); @@ -686,7 +685,6 @@ private void SpeciesSelector1OnSpeciesSelected(bool speciesChanged) creatureInfoInputExtractor.SelectedSpecies = species; creatureInfoInputTester.SelectedSpecies = species; - statsOptionsControl1.SetSpecies(species); radarChart1.SetLevels(species: species); var statNames = species.statNames; var levelGraphRepresentations = StatsOptions.GetStatsOptions(species); @@ -3977,5 +3975,19 @@ private void showTokenPopupOnListeningToolStripMenuItem_Click(object sender, Eve { Properties.Settings.Default.DisplayPopupForServerToken = showTokenPopupOnListeningToolStripMenuItem.Checked; } + + private void statsOptionsToolStripMenuItem_Click(object sender, EventArgs e) + { + var so = new StatsOptionsControl(); + var f = new Form + { + FormBorderStyle = FormBorderStyle.SizableToolWindow, + Width = 1000, + Height = 1000 + }; + f.Controls.Add(so); + so.Dock = DockStyle.Fill; + f.Show(this); + } } } diff --git a/ARKBreedingStats/library/LevelGraphRepresentation.cs b/ARKBreedingStats/library/LevelGraphRepresentation.cs index 0855ff2f..891bc92b 100644 --- a/ARKBreedingStats/library/LevelGraphRepresentation.cs +++ b/ARKBreedingStats/library/LevelGraphRepresentation.cs @@ -84,7 +84,7 @@ public Color UpperColor _upperColorH = _upperColor.GetHue(); _upperColorS = _upperColor.GetSaturation(); _upperColorV = _upperColor.GetValue(); - if (_upperColorS < float.Epsilon) + if (_upperColorS == 0) _upperColorH = _lowerColorH; _colorCache?.Clear(); @@ -145,9 +145,8 @@ public static Color GetStatLevelColor(int level, int statIndex) => UpperColor = Color.FromArgb(0, 255, 0) }; - public LevelGraphRepresentation Copy() - { - return new LevelGraphRepresentation + public LevelGraphRepresentation Copy() => + new LevelGraphRepresentation { LowerBound = LowerBound, UpperBound = UpperBound, @@ -155,6 +154,5 @@ public LevelGraphRepresentation Copy() UpperColor = UpperColor, ColorGradientReversed = ColorGradientReversed }; - } } } diff --git a/ARKBreedingStats/library/StatsOptions.cs b/ARKBreedingStats/library/StatsOptions.cs index bccbcc7c..c26589c8 100644 --- a/ARKBreedingStats/library/StatsOptions.cs +++ b/ARKBreedingStats/library/StatsOptions.cs @@ -143,7 +143,7 @@ public static StatsOptions GetStatsOptions(Species species) private static StatsOptions GenerateStatsOptions(StatsOptions so) { var finalStatsOptions = new StatsOptions { StatOptions = new StatOptions[Stats.StatsCount] }; - var parentLine = new HashSet(); // to track parent loops + var parentLine = new HashSet(); // to track possible parent loops (i.e. check if setting depends on itself) StatsOptions defaultOptions = null; for (var si = 0; si < Stats.StatsCount; si++) { diff --git a/ARKBreedingStats/uiControls/StatsOptionsControl.Designer.cs b/ARKBreedingStats/uiControls/StatsOptionsControl.Designer.cs deleted file mode 100644 index 43a0c0f8..00000000 --- a/ARKBreedingStats/uiControls/StatsOptionsControl.Designer.cs +++ /dev/null @@ -1,166 +0,0 @@ -namespace ARKBreedingStats.uiControls -{ - partial class StatsOptionsControl - { - /// - /// 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 Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.flpStatControls = new System.Windows.Forms.FlowLayoutPanel(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.BtNew = new System.Windows.Forms.Button(); - this.BtRemove = new System.Windows.Forms.Button(); - this.CbbOptions = new System.Windows.Forms.ComboBox(); - this.TbOptionsName = new System.Windows.Forms.TextBox(); - this.LbParent = new System.Windows.Forms.Label(); - this.CbbParent = new System.Windows.Forms.ComboBox(); - this.tableLayoutPanel1.SuspendLayout(); - this.flowLayoutPanel1.SuspendLayout(); - this.SuspendLayout(); - // - // flpStatControls - // - this.flpStatControls.AutoScroll = true; - this.flpStatControls.Dock = System.Windows.Forms.DockStyle.Fill; - this.flpStatControls.Location = new System.Drawing.Point(3, 33); - this.flpStatControls.Name = "flpStatControls"; - this.flpStatControls.Size = new System.Drawing.Size(929, 476); - this.flpStatControls.TabIndex = 0; - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 1; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.Controls.Add(this.flpStatControls, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 0); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 2; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(935, 512); - this.tableLayoutPanel1.TabIndex = 1; - // - // flowLayoutPanel1 - // - this.flowLayoutPanel1.Controls.Add(this.BtNew); - this.flowLayoutPanel1.Controls.Add(this.BtRemove); - this.flowLayoutPanel1.Controls.Add(this.CbbOptions); - this.flowLayoutPanel1.Controls.Add(this.TbOptionsName); - this.flowLayoutPanel1.Controls.Add(this.LbParent); - this.flowLayoutPanel1.Controls.Add(this.CbbParent); - this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(929, 24); - this.flowLayoutPanel1.TabIndex = 1; - // - // BtNew - // - this.BtNew.Location = new System.Drawing.Point(3, 3); - this.BtNew.Name = "BtNew"; - this.BtNew.Size = new System.Drawing.Size(20, 20); - this.BtNew.TabIndex = 4; - this.BtNew.UseVisualStyleBackColor = true; - this.BtNew.Click += new System.EventHandler(this.BtNew_Click); - // - // BtRemove - // - this.BtRemove.Location = new System.Drawing.Point(29, 3); - this.BtRemove.Name = "BtRemove"; - this.BtRemove.Size = new System.Drawing.Size(20, 20); - this.BtRemove.TabIndex = 5; - this.BtRemove.UseVisualStyleBackColor = false; - this.BtRemove.Click += new System.EventHandler(this.BtRemove_Click); - // - // CbbOptions - // - this.CbbOptions.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CbbOptions.FormattingEnabled = true; - this.CbbOptions.Location = new System.Drawing.Point(55, 3); - this.CbbOptions.Name = "CbbOptions"; - this.CbbOptions.Size = new System.Drawing.Size(251, 21); - this.CbbOptions.TabIndex = 1; - this.CbbOptions.SelectedIndexChanged += new System.EventHandler(this.CbbOptions_SelectedIndexChanged); - // - // TbOptionsName - // - this.TbOptionsName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; - this.TbOptionsName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.TbOptionsName.Location = new System.Drawing.Point(312, 3); - this.TbOptionsName.Name = "TbOptionsName"; - this.TbOptionsName.Size = new System.Drawing.Size(199, 20); - this.TbOptionsName.TabIndex = 0; - this.TbOptionsName.Leave += new System.EventHandler(this.TbOptionsName_Leave); - // - // LbParent - // - this.LbParent.AutoSize = true; - this.LbParent.Location = new System.Drawing.Point(517, 5); - this.LbParent.Margin = new System.Windows.Forms.Padding(3, 5, 3, 0); - this.LbParent.Name = "LbParent"; - this.LbParent.Size = new System.Drawing.Size(37, 13); - this.LbParent.TabIndex = 3; - this.LbParent.Text = "parent"; - // - // CbbParent - // - this.CbbParent.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.CbbParent.FormattingEnabled = true; - this.CbbParent.Location = new System.Drawing.Point(560, 3); - this.CbbParent.Name = "CbbParent"; - this.CbbParent.Size = new System.Drawing.Size(257, 21); - this.CbbParent.TabIndex = 2; - this.CbbParent.SelectedIndexChanged += new System.EventHandler(this.CbbParent_SelectedIndexChanged); - // - // StatsOptionsControl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.tableLayoutPanel1); - this.Name = "StatsOptionsControl"; - this.Size = new System.Drawing.Size(935, 512); - this.tableLayoutPanel1.ResumeLayout(false); - this.flowLayoutPanel1.ResumeLayout(false); - this.flowLayoutPanel1.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.FlowLayoutPanel flpStatControls; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; - private System.Windows.Forms.TextBox TbOptionsName; - private System.Windows.Forms.ComboBox CbbOptions; - private System.Windows.Forms.ComboBox CbbParent; - private System.Windows.Forms.Label LbParent; - private System.Windows.Forms.Button BtNew; - private System.Windows.Forms.Button BtRemove; - } -} diff --git a/ARKBreedingStats/uiControls/StatsOptionsControl.cs b/ARKBreedingStats/uiControls/StatsOptionsControl.cs index a72d5305..88986ba5 100644 --- a/ARKBreedingStats/uiControls/StatsOptionsControl.cs +++ b/ARKBreedingStats/uiControls/StatsOptionsControl.cs @@ -1,33 +1,77 @@ -using System; +using ARKBreedingStats.library; +using ARKBreedingStats.species; +using ARKBreedingStats.utils; +using System; using System.Drawing; using System.Linq; using System.Windows.Forms; -using ARKBreedingStats.library; -using ARKBreedingStats.species; -using ARKBreedingStats.utils; namespace ARKBreedingStats.uiControls { - public partial class StatsOptionsControl : UserControl + internal class StatsOptionsControl : TableLayoutPanel where T : new() { private StatOptionsControl[] _statOptionsControls; private readonly ToolTip _tt = new ToolTip(); private StatsOptions _selectedStatsOptions; private Species _species; + private ComboBox _cbbOptions; + private ComboBox _cbbParent; + private Button _btRemove; + private TextBox _tbOptionsName; + private Label _lbParent; public StatsOptionsControl() { - InitializeComponent(); - InitializeStatControls(); - InitButtonImages(); + InitializeControls(); + InitializeOptions(); + } + + private void InitializeControls() + { + AutoScroll = true; + ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100)); + RowStyles.Add(new RowStyle(SizeType.AutoSize)); + RowStyles.Add(new RowStyle(SizeType.Percent, 100)); + + var flpHeaderControls = new FlowLayoutPanel { Dock = DockStyle.Fill }; + Controls.Add(flpHeaderControls, 0, 0); + var flpStatControls = new FlowLayoutPanel { Dock = DockStyle.Fill }; + Controls.Add(flpStatControls, 0, 1); + + var btNew = new Button { Width = 20, Height = 20 }; + _btRemove = new Button { Width = 20, Height = 20 }; + flpHeaderControls.Controls.Add(btNew); + flpHeaderControls.Controls.Add(_btRemove); + btNew.Click += BtNew_Click; + _btRemove.Click += BtRemove_Click; + _tt.SetToolTip(btNew, "Create new setting"); + _tt.SetToolTip(_btRemove, "Delete setting"); + InitButtonImages(btNew, _btRemove); + + _cbbOptions = new ComboBox { DropDownStyle = ComboBoxStyle.DropDownList }; + _cbbOptions.SelectedIndexChanged += CbbOptions_SelectedIndexChanged; + flpHeaderControls.Controls.Add(_cbbOptions); + + _tbOptionsName = new TextBox(); + flpHeaderControls.Controls.Add(_tbOptionsName); + _tbOptionsName.Leave += TbOptionsName_Leave; + + _lbParent = new Label(); + flpHeaderControls.Controls.Add(_lbParent); + + _cbbParent = new ComboBox { DropDownStyle = ComboBoxStyle.DropDownList }; + _cbbParent.SelectedIndexChanged += CbbParent_SelectedIndexChanged; + flpHeaderControls.Controls.Add(_cbbParent); + + InitializeStatControls(flpStatControls); } - private void InitializeStatControls() + private void InitializeStatControls(FlowLayoutPanel flpStatControls) { _statOptionsControls = new StatOptionsControl[Stats.StatsCount]; foreach (var si in Stats.DisplayOrder) { - var c = new StatOptionsControl($"[{si}]{Utils.StatName(si, true)}", si, _tt); + var c = new StatOptionsControl($"[{si}] {Utils.StatName(si, true)}", si, _tt); _statOptionsControls[si] = c; flpStatControls.Controls.Add(c); flpStatControls.SetFlowBreak(c, true); @@ -39,64 +83,62 @@ On color gradients use shift + right click to copy and shift + left click to pas Ctrl + left click to reset colors.", AutoSize = true }); - _tt.SetToolTip(BtNew, "Create new setting"); - _tt.SetToolTip(BtRemove, "Delete setting"); } public void InitializeOptions() { _selectedStatsOptions = null; - CbbOptions.Items.Clear(); - CbbParent.Items.Clear(); + _cbbOptions.Items.Clear(); + _cbbParent.Items.Clear(); var statsOptions = StatsOptions.StatsOptionsDict.Values.OrderBy(n => n.Name).ToArray(); - CbbOptions.Items.AddRange(statsOptions); - CbbParent.Items.AddRange(statsOptions); - if (CbbOptions.Items.Count > 0) - CbbOptions.SelectedIndex = 0; + _cbbOptions.Items.AddRange(statsOptions); + _cbbParent.Items.AddRange(statsOptions); + if (_cbbOptions.Items.Count > 0) + _cbbOptions.SelectedIndex = 0; } private void CbbOptions_SelectedIndexChanged(object sender, EventArgs e) { - _selectedStatsOptions = CbbOptions.SelectedItem as StatsOptions; + _selectedStatsOptions = _cbbOptions.SelectedItem as StatsOptions; if (_selectedStatsOptions == null) return; this.SuspendDrawing(); - TbOptionsName.Text = _selectedStatsOptions.ToString(); + _tbOptionsName.Text = _selectedStatsOptions.ToString(); var isNotRoot = _selectedStatsOptions.Name != string.Empty; - TbOptionsName.Enabled = isNotRoot; - LbParent.Visible = isNotRoot; - CbbParent.Visible = isNotRoot; - BtRemove.Visible = isNotRoot; + _tbOptionsName.Enabled = isNotRoot; + _lbParent.Visible = isNotRoot; + _cbbParent.Visible = isNotRoot; + _btRemove.Visible = isNotRoot; for (var si = 0; si < Stats.StatsCount; si++) _statOptionsControls[si].SetStatOptions(_selectedStatsOptions.StatOptions?[si], isNotRoot, _selectedStatsOptions.ParentOptions); - CbbParent.SelectedItem = _selectedStatsOptions.ParentOptions; + _cbbParent.SelectedItem = _selectedStatsOptions.ParentOptions; this.ResumeDrawing(); } private void CbbParent_SelectedIndexChanged(object sender, EventArgs e) { - _selectedStatsOptions = CbbOptions.SelectedItem as StatsOptions; + _selectedStatsOptions = _cbbOptions.SelectedItem as StatsOptions; if (_selectedStatsOptions == null) return; - _selectedStatsOptions.ParentOptions = CbbParent.SelectedItem as StatsOptions; + _selectedStatsOptions.ParentOptions = _cbbParent.SelectedItem as StatsOptions; } private void TbOptionsName_Leave(object sender, EventArgs e) { - var newNameBase = TbOptionsName.Text; + var newNameBase = _tbOptionsName.Text; if (_selectedStatsOptions.Name == newNameBase) return; // nothing to change var newName = newNameBase; var suffix = 1; while (StatsOptions.StatsOptionsDict.ContainsKey(newName)) newName = newNameBase + "_" + ++suffix; - TbOptionsName.Text = newName; + _tbOptionsName.Text = newName; StatsOptions.StatsOptionsDict.Remove(_selectedStatsOptions.Name); _selectedStatsOptions.Name = newName; StatsOptions.StatsOptionsDict.Add(newName, _selectedStatsOptions); // update text in combobox - CbbOptions.Items[CbbOptions.SelectedIndex] = _selectedStatsOptions; + _cbbOptions.Items[_cbbOptions.SelectedIndex] = _selectedStatsOptions; } private void BtNew_Click(object sender, EventArgs e) @@ -109,7 +151,7 @@ private void BtNew_Click(object sender, EventArgs e) var newSettings = StatsOptions.GetDefaultStatOptions(newName); StatsOptions.StatsOptionsDict.Add(newName, newSettings); InitializeOptions(); - CbbOptions.SelectedItem = newSettings; + _cbbOptions.SelectedItem = newSettings; } private void BtRemove_Click(object sender, EventArgs e) @@ -118,7 +160,7 @@ private void BtRemove_Click(object sender, EventArgs e) || MessageBox.Show("Delete stat options\n" + _selectedStatsOptions + "\n?", "Delete?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) != DialogResult.Yes) return; - var index = CbbOptions.SelectedIndex; + var index = _cbbOptions.SelectedIndex; // set parent of dependant options to parent of this setting foreach (var so in StatsOptions.StatsOptionsDict.Values) { @@ -129,8 +171,8 @@ private void BtRemove_Click(object sender, EventArgs e) StatsOptions.StatsOptionsDict.Remove(_selectedStatsOptions.Name); InitializeOptions(); - if (CbbOptions.Items.Count > 0) - CbbOptions.SelectedIndex = Math.Max(0, index - 1); // select item before deleted one + if (_cbbOptions.Items.Count > 0) + _cbbOptions.SelectedIndex = Math.Max(0, index - 1); // select item before deleted one } public void SetSpecies(Species s) @@ -146,10 +188,10 @@ public void SetSpecies(Species s) _species.blueprintPath }); - TbOptionsName.AutoCompleteCustomSource = autoCompleteList; + _tbOptionsName.AutoCompleteCustomSource = autoCompleteList; } - private void InitButtonImages() + private static void InitButtonImages(Button btNew, Button btRemove) { const int size = 12; var bmp = new Bitmap(size, size); @@ -161,7 +203,7 @@ private void InitButtonImages() g.FillRectangle(Brushes.LightGreen, size / 3 + 1, 1, size / 3 - 2, size - 2); g.FillRectangle(Brushes.LightGreen, 1, size / 3 + 1, size - 2, size / 3 - 2); } - BtNew.Image = bmp; + btNew.Image = bmp; bmp = new Bitmap(size, size); using (var g = Graphics.FromImage(bmp)) @@ -170,7 +212,7 @@ private void InitButtonImages() g.DrawRectangle(p, 0, size / 3, size - 1, size / 3 - 1); g.FillRectangle(Brushes.LightPink, 1, size / 3 + 1, size - 2, size / 3 - 2); } - BtRemove.Image = bmp; + btRemove.Image = bmp; } } } diff --git a/ARKBreedingStats/uiControls/StatsOptionsWindow.Designer.cs b/ARKBreedingStats/uiControls/StatsOptionsWindow.Designer.cs new file mode 100644 index 00000000..46411bb9 --- /dev/null +++ b/ARKBreedingStats/uiControls/StatsOptionsWindow.Designer.cs @@ -0,0 +1,88 @@ +namespace ARKBreedingStats.uiControls +{ + partial class StatsOptionsWindow + { + /// + /// 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() + { + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.tabControl1.SuspendLayout(); + this.SuspendLayout(); + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(0, 0); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(800, 450); + this.tabControl1.TabIndex = 0; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(792, 424); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "Breeding Stats Weighting"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(792, 424); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "Level Colors"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // StatsOptionsWindow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.tabControl1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; + this.Name = "StatsOptionsWindow"; + this.Text = "Stats Options"; + this.tabControl1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + } +} \ No newline at end of file diff --git a/ARKBreedingStats/uiControls/StatsOptionsWindow.cs b/ARKBreedingStats/uiControls/StatsOptionsWindow.cs new file mode 100644 index 00000000..34e191f6 --- /dev/null +++ b/ARKBreedingStats/uiControls/StatsOptionsWindow.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ARKBreedingStats.uiControls +{ + public partial class StatsOptionsWindow : Form + { + public StatsOptionsWindow() + { + InitializeComponent(); + } + } +} diff --git a/ARKBreedingStats/uiControls/StatsOptionsControl.resx b/ARKBreedingStats/uiControls/StatsOptionsWindow.resx similarity index 100% rename from ARKBreedingStats/uiControls/StatsOptionsControl.resx rename to ARKBreedingStats/uiControls/StatsOptionsWindow.resx From b59d42f1a4312de17bbf45d4ed4b44f20f852032 Mon Sep 17 00:00:00 2001 From: cadon Date: Fri, 5 Jul 2024 22:19:41 +0200 Subject: [PATCH 29/36] refactoring statsOptions --- ARKBreedingStats/ARKBreedingStats.csproj | 11 ++- ARKBreedingStats/Ark.cs | 9 ++ ARKBreedingStats/Form1.cs | 42 ++------ .../LevelGraphRepresentation.cs | 2 +- .../StatLevelColors.cs} | 44 +++++++-- .../StatsOptions/StatOptionsBase.cs | 19 ++++ ARKBreedingStats/StatsOptions/StatsOptions.cs | 42 ++++++++ .../StatsOptionsSettings.cs} | 99 +++++++++---------- ARKBreedingStats/library/StatWeight.cs | 16 --- ARKBreedingStats/uiControls/HueControl.cs | 1 + ...Control.cs => LevelGraphOptionsControl.cs} | 48 ++++++--- ARKBreedingStats/uiControls/StatIO.cs | 11 ++- .../uiControls/StatOptionsControl.cs | 30 +++--- ARKBreedingStats/uiControls/StatWeighting.cs | 2 +- 14 files changed, 226 insertions(+), 150 deletions(-) rename ARKBreedingStats/{library => StatsOptions}/LevelGraphRepresentation.cs (99%) rename ARKBreedingStats/{library/StatOptions.cs => StatsOptions/StatLevelColors.cs} (64%) create mode 100644 ARKBreedingStats/StatsOptions/StatOptionsBase.cs create mode 100644 ARKBreedingStats/StatsOptions/StatsOptions.cs rename ARKBreedingStats/{library/StatsOptions.cs => StatsOptions/StatsOptionsSettings.cs} (62%) delete mode 100644 ARKBreedingStats/library/StatWeight.cs rename ARKBreedingStats/uiControls/{StatsOptionsControl.cs => LevelGraphOptionsControl.cs} (82%) diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj index 84f5a774..3071a6ad 100644 --- a/ARKBreedingStats/ARKBreedingStats.csproj +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -104,11 +104,12 @@ - + + - - - + + + @@ -178,7 +179,7 @@ StatOptionsControl.cs - + Component diff --git a/ARKBreedingStats/Ark.cs b/ARKBreedingStats/Ark.cs index c2c0cdd5..756a5b2f 100644 --- a/ARKBreedingStats/Ark.cs +++ b/ARKBreedingStats/Ark.cs @@ -189,13 +189,22 @@ public static class Stats public const int StatsCount = 12; public const int Health = 0; + /// + /// Stamina, or Charge Capacity for glow species + /// public const int Stamina = 1; public const int Torpidity = 2; + /// + /// Oxygen, or Charge Regeneration for glow species + /// public const int Oxygen = 3; public const int Food = 4; public const int Water = 5; public const int Temperature = 6; public const int Weight = 7; + /// + /// MeleeDamageMultiplier, or Charge Emission Range for glow species + /// public const int MeleeDamageMultiplier = 8; public const int SpeedMultiplier = 9; public const int TemperatureFortitude = 10; diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index d2dae224..643c068e 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -17,6 +17,7 @@ using System.Windows.Forms; using ARKBreedingStats.mods; using ARKBreedingStats.NamePatterns; +using ARKBreedingStats.StatsOptions; using ARKBreedingStats.utils; using static ARKBreedingStats.settings.Settings; using Color = System.Drawing.Color; @@ -38,11 +39,10 @@ public partial class Form1 : Form private readonly StatIO[] _testingIOs = new StatIO[Stats.StatsCount]; private int _activeStatIndex = -1; - private readonly bool[] - _activeStats = - { - true, true, true, true, true, true, true, true, true, true, true, true - }; // stats used by the creature (some don't use oxygen) + /// + /// stats used by the creature (some don't use oxygen) + /// + private readonly bool[] _activeStats = Enumerable.Repeat(true, Stats.StatsCount).ToArray(); private bool _libraryNeedsUpdate; @@ -86,24 +86,13 @@ public delegate void SetMessageLabelTextEventHandler(string text = null, Message /// private Dictionary _customReplacingNamingPattern; - // 0: Health - // 1: Stamina / Charge Capacity - // 2: Torpidity - // 3: Oxygen / Charge Regeneration - // 4: Food - // 5: Water - // 6: Temperature - // 7: Weight - // 8: MeleeDamageMultiplier / Charge Emission Range - // 9: SpeedMultiplier - // 10: TemperatureFortitude - // 11: CraftingSpeedMultiplier - // OCR stuff private ARKOverlay _overlay; private static double[] _lastOcrValues; private Species _lastOcrSpecies; + private readonly StatsOptionsSettings _statsLevelColors = new StatsOptionsSettings("statsLevelColors.json"); + public Form1() { // load settings of older version if possible after an upgrade @@ -359,8 +348,6 @@ private void Form1_Load(object sender, EventArgs e) LbWarningLevel255.Visible = false; - StatsOptions.LoadSettings(); - InitializeCollection(); CreatureColored.InitializeSpeciesImageLocation(); @@ -687,7 +674,7 @@ private void SpeciesSelector1OnSpeciesSelected(bool speciesChanged) creatureInfoInputTester.SelectedSpecies = species; radarChart1.SetLevels(species: species); var statNames = species.statNames; - var levelGraphRepresentations = StatsOptions.GetStatsOptions(species); + var levelGraphRepresentations = _statsLevelColors.GetStatsOptions(species); for (int s = 0; s < Stats.StatsCount; s++) { @@ -1413,7 +1400,7 @@ private void Form1_FormClosed(object sender, FormClosedEventArgs e) /////// save settings for next session Properties.Settings.Default.Save(); - StatsOptions.SaveSettings(); + _statsLevelColors.SaveSettings(); // remove old cache-files CreatureColored.CleanupCache(); @@ -3978,16 +3965,7 @@ private void showTokenPopupOnListeningToolStripMenuItem_Click(object sender, Eve private void statsOptionsToolStripMenuItem_Click(object sender, EventArgs e) { - var so = new StatsOptionsControl(); - var f = new Form - { - FormBorderStyle = FormBorderStyle.SizableToolWindow, - Width = 1000, - Height = 1000 - }; - f.Controls.Add(so); - so.Dock = DockStyle.Fill; - f.Show(this); + LevelGraphOptionsControl.ShowWindow(this, _statsLevelColors); } } } diff --git a/ARKBreedingStats/library/LevelGraphRepresentation.cs b/ARKBreedingStats/StatsOptions/LevelGraphRepresentation.cs similarity index 99% rename from ARKBreedingStats/library/LevelGraphRepresentation.cs rename to ARKBreedingStats/StatsOptions/LevelGraphRepresentation.cs index 891bc92b..8b79255a 100644 --- a/ARKBreedingStats/library/LevelGraphRepresentation.cs +++ b/ARKBreedingStats/StatsOptions/LevelGraphRepresentation.cs @@ -3,7 +3,7 @@ using ARKBreedingStats.utils; using Newtonsoft.Json; -namespace ARKBreedingStats.library +namespace ARKBreedingStats.StatsOptions { /// /// Representation of a level regarding chart scaling and colour. diff --git a/ARKBreedingStats/library/StatOptions.cs b/ARKBreedingStats/StatsOptions/StatLevelColors.cs similarity index 64% rename from ARKBreedingStats/library/StatOptions.cs rename to ARKBreedingStats/StatsOptions/StatLevelColors.cs index 25fd5f01..1cda8df8 100644 --- a/ARKBreedingStats/library/StatOptions.cs +++ b/ARKBreedingStats/StatsOptions/StatLevelColors.cs @@ -1,13 +1,13 @@ using System.Drawing; using Newtonsoft.Json; -namespace ARKBreedingStats.library +namespace ARKBreedingStats.StatsOptions { /// /// Options for a stat regarding breeding weights, top stat calculation and graph representation. /// [JsonObject(MemberSerialization.OptIn)] - public class StatOptions + public class StatLevelColors : StatOptionsBase { /// /// Use for all levels, or only for even levels if LevelGraphRepresentationOdd is not null. @@ -21,15 +21,11 @@ public class StatOptions [JsonProperty("lvlOdd", DefaultValueHandling = DefaultValueHandling.Ignore)] public LevelGraphRepresentation LevelGraphRepresentationOdd; - /// - /// If true don't use values of parent but overrides of this object. - /// - public bool OverrideParent; public bool UseDifferentColorsForOddLevels; - public StatOptions Copy() + public StatLevelColors Copy() { - var c = new StatOptions + var c = new StatLevelColors { LevelGraphRepresentation = LevelGraphRepresentation.Copy(), LevelGraphRepresentationOdd = LevelGraphRepresentationOdd.Copy(), @@ -61,6 +57,36 @@ public int GetLevelRange(int level, out int lowerBound) return levelRepresentations.UpperBound - lowerBound; } - // TODO stat weights + /// + /// Call after loading. + /// + public override void Initialize() + { + if (LevelGraphRepresentation != null || LevelGraphRepresentationOdd != null) + OverrideParent = true; + if (LevelGraphRepresentationOdd != null) + UseDifferentColorsForOddLevels = true; + } + + /// + /// Call before saving. + /// + public override void PrepareForSaving() + { + if (!OverrideParent) + { + LevelGraphRepresentation = null; + LevelGraphRepresentationOdd = null; + } + else if (!UseDifferentColorsForOddLevels) + LevelGraphRepresentationOdd = null; + } + + public override bool DefinesData() => LevelGraphRepresentation != null; + + public static StatLevelColors GetDefault() => new StatLevelColors + { + LevelGraphRepresentation = LevelGraphRepresentation.GetDefaultValue + }; } } diff --git a/ARKBreedingStats/StatsOptions/StatOptionsBase.cs b/ARKBreedingStats/StatsOptions/StatOptionsBase.cs new file mode 100644 index 00000000..dbb9badb --- /dev/null +++ b/ARKBreedingStats/StatsOptions/StatOptionsBase.cs @@ -0,0 +1,19 @@ +namespace ARKBreedingStats.StatsOptions +{ + public abstract class StatOptionsBase + { + public abstract void Initialize(); + + public abstract void PrepareForSaving(); + + /// + /// If true don't use values of parent but overrides of this object. + /// + public bool OverrideParent; + + /// + /// Contains data and doesn't depend on parent data. + /// + public abstract bool DefinesData(); + } +} diff --git a/ARKBreedingStats/StatsOptions/StatsOptions.cs b/ARKBreedingStats/StatsOptions/StatsOptions.cs new file mode 100644 index 00000000..45e77ccf --- /dev/null +++ b/ARKBreedingStats/StatsOptions/StatsOptions.cs @@ -0,0 +1,42 @@ +using ARKBreedingStats.species; +using ARKBreedingStats.utils; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ARKBreedingStats.StatsOptions +{ + /// + /// Options for stats of species, e.g. breeding stat weights, graph representation and top stat considerations. + /// + [JsonObject(MemberSerialization.OptIn)] + public class StatsOptions where T : StatOptionsBase + { + + /// + /// Name of the stats options, usually a species name. + /// + [JsonProperty] + public string Name; + + public override string ToString() => string.IsNullOrEmpty(Name) ? $"<{Loc.S("default")}>" : Name; + + /// + /// Name of the parent setting + /// + [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] + public string ParentName; + + public StatsOptions ParentOptions; + + /// + /// One option per stat. + /// + [JsonProperty] + public T[] StatOptions; + } +} diff --git a/ARKBreedingStats/library/StatsOptions.cs b/ARKBreedingStats/StatsOptions/StatsOptionsSettings.cs similarity index 62% rename from ARKBreedingStats/library/StatsOptions.cs rename to ARKBreedingStats/StatsOptions/StatsOptionsSettings.cs index c26589c8..d0022fe0 100644 --- a/ARKBreedingStats/library/StatsOptions.cs +++ b/ARKBreedingStats/StatsOptions/StatsOptionsSettings.cs @@ -1,46 +1,38 @@ using System; -using ARKBreedingStats.utils; using System.Collections.Generic; using System.IO; using System.Linq; using ARKBreedingStats.species; -using Newtonsoft.Json; +using ARKBreedingStats.utils; -namespace ARKBreedingStats.library +namespace ARKBreedingStats.StatsOptions { /// - /// Options for stats of species, e.g. breeding stat weights and graph representation. + /// Base access to stats options. /// - [JsonObject(MemberSerialization.OptIn)] - public class StatsOptions + /// + public class StatsOptionsSettings where T : StatOptionsBase { - public static Dictionary StatsOptionsDict; + public Dictionary> StatsOptionsDict; /// - /// Name of the stats options, usually a species name. + /// Name of the settings file. /// - [JsonProperty] - public string Name; - - public override string ToString() => string.IsNullOrEmpty(Name) ? $"<{Loc.S("default")}>" : Name; + private readonly string _settingsFileName; - /// - /// Name of the parent setting - /// - [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ParentName; - - public StatsOptions ParentOptions; - - [JsonProperty] - public StatOptions[] StatOptions; + public StatsOptionsSettings(string settingsFileName) + { + _settingsFileName = settingsFileName; + LoadSettings(settingsFileName); + } /// /// Load stats options from the settings file. /// - public static void LoadSettings() + public void LoadSettings(string settingsFileName) { - var filePath = FileService.GetJsonPath("statOptions.json"); + if (string.IsNullOrEmpty(settingsFileName)) return; + var filePath = FileService.GetJsonPath(_settingsFileName); string errorMessage = null; if (!File.Exists(filePath) @@ -48,7 +40,7 @@ public static void LoadSettings() { if (!string.IsNullOrEmpty(errorMessage)) MessageBoxes.ShowMessageBox(errorMessage); - StatsOptionsDict = new Dictionary(); + StatsOptionsDict = new Dictionary>(); } // default value @@ -69,10 +61,7 @@ public static void LoadSettings() foreach (var so in o.StatOptions) { - if (so.LevelGraphRepresentation != null || so.LevelGraphRepresentationOdd != null) - so.OverrideParent = true; - if (so.LevelGraphRepresentationOdd != null) - so.UseDifferentColorsForOddLevels = true; + so.Initialize(); } } } @@ -80,22 +69,36 @@ public static void LoadSettings() /// /// Returns the default stat options. /// - public static StatsOptions GetDefaultStatOptions(string name) => new StatsOptions + public StatsOptions GetDefaultStatOptions(string name) { - Name = name, - StatOptions = Enumerable.Range(0, Stats.StatsCount).Select(si => new StatOptions + T[] statOptions; + + if (typeof(T) == typeof(StatLevelColors)) + { + statOptions = Enumerable.Range(0, Stats.StatsCount) + .Select(si => StatLevelColors.GetDefault() as T).ToArray(); + } + else + { + throw new ArgumentOutOfRangeException($"Unknown type {typeof(T)}, no default value defined"); + } + + return new StatsOptions { - LevelGraphRepresentation = LevelGraphRepresentation.GetDefaultValue - }).ToArray(), - ParentOptions = StatsOptionsDict.TryGetValue(string.Empty, out var p) ? p : null - }; + Name = name, + StatOptions = statOptions, + ParentOptions = StatsOptionsDict.TryGetValue(string.Empty, out var p) ? p : null + }; + } /// /// Save stats options to the settings file. /// - public static void SaveSettings() + public void SaveSettings() { - var filePath = FileService.GetJsonPath("statOptions.json"); + if (string.IsNullOrEmpty(_settingsFileName)) return; + + var filePath = FileService.GetJsonPath(_settingsFileName); // set parent names and clear settings not used foreach (var o in StatsOptionsDict.Values) @@ -106,13 +109,7 @@ public static void SaveSettings() o.ParentName = null; // don't save direct loop foreach (var so in o.StatOptions) { - if (!so.OverrideParent) - { - so.LevelGraphRepresentation = null; - so.LevelGraphRepresentationOdd = null; - } - else if (!so.UseDifferentColorsForOddLevels) - so.LevelGraphRepresentationOdd = null; + so.PrepareForSaving(); } } @@ -124,7 +121,7 @@ public static void SaveSettings() /// /// Returns the stats options for a species. /// - public static StatsOptions GetStatsOptions(Species species) + public StatsOptions GetStatsOptions(Species species) { if (species == null || StatsOptionsDict == null) return null; @@ -140,11 +137,11 @@ public static StatsOptions GetStatsOptions(Species species) /// /// Generates StatsOptions, using the parent's options if not specified explicitly. /// - private static StatsOptions GenerateStatsOptions(StatsOptions so) + private StatsOptions GenerateStatsOptions(StatsOptions so) { - var finalStatsOptions = new StatsOptions { StatOptions = new StatOptions[Stats.StatsCount] }; - var parentLine = new HashSet(); // to track possible parent loops (i.e. check if setting depends on itself) - StatsOptions defaultOptions = null; + var finalStatsOptions = new StatsOptions { StatOptions = new T[Stats.StatsCount] }; + var parentLine = new HashSet>(); // to track possible parent loops (i.e. check if setting depends on itself) + StatsOptions defaultOptions = null; for (var si = 0; si < Stats.StatsCount; si++) { var useStatsOptions = so; @@ -158,7 +155,7 @@ private static StatsOptions GenerateStatsOptions(StatsOptions so) } var statOptions = useStatsOptions.StatOptions?[si]; - if (statOptions?.LevelGraphRepresentation == null) + if (statOptions?.DefinesData() != true) { if (defaultOptions == null && !StatsOptionsDict.TryGetValue(string.Empty, out defaultOptions)) throw new Exception("no default stats options found"); diff --git a/ARKBreedingStats/library/StatWeight.cs b/ARKBreedingStats/library/StatWeight.cs deleted file mode 100644 index 2493a97e..00000000 --- a/ARKBreedingStats/library/StatWeight.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ARKBreedingStats.library -{ - /// - /// Options for stat weighting regarding breeding and top stat calculation. - /// - internal class StatWeight - { - public bool ConsiderInTopStatCalculation; - } -} diff --git a/ARKBreedingStats/uiControls/HueControl.cs b/ARKBreedingStats/uiControls/HueControl.cs index 4ac8a2a3..48648051 100644 --- a/ARKBreedingStats/uiControls/HueControl.cs +++ b/ARKBreedingStats/uiControls/HueControl.cs @@ -3,6 +3,7 @@ using System; using System.Drawing; using System.Windows.Forms; +using ARKBreedingStats.StatsOptions; using Newtonsoft.Json; namespace ARKBreedingStats.uiControls diff --git a/ARKBreedingStats/uiControls/StatsOptionsControl.cs b/ARKBreedingStats/uiControls/LevelGraphOptionsControl.cs similarity index 82% rename from ARKBreedingStats/uiControls/StatsOptionsControl.cs rename to ARKBreedingStats/uiControls/LevelGraphOptionsControl.cs index 88986ba5..da0686d2 100644 --- a/ARKBreedingStats/uiControls/StatsOptionsControl.cs +++ b/ARKBreedingStats/uiControls/LevelGraphOptionsControl.cs @@ -5,14 +5,17 @@ using System.Drawing; using System.Linq; using System.Windows.Forms; +using System.Windows.Forms.VisualStyles; +using ARKBreedingStats.StatsOptions; namespace ARKBreedingStats.uiControls { - internal class StatsOptionsControl : TableLayoutPanel where T : new() + internal class LevelGraphOptionsControl : TableLayoutPanel { private StatOptionsControl[] _statOptionsControls; private readonly ToolTip _tt = new ToolTip(); - private StatsOptions _selectedStatsOptions; + private StatsOptions _selectedStatsOptions; + private StatsOptionsSettings _statsOptionsSettings; private Species _species; private ComboBox _cbbOptions; private ComboBox _cbbParent; @@ -20,8 +23,23 @@ namespace ARKBreedingStats.uiControls private TextBox _tbOptionsName; private Label _lbParent; - public StatsOptionsControl() + public static void ShowWindow(Form parent, StatsOptionsSettings settings) { + var so = new LevelGraphOptionsControl(settings); + var f = new Form + { + FormBorderStyle = FormBorderStyle.SizableToolWindow, + Width = 1000, + Height = 1000 + }; + f.Controls.Add(so); + so.Dock = DockStyle.Fill; + f.Show(parent); + } + + public LevelGraphOptionsControl(StatsOptionsSettings settings) + { + _statsOptionsSettings = settings; InitializeControls(); InitializeOptions(); } @@ -91,7 +109,7 @@ public void InitializeOptions() _cbbOptions.Items.Clear(); _cbbParent.Items.Clear(); - var statsOptions = StatsOptions.StatsOptionsDict.Values.OrderBy(n => n.Name).ToArray(); + var statsOptions = _statsOptionsSettings.StatsOptionsDict.Values.OrderBy(n => n.Name).ToArray(); _cbbOptions.Items.AddRange(statsOptions); _cbbParent.Items.AddRange(statsOptions); if (_cbbOptions.Items.Count > 0) @@ -100,7 +118,7 @@ public void InitializeOptions() private void CbbOptions_SelectedIndexChanged(object sender, EventArgs e) { - _selectedStatsOptions = _cbbOptions.SelectedItem as StatsOptions; + _selectedStatsOptions = _cbbOptions.SelectedItem as StatsOptions; if (_selectedStatsOptions == null) return; this.SuspendDrawing(); @@ -119,9 +137,9 @@ private void CbbOptions_SelectedIndexChanged(object sender, EventArgs e) private void CbbParent_SelectedIndexChanged(object sender, EventArgs e) { - _selectedStatsOptions = _cbbOptions.SelectedItem as StatsOptions; + _selectedStatsOptions = _cbbOptions.SelectedItem as StatsOptions; if (_selectedStatsOptions == null) return; - _selectedStatsOptions.ParentOptions = _cbbParent.SelectedItem as StatsOptions; + _selectedStatsOptions.ParentOptions = _cbbParent.SelectedItem as StatsOptions; } private void TbOptionsName_Leave(object sender, EventArgs e) @@ -130,13 +148,13 @@ private void TbOptionsName_Leave(object sender, EventArgs e) if (_selectedStatsOptions.Name == newNameBase) return; // nothing to change var newName = newNameBase; var suffix = 1; - while (StatsOptions.StatsOptionsDict.ContainsKey(newName)) + while (_statsOptionsSettings.StatsOptionsDict.ContainsKey(newName)) newName = newNameBase + "_" + ++suffix; _tbOptionsName.Text = newName; - StatsOptions.StatsOptionsDict.Remove(_selectedStatsOptions.Name); + _statsOptionsSettings.StatsOptionsDict.Remove(_selectedStatsOptions.Name); _selectedStatsOptions.Name = newName; - StatsOptions.StatsOptionsDict.Add(newName, _selectedStatsOptions); + _statsOptionsSettings.StatsOptionsDict.Add(newName, _selectedStatsOptions); // update text in combobox _cbbOptions.Items[_cbbOptions.SelectedIndex] = _selectedStatsOptions; } @@ -146,10 +164,10 @@ private void BtNew_Click(object sender, EventArgs e) var newNameBase = _species?.name ?? "new entry"; var newName = newNameBase; var suffix = 1; - while (StatsOptions.StatsOptionsDict.ContainsKey(newName)) + while (_statsOptionsSettings.StatsOptionsDict.ContainsKey(newName)) newName = newNameBase + "_" + ++suffix; - var newSettings = StatsOptions.GetDefaultStatOptions(newName); - StatsOptions.StatsOptionsDict.Add(newName, newSettings); + var newSettings = _statsOptionsSettings.GetDefaultStatOptions(newName); + _statsOptionsSettings.StatsOptionsDict.Add(newName, newSettings); InitializeOptions(); _cbbOptions.SelectedItem = newSettings; } @@ -162,13 +180,13 @@ private void BtRemove_Click(object sender, EventArgs e) var index = _cbbOptions.SelectedIndex; // set parent of dependant options to parent of this setting - foreach (var so in StatsOptions.StatsOptionsDict.Values) + foreach (var so in _statsOptionsSettings.StatsOptionsDict.Values) { if (so.ParentOptions == _selectedStatsOptions) so.ParentOptions = _selectedStatsOptions.ParentOptions; } - StatsOptions.StatsOptionsDict.Remove(_selectedStatsOptions.Name); + _statsOptionsSettings.StatsOptionsDict.Remove(_selectedStatsOptions.Name); InitializeOptions(); if (_cbbOptions.Items.Count > 0) diff --git a/ARKBreedingStats/uiControls/StatIO.cs b/ARKBreedingStats/uiControls/StatIO.cs index c3e2f11f..81e0e491 100644 --- a/ARKBreedingStats/uiControls/StatIO.cs +++ b/ARKBreedingStats/uiControls/StatIO.cs @@ -4,6 +4,7 @@ using System.Windows.Input; using System.Windows.Threading; using ARKBreedingStats.library; +using ARKBreedingStats.StatsOptions; using ARKBreedingStats.utils; using Cursors = System.Windows.Forms.Cursors; @@ -27,7 +28,7 @@ public partial class StatIO : UserControl private bool _linkWildMutated; private int _wildMutatedSum; private readonly Debouncer _levelChangedDebouncer = new Debouncer(); - private StatOptions _statOptions; + private StatLevelColors _statLevelColors; public StatIO() { @@ -319,7 +320,7 @@ private void numLvD_ValueChanged(object sender, EventArgs e) private void SetLevelBar(Panel panel, int level) { - var range = _statOptions.GetLevelRange(level, out var lowerBound); + var range = _statLevelColors.GetLevelRange(level, out var lowerBound); if (range < 1) range = 1; var lengthPercentage = 100 * (level - lowerBound) / range; // in percentage of the max bar width @@ -327,7 +328,7 @@ private void SetLevelBar(Panel panel, int level) else if (lengthPercentage < 0) lengthPercentage = 0; panel.Width = lengthPercentage * MaxBarLength / 100; - panel.BackColor = _statOptions.GetLevelColor(level); + panel.BackColor = _statLevelColors.GetLevelColor(level); } private void LevelChangedDebouncer() => _levelChangedDebouncer.Debounce(200, FireLevelChanged, Dispatcher.CurrentDispatcher); @@ -411,9 +412,9 @@ public bool LinkWildMutated } } - public void SetStatOptions(StatOptions so) + public void SetStatOptions(StatLevelColors so) { - _statOptions = so; + _statLevelColors = so; if (nudLvW.Value > 0) SetLevelBar(panelBarWildLevels, (int)nudLvW.Value); if (nudLvD.Value > 0) diff --git a/ARKBreedingStats/uiControls/StatOptionsControl.cs b/ARKBreedingStats/uiControls/StatOptionsControl.cs index 2528b8b4..44e959cf 100644 --- a/ARKBreedingStats/uiControls/StatOptionsControl.cs +++ b/ARKBreedingStats/uiControls/StatOptionsControl.cs @@ -1,15 +1,15 @@ using System; using System.Windows.Forms; -using ARKBreedingStats.library; +using ARKBreedingStats.StatsOptions; namespace ARKBreedingStats.uiControls { public partial class StatOptionsControl : UserControl { private readonly ToolTip _tt; - private StatOptions _statOptions; - private int _statIndex; - private StatsOptions _parent; + private StatLevelColors _statLevelColors; + private readonly int _statIndex; + private StatsOptions _parent; public StatOptionsControl() { @@ -26,9 +26,9 @@ public StatOptionsControl(string name, int statIndex, ToolTip tt) : this() _tt.SetToolTip(CbUseDifferentColorsForOddLevels, "Use different colors for odd levels"); } - public void SetStatOptions(StatOptions so, bool isNotRoot, StatsOptions parent) + public void SetStatOptions(StatLevelColors so, bool isNotRoot, StatsOptions parent) { - _statOptions = so; + _statLevelColors = so; _parent = parent; CbUseDifferentColorsForOddLevels.Checked = so?.UseDifferentColorsForOddLevels == true; hueControl.SetValues(so?.LevelGraphRepresentation); @@ -43,23 +43,23 @@ private void CbOverrideGraphSettings_CheckedChanged(object sender, EventArgs e) hueControl.Enabled = overrideStat; hueControlOdd.Enabled = overrideStat; CbUseDifferentColorsForOddLevels.Enabled = overrideStat; - _statOptions.OverrideParent = overrideStat; - if (overrideStat && _statOptions.LevelGraphRepresentation == null) + _statLevelColors.OverrideParent = overrideStat; + if (overrideStat && _statLevelColors.LevelGraphRepresentation == null) { - _statOptions.LevelGraphRepresentation = _parent?.StatOptions[_statIndex].LevelGraphRepresentation.Copy() ?? LevelGraphRepresentation.GetDefaultValue; - hueControl.SetValues(_statOptions.LevelGraphRepresentation); + _statLevelColors.LevelGraphRepresentation = _parent?.StatOptions[_statIndex].LevelGraphRepresentation.Copy() ?? LevelGraphRepresentation.GetDefaultValue; + hueControl.SetValues(_statLevelColors.LevelGraphRepresentation); } } private void CbUseDifferentColorsForOddLevels_CheckedChanged(object sender, EventArgs e) { - _statOptions.UseDifferentColorsForOddLevels = CbUseDifferentColorsForOddLevels.Checked; - hueControlOdd.Visible = _statOptions.UseDifferentColorsForOddLevels; - if (_statOptions.UseDifferentColorsForOddLevels && _statOptions.LevelGraphRepresentationOdd == null) + _statLevelColors.UseDifferentColorsForOddLevels = CbUseDifferentColorsForOddLevels.Checked; + hueControlOdd.Visible = _statLevelColors.UseDifferentColorsForOddLevels; + if (_statLevelColors.UseDifferentColorsForOddLevels && _statLevelColors.LevelGraphRepresentationOdd == null) { - _statOptions.LevelGraphRepresentationOdd = _parent?.StatOptions[_statIndex].LevelGraphRepresentationOdd?.Copy() + _statLevelColors.LevelGraphRepresentationOdd = _parent?.StatOptions[_statIndex].LevelGraphRepresentationOdd?.Copy() ?? LevelGraphRepresentation.GetDefaultValue; - hueControlOdd.SetValues(_statOptions.LevelGraphRepresentationOdd); + hueControlOdd.SetValues(_statLevelColors.LevelGraphRepresentationOdd); } } } diff --git a/ARKBreedingStats/uiControls/StatWeighting.cs b/ARKBreedingStats/uiControls/StatWeighting.cs index 769dab25..26159496 100644 --- a/ARKBreedingStats/uiControls/StatWeighting.cs +++ b/ARKBreedingStats/uiControls/StatWeighting.cs @@ -26,7 +26,7 @@ public StatWeighting() InitializeComponent(); _currentSpecies = null; - var displayedStats = new int[]{ + var displayedStats = new[]{ Stats.Health, Stats.Stamina, Stats.Oxygen, From 676081f1607229e38407147c7aa1eaf643df115e Mon Sep 17 00:00:00 2001 From: cadon Date: Fri, 5 Jul 2024 22:32:14 +0200 Subject: [PATCH 30/36] buttons to set imprinting to 0 or 100 % --- ARKBreedingStats/Form1.Designer.cs | 83 +++++++++++++++++++++-------- ARKBreedingStats/Form1.cs | 7 ++- ARKBreedingStats/Form1.extractor.cs | 6 +++ ARKBreedingStats/Form1.tester.cs | 7 +++ 4 files changed, 77 insertions(+), 26 deletions(-) diff --git a/ARKBreedingStats/Form1.Designer.cs b/ARKBreedingStats/Form1.Designer.cs index db831a35..b5495d71 100644 --- a/ARKBreedingStats/Form1.Designer.cs +++ b/ARKBreedingStats/Form1.Designer.cs @@ -58,6 +58,7 @@ private void InitializeComponent() this.quitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.lbImprintedCount = new System.Windows.Forms.Label(); + this.BtSetImprinting100Tester = new System.Windows.Forms.Button(); this.labelImprintingTester = new System.Windows.Forms.Label(); this.numericUpDownImprintingBonusTester = new ARKBreedingStats.uiControls.Nud(); this.NumericUpDownTestingTE = new ARKBreedingStats.uiControls.Nud(); @@ -70,6 +71,8 @@ private void InitializeComponent() this.columnHeaderLW = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.groupBoxDetailsExtractor = new System.Windows.Forms.GroupBox(); this.panelExtrImpr = new System.Windows.Forms.Panel(); + this.BtSetImprinting0Extractor = new System.Windows.Forms.Button(); + this.BtSetImprinting100Extractor = new System.Windows.Forms.Button(); this.cbExactlyImprinting = new System.Windows.Forms.CheckBox(); this.labelImprintingBonus = new System.Windows.Forms.Label(); this.lbImprintingCuddleCountExtractor = new System.Windows.Forms.Label(); @@ -123,6 +126,7 @@ private void InitializeComponent() this.nameGeneratorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.statsOptionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator18 = new System.Windows.Forms.ToolStripSeparator(); this.modValueManagerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.customStatOverridesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -395,7 +399,6 @@ private void InitializeComponent() this.toolStripSeparator27 = new System.Windows.Forms.ToolStripSeparator(); this.resetColumnOrderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.speciesSelector1 = new ARKBreedingStats.SpeciesSelector(); - this.statsOptionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).BeginInit(); @@ -624,13 +627,14 @@ private void InitializeComponent() // groupBox1 // this.groupBox1.Controls.Add(this.lbImprintedCount); + this.groupBox1.Controls.Add(this.BtSetImprinting100Tester); this.groupBox1.Controls.Add(this.labelImprintingTester); this.groupBox1.Controls.Add(this.numericUpDownImprintingBonusTester); this.groupBox1.Controls.Add(this.NumericUpDownTestingTE); this.groupBox1.Controls.Add(this.labelTesterTE); this.groupBox1.Location = new System.Drawing.Point(373, 6); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(229, 72); + this.groupBox1.Size = new System.Drawing.Size(262, 72); this.groupBox1.TabIndex = 2; this.groupBox1.TabStop = false; this.groupBox1.Text = "Details"; @@ -638,18 +642,28 @@ private void InitializeComponent() // lbImprintedCount // this.lbImprintedCount.AutoSize = true; - this.lbImprintedCount.Location = new System.Drawing.Point(181, 47); + this.lbImprintedCount.Location = new System.Drawing.Point(183, 47); this.lbImprintedCount.Name = "lbImprintedCount"; this.lbImprintedCount.Size = new System.Drawing.Size(25, 13); this.lbImprintedCount.TabIndex = 5; this.lbImprintedCount.Text = "(0×)"; this.lbImprintedCount.MouseClick += new System.Windows.Forms.MouseEventHandler(this.labelImprintedCount_MouseClick); // + // BtSetImprinting100Tester + // + this.BtSetImprinting100Tester.Location = new System.Drawing.Point(222, 43); + this.BtSetImprinting100Tester.Name = "BtSetImprinting100Tester"; + this.BtSetImprinting100Tester.Size = new System.Drawing.Size(34, 20); + this.BtSetImprinting100Tester.TabIndex = 15; + this.BtSetImprinting100Tester.Text = "100"; + this.BtSetImprinting100Tester.UseVisualStyleBackColor = true; + this.BtSetImprinting100Tester.Click += new System.EventHandler(this.BtSetImprinting100Tester_Click); + // // labelImprintingTester // this.labelImprintingTester.AutoSize = true; this.labelImprintingTester.Enabled = false; - this.labelImprintingTester.Location = new System.Drawing.Point(87, 47); + this.labelImprintingTester.Location = new System.Drawing.Point(81, 47); this.labelImprintingTester.Name = "labelImprintingTester"; this.labelImprintingTester.Size = new System.Drawing.Size(96, 13); this.labelImprintingTester.TabIndex = 5; @@ -672,7 +686,7 @@ private void InitializeComponent() 0, 0, 0}); - this.numericUpDownImprintingBonusTester.Size = new System.Drawing.Size(75, 20); + this.numericUpDownImprintingBonusTester.Size = new System.Drawing.Size(69, 20); this.numericUpDownImprintingBonusTester.TabIndex = 4; this.numericUpDownImprintingBonusTester.ValueChanged += new System.EventHandler(this.numericUpDownImprintingBonusTester_ValueChanged); // @@ -774,6 +788,8 @@ private void InitializeComponent() // // panelExtrImpr // + this.panelExtrImpr.Controls.Add(this.BtSetImprinting0Extractor); + this.panelExtrImpr.Controls.Add(this.BtSetImprinting100Extractor); this.panelExtrImpr.Controls.Add(this.cbExactlyImprinting); this.panelExtrImpr.Controls.Add(this.labelImprintingBonus); this.panelExtrImpr.Controls.Add(this.lbImprintingCuddleCountExtractor); @@ -784,13 +800,33 @@ private void InitializeComponent() this.panelExtrImpr.TabIndex = 52; this.panelExtrImpr.Visible = false; // + // BtSetImprinting0Extractor + // + this.BtSetImprinting0Extractor.Location = new System.Drawing.Point(3, 26); + this.BtSetImprinting0Extractor.Name = "BtSetImprinting0Extractor"; + this.BtSetImprinting0Extractor.Size = new System.Drawing.Size(35, 23); + this.BtSetImprinting0Extractor.TabIndex = 1; + this.BtSetImprinting0Extractor.Text = "0 %"; + this.BtSetImprinting0Extractor.UseVisualStyleBackColor = true; + this.BtSetImprinting0Extractor.Click += new System.EventHandler(this.BtSetImprinting0_Click); + // + // BtSetImprinting100Extractor + // + this.BtSetImprinting100Extractor.Location = new System.Drawing.Point(40, 26); + this.BtSetImprinting100Extractor.Name = "BtSetImprinting100Extractor"; + this.BtSetImprinting100Extractor.Size = new System.Drawing.Size(47, 23); + this.BtSetImprinting100Extractor.TabIndex = 2; + this.BtSetImprinting100Extractor.Text = "100 %"; + this.BtSetImprinting100Extractor.UseVisualStyleBackColor = true; + this.BtSetImprinting100Extractor.Click += new System.EventHandler(this.BtSetImprinting100_Click); + // // cbExactlyImprinting // this.cbExactlyImprinting.AutoSize = true; - this.cbExactlyImprinting.Location = new System.Drawing.Point(3, 29); + this.cbExactlyImprinting.Location = new System.Drawing.Point(93, 29); this.cbExactlyImprinting.Name = "cbExactlyImprinting"; this.cbExactlyImprinting.Size = new System.Drawing.Size(120, 17); - this.cbExactlyImprinting.TabIndex = 51; + this.cbExactlyImprinting.TabIndex = 3; this.cbExactlyImprinting.Text = "Exactly, don\'t adjust"; this.cbExactlyImprinting.UseVisualStyleBackColor = true; // @@ -829,7 +865,7 @@ private void InitializeComponent() 0, 0}); this.numericUpDownImprintingBonusExtractor.Size = new System.Drawing.Size(77, 20); - this.numericUpDownImprintingBonusExtractor.TabIndex = 6; + this.numericUpDownImprintingBonusExtractor.TabIndex = 0; this.numericUpDownImprintingBonusExtractor.ValueChanged += new System.EventHandler(this.numericUpDownImprintingBonusExtractor_ValueChanged); this.numericUpDownImprintingBonusExtractor.Enter += new System.EventHandler(this.numericUpDown_Enter); // @@ -1278,6 +1314,13 @@ private void InitializeComponent() this.openSettingsToolStripMenuItem.Text = "Settings…"; this.openSettingsToolStripMenuItem.Click += new System.EventHandler(this.settingsToolStripMenuItem_Click); // + // statsOptionsToolStripMenuItem + // + this.statsOptionsToolStripMenuItem.Name = "statsOptionsToolStripMenuItem"; + this.statsOptionsToolStripMenuItem.Size = new System.Drawing.Size(226, 22); + this.statsOptionsToolStripMenuItem.Text = "StatsOptions"; + this.statsOptionsToolStripMenuItem.Click += new System.EventHandler(this.statsOptionsToolStripMenuItem_Click); + // // toolStripSeparator18 // this.toolStripSeparator18.Name = "toolStripSeparator18"; @@ -1852,7 +1895,7 @@ private void InitializeComponent() this.gpPreviewEdit.Controls.Add(this.lbTestingInfo); this.gpPreviewEdit.Location = new System.Drawing.Point(373, 84); this.gpPreviewEdit.Name = "gpPreviewEdit"; - this.gpPreviewEdit.Size = new System.Drawing.Size(229, 91); + this.gpPreviewEdit.Size = new System.Drawing.Size(262, 91); this.gpPreviewEdit.TabIndex = 3; this.gpPreviewEdit.TabStop = false; this.gpPreviewEdit.Text = "Preview / Edit"; @@ -1880,7 +1923,7 @@ private void InitializeComponent() // this.lbTestingInfo.Location = new System.Drawing.Point(6, 16); this.lbTestingInfo.Name = "lbTestingInfo"; - this.lbTestingInfo.Size = new System.Drawing.Size(217, 25); + this.lbTestingInfo.Size = new System.Drawing.Size(250, 25); this.lbTestingInfo.TabIndex = 37; this.lbTestingInfo.Text = "Preview or edit levels of a creature."; // @@ -2995,7 +3038,7 @@ private void InitializeComponent() this.tabPage3.Location = new System.Drawing.Point(4, 22); this.tabPage3.Name = "tabPage3"; this.tabPage3.Padding = new System.Windows.Forms.Padding(3); - this.tabPage3.Size = new System.Drawing.Size(181, 176); + this.tabPage3.Size = new System.Drawing.Size(181, 328); this.tabPage3.TabIndex = 2; this.tabPage3.Text = "Stats"; this.tabPage3.UseVisualStyleBackColor = true; @@ -3014,7 +3057,7 @@ private void InitializeComponent() this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(175, 170); + this.tableLayoutPanel2.Size = new System.Drawing.Size(175, 322); this.tableLayoutPanel2.TabIndex = 0; // // checkedListBoxConsiderStatTop @@ -3024,13 +3067,13 @@ private void InitializeComponent() this.checkedListBoxConsiderStatTop.FormattingEnabled = true; this.checkedListBoxConsiderStatTop.Location = new System.Drawing.Point(3, 35); this.checkedListBoxConsiderStatTop.Name = "checkedListBoxConsiderStatTop"; - this.checkedListBoxConsiderStatTop.Size = new System.Drawing.Size(169, 103); + this.checkedListBoxConsiderStatTop.Size = new System.Drawing.Size(169, 255); this.checkedListBoxConsiderStatTop.TabIndex = 3; // // buttonRecalculateTops // this.buttonRecalculateTops.Dock = System.Windows.Forms.DockStyle.Fill; - this.buttonRecalculateTops.Location = new System.Drawing.Point(3, 144); + this.buttonRecalculateTops.Location = new System.Drawing.Point(3, 296); this.buttonRecalculateTops.Name = "buttonRecalculateTops"; this.buttonRecalculateTops.Size = new System.Drawing.Size(169, 23); this.buttonRecalculateTops.TabIndex = 2; @@ -3053,7 +3096,7 @@ private void InitializeComponent() this.tabPageLibRadarChart.Location = new System.Drawing.Point(4, 22); this.tabPageLibRadarChart.Name = "tabPageLibRadarChart"; this.tabPageLibRadarChart.Padding = new System.Windows.Forms.Padding(3); - this.tabPageLibRadarChart.Size = new System.Drawing.Size(181, 176); + this.tabPageLibRadarChart.Size = new System.Drawing.Size(181, 328); this.tabPageLibRadarChart.TabIndex = 4; this.tabPageLibRadarChart.Text = "Chart"; this.tabPageLibRadarChart.UseVisualStyleBackColor = true; @@ -3883,13 +3926,6 @@ private void InitializeComponent() this.speciesSelector1.SplitterDistance = 500; this.speciesSelector1.TabIndex = 0; // - // statsOptionsToolStripMenuItem - // - this.statsOptionsToolStripMenuItem.Name = "statsOptionsToolStripMenuItem"; - this.statsOptionsToolStripMenuItem.Size = new System.Drawing.Size(226, 22); - this.statsOptionsToolStripMenuItem.Text = "StatsOptions"; - this.statsOptionsToolStripMenuItem.Click += new System.EventHandler(this.statsOptionsToolStripMenuItem_Click); - // // Form1 // this.AcceptButton = this.btExtractLevels; @@ -4362,5 +4398,8 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem adminCommandSetMutationLevelsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem commandMutationLevelsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem statsOptionsToolStripMenuItem; + private System.Windows.Forms.Button BtSetImprinting100Extractor; + private System.Windows.Forms.Button BtSetImprinting0Extractor; + private System.Windows.Forms.Button BtSetImprinting100Tester; } } diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 643c068e..f0a19266 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -1734,12 +1734,11 @@ private void numericUpDownImprintingBonusTester_ValueChanged(object sender, Even speciesSelector1.SelectedSpecies.breeding.maturationTimeAdjusted > 0) lbImprintedCount.Text = "(" + Math.Round( - (double)numericUpDownImprintingBonusTester.Value / (100 * - Ark.ImprintingGainPerCuddle( - speciesSelector1.SelectedSpecies - .breeding.maturationTimeAdjusted)), + (double)numericUpDownImprintingBonusTester.Value / + (100 * Ark.ImprintingGainPerCuddle(speciesSelector1.SelectedSpecies.breeding.maturationTimeAdjusted)), 2) + "×)"; else lbImprintedCount.Text = string.Empty; + BtSetImprinting100Tester.Text = numericUpDownImprintingBonusTester.Value == 100 ? "0" : "100"; } private void numericUpDownImprintingBonusExtractor_ValueChanged(object sender, EventArgs e) diff --git a/ARKBreedingStats/Form1.extractor.cs b/ARKBreedingStats/Form1.extractor.cs index 16cad63c..e9af9cc0 100644 --- a/ARKBreedingStats/Form1.extractor.cs +++ b/ARKBreedingStats/Form1.extractor.cs @@ -1542,5 +1542,11 @@ private void TsCbbLabelSets_SelectedIndexChanged(object sender, EventArgs e) } #endregion + + private void BtSetImprinting0_Click(object sender, EventArgs e) + => numericUpDownImprintingBonusExtractor.ValueSave = 0; + + private void BtSetImprinting100_Click(object sender, EventArgs e) + => numericUpDownImprintingBonusExtractor.ValueSave = 100; } } diff --git a/ARKBreedingStats/Form1.tester.cs b/ARKBreedingStats/Form1.tester.cs index a2fb37b3..bfb4dd28 100644 --- a/ARKBreedingStats/Form1.tester.cs +++ b/ARKBreedingStats/Form1.tester.cs @@ -393,5 +393,12 @@ private void CbLinkWildMutatedLevelsTester_CheckedChanged(object sender, EventAr _testingIOs[s].LinkWildMutated = linkWildMutated; Properties.Settings.Default.TesterLinkWildMutatedLevels = linkWildMutated; } + + private void BtSetImprinting100Tester_Click(object sender, EventArgs e) + { + // set imprinting to 100 %, or if already at 100 % to 0 + numericUpDownImprintingBonusTester.ValueSaveDouble = + numericUpDownImprintingBonusTester.Value == 100 ? 0 : 100; + } } } From b84ddcd4638ea00f9c8296f4187727d0ae727cdc Mon Sep 17 00:00:00 2001 From: cadon Date: Fri, 5 Jul 2024 23:12:14 +0200 Subject: [PATCH 31/36] library context menu for all 6 name patterns --- ARKBreedingStats/Form1.Designer.cs | 958 ++++++++++++++--------------- ARKBreedingStats/Form1.cs | 23 +- 2 files changed, 493 insertions(+), 488 deletions(-) diff --git a/ARKBreedingStats/Form1.Designer.cs b/ARKBreedingStats/Form1.Designer.cs index b5495d71..164d41d4 100644 --- a/ARKBreedingStats/Form1.Designer.cs +++ b/ARKBreedingStats/Form1.Designer.cs @@ -60,8 +60,6 @@ private void InitializeComponent() this.lbImprintedCount = new System.Windows.Forms.Label(); this.BtSetImprinting100Tester = new System.Windows.Forms.Button(); this.labelImprintingTester = new System.Windows.Forms.Label(); - this.numericUpDownImprintingBonusTester = new ARKBreedingStats.uiControls.Nud(); - this.NumericUpDownTestingTE = new ARKBreedingStats.uiControls.Nud(); this.labelTesterTE = new System.Windows.Forms.Label(); this.groupBoxPossibilities = new System.Windows.Forms.GroupBox(); this.listViewPossibilities = new System.Windows.Forms.ListView(); @@ -76,14 +74,11 @@ private void InitializeComponent() this.cbExactlyImprinting = new System.Windows.Forms.CheckBox(); this.labelImprintingBonus = new System.Windows.Forms.Label(); this.lbImprintingCuddleCountExtractor = new System.Windows.Forms.Label(); - this.numericUpDownImprintingBonusExtractor = new ARKBreedingStats.uiControls.Nud(); this.panelExtrTE = new System.Windows.Forms.Panel(); this.labelTE = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.numericUpDownUpperTEffBound = new ARKBreedingStats.uiControls.Nud(); this.label3 = new System.Windows.Forms.Label(); - this.numericUpDownLowerTEffBound = new ARKBreedingStats.uiControls.Nud(); this.lbLevel = new System.Windows.Forms.Label(); this.lbBreedingValueTester = new System.Windows.Forms.Label(); this.lbTesterWildLevel = new System.Windows.Forms.Label(); @@ -171,9 +166,7 @@ private void InitializeComponent() this.tabPageStatTesting = new System.Windows.Forms.TabPage(); this.CbLinkWildMutatedLevelsTester = new System.Windows.Forms.CheckBox(); this.pictureBoxColorRegionsTester = new System.Windows.Forms.PictureBox(); - this.statPotentials1 = new ARKBreedingStats.uiControls.StatPotentials(); this.gbStatChart = new System.Windows.Forms.GroupBox(); - this.radarChart1 = new ARKBreedingStats.RadarChart(); this.panelWildTamedBredTester = new System.Windows.Forms.Panel(); this.rbBredTester = new System.Windows.Forms.RadioButton(); this.rbTamedTester = new System.Windows.Forms.RadioButton(); @@ -193,7 +186,6 @@ private void InitializeComponent() this.lbCurrentCreature = new System.Windows.Forms.Label(); this.labelCurrentTesterCreature = new System.Windows.Forms.Label(); this.lbTestingInfo = new System.Windows.Forms.Label(); - this.creatureInfoInputTester = new ARKBreedingStats.CreatureInfoInput(); this.tabPageExtractor = new System.Windows.Forms.TabPage(); this.LbAsa = new System.Windows.Forms.Label(); this.LbBlueprintPath = new System.Windows.Forms.Label(); @@ -201,7 +193,6 @@ private void InitializeComponent() this.llOnlineHelpExtractionIssues = new System.Windows.Forms.LinkLabel(); this.PbCreatureColorsExtractor = new System.Windows.Forms.PictureBox(); this.groupBoxRadarChartExtractor = new System.Windows.Forms.GroupBox(); - this.radarChartExtractor = new ARKBreedingStats.RadarChart(); this.lbImprintingFailInfo = new System.Windows.Forms.Label(); this.groupBoxTamingInfo = new System.Windows.Forms.GroupBox(); this.labelTamingInfo = new System.Windows.Forms.Label(); @@ -214,10 +205,6 @@ private void InitializeComponent() this.btExtractLevels = new System.Windows.Forms.Button(); this.cbQuickWildCheck = new System.Windows.Forms.CheckBox(); this.labelErrorHelp = new System.Windows.Forms.Label(); - this.creatureAnalysis1 = new ARKBreedingStats.uiControls.CreatureAnalysis(); - this.parentInheritanceExtractor = new ARKBreedingStats.uiControls.ParentInheritance(); - this.numericUpDownLevel = new ARKBreedingStats.uiControls.Nud(); - this.creatureInfoInputExtractor = new ARKBreedingStats.CreatureInfoInput(); this.tabPageLibrary = new System.Windows.Forms.TabPage(); this.tableLayoutPanelLibrary = new System.Windows.Forms.TableLayoutPanel(); this.listViewLibrary = new System.Windows.Forms.ListView(); @@ -318,36 +305,22 @@ private void InitializeComponent() this.buttonRecalculateTops = new System.Windows.Forms.Button(); this.label17 = new System.Windows.Forms.Label(); this.tabPageLibRadarChart = new System.Windows.Forms.TabPage(); - this.radarChartLibrary = new ARKBreedingStats.RadarChart(); - this.creatureBoxListView = new ARKBreedingStats.CreatureBox(); this.tabPageLibraryInfo = new System.Windows.Forms.TabPage(); this.tlpLibraryInfo = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.CbLibraryInfoUseFilter = new System.Windows.Forms.CheckBox(); this.BtCopyLibraryColorToClipboard = new System.Windows.Forms.Button(); - this.libraryInfoControl1 = new ARKBreedingStats.uiControls.LibraryInfoControl(); this.tabPagePedigree = new System.Windows.Forms.TabPage(); - this.pedigree1 = new ARKBreedingStats.Pedigree.PedigreeControl(); this.tabPageTaming = new System.Windows.Forms.TabPage(); - this.tamingControl1 = new ARKBreedingStats.TamingControl(); this.tabPageBreedingPlan = new System.Windows.Forms.TabPage(); - this.breedingPlan1 = new ARKBreedingStats.BreedingPlanning.BreedingPlan(); this.tabPageHatching = new System.Windows.Forms.TabPage(); - this.hatching1 = new ARKBreedingStats.uiControls.Hatching(); this.tabPageRaising = new System.Windows.Forms.TabPage(); - this.raisingControl1 = new ARKBreedingStats.raising.RaisingControl(); this.tabPageTimer = new System.Windows.Forms.TabPage(); - this.timerList1 = new ARKBreedingStats.TimerControl(); this.tabPagePlayerTribes = new System.Windows.Forms.TabPage(); - this.tribesControl1 = new ARKBreedingStats.TribesControl(); this.tabPageNotes = new System.Windows.Forms.TabPage(); - this.notesControl1 = new ARKBreedingStats.NotesControl(); this.TabPageOCR = new System.Windows.Forms.TabPage(); - this.ocrControl1 = new ARKBreedingStats.ocr.OCRControl(); this.tabPageExtractionTests = new System.Windows.Forms.TabPage(); - this.extractionTestControl1 = new ARKBreedingStats.testCases.ExtractionTestControl(); this.tabPageMultiplierTesting = new System.Windows.Forms.TabPage(); - this.statsMultiplierTesting1 = new ARKBreedingStats.multiplierTesting.StatsMultiplierTesting(); this.btReadValuesFromArk = new System.Windows.Forms.Button(); this.cbEventMultipliers = new System.Windows.Forms.CheckBox(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); @@ -385,7 +358,6 @@ private void InitializeComponent() this.panelToolBar = new System.Windows.Forms.Panel(); this.btImportLastExported = new System.Windows.Forms.Button(); this.pbSpecies = new System.Windows.Forms.PictureBox(); - this.tbSpeciesGlobal = new ARKBreedingStats.uiControls.TextBoxSuggest(); this.cbGuessSpecies = new System.Windows.Forms.CheckBox(); this.cbToggleOverlay = new System.Windows.Forms.CheckBox(); this.lbListening = new System.Windows.Forms.Label(); @@ -398,17 +370,40 @@ private void InitializeComponent() this.collapseMutationsLevelsASEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator27 = new System.Windows.Forms.ToolStripSeparator(); this.resetColumnOrderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.statPotentials1 = new ARKBreedingStats.uiControls.StatPotentials(); + this.radarChart1 = new ARKBreedingStats.RadarChart(); + this.numericUpDownImprintingBonusTester = new ARKBreedingStats.uiControls.Nud(); + this.NumericUpDownTestingTE = new ARKBreedingStats.uiControls.Nud(); + this.creatureInfoInputTester = new ARKBreedingStats.CreatureInfoInput(); + this.radarChartExtractor = new ARKBreedingStats.RadarChart(); + this.numericUpDownImprintingBonusExtractor = new ARKBreedingStats.uiControls.Nud(); + this.numericUpDownUpperTEffBound = new ARKBreedingStats.uiControls.Nud(); + this.numericUpDownLowerTEffBound = new ARKBreedingStats.uiControls.Nud(); + this.creatureAnalysis1 = new ARKBreedingStats.uiControls.CreatureAnalysis(); + this.parentInheritanceExtractor = new ARKBreedingStats.uiControls.ParentInheritance(); + this.numericUpDownLevel = new ARKBreedingStats.uiControls.Nud(); + this.creatureInfoInputExtractor = new ARKBreedingStats.CreatureInfoInput(); + this.radarChartLibrary = new ARKBreedingStats.RadarChart(); + this.creatureBoxListView = new ARKBreedingStats.CreatureBox(); + this.libraryInfoControl1 = new ARKBreedingStats.uiControls.LibraryInfoControl(); + this.pedigree1 = new ARKBreedingStats.Pedigree.PedigreeControl(); + this.tamingControl1 = new ARKBreedingStats.TamingControl(); + this.breedingPlan1 = new ARKBreedingStats.BreedingPlanning.BreedingPlan(); + this.hatching1 = new ARKBreedingStats.uiControls.Hatching(); + this.raisingControl1 = new ARKBreedingStats.raising.RaisingControl(); + this.timerList1 = new ARKBreedingStats.TimerControl(); + this.tribesControl1 = new ARKBreedingStats.TribesControl(); + this.notesControl1 = new ARKBreedingStats.NotesControl(); + this.ocrControl1 = new ARKBreedingStats.ocr.OCRControl(); + this.extractionTestControl1 = new ARKBreedingStats.testCases.ExtractionTestControl(); + this.statsMultiplierTesting1 = new ARKBreedingStats.multiplierTesting.StatsMultiplierTesting(); this.speciesSelector1 = new ARKBreedingStats.SpeciesSelector(); + this.tbSpeciesGlobal = new ARKBreedingStats.uiControls.TextBoxSuggest(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).BeginInit(); this.groupBoxPossibilities.SuspendLayout(); this.groupBoxDetailsExtractor.SuspendLayout(); this.panelExtrImpr.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusExtractor)).BeginInit(); this.panelExtrTE.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownUpperTEffBound)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffBound)).BeginInit(); this.menuStrip1.SuspendLayout(); this.panelSums.SuspendLayout(); this.panelWildTamedBred.SuspendLayout(); @@ -416,7 +411,6 @@ private void InitializeComponent() this.tabPageStatTesting.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxColorRegionsTester)).BeginInit(); this.gbStatChart.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).BeginInit(); this.panelWildTamedBredTester.SuspendLayout(); this.groupBox2.SuspendLayout(); this.flowLayoutPanelStatIOsTester.SuspendLayout(); @@ -426,12 +420,10 @@ private void InitializeComponent() this.tabPageExtractor.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.PbCreatureColorsExtractor)).BeginInit(); this.groupBoxRadarChartExtractor.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).BeginInit(); this.groupBoxTamingInfo.SuspendLayout(); this.gbStatsExtractor.SuspendLayout(); this.flowLayoutPanelStatIOsExtractor.SuspendLayout(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLevel)).BeginInit(); this.tabPageLibrary.SuspendLayout(); this.tableLayoutPanelLibrary.SuspendLayout(); this.contextMenuStripLibrary.SuspendLayout(); @@ -441,7 +433,6 @@ private void InitializeComponent() this.tabPage3.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); this.tabPageLibRadarChart.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).BeginInit(); this.tabPageLibraryInfo.SuspendLayout(); this.tlpLibraryInfo.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout(); @@ -461,6 +452,15 @@ private void InitializeComponent() this.panelToolBar.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbSpecies)).BeginInit(); this.contextMenuStripLibraryHeader.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusExtractor)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownUpperTEffBound)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffBound)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLevel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).BeginInit(); this.SuspendLayout(); // // aboutToolStripMenuItem @@ -669,52 +669,6 @@ private void InitializeComponent() this.labelImprintingTester.TabIndex = 5; this.labelImprintingTester.Text = "% Imprinting Bonus"; // - // numericUpDownImprintingBonusTester - // - this.numericUpDownImprintingBonusTester.DecimalPlaces = 5; - this.numericUpDownImprintingBonusTester.Enabled = false; - this.numericUpDownImprintingBonusTester.ForeColor = System.Drawing.SystemColors.GrayText; - this.numericUpDownImprintingBonusTester.Location = new System.Drawing.Point(6, 45); - this.numericUpDownImprintingBonusTester.Maximum = new decimal(new int[] { - 1000, - 0, - 0, - 0}); - this.numericUpDownImprintingBonusTester.Name = "numericUpDownImprintingBonusTester"; - this.numericUpDownImprintingBonusTester.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownImprintingBonusTester.Size = new System.Drawing.Size(69, 20); - this.numericUpDownImprintingBonusTester.TabIndex = 4; - this.numericUpDownImprintingBonusTester.ValueChanged += new System.EventHandler(this.numericUpDownImprintingBonusTester_ValueChanged); - // - // NumericUpDownTestingTE - // - this.NumericUpDownTestingTE.DecimalPlaces = 2; - this.NumericUpDownTestingTE.ForeColor = System.Drawing.SystemColors.WindowText; - this.NumericUpDownTestingTE.Location = new System.Drawing.Point(6, 19); - this.NumericUpDownTestingTE.Minimum = new decimal(new int[] { - 1, - 0, - 0, - -2147483648}); - this.NumericUpDownTestingTE.Name = "NumericUpDownTestingTE"; - this.NumericUpDownTestingTE.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.NumericUpDownTestingTE.Size = new System.Drawing.Size(60, 20); - this.NumericUpDownTestingTE.TabIndex = 0; - this.NumericUpDownTestingTE.Value = new decimal(new int[] { - 80, - 0, - 0, - 0}); - this.NumericUpDownTestingTE.ValueChanged += new System.EventHandler(this.NumericUpDownTestingTE_ValueChanged); - // // labelTesterTE // this.labelTesterTE.AutoSize = true; @@ -848,27 +802,6 @@ private void InitializeComponent() this.lbImprintingCuddleCountExtractor.TabIndex = 50; this.lbImprintingCuddleCountExtractor.Text = "(0×)"; // - // numericUpDownImprintingBonusExtractor - // - this.numericUpDownImprintingBonusExtractor.DecimalPlaces = 5; - this.numericUpDownImprintingBonusExtractor.ForeColor = System.Drawing.SystemColors.GrayText; - this.numericUpDownImprintingBonusExtractor.Location = new System.Drawing.Point(3, 3); - this.numericUpDownImprintingBonusExtractor.Maximum = new decimal(new int[] { - 1000, - 0, - 0, - 0}); - this.numericUpDownImprintingBonusExtractor.Name = "numericUpDownImprintingBonusExtractor"; - this.numericUpDownImprintingBonusExtractor.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownImprintingBonusExtractor.Size = new System.Drawing.Size(77, 20); - this.numericUpDownImprintingBonusExtractor.TabIndex = 0; - this.numericUpDownImprintingBonusExtractor.ValueChanged += new System.EventHandler(this.numericUpDownImprintingBonusExtractor_ValueChanged); - this.numericUpDownImprintingBonusExtractor.Enter += new System.EventHandler(this.numericUpDown_Enter); - // // panelExtrTE // this.panelExtrTE.Controls.Add(this.labelTE); @@ -908,25 +841,6 @@ private void InitializeComponent() this.label1.TabIndex = 5; this.label1.Text = "%"; // - // numericUpDownUpperTEffBound - // - this.numericUpDownUpperTEffBound.ForeColor = System.Drawing.SystemColors.WindowText; - this.numericUpDownUpperTEffBound.Location = new System.Drawing.Point(147, 3); - this.numericUpDownUpperTEffBound.Name = "numericUpDownUpperTEffBound"; - this.numericUpDownUpperTEffBound.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownUpperTEffBound.Size = new System.Drawing.Size(45, 20); - this.numericUpDownUpperTEffBound.TabIndex = 3; - this.numericUpDownUpperTEffBound.Value = new decimal(new int[] { - 100, - 0, - 0, - 0}); - this.numericUpDownUpperTEffBound.Enter += new System.EventHandler(this.numericUpDown_Enter); - // // label3 // this.label3.AutoSize = true; @@ -936,25 +850,6 @@ private void InitializeComponent() this.label3.TabIndex = 2; this.label3.Text = "-"; // - // numericUpDownLowerTEffBound - // - this.numericUpDownLowerTEffBound.ForeColor = System.Drawing.SystemColors.WindowText; - this.numericUpDownLowerTEffBound.Location = new System.Drawing.Point(80, 3); - this.numericUpDownLowerTEffBound.Name = "numericUpDownLowerTEffBound"; - this.numericUpDownLowerTEffBound.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownLowerTEffBound.Size = new System.Drawing.Size(45, 20); - this.numericUpDownLowerTEffBound.TabIndex = 1; - this.numericUpDownLowerTEffBound.Value = new decimal(new int[] { - 80, - 0, - 0, - 0}); - this.numericUpDownLowerTEffBound.Enter += new System.EventHandler(this.numericUpDown_Enter); - // // lbLevel // this.lbLevel.AutoSize = true; @@ -1704,13 +1599,6 @@ private void InitializeComponent() this.pictureBoxColorRegionsTester.TabStop = false; this.pictureBoxColorRegionsTester.Click += new System.EventHandler(this.pictureBoxColorRegionsTester_Click); // - // statPotentials1 - // - this.statPotentials1.Location = new System.Drawing.Point(860, 9); - this.statPotentials1.Name = "statPotentials1"; - this.statPotentials1.Size = new System.Drawing.Size(293, 433); - this.statPotentials1.TabIndex = 12; - // // gbStatChart // this.gbStatChart.Controls.Add(this.radarChart1); @@ -1721,16 +1609,6 @@ private void InitializeComponent() this.gbStatChart.TabStop = false; this.gbStatChart.Text = "Stat-Chart"; // - // radarChart1 - // - this.radarChart1.Image = ((System.Drawing.Image)(resources.GetObject("radarChart1.Image"))); - this.radarChart1.Location = new System.Drawing.Point(6, 19); - this.radarChart1.Name = "radarChart1"; - this.radarChart1.Size = new System.Drawing.Size(200, 200); - this.radarChart1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.radarChart1.TabIndex = 10; - this.radarChart1.TabStop = false; - // // panelWildTamedBredTester // this.panelWildTamedBredTester.Controls.Add(this.rbBredTester); @@ -1927,43 +1805,6 @@ private void InitializeComponent() this.lbTestingInfo.TabIndex = 37; this.lbTestingInfo.Text = "Preview or edit levels of a creature."; // - // creatureInfoInputTester - // - this.creatureInfoInputTester.AlreadyExistingCreature = null; - this.creatureInfoInputTester.ColorIdsAlsoPossible = null; - this.creatureInfoInputTester.CooldownUntil = null; - this.creatureInfoInputTester.CreatureFlags = ARKBreedingStats.Library.CreatureFlags.None; - this.creatureInfoInputTester.CreatureName = ""; - this.creatureInfoInputTester.CreatureNote = ""; - this.creatureInfoInputTester.CreatureOwner = ""; - this.creatureInfoInputTester.CreatureServer = ""; - this.creatureInfoInputTester.CreatureSex = ARKBreedingStats.Library.Sex.Unknown; - this.creatureInfoInputTester.CreatureStatus = ARKBreedingStats.Library.CreatureStatus.Available; - this.creatureInfoInputTester.CreatureTribe = ""; - this.creatureInfoInputTester.DomesticatedAt = new System.DateTime(2014, 12, 31, 0, 0, 0, 0); - this.creatureInfoInputTester.Father = null; - this.creatureInfoInputTester.GrowingUntil = null; - this.creatureInfoInputTester.Location = new System.Drawing.Point(373, 184); - this.creatureInfoInputTester.LockServer = false; - this.creatureInfoInputTester.Mother = null; - this.creatureInfoInputTester.MutationCounterFather = 0; - this.creatureInfoInputTester.MutationCounterMother = 0; - this.creatureInfoInputTester.Name = "creatureInfoInputTester"; - this.creatureInfoInputTester.OwnerLock = false; - this.creatureInfoInputTester.RegionColors = new byte[] { - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0))}; - this.creatureInfoInputTester.Size = new System.Drawing.Size(262, 590); - this.creatureInfoInputTester.TabIndex = 4; - this.creatureInfoInputTester.TribeLock = false; - this.creatureInfoInputTester.Add2LibraryClicked += new System.Action(this.creatureInfoInputTester_Add2Library_Clicked); - this.creatureInfoInputTester.Save2LibraryClicked += new System.Action(this.creatureInfoInputTester_Save2Library_Clicked); - this.creatureInfoInputTester.ParentListRequested += new System.Action(this.CreatureInfoInput_ParentListRequested); - // // tabPageExtractor // this.tabPageExtractor.AutoScroll = true; @@ -2060,17 +1901,6 @@ private void InitializeComponent() this.groupBoxRadarChartExtractor.TabStop = false; this.groupBoxRadarChartExtractor.Text = "Stat-Chart"; // - // radarChartExtractor - // - this.radarChartExtractor.Dock = System.Windows.Forms.DockStyle.Fill; - this.radarChartExtractor.Image = ((System.Drawing.Image)(resources.GetObject("radarChartExtractor.Image"))); - this.radarChartExtractor.Location = new System.Drawing.Point(3, 16); - this.radarChartExtractor.Name = "radarChartExtractor"; - this.radarChartExtractor.Size = new System.Drawing.Size(144, 144); - this.radarChartExtractor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; - this.radarChartExtractor.TabIndex = 10; - this.radarChartExtractor.TabStop = false; - // // lbImprintingFailInfo // this.lbImprintingFailInfo.BackColor = System.Drawing.Color.MistyRose; @@ -2198,81 +2028,7 @@ private void InitializeComponent() this.labelErrorHelp.TabIndex = 40; this.labelErrorHelp.Text = resources.GetString("labelErrorHelp.Text"); // - // creatureAnalysis1 - // - this.creatureAnalysis1.Location = new System.Drawing.Point(903, 265); - this.creatureAnalysis1.Name = "creatureAnalysis1"; - this.creatureAnalysis1.Size = new System.Drawing.Size(346, 199); - this.creatureAnalysis1.TabIndex = 55; - // - // parentInheritanceExtractor - // - this.parentInheritanceExtractor.Location = new System.Drawing.Point(903, 470); - this.parentInheritanceExtractor.Name = "parentInheritanceExtractor"; - this.parentInheritanceExtractor.Size = new System.Drawing.Size(337, 182); - this.parentInheritanceExtractor.TabIndex = 52; - // - // numericUpDownLevel - // - this.numericUpDownLevel.ForeColor = System.Drawing.SystemColors.WindowText; - this.numericUpDownLevel.Location = new System.Drawing.Point(244, 9); - this.numericUpDownLevel.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.numericUpDownLevel.Name = "numericUpDownLevel"; - this.numericUpDownLevel.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownLevel.Size = new System.Drawing.Size(56, 20); - this.numericUpDownLevel.TabIndex = 2; - this.numericUpDownLevel.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numericUpDownLevel.Enter += new System.EventHandler(this.numericUpDown_Enter); - // - // creatureInfoInputExtractor - // - this.creatureInfoInputExtractor.AlreadyExistingCreature = null; - this.creatureInfoInputExtractor.ColorIdsAlsoPossible = null; - this.creatureInfoInputExtractor.CooldownUntil = null; - this.creatureInfoInputExtractor.CreatureFlags = ARKBreedingStats.Library.CreatureFlags.None; - this.creatureInfoInputExtractor.CreatureName = ""; - this.creatureInfoInputExtractor.CreatureNote = ""; - this.creatureInfoInputExtractor.CreatureOwner = ""; - this.creatureInfoInputExtractor.CreatureServer = ""; - this.creatureInfoInputExtractor.CreatureSex = ARKBreedingStats.Library.Sex.Unknown; - this.creatureInfoInputExtractor.CreatureStatus = ARKBreedingStats.Library.CreatureStatus.Available; - this.creatureInfoInputExtractor.CreatureTribe = ""; - this.creatureInfoInputExtractor.DomesticatedAt = new System.DateTime(2014, 12, 31, 0, 0, 0, 0); - this.creatureInfoInputExtractor.Father = null; - this.creatureInfoInputExtractor.GrowingUntil = null; - this.creatureInfoInputExtractor.Location = new System.Drawing.Point(373, 184); - this.creatureInfoInputExtractor.LockServer = false; - this.creatureInfoInputExtractor.Mother = null; - this.creatureInfoInputExtractor.MutationCounterFather = 0; - this.creatureInfoInputExtractor.MutationCounterMother = 0; - this.creatureInfoInputExtractor.Name = "creatureInfoInputExtractor"; - this.creatureInfoInputExtractor.OwnerLock = false; - this.creatureInfoInputExtractor.RegionColors = new byte[] { - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0)), - ((byte)(0))}; - this.creatureInfoInputExtractor.Size = new System.Drawing.Size(262, 590); - this.creatureInfoInputExtractor.TabIndex = 7; - this.creatureInfoInputExtractor.TribeLock = false; - this.creatureInfoInputExtractor.Add2LibraryClicked += new System.Action(this.creatureInfoInputExtractor_Add2Library_Clicked); - this.creatureInfoInputExtractor.ParentListRequested += new System.Action(this.CreatureInfoInput_ParentListRequested); - // - // tabPageLibrary + // tabPageLibrary // this.tabPageLibrary.Controls.Add(this.tableLayoutPanelLibrary); this.tabPageLibrary.Location = new System.Drawing.Point(4, 22); @@ -2697,7 +2453,7 @@ private void InitializeComponent() this.toolStripSeparator14, this.toolStripMenuItemRemove}); this.contextMenuStripLibrary.Name = "contextMenuStripLibrary"; - this.contextMenuStripLibrary.Size = new System.Drawing.Size(303, 480); + this.contextMenuStripLibrary.Size = new System.Drawing.Size(303, 502); this.contextMenuStripLibrary.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStripLibrary_Opening); // // toolStripMenuItemEdit @@ -2724,11 +2480,9 @@ private void InitializeComponent() // toolStripMenuItemGenerateCreatureName // this.toolStripMenuItemGenerateCreatureName.Name = "toolStripMenuItemGenerateCreatureName"; - this.toolStripMenuItemGenerateCreatureName.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.G))); this.toolStripMenuItemGenerateCreatureName.Size = new System.Drawing.Size(302, 22); - this.toolStripMenuItemGenerateCreatureName.Text = "Generate creature Name"; - this.toolStripMenuItemGenerateCreatureName.ToolTipText = "Applies the naming pattern on all selected creatures"; - this.toolStripMenuItemGenerateCreatureName.Click += new System.EventHandler(this.toolStripMenuItem5_Click); + this.toolStripMenuItemGenerateCreatureName.Text = "Apply Name Pattern"; + this.toolStripMenuItemGenerateCreatureName.ToolTipText = "Applies the naming pattern on the selected creatures"; // // toolStripMenuItemCopyCreatureName // @@ -3101,27 +2855,6 @@ private void InitializeComponent() this.tabPageLibRadarChart.Text = "Chart"; this.tabPageLibRadarChart.UseVisualStyleBackColor = true; // - // radarChartLibrary - // - this.radarChartLibrary.Dock = System.Windows.Forms.DockStyle.Top; - this.radarChartLibrary.Image = ((System.Drawing.Image)(resources.GetObject("radarChartLibrary.Image"))); - this.radarChartLibrary.Location = new System.Drawing.Point(3, 3); - this.radarChartLibrary.Name = "radarChartLibrary"; - this.radarChartLibrary.Size = new System.Drawing.Size(175, 287); - this.radarChartLibrary.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.radarChartLibrary.TabIndex = 0; - this.radarChartLibrary.TabStop = false; - // - // creatureBoxListView - // - this.creatureBoxListView.Location = new System.Drawing.Point(3, 3); - this.creatureBoxListView.Name = "creatureBoxListView"; - this.creatureBoxListView.Size = new System.Drawing.Size(189, 406); - this.creatureBoxListView.TabIndex = 0; - this.creatureBoxListView.Changed += new System.Action(this.UpdateDisplayedCreatureValues); - this.creatureBoxListView.GiveParents += new System.Action(this.CreatureBoxListView_FindParents); - this.creatureBoxListView.SelectCreature += new System.Action(this.SelectCreatureInLibrary); - // // tabPageLibraryInfo // this.tabPageLibraryInfo.Controls.Add(this.tlpLibraryInfo); @@ -3185,14 +2918,6 @@ private void InitializeComponent() this.BtCopyLibraryColorToClipboard.UseVisualStyleBackColor = true; this.BtCopyLibraryColorToClipboard.Click += new System.EventHandler(this.BtCopyLibraryColorToClipboard_Click); // - // libraryInfoControl1 - // - this.libraryInfoControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.libraryInfoControl1.Location = new System.Drawing.Point(3, 39); - this.libraryInfoControl1.Name = "libraryInfoControl1"; - this.libraryInfoControl1.Size = new System.Drawing.Size(1858, 736); - this.libraryInfoControl1.TabIndex = 3; - // // tabPagePedigree // this.tabPagePedigree.Controls.Add(this.pedigree1); @@ -3204,16 +2929,6 @@ private void InitializeComponent() this.tabPagePedigree.Text = "Pedigree"; this.tabPagePedigree.UseVisualStyleBackColor = true; // - // pedigree1 - // - this.pedigree1.AutoScroll = true; - this.pedigree1.Dock = System.Windows.Forms.DockStyle.Fill; - this.pedigree1.LeftColumnWidth = 203; - this.pedigree1.Location = new System.Drawing.Point(3, 3); - this.pedigree1.Name = "pedigree1"; - this.pedigree1.Size = new System.Drawing.Size(1864, 778); - this.pedigree1.TabIndex = 0; - // // tabPageTaming // this.tabPageTaming.Controls.Add(this.tamingControl1); @@ -3225,24 +2940,6 @@ private void InitializeComponent() this.tabPageTaming.Text = "Taming"; this.tabPageTaming.UseVisualStyleBackColor = true; // - // tamingControl1 - // - this.tamingControl1.AutoScroll = true; - this.tamingControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tamingControl1.Location = new System.Drawing.Point(3, 3); - this.tamingControl1.Name = "tamingControl1"; - this.tamingControl1.Size = new System.Drawing.Size(1864, 778); - this.tamingControl1.TabIndex = 0; - this.tamingControl1.WeaponDamages = new double[] { - 100D, - 100D, - 100D, - 100D, - 100D, - 100D, - 100D}; - this.tamingControl1.WeaponDamagesEnabled = 3; - // // tabPageBreedingPlan // this.tabPageBreedingPlan.Controls.Add(this.breedingPlan1); @@ -3254,17 +2951,6 @@ private void InitializeComponent() this.tabPageBreedingPlan.Text = "Breeding Plan"; this.tabPageBreedingPlan.UseVisualStyleBackColor = true; // - // breedingPlan1 - // - this.breedingPlan1.AutoScroll = true; - this.breedingPlan1.CurrentSpecies = null; - this.breedingPlan1.Dock = System.Windows.Forms.DockStyle.Fill; - this.breedingPlan1.Location = new System.Drawing.Point(3, 3); - this.breedingPlan1.MutationLimit = 0; - this.breedingPlan1.Name = "breedingPlan1"; - this.breedingPlan1.Size = new System.Drawing.Size(1864, 778); - this.breedingPlan1.TabIndex = 0; - // // tabPageHatching // this.tabPageHatching.Controls.Add(this.hatching1); @@ -3276,14 +2962,6 @@ private void InitializeComponent() this.tabPageHatching.Text = "Hatching"; this.tabPageHatching.UseVisualStyleBackColor = true; // - // hatching1 - // - this.hatching1.Dock = System.Windows.Forms.DockStyle.Fill; - this.hatching1.Location = new System.Drawing.Point(3, 3); - this.hatching1.Name = "hatching1"; - this.hatching1.Size = new System.Drawing.Size(1864, 778); - this.hatching1.TabIndex = 0; - // // tabPageRaising // this.tabPageRaising.Controls.Add(this.raisingControl1); @@ -3295,15 +2973,6 @@ private void InitializeComponent() this.tabPageRaising.Text = "Raising"; this.tabPageRaising.UseVisualStyleBackColor = true; // - // raisingControl1 - // - this.raisingControl1.AutoScroll = true; - this.raisingControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.raisingControl1.Location = new System.Drawing.Point(3, 3); - this.raisingControl1.Name = "raisingControl1"; - this.raisingControl1.Size = new System.Drawing.Size(1864, 778); - this.raisingControl1.TabIndex = 0; - // // tabPageTimer // this.tabPageTimer.Controls.Add(this.timerList1); @@ -3315,15 +2984,6 @@ private void InitializeComponent() this.tabPageTimer.Text = "Timer"; this.tabPageTimer.UseVisualStyleBackColor = true; // - // timerList1 - // - this.timerList1.Dock = System.Windows.Forms.DockStyle.Fill; - this.timerList1.Location = new System.Drawing.Point(3, 3); - this.timerList1.Name = "timerList1"; - this.timerList1.Size = new System.Drawing.Size(1864, 778); - this.timerList1.TabIndex = 0; - this.timerList1.TimerAlertsCSV = ""; - // // tabPagePlayerTribes // this.tabPagePlayerTribes.Controls.Add(this.tribesControl1); @@ -3335,14 +2995,6 @@ private void InitializeComponent() this.tabPagePlayerTribes.Text = "Player"; this.tabPagePlayerTribes.UseVisualStyleBackColor = true; // - // tribesControl1 - // - this.tribesControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tribesControl1.Location = new System.Drawing.Point(3, 3); - this.tribesControl1.Name = "tribesControl1"; - this.tribesControl1.Size = new System.Drawing.Size(1864, 778); - this.tribesControl1.TabIndex = 0; - // // tabPageNotes // this.tabPageNotes.Controls.Add(this.notesControl1); @@ -3354,14 +3006,6 @@ private void InitializeComponent() this.tabPageNotes.Text = "Notes"; this.tabPageNotes.UseVisualStyleBackColor = true; // - // notesControl1 - // - this.notesControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.notesControl1.Location = new System.Drawing.Point(3, 3); - this.notesControl1.Name = "notesControl1"; - this.notesControl1.Size = new System.Drawing.Size(1864, 778); - this.notesControl1.TabIndex = 0; - // // TabPageOCR // this.TabPageOCR.Controls.Add(this.ocrControl1); @@ -3373,14 +3017,6 @@ private void InitializeComponent() this.TabPageOCR.Text = "Experimental OCR"; this.TabPageOCR.UseVisualStyleBackColor = true; // - // ocrControl1 - // - this.ocrControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.ocrControl1.Location = new System.Drawing.Point(3, 3); - this.ocrControl1.Name = "ocrControl1"; - this.ocrControl1.Size = new System.Drawing.Size(1864, 778); - this.ocrControl1.TabIndex = 2; - // // tabPageExtractionTests // this.tabPageExtractionTests.Controls.Add(this.extractionTestControl1); @@ -3392,14 +3028,6 @@ private void InitializeComponent() this.tabPageExtractionTests.Text = "Extraction Tests"; this.tabPageExtractionTests.UseVisualStyleBackColor = true; // - // extractionTestControl1 - // - this.extractionTestControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.extractionTestControl1.Location = new System.Drawing.Point(3, 3); - this.extractionTestControl1.Name = "extractionTestControl1"; - this.extractionTestControl1.Size = new System.Drawing.Size(1864, 778); - this.extractionTestControl1.TabIndex = 0; - // // tabPageMultiplierTesting // this.tabPageMultiplierTesting.Controls.Add(this.statsMultiplierTesting1); @@ -3411,15 +3039,6 @@ private void InitializeComponent() this.tabPageMultiplierTesting.Text = "Multiplier Testing"; this.tabPageMultiplierTesting.UseVisualStyleBackColor = true; // - // statsMultiplierTesting1 - // - this.statsMultiplierTesting1.AllowDrop = true; - this.statsMultiplierTesting1.Dock = System.Windows.Forms.DockStyle.Fill; - this.statsMultiplierTesting1.Location = new System.Drawing.Point(3, 3); - this.statsMultiplierTesting1.Name = "statsMultiplierTesting1"; - this.statsMultiplierTesting1.Size = new System.Drawing.Size(1864, 778); - this.statsMultiplierTesting1.TabIndex = 0; - // // btReadValuesFromArk // this.btReadValuesFromArk.Location = new System.Drawing.Point(262, 3); @@ -3792,18 +3411,6 @@ private void InitializeComponent() this.pbSpecies.TabStop = false; this.pbSpecies.Click += new System.EventHandler(this.pbSpecies_Click); // - // tbSpeciesGlobal - // - this.tbSpeciesGlobal.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.tbSpeciesGlobal.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.tbSpeciesGlobal.Location = new System.Drawing.Point(104, 3); - this.tbSpeciesGlobal.Name = "tbSpeciesGlobal"; - this.tbSpeciesGlobal.Size = new System.Drawing.Size(152, 20); - this.tbSpeciesGlobal.TabIndex = 8; - this.tbSpeciesGlobal.Click += new System.EventHandler(this.tbSpeciesGlobal_Click); - this.tbSpeciesGlobal.Enter += new System.EventHandler(this.tbSpeciesGlobal_Enter); - this.tbSpeciesGlobal.KeyUp += new System.Windows.Forms.KeyEventHandler(this.TbSpeciesGlobal_KeyUp); - // // cbGuessSpecies // this.cbGuessSpecies.AutoSize = true; @@ -3916,54 +3523,440 @@ private void InitializeComponent() this.resetColumnOrderToolStripMenuItem.Text = "Reset column order"; this.resetColumnOrderToolStripMenuItem.Click += new System.EventHandler(this.resetColumnOrderToolStripMenuItem_Click); // - // speciesSelector1 + // statPotentials1 // - this.speciesSelector1.Dock = System.Windows.Forms.DockStyle.Fill; - this.speciesSelector1.LastSpecies = new string[0]; - this.speciesSelector1.Location = new System.Drawing.Point(0, 103); - this.speciesSelector1.Name = "speciesSelector1"; - this.speciesSelector1.Size = new System.Drawing.Size(1878, 810); - this.speciesSelector1.SplitterDistance = 500; - this.speciesSelector1.TabIndex = 0; + this.statPotentials1.Location = new System.Drawing.Point(860, 9); + this.statPotentials1.Name = "statPotentials1"; + this.statPotentials1.Size = new System.Drawing.Size(293, 433); + this.statPotentials1.TabIndex = 12; // - // Form1 + // radarChart1 // - this.AcceptButton = this.btExtractLevels; - this.AllowDrop = true; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1878, 935); - this.Controls.Add(this.tabControlMain); - this.Controls.Add(this.speciesSelector1); - this.Controls.Add(this.panelToolBar); - this.Controls.Add(this.toolStrip2); - this.Controls.Add(this.menuStrip1); - this.Controls.Add(this.statusStrip1); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.KeyPreview = true; - this.MainMenuStrip = this.menuStrip1; - this.Name = "Form1"; - this.Text = "ARK Smart Breeding"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); - this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed); - this.Load += new System.EventHandler(this.Form1_Load); - this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop); - this.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter); - this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown); - this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyUp); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).EndInit(); - this.groupBoxPossibilities.ResumeLayout(false); - this.groupBoxDetailsExtractor.ResumeLayout(false); - this.panelExtrImpr.ResumeLayout(false); + this.radarChart1.Image = ((System.Drawing.Image)(resources.GetObject("radarChart1.Image"))); + this.radarChart1.Location = new System.Drawing.Point(6, 19); + this.radarChart1.Name = "radarChart1"; + this.radarChart1.Size = new System.Drawing.Size(200, 200); + this.radarChart1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.radarChart1.TabIndex = 10; + this.radarChart1.TabStop = false; + // + // numericUpDownImprintingBonusTester + // + this.numericUpDownImprintingBonusTester.DecimalPlaces = 5; + this.numericUpDownImprintingBonusTester.Enabled = false; + this.numericUpDownImprintingBonusTester.ForeColor = System.Drawing.SystemColors.GrayText; + this.numericUpDownImprintingBonusTester.Location = new System.Drawing.Point(6, 45); + this.numericUpDownImprintingBonusTester.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.numericUpDownImprintingBonusTester.Name = "numericUpDownImprintingBonusTester"; + this.numericUpDownImprintingBonusTester.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownImprintingBonusTester.Size = new System.Drawing.Size(69, 20); + this.numericUpDownImprintingBonusTester.TabIndex = 4; + this.numericUpDownImprintingBonusTester.ValueChanged += new System.EventHandler(this.numericUpDownImprintingBonusTester_ValueChanged); + // + // NumericUpDownTestingTE + // + this.NumericUpDownTestingTE.DecimalPlaces = 2; + this.NumericUpDownTestingTE.ForeColor = System.Drawing.SystemColors.WindowText; + this.NumericUpDownTestingTE.Location = new System.Drawing.Point(6, 19); + this.NumericUpDownTestingTE.Minimum = new decimal(new int[] { + 1, + 0, + 0, + -2147483648}); + this.NumericUpDownTestingTE.Name = "NumericUpDownTestingTE"; + this.NumericUpDownTestingTE.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.NumericUpDownTestingTE.Size = new System.Drawing.Size(60, 20); + this.NumericUpDownTestingTE.TabIndex = 0; + this.NumericUpDownTestingTE.Value = new decimal(new int[] { + 80, + 0, + 0, + 0}); + this.NumericUpDownTestingTE.ValueChanged += new System.EventHandler(this.NumericUpDownTestingTE_ValueChanged); + // + // creatureInfoInputTester + // + this.creatureInfoInputTester.AlreadyExistingCreature = null; + this.creatureInfoInputTester.ColorIdsAlsoPossible = null; + this.creatureInfoInputTester.CooldownUntil = null; + this.creatureInfoInputTester.CreatureFlags = ARKBreedingStats.Library.CreatureFlags.None; + this.creatureInfoInputTester.CreatureName = ""; + this.creatureInfoInputTester.CreatureNote = ""; + this.creatureInfoInputTester.CreatureOwner = ""; + this.creatureInfoInputTester.CreatureServer = ""; + this.creatureInfoInputTester.CreatureSex = ARKBreedingStats.Library.Sex.Unknown; + this.creatureInfoInputTester.CreatureStatus = ARKBreedingStats.Library.CreatureStatus.Available; + this.creatureInfoInputTester.CreatureTribe = ""; + this.creatureInfoInputTester.DomesticatedAt = new System.DateTime(2014, 12, 31, 0, 0, 0, 0); + this.creatureInfoInputTester.Father = null; + this.creatureInfoInputTester.GrowingUntil = null; + this.creatureInfoInputTester.Location = new System.Drawing.Point(373, 184); + this.creatureInfoInputTester.LockServer = false; + this.creatureInfoInputTester.Mother = null; + this.creatureInfoInputTester.MutationCounterFather = 0; + this.creatureInfoInputTester.MutationCounterMother = 0; + this.creatureInfoInputTester.Name = "creatureInfoInputTester"; + this.creatureInfoInputTester.OwnerLock = false; + this.creatureInfoInputTester.RegionColors = new byte[] { + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0))}; + this.creatureInfoInputTester.Size = new System.Drawing.Size(262, 590); + this.creatureInfoInputTester.TabIndex = 4; + this.creatureInfoInputTester.TribeLock = false; + this.creatureInfoInputTester.Add2LibraryClicked += new System.Action(this.creatureInfoInputTester_Add2Library_Clicked); + this.creatureInfoInputTester.Save2LibraryClicked += new System.Action(this.creatureInfoInputTester_Save2Library_Clicked); + this.creatureInfoInputTester.ParentListRequested += new System.Action(this.CreatureInfoInput_ParentListRequested); + // + // radarChartExtractor + // + this.radarChartExtractor.Dock = System.Windows.Forms.DockStyle.Fill; + this.radarChartExtractor.Image = ((System.Drawing.Image)(resources.GetObject("radarChartExtractor.Image"))); + this.radarChartExtractor.Location = new System.Drawing.Point(3, 16); + this.radarChartExtractor.Name = "radarChartExtractor"; + this.radarChartExtractor.Size = new System.Drawing.Size(144, 144); + this.radarChartExtractor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.radarChartExtractor.TabIndex = 10; + this.radarChartExtractor.TabStop = false; + // + // numericUpDownImprintingBonusExtractor + // + this.numericUpDownImprintingBonusExtractor.DecimalPlaces = 5; + this.numericUpDownImprintingBonusExtractor.ForeColor = System.Drawing.SystemColors.GrayText; + this.numericUpDownImprintingBonusExtractor.Location = new System.Drawing.Point(3, 3); + this.numericUpDownImprintingBonusExtractor.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.numericUpDownImprintingBonusExtractor.Name = "numericUpDownImprintingBonusExtractor"; + this.numericUpDownImprintingBonusExtractor.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownImprintingBonusExtractor.Size = new System.Drawing.Size(77, 20); + this.numericUpDownImprintingBonusExtractor.TabIndex = 0; + this.numericUpDownImprintingBonusExtractor.ValueChanged += new System.EventHandler(this.numericUpDownImprintingBonusExtractor_ValueChanged); + this.numericUpDownImprintingBonusExtractor.Enter += new System.EventHandler(this.numericUpDown_Enter); + // + // numericUpDownUpperTEffBound + // + this.numericUpDownUpperTEffBound.ForeColor = System.Drawing.SystemColors.WindowText; + this.numericUpDownUpperTEffBound.Location = new System.Drawing.Point(147, 3); + this.numericUpDownUpperTEffBound.Name = "numericUpDownUpperTEffBound"; + this.numericUpDownUpperTEffBound.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownUpperTEffBound.Size = new System.Drawing.Size(45, 20); + this.numericUpDownUpperTEffBound.TabIndex = 3; + this.numericUpDownUpperTEffBound.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.numericUpDownUpperTEffBound.Enter += new System.EventHandler(this.numericUpDown_Enter); + // + // numericUpDownLowerTEffBound + // + this.numericUpDownLowerTEffBound.ForeColor = System.Drawing.SystemColors.WindowText; + this.numericUpDownLowerTEffBound.Location = new System.Drawing.Point(80, 3); + this.numericUpDownLowerTEffBound.Name = "numericUpDownLowerTEffBound"; + this.numericUpDownLowerTEffBound.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownLowerTEffBound.Size = new System.Drawing.Size(45, 20); + this.numericUpDownLowerTEffBound.TabIndex = 1; + this.numericUpDownLowerTEffBound.Value = new decimal(new int[] { + 80, + 0, + 0, + 0}); + this.numericUpDownLowerTEffBound.Enter += new System.EventHandler(this.numericUpDown_Enter); + // + // creatureAnalysis1 + // + this.creatureAnalysis1.Location = new System.Drawing.Point(903, 265); + this.creatureAnalysis1.Name = "creatureAnalysis1"; + this.creatureAnalysis1.Size = new System.Drawing.Size(346, 199); + this.creatureAnalysis1.TabIndex = 55; + // + // parentInheritanceExtractor + // + this.parentInheritanceExtractor.Location = new System.Drawing.Point(903, 470); + this.parentInheritanceExtractor.Name = "parentInheritanceExtractor"; + this.parentInheritanceExtractor.Size = new System.Drawing.Size(337, 182); + this.parentInheritanceExtractor.TabIndex = 52; + // + // numericUpDownLevel + // + this.numericUpDownLevel.ForeColor = System.Drawing.SystemColors.WindowText; + this.numericUpDownLevel.Location = new System.Drawing.Point(244, 9); + this.numericUpDownLevel.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.numericUpDownLevel.Name = "numericUpDownLevel"; + this.numericUpDownLevel.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownLevel.Size = new System.Drawing.Size(56, 20); + this.numericUpDownLevel.TabIndex = 2; + this.numericUpDownLevel.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownLevel.Enter += new System.EventHandler(this.numericUpDown_Enter); + // + // creatureInfoInputExtractor + // + this.creatureInfoInputExtractor.AlreadyExistingCreature = null; + this.creatureInfoInputExtractor.ColorIdsAlsoPossible = null; + this.creatureInfoInputExtractor.CooldownUntil = null; + this.creatureInfoInputExtractor.CreatureFlags = ARKBreedingStats.Library.CreatureFlags.None; + this.creatureInfoInputExtractor.CreatureName = ""; + this.creatureInfoInputExtractor.CreatureNote = ""; + this.creatureInfoInputExtractor.CreatureOwner = ""; + this.creatureInfoInputExtractor.CreatureServer = ""; + this.creatureInfoInputExtractor.CreatureSex = ARKBreedingStats.Library.Sex.Unknown; + this.creatureInfoInputExtractor.CreatureStatus = ARKBreedingStats.Library.CreatureStatus.Available; + this.creatureInfoInputExtractor.CreatureTribe = ""; + this.creatureInfoInputExtractor.DomesticatedAt = new System.DateTime(2014, 12, 31, 0, 0, 0, 0); + this.creatureInfoInputExtractor.Father = null; + this.creatureInfoInputExtractor.GrowingUntil = null; + this.creatureInfoInputExtractor.Location = new System.Drawing.Point(373, 184); + this.creatureInfoInputExtractor.LockServer = false; + this.creatureInfoInputExtractor.Mother = null; + this.creatureInfoInputExtractor.MutationCounterFather = 0; + this.creatureInfoInputExtractor.MutationCounterMother = 0; + this.creatureInfoInputExtractor.Name = "creatureInfoInputExtractor"; + this.creatureInfoInputExtractor.OwnerLock = false; + this.creatureInfoInputExtractor.RegionColors = new byte[] { + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0))}; + this.creatureInfoInputExtractor.Size = new System.Drawing.Size(262, 590); + this.creatureInfoInputExtractor.TabIndex = 7; + this.creatureInfoInputExtractor.TribeLock = false; + this.creatureInfoInputExtractor.Add2LibraryClicked += new System.Action(this.creatureInfoInputExtractor_Add2Library_Clicked); + this.creatureInfoInputExtractor.ParentListRequested += new System.Action(this.CreatureInfoInput_ParentListRequested); + // + // radarChartLibrary + // + this.radarChartLibrary.Dock = System.Windows.Forms.DockStyle.Top; + this.radarChartLibrary.Image = ((System.Drawing.Image)(resources.GetObject("radarChartLibrary.Image"))); + this.radarChartLibrary.Location = new System.Drawing.Point(3, 3); + this.radarChartLibrary.Name = "radarChartLibrary"; + this.radarChartLibrary.Size = new System.Drawing.Size(175, 287); + this.radarChartLibrary.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.radarChartLibrary.TabIndex = 0; + this.radarChartLibrary.TabStop = false; + // + // creatureBoxListView + // + this.creatureBoxListView.Location = new System.Drawing.Point(3, 3); + this.creatureBoxListView.Name = "creatureBoxListView"; + this.creatureBoxListView.Size = new System.Drawing.Size(189, 406); + this.creatureBoxListView.TabIndex = 0; + this.creatureBoxListView.Changed += new System.Action(this.UpdateDisplayedCreatureValues); + this.creatureBoxListView.GiveParents += new System.Action(this.CreatureBoxListView_FindParents); + this.creatureBoxListView.SelectCreature += new System.Action(this.SelectCreatureInLibrary); + // + // libraryInfoControl1 + // + this.libraryInfoControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.libraryInfoControl1.Location = new System.Drawing.Point(3, 39); + this.libraryInfoControl1.Name = "libraryInfoControl1"; + this.libraryInfoControl1.Size = new System.Drawing.Size(1858, 736); + this.libraryInfoControl1.TabIndex = 3; + // + // pedigree1 + // + this.pedigree1.AutoScroll = true; + this.pedigree1.Dock = System.Windows.Forms.DockStyle.Fill; + this.pedigree1.LeftColumnWidth = 203; + this.pedigree1.Location = new System.Drawing.Point(3, 3); + this.pedigree1.Name = "pedigree1"; + this.pedigree1.Size = new System.Drawing.Size(1864, 778); + this.pedigree1.TabIndex = 0; + // + // tamingControl1 + // + this.tamingControl1.AutoScroll = true; + this.tamingControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tamingControl1.Location = new System.Drawing.Point(3, 3); + this.tamingControl1.Name = "tamingControl1"; + this.tamingControl1.Size = new System.Drawing.Size(1864, 778); + this.tamingControl1.TabIndex = 0; + this.tamingControl1.WeaponDamages = new double[] { + 100D, + 100D, + 100D, + 100D, + 100D, + 100D, + 100D}; + this.tamingControl1.WeaponDamagesEnabled = 3; + // + // breedingPlan1 + // + this.breedingPlan1.AutoScroll = true; + this.breedingPlan1.CurrentSpecies = null; + this.breedingPlan1.Dock = System.Windows.Forms.DockStyle.Fill; + this.breedingPlan1.Location = new System.Drawing.Point(3, 3); + this.breedingPlan1.MutationLimit = 0; + this.breedingPlan1.Name = "breedingPlan1"; + this.breedingPlan1.Size = new System.Drawing.Size(1864, 778); + this.breedingPlan1.TabIndex = 0; + // + // hatching1 + // + this.hatching1.Dock = System.Windows.Forms.DockStyle.Fill; + this.hatching1.Location = new System.Drawing.Point(3, 3); + this.hatching1.Name = "hatching1"; + this.hatching1.Size = new System.Drawing.Size(1864, 778); + this.hatching1.TabIndex = 0; + // + // raisingControl1 + // + this.raisingControl1.AutoScroll = true; + this.raisingControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.raisingControl1.Location = new System.Drawing.Point(3, 3); + this.raisingControl1.Name = "raisingControl1"; + this.raisingControl1.Size = new System.Drawing.Size(1864, 778); + this.raisingControl1.TabIndex = 0; + // + // timerList1 + // + this.timerList1.Dock = System.Windows.Forms.DockStyle.Fill; + this.timerList1.Location = new System.Drawing.Point(3, 3); + this.timerList1.Name = "timerList1"; + this.timerList1.Size = new System.Drawing.Size(1864, 778); + this.timerList1.TabIndex = 0; + this.timerList1.TimerAlertsCSV = ""; + // + // tribesControl1 + // + this.tribesControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tribesControl1.Location = new System.Drawing.Point(3, 3); + this.tribesControl1.Name = "tribesControl1"; + this.tribesControl1.Size = new System.Drawing.Size(1864, 778); + this.tribesControl1.TabIndex = 0; + // + // notesControl1 + // + this.notesControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.notesControl1.Location = new System.Drawing.Point(3, 3); + this.notesControl1.Name = "notesControl1"; + this.notesControl1.Size = new System.Drawing.Size(1864, 778); + this.notesControl1.TabIndex = 0; + // + // ocrControl1 + // + this.ocrControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.ocrControl1.Location = new System.Drawing.Point(3, 3); + this.ocrControl1.Name = "ocrControl1"; + this.ocrControl1.Size = new System.Drawing.Size(1864, 778); + this.ocrControl1.TabIndex = 2; + // + // extractionTestControl1 + // + this.extractionTestControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.extractionTestControl1.Location = new System.Drawing.Point(3, 3); + this.extractionTestControl1.Name = "extractionTestControl1"; + this.extractionTestControl1.Size = new System.Drawing.Size(1864, 778); + this.extractionTestControl1.TabIndex = 0; + // + // statsMultiplierTesting1 + // + this.statsMultiplierTesting1.AllowDrop = true; + this.statsMultiplierTesting1.Dock = System.Windows.Forms.DockStyle.Fill; + this.statsMultiplierTesting1.Location = new System.Drawing.Point(3, 3); + this.statsMultiplierTesting1.Name = "statsMultiplierTesting1"; + this.statsMultiplierTesting1.Size = new System.Drawing.Size(1864, 778); + this.statsMultiplierTesting1.TabIndex = 0; + // + // speciesSelector1 + // + this.speciesSelector1.Dock = System.Windows.Forms.DockStyle.Fill; + this.speciesSelector1.LastSpecies = new string[0]; + this.speciesSelector1.Location = new System.Drawing.Point(0, 103); + this.speciesSelector1.Name = "speciesSelector1"; + this.speciesSelector1.Size = new System.Drawing.Size(1878, 810); + this.speciesSelector1.SplitterDistance = 500; + this.speciesSelector1.TabIndex = 0; + // + // tbSpeciesGlobal + // + this.tbSpeciesGlobal.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; + this.tbSpeciesGlobal.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; + this.tbSpeciesGlobal.Location = new System.Drawing.Point(104, 3); + this.tbSpeciesGlobal.Name = "tbSpeciesGlobal"; + this.tbSpeciesGlobal.Size = new System.Drawing.Size(152, 20); + this.tbSpeciesGlobal.TabIndex = 8; + this.tbSpeciesGlobal.Click += new System.EventHandler(this.tbSpeciesGlobal_Click); + this.tbSpeciesGlobal.Enter += new System.EventHandler(this.tbSpeciesGlobal_Enter); + this.tbSpeciesGlobal.KeyUp += new System.Windows.Forms.KeyEventHandler(this.TbSpeciesGlobal_KeyUp); + // + // Form1 + // + this.AcceptButton = this.btExtractLevels; + this.AllowDrop = true; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1878, 935); + this.Controls.Add(this.tabControlMain); + this.Controls.Add(this.speciesSelector1); + this.Controls.Add(this.panelToolBar); + this.Controls.Add(this.toolStrip2); + this.Controls.Add(this.menuStrip1); + this.Controls.Add(this.statusStrip1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.KeyPreview = true; + this.MainMenuStrip = this.menuStrip1; + this.Name = "Form1"; + this.Text = "ARK Smart Breeding"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed); + this.Load += new System.EventHandler(this.Form1_Load); + this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop); + this.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter); + this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown); + this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyUp); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBoxPossibilities.ResumeLayout(false); + this.groupBoxDetailsExtractor.ResumeLayout(false); + this.panelExtrImpr.ResumeLayout(false); this.panelExtrImpr.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusExtractor)).EndInit(); this.panelExtrTE.ResumeLayout(false); this.panelExtrTE.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownUpperTEffBound)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffBound)).EndInit(); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); this.panelSums.ResumeLayout(false); @@ -3975,7 +3968,6 @@ private void InitializeComponent() this.tabPageStatTesting.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxColorRegionsTester)).EndInit(); this.gbStatChart.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).EndInit(); this.panelWildTamedBredTester.ResumeLayout(false); this.panelWildTamedBredTester.PerformLayout(); this.groupBox2.ResumeLayout(false); @@ -3990,13 +3982,11 @@ private void InitializeComponent() this.tabPageExtractor.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.PbCreatureColorsExtractor)).EndInit(); this.groupBoxRadarChartExtractor.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).EndInit(); this.groupBoxTamingInfo.ResumeLayout(false); this.gbStatsExtractor.ResumeLayout(false); this.flowLayoutPanelStatIOsExtractor.ResumeLayout(false); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLevel)).EndInit(); this.tabPageLibrary.ResumeLayout(false); this.tableLayoutPanelLibrary.ResumeLayout(false); this.contextMenuStripLibrary.ResumeLayout(false); @@ -4007,7 +3997,6 @@ private void InitializeComponent() this.tableLayoutPanel2.ResumeLayout(false); this.tableLayoutPanel2.PerformLayout(); this.tabPageLibRadarChart.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).EndInit(); this.tabPageLibraryInfo.ResumeLayout(false); this.tlpLibraryInfo.ResumeLayout(false); this.tableLayoutPanel3.ResumeLayout(false); @@ -4031,6 +4020,15 @@ private void InitializeComponent() this.panelToolBar.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbSpecies)).EndInit(); this.contextMenuStripLibraryHeader.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.radarChart1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusTester)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NumericUpDownTestingTE)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.radarChartExtractor)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownImprintingBonusExtractor)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownUpperTEffBound)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffBound)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLevel)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.radarChartLibrary)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index f0a19266..c68291d1 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -232,14 +232,24 @@ public Form1() // name patterns menu entries const int namePatternCount = 6; - var namePatternMenuItems = new ToolStripItem[namePatternCount]; + var namePatternMenuItems = new ToolStripMenuItem[namePatternCount]; + var libraryContextMenuItems = new ToolStripMenuItem[namePatternCount]; for (int i = 0; i < namePatternCount; i++) { var mi = new ToolStripMenuItem { Text = $"Pattern {i + 1}{(i == 0 ? " (used for auto import)" : string.Empty)}", Tag = i }; mi.Click += MenuOpenNamePattern; namePatternMenuItems[i] = mi; + + // library context menu + mi = new ToolStripMenuItem { Text = $"Pattern {i + 1}", Tag = i }; + mi.Click += GenerateCreatureNames; + libraryContextMenuItems[i] = mi; } + + libraryContextMenuItems[0].ShortcutKeys = Keys.Control | Keys.G; + nameGeneratorToolStripMenuItem.DropDownItems.AddRange(namePatternMenuItems); + toolStripMenuItemGenerateCreatureName.DropDownItems.AddRange(libraryContextMenuItems); _reactOnCreatureSelectionChange = true; } @@ -3581,18 +3591,15 @@ private void CopySelectedCreatureName() } } - private void toolStripMenuItem5_Click(object sender, EventArgs e) - { - GenerateCreatureNames(); - } - /// /// Replaces the names of the selected creatures with a pattern generated name. /// - private void GenerateCreatureNames() + private void GenerateCreatureNames(object sender, EventArgs e) { if (listViewLibrary.SelectedIndices.Count == 0) return; + var namePatternIndex = (int)((ToolStripMenuItem)sender).Tag; + var creaturesToUpdate = new List(); Creature[] sameSpecies = null; var libraryCreatureCount = _creatureCollection.GetTotalCreatureCount(); @@ -3607,7 +3614,7 @@ private void GenerateCreatureNames() // set new name cr.name = NamePattern.GenerateCreatureName(cr, cr, sameSpecies, _topLevels.TryGetValue(cr.Species, out var tl) ? tl : null, - _customReplacingNamingPattern, false, 0, libraryCreatureCount: libraryCreatureCount); + _customReplacingNamingPattern, false, namePatternIndex, libraryCreatureCount: libraryCreatureCount); creaturesToUpdate.Add(cr); } From 0bfce332224648f43b1e86d0fc88963ece671e7e Mon Sep 17 00:00:00 2001 From: cadon Date: Fri, 5 Jul 2024 23:39:56 +0200 Subject: [PATCH 32/36] setting to enable/disable warning about too long generated creature name --- ARKBreedingStats/App.config | 3 + ARKBreedingStats/Form1.cs | 3 +- ARKBreedingStats/Form1.importExported.cs | 2 +- .../Properties/Settings.Designer.cs | 14 ++- ARKBreedingStats/Properties/Settings.settings | 3 + .../settings/Settings.Designer.cs | 117 ++++++++++-------- ARKBreedingStats/settings/Settings.cs | 2 + 7 files changed, 89 insertions(+), 55 deletions(-) diff --git a/ARKBreedingStats/App.config b/ARKBreedingStats/App.config index b935db80..22dea2a0 100644 --- a/ARKBreedingStats/App.config +++ b/ARKBreedingStats/App.config @@ -541,6 +541,9 @@ True + + False + diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index c68291d1..455bc269 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -3614,7 +3614,8 @@ private void GenerateCreatureNames(object sender, EventArgs e) // set new name cr.name = NamePattern.GenerateCreatureName(cr, cr, sameSpecies, _topLevels.TryGetValue(cr.Species, out var tl) ? tl : null, - _customReplacingNamingPattern, false, namePatternIndex, libraryCreatureCount: libraryCreatureCount); + _customReplacingNamingPattern, false, namePatternIndex, + Properties.Settings.Default.DisplayWarningAboutTooLongNameGenerated, libraryCreatureCount: libraryCreatureCount); creaturesToUpdate.Add(cr); } diff --git a/ARKBreedingStats/Form1.importExported.cs b/ARKBreedingStats/Form1.importExported.cs index 272c7467..7c6afdb4 100644 --- a/ARKBreedingStats/Form1.importExported.cs +++ b/ARKBreedingStats/Form1.importExported.cs @@ -332,7 +332,7 @@ private bool SetNameOfImportedCreature(Creature creature, Creature[] creaturesOf creature.name = NamePattern.GenerateCreatureName(creature, alreadyExistingCreature, creaturesOfSpecies, _topLevels.TryGetValue(creature.Species, out var topLevels) ? topLevels : null, - _customReplacingNamingPattern, false, 0, libraryCreatureCount: totalCreatureCount); + _customReplacingNamingPattern, false, 0, Properties.Settings.Default.DisplayWarningAboutTooLongNameGenerated, libraryCreatureCount: totalCreatureCount); if (alreadyExistingCreature != null) alreadyExistingCreature.name = creature.name; // if alreadyExistingCreature was already updated and creature is not used anymore make sure name is not lost } diff --git a/ARKBreedingStats/Properties/Settings.Designer.cs b/ARKBreedingStats/Properties/Settings.Designer.cs index 9a6b16ab..6410795d 100644 --- a/ARKBreedingStats/Properties/Settings.Designer.cs +++ b/ARKBreedingStats/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace ARKBreedingStats.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -2421,5 +2421,17 @@ public bool TesterLinkWildMutatedLevels { this["TesterLinkWildMutatedLevels"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool DisplayWarningAboutTooLongNameGenerated { + get { + return ((bool)(this["DisplayWarningAboutTooLongNameGenerated"])); + } + set { + this["DisplayWarningAboutTooLongNameGenerated"] = value; + } + } } } diff --git a/ARKBreedingStats/Properties/Settings.settings b/ARKBreedingStats/Properties/Settings.settings index 906b5767..f319051c 100644 --- a/ARKBreedingStats/Properties/Settings.settings +++ b/ARKBreedingStats/Properties/Settings.settings @@ -608,5 +608,8 @@ True + + False + \ No newline at end of file diff --git a/ARKBreedingStats/settings/Settings.Designer.cs b/ARKBreedingStats/settings/Settings.Designer.cs index 991dc4cd..b8412fe0 100644 --- a/ARKBreedingStats/settings/Settings.Designer.cs +++ b/ARKBreedingStats/settings/Settings.Designer.cs @@ -121,6 +121,7 @@ private void InitializeComponent() this.label2 = new System.Windows.Forms.Label(); this.NudBackupEveryMinutes = new ARKBreedingStats.uiControls.Nud(); this.groupBox7 = new System.Windows.Forms.GroupBox(); + this.CbSetMutationLevelsExtractor = new System.Windows.Forms.CheckBox(); this.checkBoxDisplayHiddenStats = new System.Windows.Forms.CheckBox(); this.tabControlSettings = new System.Windows.Forms.TabControl(); this.tabPageMultipliers = new System.Windows.Forms.TabPage(); @@ -171,13 +172,13 @@ private void InitializeComponent() this.ClbExportSpreadsheetFields = new System.Windows.Forms.CheckedListBox(); this.GbImgCacheLocalAppData = new System.Windows.Forms.GroupBox(); this.CbImgCacheUseLocalAppData = new System.Windows.Forms.CheckBox(); + this.GbSpecies = new System.Windows.Forms.GroupBox(); + this.LbSpeciesSelectorCountLastUsed = new System.Windows.Forms.Label(); + this.NudSpeciesSelectorCountLastUsed = new ARKBreedingStats.uiControls.Nud(); this.groupBox16 = new System.Windows.Forms.GroupBox(); this.CbDisplayServerTokenPopup = new System.Windows.Forms.CheckBox(); this.CbStreamerMode = new System.Windows.Forms.CheckBox(); this.cbDevTools = new System.Windows.Forms.CheckBox(); - this.GbSpecies = new System.Windows.Forms.GroupBox(); - this.LbSpeciesSelectorCountLastUsed = new System.Windows.Forms.Label(); - this.NudSpeciesSelectorCountLastUsed = new ARKBreedingStats.uiControls.Nud(); this.groupBox26 = new System.Windows.Forms.GroupBox(); this.cbAdminConsoleCommandWithCheat = new System.Windows.Forms.CheckBox(); this.groupBox25 = new System.Windows.Forms.GroupBox(); @@ -373,7 +374,7 @@ private void InitializeComponent() this.panel1 = new System.Windows.Forms.Panel(); this.colorDialog1 = new System.Windows.Forms.ColorDialog(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.CbSetMutationLevelsExtractor = new System.Windows.Forms.CheckBox(); + this.CbLibraryGenerateNameWarnTooLongName = new System.Windows.Forms.CheckBox(); this.groupBoxMultiplier.SuspendLayout(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudTamedDinoCharacterFoodDrain)).BeginInit(); @@ -430,9 +431,9 @@ private void InitializeComponent() this.groupBox31.SuspendLayout(); this.groupBox30.SuspendLayout(); this.GbImgCacheLocalAppData.SuspendLayout(); - this.groupBox16.SuspendLayout(); this.GbSpecies.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.NudSpeciesSelectorCountLastUsed)).BeginInit(); + this.groupBox16.SuspendLayout(); this.groupBox26.SuspendLayout(); this.groupBox25.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudDefaultFontSize)).BeginInit(); @@ -1867,6 +1868,16 @@ private void InitializeComponent() this.groupBox7.TabStop = false; this.groupBox7.Text = "Extractor"; // + // CbSetMutationLevelsExtractor + // + this.CbSetMutationLevelsExtractor.AutoSize = true; + this.CbSetMutationLevelsExtractor.Location = new System.Drawing.Point(13, 42); + this.CbSetMutationLevelsExtractor.Name = "CbSetMutationLevelsExtractor"; + this.CbSetMutationLevelsExtractor.Size = new System.Drawing.Size(309, 17); + this.CbSetMutationLevelsExtractor.TabIndex = 1; + this.CbSetMutationLevelsExtractor.Text = "Set mutation levels if they can be determined uniquely (ASA)"; + this.CbSetMutationLevelsExtractor.UseVisualStyleBackColor = true; + // // checkBoxDisplayHiddenStats // this.checkBoxDisplayHiddenStats.AutoSize = true; @@ -2457,6 +2468,39 @@ private void InitializeComponent() this.CbImgCacheUseLocalAppData.Text = "Use LocalAppData for Image cache"; this.CbImgCacheUseLocalAppData.UseVisualStyleBackColor = true; // + // GbSpecies + // + this.GbSpecies.Controls.Add(this.LbSpeciesSelectorCountLastUsed); + this.GbSpecies.Controls.Add(this.NudSpeciesSelectorCountLastUsed); + this.GbSpecies.Location = new System.Drawing.Point(329, 616); + this.GbSpecies.Name = "GbSpecies"; + this.GbSpecies.Size = new System.Drawing.Size(413, 43); + this.GbSpecies.TabIndex = 3; + this.GbSpecies.TabStop = false; + this.GbSpecies.Text = "Species Selection"; + // + // LbSpeciesSelectorCountLastUsed + // + this.LbSpeciesSelectorCountLastUsed.AutoSize = true; + this.LbSpeciesSelectorCountLastUsed.Location = new System.Drawing.Point(6, 21); + this.LbSpeciesSelectorCountLastUsed.Name = "LbSpeciesSelectorCountLastUsed"; + this.LbSpeciesSelectorCountLastUsed.Size = new System.Drawing.Size(187, 13); + this.LbSpeciesSelectorCountLastUsed.TabIndex = 0; + this.LbSpeciesSelectorCountLastUsed.Text = "Number of displayed last used species"; + // + // NudSpeciesSelectorCountLastUsed + // + this.NudSpeciesSelectorCountLastUsed.ForeColor = System.Drawing.SystemColors.GrayText; + this.NudSpeciesSelectorCountLastUsed.Location = new System.Drawing.Point(350, 19); + this.NudSpeciesSelectorCountLastUsed.Name = "NudSpeciesSelectorCountLastUsed"; + this.NudSpeciesSelectorCountLastUsed.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.NudSpeciesSelectorCountLastUsed.Size = new System.Drawing.Size(57, 20); + this.NudSpeciesSelectorCountLastUsed.TabIndex = 1; + // // groupBox16 // this.groupBox16.Controls.Add(this.CbDisplayServerTokenPopup); @@ -2496,39 +2540,6 @@ private void InitializeComponent() this.cbDevTools.Text = "Show Dev Tools (needs restart). Adds a statmultiplier-tester and extractor tests"; this.cbDevTools.UseVisualStyleBackColor = true; // - // GbSpecies - // - this.GbSpecies.Controls.Add(this.LbSpeciesSelectorCountLastUsed); - this.GbSpecies.Controls.Add(this.NudSpeciesSelectorCountLastUsed); - this.GbSpecies.Location = new System.Drawing.Point(329, 616); - this.GbSpecies.Name = "GbSpecies"; - this.GbSpecies.Size = new System.Drawing.Size(413, 43); - this.GbSpecies.TabIndex = 3; - this.GbSpecies.TabStop = false; - this.GbSpecies.Text = "Species Selection"; - // - // LbSpeciesSelectorCountLastUsed - // - this.LbSpeciesSelectorCountLastUsed.AutoSize = true; - this.LbSpeciesSelectorCountLastUsed.Location = new System.Drawing.Point(6, 21); - this.LbSpeciesSelectorCountLastUsed.Name = "LbSpeciesSelectorCountLastUsed"; - this.LbSpeciesSelectorCountLastUsed.Size = new System.Drawing.Size(187, 13); - this.LbSpeciesSelectorCountLastUsed.TabIndex = 0; - this.LbSpeciesSelectorCountLastUsed.Text = "Number of displayed last used species"; - // - // NudSpeciesSelectorCountLastUsed - // - this.NudSpeciesSelectorCountLastUsed.ForeColor = System.Drawing.SystemColors.GrayText; - this.NudSpeciesSelectorCountLastUsed.Location = new System.Drawing.Point(350, 19); - this.NudSpeciesSelectorCountLastUsed.Name = "NudSpeciesSelectorCountLastUsed"; - this.NudSpeciesSelectorCountLastUsed.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.NudSpeciesSelectorCountLastUsed.Size = new System.Drawing.Size(57, 20); - this.NudSpeciesSelectorCountLastUsed.TabIndex = 1; - // // groupBox26 // this.groupBox26.Controls.Add(this.cbAdminConsoleCommandWithCheat); @@ -2685,6 +2696,7 @@ private void InitializeComponent() // // groupBox9 // + this.groupBox9.Controls.Add(this.CbLibraryGenerateNameWarnTooLongName); this.groupBox9.Controls.Add(this.CbLibraryDisplayZeroMutationLevels); this.groupBox9.Controls.Add(this.CbDisplayLibraryCreatureIndex); this.groupBox9.Controls.Add(this.CbNaturalSortIgnoreSpaces); @@ -2697,7 +2709,7 @@ private void InitializeComponent() this.groupBox9.Controls.Add(this.cbCreatureColorsLibrary); this.groupBox9.Location = new System.Drawing.Point(6, 490); this.groupBox9.Name = "groupBox9"; - this.groupBox9.Size = new System.Drawing.Size(317, 229); + this.groupBox9.Size = new System.Drawing.Size(317, 248); this.groupBox9.TabIndex = 4; this.groupBox9.TabStop = false; this.groupBox9.Text = "Library"; @@ -3966,7 +3978,7 @@ private void InitializeComponent() this.customSCCustom.Location = new System.Drawing.Point(6, 139); this.customSCCustom.Name = "customSCCustom"; this.customSCCustom.Size = new System.Drawing.Size(401, 23); - this.customSCCustom.SoundFile = ""; + this.customSCCustom.SoundFile = null; this.customSCCustom.TabIndex = 4; // // customSCWakeup @@ -3974,7 +3986,7 @@ private void InitializeComponent() this.customSCWakeup.Location = new System.Drawing.Point(6, 81); this.customSCWakeup.Name = "customSCWakeup"; this.customSCWakeup.Size = new System.Drawing.Size(401, 23); - this.customSCWakeup.SoundFile = null; + this.customSCWakeup.SoundFile = ""; this.customSCWakeup.TabIndex = 2; // // customSCBirth @@ -3982,7 +3994,7 @@ private void InitializeComponent() this.customSCBirth.Location = new System.Drawing.Point(6, 110); this.customSCBirth.Name = "customSCBirth"; this.customSCBirth.Size = new System.Drawing.Size(401, 23); - this.customSCBirth.SoundFile = null; + this.customSCBirth.SoundFile = ""; this.customSCBirth.TabIndex = 3; // // customSCStarving @@ -3990,7 +4002,7 @@ private void InitializeComponent() this.customSCStarving.Location = new System.Drawing.Point(6, 52); this.customSCStarving.Name = "customSCStarving"; this.customSCStarving.Size = new System.Drawing.Size(401, 23); - this.customSCStarving.SoundFile = ""; + this.customSCStarving.SoundFile = null; this.customSCStarving.TabIndex = 1; // // label20 @@ -4807,15 +4819,15 @@ private void InitializeComponent() this.panel1.Size = new System.Drawing.Size(758, 30); this.panel1.TabIndex = 12; // - // CbSetMutationLevelsExtractor + // CbLibraryGenerateNameWarnTooLongName // - this.CbSetMutationLevelsExtractor.AutoSize = true; - this.CbSetMutationLevelsExtractor.Location = new System.Drawing.Point(13, 42); - this.CbSetMutationLevelsExtractor.Name = "CbSetMutationLevelsExtractor"; - this.CbSetMutationLevelsExtractor.Size = new System.Drawing.Size(309, 17); - this.CbSetMutationLevelsExtractor.TabIndex = 1; - this.CbSetMutationLevelsExtractor.Text = "Set mutation levels if they can be determined uniquely (ASA)"; - this.CbSetMutationLevelsExtractor.UseVisualStyleBackColor = true; + this.CbLibraryGenerateNameWarnTooLongName.AutoSize = true; + this.CbLibraryGenerateNameWarnTooLongName.Location = new System.Drawing.Point(6, 225); + this.CbLibraryGenerateNameWarnTooLongName.Name = "CbLibraryGenerateNameWarnTooLongName"; + this.CbLibraryGenerateNameWarnTooLongName.Size = new System.Drawing.Size(309, 17); + this.CbLibraryGenerateNameWarnTooLongName.TabIndex = 10; + this.CbLibraryGenerateNameWarnTooLongName.Text = "When generating names in library warn about too long name"; + this.CbLibraryGenerateNameWarnTooLongName.UseVisualStyleBackColor = true; // // Settings // @@ -4905,10 +4917,10 @@ private void InitializeComponent() this.groupBox30.ResumeLayout(false); this.groupBox30.PerformLayout(); this.GbImgCacheLocalAppData.ResumeLayout(false); - this.groupBox16.ResumeLayout(false); this.GbSpecies.ResumeLayout(false); this.GbSpecies.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.NudSpeciesSelectorCountLastUsed)).EndInit(); + this.groupBox16.ResumeLayout(false); this.groupBox26.ResumeLayout(false); this.groupBox26.PerformLayout(); this.groupBox25.ResumeLayout(false); @@ -5336,5 +5348,6 @@ private void InitializeComponent() private uiControls.Nud nudOverlayInfoWidth; private System.Windows.Forms.CheckBox CbCopyNameToClipboardOnImport; private System.Windows.Forms.CheckBox CbSetMutationLevelsExtractor; + private System.Windows.Forms.CheckBox CbLibraryGenerateNameWarnTooLongName; } } \ No newline at end of file diff --git a/ARKBreedingStats/settings/Settings.cs b/ARKBreedingStats/settings/Settings.cs index df33ac36..69a2f1be 100644 --- a/ARKBreedingStats/settings/Settings.cs +++ b/ARKBreedingStats/settings/Settings.cs @@ -381,6 +381,7 @@ private void LoadSettings(CreatureCollection cc) CbNaturalSortIgnoreSpaces.Checked = Properties.Settings.Default.NaturalSortIgnoreSpaces; CbDisplayLibraryCreatureIndex.Checked = Properties.Settings.Default.DisplayLibraryCreatureIndex; CbLibraryDisplayZeroMutationLevels.Checked = Properties.Settings.Default.LibraryDisplayZeroMutationLevels; + CbLibraryGenerateNameWarnTooLongName.Checked = Properties.Settings.Default.DisplayWarningAboutTooLongNameGenerated; #endregion @@ -652,6 +653,7 @@ private void SaveSettings() Properties.Settings.Default.NaturalSortIgnoreSpaces = CbNaturalSortIgnoreSpaces.Checked; Properties.Settings.Default.DisplayLibraryCreatureIndex = CbDisplayLibraryCreatureIndex.Checked; Properties.Settings.Default.LibraryDisplayZeroMutationLevels = CbLibraryDisplayZeroMutationLevels.Checked; + Properties.Settings.Default.DisplayWarningAboutTooLongNameGenerated = CbLibraryGenerateNameWarnTooLongName.Checked; #endregion From 3d0ac375386bc3870123d6e356de1666f2693f1d Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 6 Jul 2024 19:46:53 +0200 Subject: [PATCH 33/36] conversion to level color settings --- ARKBreedingStats/ARKBreedingStats.csproj | 14 +- ARKBreedingStats/App.config | 9 +- ARKBreedingStats/Form1.cs | 29 +- .../Properties/Settings.Designer.cs | 36 +- ARKBreedingStats/Properties/Settings.settings | 9 +- .../LevelGraphOptionsControl.cs | 31 +- .../StatsOptions/LevelGraphRepresentation.cs | 2 +- .../StatOptionsControl.Designer.cs | 20 +- .../StatOptionsControl.cs | 11 +- .../StatOptionsControl.resx | 0 .../StatsOptions/StatsOptionsSettings.cs | 2 +- .../StatsOptionsWindow.Designer.cs | 2 +- .../StatsOptions/StatsOptionsWindow.cs | 12 + .../StatsOptionsWindow.resx | 0 .../settings/Settings.Designer.cs | 3375 ++++++++--------- ARKBreedingStats/settings/Settings.cs | 73 +- ARKBreedingStats/settings/Settings.resx | 3 + .../uiControls/StatsOptionsWindow.cs | 20 - 18 files changed, 1731 insertions(+), 1917 deletions(-) rename ARKBreedingStats/{uiControls => StatsOptions}/LevelGraphOptionsControl.cs (88%) rename ARKBreedingStats/{uiControls => StatsOptions}/StatOptionsControl.Designer.cs (93%) rename ARKBreedingStats/{uiControls => StatsOptions}/StatOptionsControl.cs (88%) rename ARKBreedingStats/{uiControls => StatsOptions}/StatOptionsControl.resx (100%) rename ARKBreedingStats/{uiControls => StatsOptions}/StatsOptionsWindow.Designer.cs (98%) create mode 100644 ARKBreedingStats/StatsOptions/StatsOptionsWindow.cs rename ARKBreedingStats/{uiControls => StatsOptions}/StatsOptionsWindow.resx (100%) delete mode 100644 ARKBreedingStats/uiControls/StatsOptionsWindow.cs diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj index 3071a6ad..7a361b04 100644 --- a/ARKBreedingStats/ARKBreedingStats.csproj +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -173,13 +173,13 @@ ScrollForm.cs - + UserControl - + StatOptionsControl.cs - + Component @@ -188,10 +188,10 @@ StatSelector.cs - + Form - + StatsOptionsWindow.cs @@ -777,13 +777,13 @@ ScrollForm.cs - + StatOptionsControl.cs StatSelector.cs - + StatsOptionsWindow.cs diff --git a/ARKBreedingStats/App.config b/ARKBreedingStats/App.config index 22dea2a0..70cb644f 100644 --- a/ARKBreedingStats/App.config +++ b/ARKBreedingStats/App.config @@ -408,12 +408,6 @@ False - - 0 - - - 120 - 120 @@ -544,6 +538,9 @@ False + + 200, 200, 1000, 650 + diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 455bc269..fea4f963 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -15,6 +15,7 @@ using System.IO.Compression; using System.Linq; using System.Windows.Forms; +using ARKBreedingStats.importExportGun; using ARKBreedingStats.mods; using ARKBreedingStats.NamePatterns; using ARKBreedingStats.StatsOptions; @@ -251,6 +252,32 @@ public Form1() nameGeneratorToolStripMenuItem.DropDownItems.AddRange(namePatternMenuItems); toolStripMenuItemGenerateCreatureName.DropDownItems.AddRange(libraryContextMenuItems); + // conversion of global color level settings to specific options. Remove around 2024-09 + if (Properties.Settings.Default.ChartHueEvenMax != int.MaxValue) + { + var defaultSettings = _statsLevelColors.StatsOptionsDict[string.Empty].StatOptions; + for (var s = 0; s < Stats.StatsCount; s++) + { + defaultSettings[s].LevelGraphRepresentation.LowerColor = Utils.ColorFromHue(Properties.Settings.Default.ChartHueEvenMin); + defaultSettings[s].LevelGraphRepresentation.UpperColor = Utils.ColorFromHue(Properties.Settings.Default.ChartHueEvenMax); + defaultSettings[s].LevelGraphRepresentation.ColorGradientReversed = Properties.Settings.Default.ChartHueEvenMax < Properties.Settings.Default.ChartHueEvenMin; + + if (Properties.Settings.Default.HighlightEvenOdd) + { + defaultSettings[s].LevelGraphRepresentationOdd = new LevelGraphRepresentation + { + LowerColor = Utils.ColorFromHue(Properties.Settings.Default.ChartHueOddMin), + UpperColor = Utils.ColorFromHue(Properties.Settings.Default.ChartHueOddMax), + ColorGradientReversed = Properties.Settings.Default.ChartHueOddMax < Properties.Settings.Default.ChartHueOddMin, + }; + defaultSettings[s].UseDifferentColorsForOddLevels = true; + } + } + + Properties.Settings.Default.ChartHueEvenMax = int.MaxValue; + } + // end of level color settings conversion + _reactOnCreatureSelectionChange = true; } @@ -2096,7 +2123,7 @@ private void OpenSettingsDialog(SettingsTabPages page = SettingsTabPages.Unknown var gameSettingBefore = _creatureCollection.Game; var displayLibraryCreatureIndexBefore = Properties.Settings.Default.DisplayLibraryCreatureIndex; - using (Settings settingsForm = new Settings(_creatureCollection, page)) + using (Settings settingsForm = new Settings(_creatureCollection, page, _statsLevelColors)) { var settingsSaved = settingsForm.ShowDialog() == DialogResult.OK; _settingsLastTabPage = settingsForm.LastTabPageIndex; diff --git a/ARKBreedingStats/Properties/Settings.Designer.cs b/ARKBreedingStats/Properties/Settings.Designer.cs index 6410795d..0b9e2868 100644 --- a/ARKBreedingStats/Properties/Settings.Designer.cs +++ b/ARKBreedingStats/Properties/Settings.Designer.cs @@ -1838,30 +1838,6 @@ public bool InfoGraphicShowRegionNamesIfNoImage { } } - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int ChartHueMin { - get { - return ((int)(this["ChartHueMin"])); - } - set { - this["ChartHueMin"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("120")] - public int ChartHueMax { - get { - return ((int)(this["ChartHueMax"])); - } - set { - this["ChartHueMax"] = value; - } - } - [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("120")] @@ -2433,5 +2409,17 @@ public bool DisplayWarningAboutTooLongNameGenerated { this["DisplayWarningAboutTooLongNameGenerated"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("200, 200, 1000, 650")] + public global::System.Drawing.Rectangle LevelColorWindowRectangle { + get { + return ((global::System.Drawing.Rectangle)(this["LevelColorWindowRectangle"])); + } + set { + this["LevelColorWindowRectangle"] = value; + } + } } } diff --git a/ARKBreedingStats/Properties/Settings.settings b/ARKBreedingStats/Properties/Settings.settings index f319051c..053fb0c0 100644 --- a/ARKBreedingStats/Properties/Settings.settings +++ b/ARKBreedingStats/Properties/Settings.settings @@ -461,12 +461,6 @@ False - - 0 - - - 120 - 120 @@ -611,5 +605,8 @@ False + + 200, 200, 1000, 650 + \ No newline at end of file diff --git a/ARKBreedingStats/uiControls/LevelGraphOptionsControl.cs b/ARKBreedingStats/StatsOptions/LevelGraphOptionsControl.cs similarity index 88% rename from ARKBreedingStats/uiControls/LevelGraphOptionsControl.cs rename to ARKBreedingStats/StatsOptions/LevelGraphOptionsControl.cs index da0686d2..59cdce2e 100644 --- a/ARKBreedingStats/uiControls/LevelGraphOptionsControl.cs +++ b/ARKBreedingStats/StatsOptions/LevelGraphOptionsControl.cs @@ -1,11 +1,10 @@ -using ARKBreedingStats.library; -using ARKBreedingStats.species; +using ARKBreedingStats.species; using ARKBreedingStats.utils; using System; using System.Drawing; using System.Linq; +using System.Runtime.CompilerServices; using System.Windows.Forms; -using System.Windows.Forms.VisualStyles; using ARKBreedingStats.StatsOptions; namespace ARKBreedingStats.uiControls @@ -15,28 +14,46 @@ internal class LevelGraphOptionsControl : TableLayoutPanel private StatOptionsControl[] _statOptionsControls; private readonly ToolTip _tt = new ToolTip(); private StatsOptions _selectedStatsOptions; - private StatsOptionsSettings _statsOptionsSettings; + private readonly StatsOptionsSettings _statsOptionsSettings; private Species _species; private ComboBox _cbbOptions; private ComboBox _cbbParent; private Button _btRemove; private TextBox _tbOptionsName; private Label _lbParent; + public static Form DisplayedForm; public static void ShowWindow(Form parent, StatsOptionsSettings settings) { + if (DisplayedForm != null) + { + DisplayedForm.BringToFront(); + return; + } + var so = new LevelGraphOptionsControl(settings); var f = new Form { FormBorderStyle = FormBorderStyle.SizableToolWindow, - Width = 1000, - Height = 1000 + Width = Properties.Settings.Default.LevelColorWindowRectangle.Width, + Height = Properties.Settings.Default.LevelColorWindowRectangle.Height, + StartPosition = FormStartPosition.Manual, + Location = new Point(Properties.Settings.Default.LevelColorWindowRectangle.X, Properties.Settings.Default.LevelColorWindowRectangle.Y) }; f.Controls.Add(so); so.Dock = DockStyle.Fill; + DisplayedForm = f; + f.Closed += F_Closed; f.Show(parent); } + private static void F_Closed(object sender, EventArgs e) + { + Properties.Settings.Default.LevelColorWindowRectangle = + new Rectangle(DisplayedForm.Left, DisplayedForm.Top, DisplayedForm.Width, DisplayedForm.Height); + DisplayedForm = null; + } + public LevelGraphOptionsControl(StatsOptionsSettings settings) { _statsOptionsSettings = settings; @@ -74,7 +91,7 @@ private void InitializeControls() flpHeaderControls.Controls.Add(_tbOptionsName); _tbOptionsName.Leave += TbOptionsName_Leave; - _lbParent = new Label(); + _lbParent = new Label { Text = "depends on", Margin = new Padding(5, 7, 5, 0), AutoSize = true }; flpHeaderControls.Controls.Add(_lbParent); _cbbParent = new ComboBox { DropDownStyle = ComboBoxStyle.DropDownList }; diff --git a/ARKBreedingStats/StatsOptions/LevelGraphRepresentation.cs b/ARKBreedingStats/StatsOptions/LevelGraphRepresentation.cs index 8b79255a..cc703219 100644 --- a/ARKBreedingStats/StatsOptions/LevelGraphRepresentation.cs +++ b/ARKBreedingStats/StatsOptions/LevelGraphRepresentation.cs @@ -41,7 +41,7 @@ public int UpperBound } } - private int _upperBound; + private int _upperBound = 50; private Color _lowerColor; private float _lowerColorH; diff --git a/ARKBreedingStats/uiControls/StatOptionsControl.Designer.cs b/ARKBreedingStats/StatsOptions/StatOptionsControl.Designer.cs similarity index 93% rename from ARKBreedingStats/uiControls/StatOptionsControl.Designer.cs rename to ARKBreedingStats/StatsOptions/StatOptionsControl.Designer.cs index c32c6a7c..c50a047e 100644 --- a/ARKBreedingStats/uiControls/StatOptionsControl.Designer.cs +++ b/ARKBreedingStats/StatsOptions/StatOptionsControl.Designer.cs @@ -1,4 +1,6 @@ -namespace ARKBreedingStats.uiControls +using ARKBreedingStats.uiControls; + +namespace ARKBreedingStats.StatsOptions { partial class StatOptionsControl { @@ -52,14 +54,14 @@ private void InitializeComponent() this.panel1.BackColor = System.Drawing.Color.Gray; this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(950, 1); + this.panel1.Size = new System.Drawing.Size(936, 1); this.panel1.TabIndex = 7; // // CbUseDifferentColorsForOddLevels // this.CbUseDifferentColorsForOddLevels.AutoSize = true; this.CbUseDifferentColorsForOddLevels.Enabled = false; - this.CbUseDifferentColorsForOddLevels.Location = new System.Drawing.Point(508, 37); + this.CbUseDifferentColorsForOddLevels.Location = new System.Drawing.Point(531, 8); this.CbUseDifferentColorsForOddLevels.Name = "CbUseDifferentColorsForOddLevels"; this.CbUseDifferentColorsForOddLevels.Size = new System.Drawing.Size(44, 17); this.CbUseDifferentColorsForOddLevels.TabIndex = 8; @@ -69,14 +71,14 @@ private void InitializeComponent() // // hueControlOdd // - this.hueControlOdd.Location = new System.Drawing.Point(558, 31); + this.hueControlOdd.Location = new System.Drawing.Point(581, 3); this.hueControlOdd.Name = "hueControlOdd"; this.hueControlOdd.Size = new System.Drawing.Size(347, 24); this.hueControlOdd.TabIndex = 10; // // hueControl // - this.hueControl.Location = new System.Drawing.Point(152, 32); + this.hueControl.Location = new System.Drawing.Point(175, 3); this.hueControl.Name = "hueControl"; this.hueControl.Size = new System.Drawing.Size(350, 24); this.hueControl.TabIndex = 9; @@ -84,11 +86,11 @@ private void InitializeComponent() // CbOverrideGraphSettings // this.CbOverrideGraphSettings.AutoSize = true; - this.CbOverrideGraphSettings.Location = new System.Drawing.Point(15, 38); + this.CbOverrideGraphSettings.Location = new System.Drawing.Point(70, 10); this.CbOverrideGraphSettings.Name = "CbOverrideGraphSettings"; - this.CbOverrideGraphSettings.Size = new System.Drawing.Size(135, 17); + this.CbOverrideGraphSettings.Size = new System.Drawing.Size(99, 17); this.CbOverrideGraphSettings.TabIndex = 11; - this.CbOverrideGraphSettings.Text = "Override graph settings"; + this.CbOverrideGraphSettings.Text = "Override parent"; this.CbOverrideGraphSettings.UseVisualStyleBackColor = true; this.CbOverrideGraphSettings.CheckedChanged += new System.EventHandler(this.CbOverrideGraphSettings_CheckedChanged); // @@ -103,7 +105,7 @@ private void InitializeComponent() this.Controls.Add(this.panel1); this.Controls.Add(this.LbStatName); this.Name = "StatOptionsControl"; - this.Size = new System.Drawing.Size(987, 60); + this.Size = new System.Drawing.Size(936, 29); this.ResumeLayout(false); this.PerformLayout(); diff --git a/ARKBreedingStats/uiControls/StatOptionsControl.cs b/ARKBreedingStats/StatsOptions/StatOptionsControl.cs similarity index 88% rename from ARKBreedingStats/uiControls/StatOptionsControl.cs rename to ARKBreedingStats/StatsOptions/StatOptionsControl.cs index 44e959cf..3591f33e 100644 --- a/ARKBreedingStats/uiControls/StatOptionsControl.cs +++ b/ARKBreedingStats/StatsOptions/StatOptionsControl.cs @@ -1,12 +1,10 @@ using System; using System.Windows.Forms; -using ARKBreedingStats.StatsOptions; -namespace ARKBreedingStats.uiControls +namespace ARKBreedingStats.StatsOptions { public partial class StatOptionsControl : UserControl { - private readonly ToolTip _tt; private StatLevelColors _statLevelColors; private readonly int _statIndex; private StatsOptions _parent; @@ -20,10 +18,9 @@ public StatOptionsControl(string name, int statIndex, ToolTip tt) : this() { LbStatName.Text = name; _statIndex = statIndex; - _tt = tt; - hueControl.UpdateTooltips(_tt); - hueControlOdd.UpdateTooltips(_tt); - _tt.SetToolTip(CbUseDifferentColorsForOddLevels, "Use different colors for odd levels"); + hueControl.UpdateTooltips(tt); + hueControlOdd.UpdateTooltips(tt); + tt.SetToolTip(CbUseDifferentColorsForOddLevels, "Use different colors for odd levels"); } public void SetStatOptions(StatLevelColors so, bool isNotRoot, StatsOptions parent) diff --git a/ARKBreedingStats/uiControls/StatOptionsControl.resx b/ARKBreedingStats/StatsOptions/StatOptionsControl.resx similarity index 100% rename from ARKBreedingStats/uiControls/StatOptionsControl.resx rename to ARKBreedingStats/StatsOptions/StatOptionsControl.resx diff --git a/ARKBreedingStats/StatsOptions/StatsOptionsSettings.cs b/ARKBreedingStats/StatsOptions/StatsOptionsSettings.cs index d0022fe0..b04b784f 100644 --- a/ARKBreedingStats/StatsOptions/StatsOptionsSettings.cs +++ b/ARKBreedingStats/StatsOptions/StatsOptionsSettings.cs @@ -67,7 +67,7 @@ public void LoadSettings(string settingsFileName) } /// - /// Returns the default stat options. + /// Returns the default stat options and set the name according the parameter. /// public StatsOptions GetDefaultStatOptions(string name) { diff --git a/ARKBreedingStats/uiControls/StatsOptionsWindow.Designer.cs b/ARKBreedingStats/StatsOptions/StatsOptionsWindow.Designer.cs similarity index 98% rename from ARKBreedingStats/uiControls/StatsOptionsWindow.Designer.cs rename to ARKBreedingStats/StatsOptions/StatsOptionsWindow.Designer.cs index 46411bb9..4cc8e0b8 100644 --- a/ARKBreedingStats/uiControls/StatsOptionsWindow.Designer.cs +++ b/ARKBreedingStats/StatsOptions/StatsOptionsWindow.Designer.cs @@ -1,4 +1,4 @@ -namespace ARKBreedingStats.uiControls +namespace ARKBreedingStats.StatsOptions { partial class StatsOptionsWindow { diff --git a/ARKBreedingStats/StatsOptions/StatsOptionsWindow.cs b/ARKBreedingStats/StatsOptions/StatsOptionsWindow.cs new file mode 100644 index 00000000..2fbfc658 --- /dev/null +++ b/ARKBreedingStats/StatsOptions/StatsOptionsWindow.cs @@ -0,0 +1,12 @@ +using System.Windows.Forms; + +namespace ARKBreedingStats.StatsOptions +{ + public partial class StatsOptionsWindow : Form + { + public StatsOptionsWindow() + { + InitializeComponent(); + } + } +} diff --git a/ARKBreedingStats/uiControls/StatsOptionsWindow.resx b/ARKBreedingStats/StatsOptions/StatsOptionsWindow.resx similarity index 100% rename from ARKBreedingStats/uiControls/StatsOptionsWindow.resx rename to ARKBreedingStats/StatsOptions/StatsOptionsWindow.resx diff --git a/ARKBreedingStats/settings/Settings.Designer.cs b/ARKBreedingStats/settings/Settings.Designer.cs index b8412fe0..e5f8bb77 100644 --- a/ARKBreedingStats/settings/Settings.Designer.cs +++ b/ARKBreedingStats/settings/Settings.Designer.cs @@ -30,6 +30,7 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Settings)); + System.Windows.Forms.Button BtOpenLevelColorOptions; this.groupBoxMultiplier = new System.Windows.Forms.GroupBox(); this.CbHighlightAdjustedMultipliers = new System.Windows.Forms.CheckBox(); this.flowLayoutPanelStatMultipliers = new System.Windows.Forms.FlowLayoutPanel(); @@ -45,81 +46,42 @@ private void InitializeComponent() this.label6 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.nudTamedDinoCharacterFoodDrain = new ARKBreedingStats.uiControls.Nud(); - this.nudTamedDinoCharacterFoodDrainEvent = new ARKBreedingStats.uiControls.Nud(); this.label64 = new System.Windows.Forms.Label(); - this.nudBabyImprintAmountEvent = new ARKBreedingStats.uiControls.Nud(); this.label49 = new System.Windows.Forms.Label(); - this.nudBabyImprintAmount = new ARKBreedingStats.uiControls.Nud(); this.label44 = new System.Windows.Forms.Label(); - this.nudMatingSpeed = new ARKBreedingStats.uiControls.Nud(); - this.nudBabyFoodConsumptionSpeedEvent = new ARKBreedingStats.uiControls.Nud(); - this.nudMatingIntervalEvent = new ARKBreedingStats.uiControls.Nud(); - this.nudBabyCuddleIntervalEvent = new ARKBreedingStats.uiControls.Nud(); - this.nudBabyMatureSpeedEvent = new ARKBreedingStats.uiControls.Nud(); - this.nudEggHatchSpeedEvent = new ARKBreedingStats.uiControls.Nud(); this.labelBabyFoodConsumptionSpeed = new System.Windows.Forms.Label(); - this.nudBabyFoodConsumptionSpeed = new ARKBreedingStats.uiControls.Nud(); this.label3 = new System.Windows.Forms.Label(); - this.nudMatingInterval = new ARKBreedingStats.uiControls.Nud(); this.label17 = new System.Windows.Forms.Label(); - this.nudBabyCuddleInterval = new ARKBreedingStats.uiControls.Nud(); this.label13 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); - this.nudBabyMatureSpeed = new ARKBreedingStats.uiControls.Nud(); - this.nudBabyImprintingStatScale = new ARKBreedingStats.uiControls.Nud(); this.label8 = new System.Windows.Forms.Label(); - this.nudEggHatchSpeed = new ARKBreedingStats.uiControls.Nud(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.LbDefaultLevelups = new System.Windows.Forms.Label(); - this.nudMaxServerLevel = new ARKBreedingStats.uiControls.Nud(); this.lbMaxTotalLevel = new System.Windows.Forms.Label(); - this.nudMaxGraphLevel = new ARKBreedingStats.uiControls.Nud(); this.label18 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); - this.nudMaxWildLevels = new ARKBreedingStats.uiControls.Nud(); this.label10 = new System.Windows.Forms.Label(); - this.nudMaxDomLevels = new ARKBreedingStats.uiControls.Nud(); this.label27 = new System.Windows.Forms.Label(); this.groupBox4 = new System.Windows.Forms.GroupBox(); - this.label57 = new System.Windows.Forms.Label(); - this.label56 = new System.Windows.Forms.Label(); - this.pbChartOddRange = new System.Windows.Forms.PictureBox(); - this.pbChartEvenRange = new System.Windows.Forms.PictureBox(); - this.nudChartLevelOddMax = new ARKBreedingStats.uiControls.Nud(); - this.nudChartLevelOddMin = new ARKBreedingStats.uiControls.Nud(); - this.nudChartLevelEvenMax = new ARKBreedingStats.uiControls.Nud(); - this.nudChartLevelEvenMin = new ARKBreedingStats.uiControls.Nud(); - this.CbHighlightLevelEvenOdd = new System.Windows.Forms.CheckBox(); this.CbHighlightLevel255 = new System.Windows.Forms.CheckBox(); this.cbIgnoreSexInBreedingPlan = new System.Windows.Forms.CheckBox(); this.label16 = new System.Windows.Forms.Label(); this.radioButtonFahrenheit = new System.Windows.Forms.RadioButton(); this.radioButtonCelsius = new System.Windows.Forms.RadioButton(); this.label12 = new System.Windows.Forms.Label(); - this.numericUpDownMaxBreedingSug = new ARKBreedingStats.uiControls.Nud(); this.groupBox5 = new System.Windows.Forms.GroupBox(); - this.NudWildDinoCharacterFoodDrainMultiplier = new ARKBreedingStats.uiControls.Nud(); this.label69 = new System.Windows.Forms.Label(); this.label67 = new System.Windows.Forms.Label(); - this.NudWildDinoTorporDrainMultiplier = new ARKBreedingStats.uiControls.Nud(); - this.nudDinoCharacterFoodDrainEvent = new ARKBreedingStats.uiControls.Nud(); - this.nudTamingSpeedEvent = new ARKBreedingStats.uiControls.Nud(); this.label7 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); - this.nudDinoCharacterFoodDrain = new ARKBreedingStats.uiControls.Nud(); - this.nudTamingSpeed = new ARKBreedingStats.uiControls.Nud(); this.groupBox6 = new System.Windows.Forms.GroupBox(); this.label55 = new System.Windows.Forms.Label(); - this.NudWaitBeforeAutoLoad = new ARKBreedingStats.uiControls.Nud(); this.label54 = new System.Windows.Forms.Label(); - this.NudKeepBackupFilesCount = new ARKBreedingStats.uiControls.Nud(); this.label53 = new System.Windows.Forms.Label(); this.BtClearBackupFolder = new System.Windows.Forms.Button(); this.label52 = new System.Windows.Forms.Label(); this.BtBackupFolder = new System.Windows.Forms.Button(); this.label2 = new System.Windows.Forms.Label(); - this.NudBackupEveryMinutes = new ARKBreedingStats.uiControls.Nud(); this.groupBox7 = new System.Windows.Forms.GroupBox(); this.CbSetMutationLevelsExtractor = new System.Windows.Forms.CheckBox(); this.checkBoxDisplayHiddenStats = new System.Windows.Forms.CheckBox(); @@ -155,7 +117,6 @@ private void InitializeComponent() this.cbSingleplayerSettings = new System.Windows.Forms.CheckBox(); this.groupBox11 = new System.Windows.Forms.GroupBox(); this.cbAllowMoreThanHundredImprinting = new System.Windows.Forms.CheckBox(); - this.nudWildLevelStep = new ARKBreedingStats.uiControls.Nud(); this.cbConsiderWildLevelSteps = new System.Windows.Forms.CheckBox(); this.buttonEventToDefault = new System.Windows.Forms.Button(); this.labelEvent = new System.Windows.Forms.Label(); @@ -174,7 +135,6 @@ private void InitializeComponent() this.CbImgCacheUseLocalAppData = new System.Windows.Forms.CheckBox(); this.GbSpecies = new System.Windows.Forms.GroupBox(); this.LbSpeciesSelectorCountLastUsed = new System.Windows.Forms.Label(); - this.NudSpeciesSelectorCountLastUsed = new ARKBreedingStats.uiControls.Nud(); this.groupBox16 = new System.Windows.Forms.GroupBox(); this.CbDisplayServerTokenPopup = new System.Windows.Forms.CheckBox(); this.CbStreamerMode = new System.Windows.Forms.CheckBox(); @@ -185,7 +145,6 @@ private void InitializeComponent() this.CbbAppDefaultFontName = new System.Windows.Forms.ComboBox(); this.label48 = new System.Windows.Forms.Label(); this.CbbColorMode = new System.Windows.Forms.ComboBox(); - this.nudDefaultFontSize = new ARKBreedingStats.uiControls.Nud(); this.label33 = new System.Windows.Forms.Label(); this.label32 = new System.Windows.Forms.Label(); this.groupBox20 = new System.Windows.Forms.GroupBox(); @@ -195,6 +154,7 @@ private void InitializeComponent() this.CbbLanguage2 = new System.Windows.Forms.ComboBox(); this.CbbLanguage = new System.Windows.Forms.ComboBox(); this.groupBox9 = new System.Windows.Forms.GroupBox(); + this.CbLibraryGenerateNameWarnTooLongName = new System.Windows.Forms.CheckBox(); this.CbLibraryDisplayZeroMutationLevels = new System.Windows.Forms.CheckBox(); this.CbDisplayLibraryCreatureIndex = new System.Windows.Forms.CheckBox(); this.CbNaturalSortIgnoreSpaces = new System.Windows.Forms.CheckBox(); @@ -212,7 +172,6 @@ private void InitializeComponent() this.groupBox32 = new System.Windows.Forms.GroupBox(); this.LbInfoGraphicSize = new System.Windows.Forms.Label(); this.CbbInfoGraphicFontName = new System.Windows.Forms.ComboBox(); - this.nudInfoGraphicHeight = new ARKBreedingStats.uiControls.Nud(); this.BtInfoGraphicForeColor = new System.Windows.Forms.Button(); this.BtInfoGraphicBackColor = new System.Windows.Forms.Button(); this.BtInfoGraphicBorderColor = new System.Windows.Forms.Button(); @@ -237,17 +196,12 @@ private void InitializeComponent() this.label24 = new System.Windows.Forms.Label(); this.cbIgnoreUnknownBPOnSaveImport = new System.Windows.Forms.CheckBox(); this.groupBox14 = new System.Windows.Forms.GroupBox(); - this.fileSelectorExtractedSaveFolder = new ARKBreedingStats.uiControls.FileSelector(); this.textBoxImportTribeNameFilter = new System.Windows.Forms.TextBox(); this.groupBox15 = new System.Windows.Forms.GroupBox(); this.dataGridView_FileLocations = new System.Windows.Forms.DataGridView(); - this.convenientNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.serverNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.fileLocationDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dgvFileLocation_Change = new System.Windows.Forms.DataGridViewButtonColumn(); this.ImportWithQuickImport = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.dgvFileLocation_Delete = new System.Windows.Forms.DataGridViewButtonColumn(); - this.aTImportFileLocationBindingSource = new System.Windows.Forms.BindingSource(this.components); this.btAddSavegameFileLocation = new System.Windows.Forms.Button(); this.labelSavegameFileLocationHint = new System.Windows.Forms.Label(); this.label_Filter = new System.Windows.Forms.Label(); @@ -261,7 +215,6 @@ private void InitializeComponent() this.groupBox23 = new System.Windows.Forms.GroupBox(); this.label31 = new System.Windows.Forms.Label(); this.label30 = new System.Windows.Forms.Label(); - this.nudImportLowerBoundTE = new ARKBreedingStats.uiControls.Nud(); this.groupBox22 = new System.Windows.Forms.GroupBox(); this.CbBringToFrontOnImportExportIssue = new System.Windows.Forms.CheckBox(); this.CbAutoExtractAddToLibrary = new System.Windows.Forms.CheckBox(); @@ -294,13 +247,9 @@ private void InitializeComponent() this.nudWarnImportMoreThan = new System.Windows.Forms.NumericUpDown(); this.groupBox13 = new System.Windows.Forms.GroupBox(); this.dataGridViewExportFolders = new System.Windows.Forms.DataGridView(); - this.convenientNameDataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ownerSuffixDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.folderPathDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dgvExportFolderChange = new System.Windows.Forms.DataGridViewButtonColumn(); this.dgvExportFolderDelete = new System.Windows.Forms.DataGridViewButtonColumn(); this.dgvExportMakeDefault = new System.Windows.Forms.DataGridViewButtonColumn(); - this.aTExportFolderLocationsBindingSource = new System.Windows.Forms.BindingSource(this.components); this.btAddExportFolder = new System.Windows.Forms.Button(); this.label25 = new System.Windows.Forms.Label(); this.tabPageTimers = new System.Windows.Forms.TabPage(); @@ -311,40 +260,26 @@ private void InitializeComponent() this.groupBox8 = new System.Windows.Forms.GroupBox(); this.label22 = new System.Windows.Forms.Label(); this.tbPlayAlarmsSeconds = new System.Windows.Forms.TextBox(); - this.customSCCustom = new ARKBreedingStats.settings.customSoundChooser(); - this.customSCWakeup = new ARKBreedingStats.settings.customSoundChooser(); - this.customSCBirth = new ARKBreedingStats.settings.customSoundChooser(); - this.customSCStarving = new ARKBreedingStats.settings.customSoundChooser(); this.label20 = new System.Windows.Forms.Label(); this.tabPageOverlay = new System.Windows.Forms.TabPage(); this.groupBox10 = new System.Windows.Forms.GroupBox(); this.label70 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); - this.nudOverlayInfoHeight = new ARKBreedingStats.uiControls.Nud(); - this.nudOverlayInfoWidth = new ARKBreedingStats.uiControls.Nud(); - this.NudOverlayRelativeFontSize = new ARKBreedingStats.uiControls.Nud(); this.label65 = new System.Windows.Forms.Label(); this.CbOverlayDisplayInheritance = new System.Windows.Forms.CheckBox(); this.label45 = new System.Windows.Forms.Label(); this.pCustomOverlayLocation = new System.Windows.Forms.Panel(); - this.nudCustomOverlayLocX = new ARKBreedingStats.uiControls.Nud(); this.label42 = new System.Windows.Forms.Label(); this.label43 = new System.Windows.Forms.Label(); - this.nudCustomOverlayLocY = new ARKBreedingStats.uiControls.Nud(); this.cbCustomOverlayLocation = new System.Windows.Forms.CheckBox(); this.label38 = new System.Windows.Forms.Label(); - this.nudOverlayInfoPosY = new ARKBreedingStats.uiControls.Nud(); this.label39 = new System.Windows.Forms.Label(); - this.nudOverlayInfoPosDFR = new ARKBreedingStats.uiControls.Nud(); this.label40 = new System.Windows.Forms.Label(); this.label37 = new System.Windows.Forms.Label(); - this.nudOverlayTimerPosY = new ARKBreedingStats.uiControls.Nud(); this.label36 = new System.Windows.Forms.Label(); - this.nudOverlayTimerPosX = new ARKBreedingStats.uiControls.Nud(); this.label35 = new System.Windows.Forms.Label(); this.cbInventoryCheck = new System.Windows.Forms.CheckBox(); this.label21 = new System.Windows.Forms.Label(); - this.nudOverlayInfoDuration = new ARKBreedingStats.uiControls.Nud(); this.chkbSpeechRecognition = new System.Windows.Forms.CheckBox(); this.label66 = new System.Windows.Forms.Label(); this.tabPageOCR = new System.Windows.Forms.TabPage(); @@ -355,18 +290,12 @@ private void InitializeComponent() this.label60 = new System.Windows.Forms.Label(); this.label59 = new System.Windows.Forms.Label(); this.label58 = new System.Windows.Forms.Label(); - this.NudOCRClipboardCropHeight = new ARKBreedingStats.uiControls.Nud(); - this.NudOCRClipboardCropWidth = new ARKBreedingStats.uiControls.Nud(); - this.NudOCRClipboardCropTop = new ARKBreedingStats.uiControls.Nud(); - this.NudOCRClipboardCropLeft = new ARKBreedingStats.uiControls.Nud(); this.CbOCRFromClipboard = new System.Windows.Forms.CheckBox(); this.BtGameNameAse = new System.Windows.Forms.Button(); this.cbOCRIgnoreImprintValue = new System.Windows.Forms.CheckBox(); this.cbShowOCRButton = new System.Windows.Forms.CheckBox(); this.label23 = new System.Windows.Forms.Label(); - this.nudWaitBeforeScreenCapture = new ARKBreedingStats.uiControls.Nud(); this.label19 = new System.Windows.Forms.Label(); - this.nudWhiteThreshold = new ARKBreedingStats.uiControls.Nud(); this.tbOCRCaptureApp = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.cbbOCRApp = new System.Windows.Forms.ComboBox(); @@ -374,49 +303,77 @@ private void InitializeComponent() this.panel1 = new System.Windows.Forms.Panel(); this.colorDialog1 = new System.Windows.Forms.ColorDialog(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.CbLibraryGenerateNameWarnTooLongName = new System.Windows.Forms.CheckBox(); + this.nudWildLevelStep = new ARKBreedingStats.uiControls.Nud(); + this.nudTamedDinoCharacterFoodDrain = new ARKBreedingStats.uiControls.Nud(); + this.nudTamedDinoCharacterFoodDrainEvent = new ARKBreedingStats.uiControls.Nud(); + this.nudBabyImprintAmountEvent = new ARKBreedingStats.uiControls.Nud(); + this.nudBabyImprintAmount = new ARKBreedingStats.uiControls.Nud(); + this.nudMatingSpeed = new ARKBreedingStats.uiControls.Nud(); + this.nudBabyFoodConsumptionSpeedEvent = new ARKBreedingStats.uiControls.Nud(); + this.nudMatingIntervalEvent = new ARKBreedingStats.uiControls.Nud(); + this.nudBabyCuddleIntervalEvent = new ARKBreedingStats.uiControls.Nud(); + this.nudBabyMatureSpeedEvent = new ARKBreedingStats.uiControls.Nud(); + this.nudEggHatchSpeedEvent = new ARKBreedingStats.uiControls.Nud(); + this.nudBabyFoodConsumptionSpeed = new ARKBreedingStats.uiControls.Nud(); + this.nudMatingInterval = new ARKBreedingStats.uiControls.Nud(); + this.nudBabyCuddleInterval = new ARKBreedingStats.uiControls.Nud(); + this.nudBabyMatureSpeed = new ARKBreedingStats.uiControls.Nud(); + this.nudBabyImprintingStatScale = new ARKBreedingStats.uiControls.Nud(); + this.nudEggHatchSpeed = new ARKBreedingStats.uiControls.Nud(); + this.nudMaxServerLevel = new ARKBreedingStats.uiControls.Nud(); + this.nudMaxGraphLevel = new ARKBreedingStats.uiControls.Nud(); + this.nudMaxWildLevels = new ARKBreedingStats.uiControls.Nud(); + this.nudMaxDomLevels = new ARKBreedingStats.uiControls.Nud(); + this.NudWildDinoCharacterFoodDrainMultiplier = new ARKBreedingStats.uiControls.Nud(); + this.NudWildDinoTorporDrainMultiplier = new ARKBreedingStats.uiControls.Nud(); + this.nudDinoCharacterFoodDrainEvent = new ARKBreedingStats.uiControls.Nud(); + this.nudTamingSpeedEvent = new ARKBreedingStats.uiControls.Nud(); + this.nudDinoCharacterFoodDrain = new ARKBreedingStats.uiControls.Nud(); + this.nudTamingSpeed = new ARKBreedingStats.uiControls.Nud(); + this.NudSpeciesSelectorCountLastUsed = new ARKBreedingStats.uiControls.Nud(); + this.nudDefaultFontSize = new ARKBreedingStats.uiControls.Nud(); + this.numericUpDownMaxBreedingSug = new ARKBreedingStats.uiControls.Nud(); + this.NudWaitBeforeAutoLoad = new ARKBreedingStats.uiControls.Nud(); + this.NudKeepBackupFilesCount = new ARKBreedingStats.uiControls.Nud(); + this.NudBackupEveryMinutes = new ARKBreedingStats.uiControls.Nud(); + this.nudInfoGraphicHeight = new ARKBreedingStats.uiControls.Nud(); + this.fileSelectorExtractedSaveFolder = new ARKBreedingStats.uiControls.FileSelector(); + this.convenientNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.serverNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.fileLocationDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.aTImportFileLocationBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.nudImportLowerBoundTE = new ARKBreedingStats.uiControls.Nud(); + this.convenientNameDataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ownerSuffixDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.folderPathDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.aTExportFolderLocationsBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.customSCCustom = new ARKBreedingStats.settings.customSoundChooser(); + this.customSCWakeup = new ARKBreedingStats.settings.customSoundChooser(); + this.customSCBirth = new ARKBreedingStats.settings.customSoundChooser(); + this.customSCStarving = new ARKBreedingStats.settings.customSoundChooser(); + this.nudOverlayInfoHeight = new ARKBreedingStats.uiControls.Nud(); + this.nudOverlayInfoWidth = new ARKBreedingStats.uiControls.Nud(); + this.NudOverlayRelativeFontSize = new ARKBreedingStats.uiControls.Nud(); + this.nudCustomOverlayLocX = new ARKBreedingStats.uiControls.Nud(); + this.nudCustomOverlayLocY = new ARKBreedingStats.uiControls.Nud(); + this.nudOverlayInfoPosY = new ARKBreedingStats.uiControls.Nud(); + this.nudOverlayInfoPosDFR = new ARKBreedingStats.uiControls.Nud(); + this.nudOverlayTimerPosY = new ARKBreedingStats.uiControls.Nud(); + this.nudOverlayTimerPosX = new ARKBreedingStats.uiControls.Nud(); + this.nudOverlayInfoDuration = new ARKBreedingStats.uiControls.Nud(); + this.NudOCRClipboardCropHeight = new ARKBreedingStats.uiControls.Nud(); + this.NudOCRClipboardCropWidth = new ARKBreedingStats.uiControls.Nud(); + this.NudOCRClipboardCropTop = new ARKBreedingStats.uiControls.Nud(); + this.NudOCRClipboardCropLeft = new ARKBreedingStats.uiControls.Nud(); + this.nudWaitBeforeScreenCapture = new ARKBreedingStats.uiControls.Nud(); + this.nudWhiteThreshold = new ARKBreedingStats.uiControls.Nud(); + BtOpenLevelColorOptions = new System.Windows.Forms.Button(); this.groupBoxMultiplier.SuspendLayout(); this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudTamedDinoCharacterFoodDrain)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudTamedDinoCharacterFoodDrainEvent)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyImprintAmountEvent)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyImprintAmount)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudMatingSpeed)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyFoodConsumptionSpeedEvent)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudMatingIntervalEvent)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyCuddleIntervalEvent)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyMatureSpeedEvent)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudEggHatchSpeedEvent)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyFoodConsumptionSpeed)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudMatingInterval)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyCuddleInterval)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyMatureSpeed)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyImprintingStatScale)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudEggHatchSpeed)).BeginInit(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudMaxServerLevel)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudMaxGraphLevel)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudMaxWildLevels)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudMaxDomLevels)).BeginInit(); this.groupBox4.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbChartOddRange)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pbChartEvenRange)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudChartLevelOddMax)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudChartLevelOddMin)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudChartLevelEvenMax)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudChartLevelEvenMin)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxBreedingSug)).BeginInit(); this.groupBox5.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.NudWildDinoCharacterFoodDrainMultiplier)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NudWildDinoTorporDrainMultiplier)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudDinoCharacterFoodDrainEvent)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudTamingSpeedEvent)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudDinoCharacterFoodDrain)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudTamingSpeed)).BeginInit(); this.groupBox6.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.NudWaitBeforeAutoLoad)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NudKeepBackupFilesCount)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.NudBackupEveryMinutes)).BeginInit(); this.groupBox7.SuspendLayout(); this.tabControlSettings.SuspendLayout(); this.tabPageMultipliers.SuspendLayout(); @@ -426,35 +383,29 @@ private void InitializeComponent() this.groupBox29.SuspendLayout(); this.groupBox18.SuspendLayout(); this.groupBox11.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudWildLevelStep)).BeginInit(); this.tabPageGeneral.SuspendLayout(); this.groupBox31.SuspendLayout(); this.groupBox30.SuspendLayout(); this.GbImgCacheLocalAppData.SuspendLayout(); this.GbSpecies.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.NudSpeciesSelectorCountLastUsed)).BeginInit(); this.groupBox16.SuspendLayout(); this.groupBox26.SuspendLayout(); this.groupBox25.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudDefaultFontSize)).BeginInit(); this.groupBox20.SuspendLayout(); this.groupBox17.SuspendLayout(); this.groupBox9.SuspendLayout(); this.tabPageInfoGraphic.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.PbInfoGraphicPreview)).BeginInit(); this.groupBox32.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudInfoGraphicHeight)).BeginInit(); this.groupBox28.SuspendLayout(); this.PanelDomLevels.SuspendLayout(); this.tabPageImportSavegame.SuspendLayout(); this.groupBox14.SuspendLayout(); this.groupBox15.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_FileLocations)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.aTImportFileLocationBindingSource)).BeginInit(); this.tabPageImportExported.SuspendLayout(); this.groupBox27.SuspendLayout(); this.groupBox23.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudImportLowerBoundTE)).BeginInit(); this.groupBox22.SuspendLayout(); this.panel2.SuspendLayout(); this.groupBox21.SuspendLayout(); @@ -462,16 +413,55 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.nudWarnImportMoreThan)).BeginInit(); this.groupBox13.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewExportFolders)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.aTExportFolderLocationsBindingSource)).BeginInit(); this.tabPageTimers.SuspendLayout(); this.groupBox24.SuspendLayout(); this.groupBox8.SuspendLayout(); this.tabPageOverlay.SuspendLayout(); this.groupBox10.SuspendLayout(); + this.pCustomOverlayLocation.SuspendLayout(); + this.tabPageOCR.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudWildLevelStep)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudTamedDinoCharacterFoodDrain)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudTamedDinoCharacterFoodDrainEvent)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyImprintAmountEvent)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyImprintAmount)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMatingSpeed)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyFoodConsumptionSpeedEvent)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMatingIntervalEvent)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyCuddleIntervalEvent)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyMatureSpeedEvent)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudEggHatchSpeedEvent)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyFoodConsumptionSpeed)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMatingInterval)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyCuddleInterval)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyMatureSpeed)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyImprintingStatScale)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudEggHatchSpeed)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMaxServerLevel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMaxGraphLevel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMaxWildLevels)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMaxDomLevels)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudWildDinoCharacterFoodDrainMultiplier)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudWildDinoTorporDrainMultiplier)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudDinoCharacterFoodDrainEvent)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudTamingSpeedEvent)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudDinoCharacterFoodDrain)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudTamingSpeed)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudSpeciesSelectorCountLastUsed)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudDefaultFontSize)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxBreedingSug)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudWaitBeforeAutoLoad)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudKeepBackupFilesCount)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudBackupEveryMinutes)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudInfoGraphicHeight)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aTImportFileLocationBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudImportLowerBoundTE)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aTExportFolderLocationsBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudOverlayInfoHeight)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudOverlayInfoWidth)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NudOverlayRelativeFontSize)).BeginInit(); - this.pCustomOverlayLocation.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudCustomOverlayLocX)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudCustomOverlayLocY)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudOverlayInfoPosY)).BeginInit(); @@ -479,15 +469,12 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.nudOverlayTimerPosY)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudOverlayTimerPosX)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudOverlayInfoDuration)).BeginInit(); - this.tabPageOCR.SuspendLayout(); - this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.NudOCRClipboardCropHeight)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NudOCRClipboardCropWidth)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NudOCRClipboardCropTop)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NudOCRClipboardCropLeft)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudWaitBeforeScreenCapture)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudWhiteThreshold)).BeginInit(); - this.panel1.SuspendLayout(); this.SuspendLayout(); // // groupBoxMultiplier @@ -665,88 +652,16 @@ private void InitializeComponent() this.groupBox2.TabStop = false; this.groupBox2.Text = "Breeding-Multiplier"; // - // nudTamedDinoCharacterFoodDrain + // label64 // - this.nudTamedDinoCharacterFoodDrain.DecimalPlaces = 6; - this.nudTamedDinoCharacterFoodDrain.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudTamedDinoCharacterFoodDrain.Location = new System.Drawing.Point(183, 227); - this.nudTamedDinoCharacterFoodDrain.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudTamedDinoCharacterFoodDrain.Name = "nudTamedDinoCharacterFoodDrain"; - this.nudTamedDinoCharacterFoodDrain.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudTamedDinoCharacterFoodDrain.Size = new System.Drawing.Size(72, 20); - this.nudTamedDinoCharacterFoodDrain.TabIndex = 21; - this.nudTamedDinoCharacterFoodDrain.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); + this.label64.AutoSize = true; + this.label64.Location = new System.Drawing.Point(10, 229); + this.label64.Name = "label64"; + this.label64.Size = new System.Drawing.Size(177, 13); + this.label64.TabIndex = 22; + this.label64.Text = "TamedDinoCharacterFoodDrainMult"; // - // nudTamedDinoCharacterFoodDrainEvent - // - this.nudTamedDinoCharacterFoodDrainEvent.DecimalPlaces = 6; - this.nudTamedDinoCharacterFoodDrainEvent.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudTamedDinoCharacterFoodDrainEvent.Location = new System.Drawing.Point(263, 227); - this.nudTamedDinoCharacterFoodDrainEvent.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudTamedDinoCharacterFoodDrainEvent.Name = "nudTamedDinoCharacterFoodDrainEvent"; - this.nudTamedDinoCharacterFoodDrainEvent.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudTamedDinoCharacterFoodDrainEvent.Size = new System.Drawing.Size(72, 20); - this.nudTamedDinoCharacterFoodDrainEvent.TabIndex = 23; - this.nudTamedDinoCharacterFoodDrainEvent.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // label64 - // - this.label64.AutoSize = true; - this.label64.Location = new System.Drawing.Point(10, 229); - this.label64.Name = "label64"; - this.label64.Size = new System.Drawing.Size(177, 13); - this.label64.TabIndex = 22; - this.label64.Text = "TamedDinoCharacterFoodDrainMult"; - // - // nudBabyImprintAmountEvent - // - this.nudBabyImprintAmountEvent.DecimalPlaces = 6; - this.nudBabyImprintAmountEvent.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudBabyImprintAmountEvent.Location = new System.Drawing.Point(263, 149); - this.nudBabyImprintAmountEvent.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudBabyImprintAmountEvent.Name = "nudBabyImprintAmountEvent"; - this.nudBabyImprintAmountEvent.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudBabyImprintAmountEvent.Size = new System.Drawing.Size(72, 20); - this.nudBabyImprintAmountEvent.TabIndex = 12; - this.nudBabyImprintAmountEvent.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // label49 + // label49 // this.label49.AutoSize = true; this.label49.Location = new System.Drawing.Point(10, 151); @@ -755,30 +670,6 @@ private void InitializeComponent() this.label49.TabIndex = 20; this.label49.Text = "BabyImprintAmountMultiplier"; // - // nudBabyImprintAmount - // - this.nudBabyImprintAmount.DecimalPlaces = 6; - this.nudBabyImprintAmount.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudBabyImprintAmount.Location = new System.Drawing.Point(183, 149); - this.nudBabyImprintAmount.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudBabyImprintAmount.Name = "nudBabyImprintAmount"; - this.nudBabyImprintAmount.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudBabyImprintAmount.Size = new System.Drawing.Size(72, 20); - this.nudBabyImprintAmount.TabIndex = 5; - this.nudBabyImprintAmount.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // // label44 // this.label44.AutoSize = true; @@ -788,150 +679,6 @@ private void InitializeComponent() this.label44.TabIndex = 18; this.label44.Text = "MatingSpeedMultiplier"; // - // nudMatingSpeed - // - this.nudMatingSpeed.DecimalPlaces = 6; - this.nudMatingSpeed.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudMatingSpeed.Location = new System.Drawing.Point(183, 19); - this.nudMatingSpeed.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudMatingSpeed.Name = "nudMatingSpeed"; - this.nudMatingSpeed.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudMatingSpeed.Size = new System.Drawing.Size(72, 20); - this.nudMatingSpeed.TabIndex = 0; - this.nudMatingSpeed.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // nudBabyFoodConsumptionSpeedEvent - // - this.nudBabyFoodConsumptionSpeedEvent.DecimalPlaces = 6; - this.nudBabyFoodConsumptionSpeedEvent.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudBabyFoodConsumptionSpeedEvent.Location = new System.Drawing.Point(263, 201); - this.nudBabyFoodConsumptionSpeedEvent.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudBabyFoodConsumptionSpeedEvent.Name = "nudBabyFoodConsumptionSpeedEvent"; - this.nudBabyFoodConsumptionSpeedEvent.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudBabyFoodConsumptionSpeedEvent.Size = new System.Drawing.Size(72, 20); - this.nudBabyFoodConsumptionSpeedEvent.TabIndex = 13; - this.nudBabyFoodConsumptionSpeedEvent.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // nudMatingIntervalEvent - // - this.nudMatingIntervalEvent.DecimalPlaces = 6; - this.nudMatingIntervalEvent.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudMatingIntervalEvent.Location = new System.Drawing.Point(263, 45); - this.nudMatingIntervalEvent.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudMatingIntervalEvent.Name = "nudMatingIntervalEvent"; - this.nudMatingIntervalEvent.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudMatingIntervalEvent.Size = new System.Drawing.Size(72, 20); - this.nudMatingIntervalEvent.TabIndex = 8; - this.nudMatingIntervalEvent.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // nudBabyCuddleIntervalEvent - // - this.nudBabyCuddleIntervalEvent.DecimalPlaces = 6; - this.nudBabyCuddleIntervalEvent.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudBabyCuddleIntervalEvent.Location = new System.Drawing.Point(263, 123); - this.nudBabyCuddleIntervalEvent.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudBabyCuddleIntervalEvent.Name = "nudBabyCuddleIntervalEvent"; - this.nudBabyCuddleIntervalEvent.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudBabyCuddleIntervalEvent.Size = new System.Drawing.Size(72, 20); - this.nudBabyCuddleIntervalEvent.TabIndex = 11; - this.nudBabyCuddleIntervalEvent.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // nudBabyMatureSpeedEvent - // - this.nudBabyMatureSpeedEvent.DecimalPlaces = 6; - this.nudBabyMatureSpeedEvent.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudBabyMatureSpeedEvent.Location = new System.Drawing.Point(263, 97); - this.nudBabyMatureSpeedEvent.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudBabyMatureSpeedEvent.Name = "nudBabyMatureSpeedEvent"; - this.nudBabyMatureSpeedEvent.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudBabyMatureSpeedEvent.Size = new System.Drawing.Size(72, 20); - this.nudBabyMatureSpeedEvent.TabIndex = 10; - this.nudBabyMatureSpeedEvent.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // nudEggHatchSpeedEvent - // - this.nudEggHatchSpeedEvent.DecimalPlaces = 6; - this.nudEggHatchSpeedEvent.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudEggHatchSpeedEvent.Location = new System.Drawing.Point(263, 71); - this.nudEggHatchSpeedEvent.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudEggHatchSpeedEvent.Name = "nudEggHatchSpeedEvent"; - this.nudEggHatchSpeedEvent.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudEggHatchSpeedEvent.Size = new System.Drawing.Size(72, 20); - this.nudEggHatchSpeedEvent.TabIndex = 9; - this.nudEggHatchSpeedEvent.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // // labelBabyFoodConsumptionSpeed // this.labelBabyFoodConsumptionSpeed.AutoSize = true; @@ -941,30 +688,6 @@ private void InitializeComponent() this.labelBabyFoodConsumptionSpeed.TabIndex = 10; this.labelBabyFoodConsumptionSpeed.Text = "BabyFoodConsumptionSpeedMult"; // - // nudBabyFoodConsumptionSpeed - // - this.nudBabyFoodConsumptionSpeed.DecimalPlaces = 6; - this.nudBabyFoodConsumptionSpeed.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudBabyFoodConsumptionSpeed.Location = new System.Drawing.Point(183, 201); - this.nudBabyFoodConsumptionSpeed.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudBabyFoodConsumptionSpeed.Name = "nudBabyFoodConsumptionSpeed"; - this.nudBabyFoodConsumptionSpeed.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudBabyFoodConsumptionSpeed.Size = new System.Drawing.Size(72, 20); - this.nudBabyFoodConsumptionSpeed.TabIndex = 7; - this.nudBabyFoodConsumptionSpeed.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // // label3 // this.label3.AutoSize = true; @@ -974,31 +697,7 @@ private void InitializeComponent() this.label3.TabIndex = 8; this.label3.Text = "MatingIntervalMultiplier"; // - // nudMatingInterval - // - this.nudMatingInterval.DecimalPlaces = 6; - this.nudMatingInterval.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudMatingInterval.Location = new System.Drawing.Point(183, 45); - this.nudMatingInterval.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudMatingInterval.Name = "nudMatingInterval"; - this.nudMatingInterval.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudMatingInterval.Size = new System.Drawing.Size(72, 20); - this.nudMatingInterval.TabIndex = 1; - this.nudMatingInterval.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // label17 + // label17 // this.label17.AutoSize = true; this.label17.Location = new System.Drawing.Point(10, 125); @@ -1007,30 +706,6 @@ private void InitializeComponent() this.label17.TabIndex = 6; this.label17.Text = "BabyCuddleIntervalMultiplier"; // - // nudBabyCuddleInterval - // - this.nudBabyCuddleInterval.DecimalPlaces = 6; - this.nudBabyCuddleInterval.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudBabyCuddleInterval.Location = new System.Drawing.Point(183, 123); - this.nudBabyCuddleInterval.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudBabyCuddleInterval.Name = "nudBabyCuddleInterval"; - this.nudBabyCuddleInterval.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudBabyCuddleInterval.Size = new System.Drawing.Size(72, 20); - this.nudBabyCuddleInterval.TabIndex = 4; - this.nudBabyCuddleInterval.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // // label13 // this.label13.AutoSize = true; @@ -1049,54 +724,6 @@ private void InitializeComponent() this.label9.TabIndex = 2; this.label9.Text = "BabyMatureSpeedMultiplier"; // - // nudBabyMatureSpeed - // - this.nudBabyMatureSpeed.DecimalPlaces = 6; - this.nudBabyMatureSpeed.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudBabyMatureSpeed.Location = new System.Drawing.Point(183, 97); - this.nudBabyMatureSpeed.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudBabyMatureSpeed.Name = "nudBabyMatureSpeed"; - this.nudBabyMatureSpeed.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudBabyMatureSpeed.Size = new System.Drawing.Size(72, 20); - this.nudBabyMatureSpeed.TabIndex = 3; - this.nudBabyMatureSpeed.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // nudBabyImprintingStatScale - // - this.nudBabyImprintingStatScale.DecimalPlaces = 6; - this.nudBabyImprintingStatScale.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudBabyImprintingStatScale.Location = new System.Drawing.Point(183, 175); - this.nudBabyImprintingStatScale.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudBabyImprintingStatScale.Name = "nudBabyImprintingStatScale"; - this.nudBabyImprintingStatScale.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudBabyImprintingStatScale.Size = new System.Drawing.Size(72, 20); - this.nudBabyImprintingStatScale.TabIndex = 6; - this.nudBabyImprintingStatScale.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // // label8 // this.label8.AutoSize = true; @@ -1106,30 +733,6 @@ private void InitializeComponent() this.label8.TabIndex = 0; this.label8.Text = "EggHatchSpeedMultiplier"; // - // nudEggHatchSpeed - // - this.nudEggHatchSpeed.DecimalPlaces = 6; - this.nudEggHatchSpeed.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudEggHatchSpeed.Location = new System.Drawing.Point(183, 71); - this.nudEggHatchSpeed.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudEggHatchSpeed.Name = "nudEggHatchSpeed"; - this.nudEggHatchSpeed.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudEggHatchSpeed.Size = new System.Drawing.Size(72, 20); - this.nudEggHatchSpeed.TabIndex = 2; - this.nudEggHatchSpeed.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // // groupBox3 // this.groupBox3.Controls.Add(this.LbDefaultLevelups); @@ -1156,24 +759,6 @@ private void InitializeComponent() this.LbDefaultLevelups.Size = new System.Drawing.Size(0, 13); this.LbDefaultLevelups.TabIndex = 13; // - // nudMaxServerLevel - // - this.nudMaxServerLevel.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudMaxServerLevel.Location = new System.Drawing.Point(183, 97); - this.nudMaxServerLevel.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.nudMaxServerLevel.Name = "nudMaxServerLevel"; - this.nudMaxServerLevel.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudMaxServerLevel.Size = new System.Drawing.Size(57, 20); - this.nudMaxServerLevel.TabIndex = 3; - // // lbMaxTotalLevel // this.lbMaxTotalLevel.AutoSize = true; @@ -1183,24 +768,6 @@ private void InitializeComponent() this.lbMaxTotalLevel.TabIndex = 12; this.lbMaxTotalLevel.Text = "Max Total Level (0: disabled)"; // - // nudMaxGraphLevel - // - this.nudMaxGraphLevel.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudMaxGraphLevel.Location = new System.Drawing.Point(183, 71); - this.nudMaxGraphLevel.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.nudMaxGraphLevel.Name = "nudMaxGraphLevel"; - this.nudMaxGraphLevel.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudMaxGraphLevel.Size = new System.Drawing.Size(57, 20); - this.nudMaxGraphLevel.TabIndex = 2; - // // label18 // this.label18.AutoSize = true; @@ -1219,24 +786,6 @@ private void InitializeComponent() this.label11.TabIndex = 0; this.label11.Text = "Max Wild Level"; // - // nudMaxWildLevels - // - this.nudMaxWildLevels.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudMaxWildLevels.Location = new System.Drawing.Point(183, 19); - this.nudMaxWildLevels.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.nudMaxWildLevels.Name = "nudMaxWildLevels"; - this.nudMaxWildLevels.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudMaxWildLevels.Size = new System.Drawing.Size(57, 20); - this.nudMaxWildLevels.TabIndex = 0; - // // label10 // this.label10.AutoSize = true; @@ -1246,24 +795,6 @@ private void InitializeComponent() this.label10.TabIndex = 2; this.label10.Text = "Max Tamed Levelups"; // - // nudMaxDomLevels - // - this.nudMaxDomLevels.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudMaxDomLevels.Location = new System.Drawing.Point(183, 45); - this.nudMaxDomLevels.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.nudMaxDomLevels.Name = "nudMaxDomLevels"; - this.nudMaxDomLevels.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudMaxDomLevels.Size = new System.Drawing.Size(57, 20); - this.nudMaxDomLevels.TabIndex = 1; - // // label27 // this.label27.AutoSize = true; @@ -1278,15 +809,7 @@ private void InitializeComponent() // // groupBox4 // - this.groupBox4.Controls.Add(this.label57); - this.groupBox4.Controls.Add(this.label56); - this.groupBox4.Controls.Add(this.pbChartOddRange); - this.groupBox4.Controls.Add(this.pbChartEvenRange); - this.groupBox4.Controls.Add(this.nudChartLevelOddMax); - this.groupBox4.Controls.Add(this.nudChartLevelOddMin); - this.groupBox4.Controls.Add(this.nudChartLevelEvenMax); - this.groupBox4.Controls.Add(this.nudChartLevelEvenMin); - this.groupBox4.Controls.Add(this.CbHighlightLevelEvenOdd); + this.groupBox4.Controls.Add(BtOpenLevelColorOptions); this.groupBox4.Controls.Add(this.CbHighlightLevel255); this.groupBox4.Controls.Add(this.cbIgnoreSexInBreedingPlan); this.groupBox4.Controls.Add(this.label16); @@ -1296,156 +819,11 @@ private void InitializeComponent() this.groupBox4.Controls.Add(this.numericUpDownMaxBreedingSug); this.groupBox4.Location = new System.Drawing.Point(6, 233); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(317, 172); + this.groupBox4.Size = new System.Drawing.Size(317, 144); this.groupBox4.TabIndex = 1; this.groupBox4.TabStop = false; this.groupBox4.Text = "Breeding Planner"; // - // label57 - // - this.label57.AutoSize = true; - this.label57.Location = new System.Drawing.Point(6, 139); - this.label57.Name = "label57"; - this.label57.Size = new System.Drawing.Size(31, 26); - this.label57.TabIndex = 15; - this.label57.Text = "hue\r\neven"; - // - // label56 - // - this.label56.AutoSize = true; - this.label56.Location = new System.Drawing.Point(178, 139); - this.label56.Name = "label56"; - this.label56.Size = new System.Drawing.Size(25, 26); - this.label56.TabIndex = 14; - this.label56.Text = "hue\r\nodd"; - // - // pbChartOddRange - // - this.pbChartOddRange.Location = new System.Drawing.Point(209, 158); - this.pbChartOddRange.Name = "pbChartOddRange"; - this.pbChartOddRange.Size = new System.Drawing.Size(100, 10); - this.pbChartOddRange.TabIndex = 13; - this.pbChartOddRange.TabStop = false; - // - // pbChartEvenRange - // - this.pbChartEvenRange.Location = new System.Drawing.Point(43, 158); - this.pbChartEvenRange.Name = "pbChartEvenRange"; - this.pbChartEvenRange.Size = new System.Drawing.Size(100, 10); - this.pbChartEvenRange.TabIndex = 12; - this.pbChartEvenRange.TabStop = false; - // - // nudChartLevelOddMax - // - this.nudChartLevelOddMax.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudChartLevelOddMax.Location = new System.Drawing.Point(268, 137); - this.nudChartLevelOddMax.Maximum = new decimal(new int[] { - 360, - 0, - 0, - 0}); - this.nudChartLevelOddMax.Minimum = new decimal(new int[] { - 360, - 0, - 0, - -2147483648}); - this.nudChartLevelOddMax.Name = "nudChartLevelOddMax"; - this.nudChartLevelOddMax.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudChartLevelOddMax.Size = new System.Drawing.Size(41, 20); - this.nudChartLevelOddMax.TabIndex = 11; - this.nudChartLevelOddMax.Value = new decimal(new int[] { - 360, - 0, - 0, - 0}); - this.nudChartLevelOddMax.ValueChanged += new System.EventHandler(this.nudChartLevelOddMax_ValueChanged); - // - // nudChartLevelOddMin - // - this.nudChartLevelOddMin.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudChartLevelOddMin.Location = new System.Drawing.Point(209, 137); - this.nudChartLevelOddMin.Maximum = new decimal(new int[] { - 360, - 0, - 0, - 0}); - this.nudChartLevelOddMin.Minimum = new decimal(new int[] { - 360, - 0, - 0, - -2147483648}); - this.nudChartLevelOddMin.Name = "nudChartLevelOddMin"; - this.nudChartLevelOddMin.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudChartLevelOddMin.Size = new System.Drawing.Size(41, 20); - this.nudChartLevelOddMin.TabIndex = 10; - this.nudChartLevelOddMin.ValueChanged += new System.EventHandler(this.nudChartLevelOddMin_ValueChanged); - // - // nudChartLevelEvenMax - // - this.nudChartLevelEvenMax.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudChartLevelEvenMax.Location = new System.Drawing.Point(102, 137); - this.nudChartLevelEvenMax.Maximum = new decimal(new int[] { - 360, - 0, - 0, - 0}); - this.nudChartLevelEvenMax.Minimum = new decimal(new int[] { - 360, - 0, - 0, - -2147483648}); - this.nudChartLevelEvenMax.Name = "nudChartLevelEvenMax"; - this.nudChartLevelEvenMax.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudChartLevelEvenMax.Size = new System.Drawing.Size(41, 20); - this.nudChartLevelEvenMax.TabIndex = 9; - this.nudChartLevelEvenMax.ValueChanged += new System.EventHandler(this.nudChartLevelEvenMax_ValueChanged); - // - // nudChartLevelEvenMin - // - this.nudChartLevelEvenMin.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudChartLevelEvenMin.Location = new System.Drawing.Point(43, 137); - this.nudChartLevelEvenMin.Maximum = new decimal(new int[] { - 360, - 0, - 0, - 0}); - this.nudChartLevelEvenMin.Minimum = new decimal(new int[] { - 360, - 0, - 0, - -2147483648}); - this.nudChartLevelEvenMin.Name = "nudChartLevelEvenMin"; - this.nudChartLevelEvenMin.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudChartLevelEvenMin.Size = new System.Drawing.Size(41, 20); - this.nudChartLevelEvenMin.TabIndex = 8; - this.nudChartLevelEvenMin.ValueChanged += new System.EventHandler(this.nudChartLevelEvenMin_ValueChanged); - // - // CbHighlightLevelEvenOdd - // - this.CbHighlightLevelEvenOdd.AutoSize = true; - this.CbHighlightLevelEvenOdd.Location = new System.Drawing.Point(6, 114); - this.CbHighlightLevelEvenOdd.Name = "CbHighlightLevelEvenOdd"; - this.CbHighlightLevelEvenOdd.Size = new System.Drawing.Size(156, 17); - this.CbHighlightLevelEvenOdd.TabIndex = 7; - this.CbHighlightLevelEvenOdd.Text = "Highlight even / odd levels"; - this.CbHighlightLevelEvenOdd.UseVisualStyleBackColor = true; - // // CbHighlightLevel255 // this.CbHighlightLevel255.AutoSize = true; @@ -1506,24 +884,6 @@ private void InitializeComponent() this.label12.TabIndex = 0; this.label12.Text = "Max Breeding Pair Suggestions"; // - // numericUpDownMaxBreedingSug - // - this.numericUpDownMaxBreedingSug.ForeColor = System.Drawing.SystemColors.GrayText; - this.numericUpDownMaxBreedingSug.Location = new System.Drawing.Point(252, 19); - this.numericUpDownMaxBreedingSug.Maximum = new decimal(new int[] { - 200, - 0, - 0, - 0}); - this.numericUpDownMaxBreedingSug.Name = "numericUpDownMaxBreedingSug"; - this.numericUpDownMaxBreedingSug.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.numericUpDownMaxBreedingSug.Size = new System.Drawing.Size(57, 20); - this.numericUpDownMaxBreedingSug.TabIndex = 1; - // // groupBox5 // this.groupBox5.Controls.Add(this.NudWildDinoCharacterFoodDrainMultiplier); @@ -1543,31 +903,7 @@ private void InitializeComponent() this.groupBox5.TabStop = false; this.groupBox5.Text = "Taming-Multiplier"; // - // NudWildDinoCharacterFoodDrainMultiplier - // - this.NudWildDinoCharacterFoodDrainMultiplier.DecimalPlaces = 6; - this.NudWildDinoCharacterFoodDrainMultiplier.ForeColor = System.Drawing.SystemColors.WindowText; - this.NudWildDinoCharacterFoodDrainMultiplier.Location = new System.Drawing.Point(183, 71); - this.NudWildDinoCharacterFoodDrainMultiplier.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.NudWildDinoCharacterFoodDrainMultiplier.Name = "NudWildDinoCharacterFoodDrainMultiplier"; - this.NudWildDinoCharacterFoodDrainMultiplier.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.NudWildDinoCharacterFoodDrainMultiplier.Size = new System.Drawing.Size(72, 20); - this.NudWildDinoCharacterFoodDrainMultiplier.TabIndex = 4; - this.NudWildDinoCharacterFoodDrainMultiplier.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // label69 + // label69 // this.label69.AutoSize = true; this.label69.Location = new System.Drawing.Point(10, 73); @@ -1585,78 +921,6 @@ private void InitializeComponent() this.label67.TabIndex = 5; this.label67.Text = "WildDinoTorporDrainMultiplier"; // - // NudWildDinoTorporDrainMultiplier - // - this.NudWildDinoTorporDrainMultiplier.DecimalPlaces = 6; - this.NudWildDinoTorporDrainMultiplier.ForeColor = System.Drawing.SystemColors.WindowText; - this.NudWildDinoTorporDrainMultiplier.Location = new System.Drawing.Point(183, 97); - this.NudWildDinoTorporDrainMultiplier.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.NudWildDinoTorporDrainMultiplier.Name = "NudWildDinoTorporDrainMultiplier"; - this.NudWildDinoTorporDrainMultiplier.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.NudWildDinoTorporDrainMultiplier.Size = new System.Drawing.Size(72, 20); - this.NudWildDinoTorporDrainMultiplier.TabIndex = 5; - this.NudWildDinoTorporDrainMultiplier.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // nudDinoCharacterFoodDrainEvent - // - this.nudDinoCharacterFoodDrainEvent.DecimalPlaces = 6; - this.nudDinoCharacterFoodDrainEvent.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudDinoCharacterFoodDrainEvent.Location = new System.Drawing.Point(263, 45); - this.nudDinoCharacterFoodDrainEvent.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudDinoCharacterFoodDrainEvent.Name = "nudDinoCharacterFoodDrainEvent"; - this.nudDinoCharacterFoodDrainEvent.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudDinoCharacterFoodDrainEvent.Size = new System.Drawing.Size(72, 20); - this.nudDinoCharacterFoodDrainEvent.TabIndex = 3; - this.nudDinoCharacterFoodDrainEvent.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // nudTamingSpeedEvent - // - this.nudTamingSpeedEvent.DecimalPlaces = 6; - this.nudTamingSpeedEvent.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudTamingSpeedEvent.Location = new System.Drawing.Point(263, 19); - this.nudTamingSpeedEvent.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudTamingSpeedEvent.Name = "nudTamingSpeedEvent"; - this.nudTamingSpeedEvent.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudTamingSpeedEvent.Size = new System.Drawing.Size(72, 20); - this.nudTamingSpeedEvent.TabIndex = 1; - this.nudTamingSpeedEvent.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // // label7 // this.label7.AutoSize = true; @@ -1675,54 +939,6 @@ private void InitializeComponent() this.label14.TabIndex = 0; this.label14.Text = "TamingSpeedMultiplier"; // - // nudDinoCharacterFoodDrain - // - this.nudDinoCharacterFoodDrain.DecimalPlaces = 6; - this.nudDinoCharacterFoodDrain.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudDinoCharacterFoodDrain.Location = new System.Drawing.Point(183, 45); - this.nudDinoCharacterFoodDrain.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudDinoCharacterFoodDrain.Name = "nudDinoCharacterFoodDrain"; - this.nudDinoCharacterFoodDrain.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudDinoCharacterFoodDrain.Size = new System.Drawing.Size(72, 20); - this.nudDinoCharacterFoodDrain.TabIndex = 2; - this.nudDinoCharacterFoodDrain.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // nudTamingSpeed - // - this.nudTamingSpeed.DecimalPlaces = 6; - this.nudTamingSpeed.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudTamingSpeed.Location = new System.Drawing.Point(183, 19); - this.nudTamingSpeed.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudTamingSpeed.Name = "nudTamingSpeed"; - this.nudTamingSpeed.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudTamingSpeed.Size = new System.Drawing.Size(72, 20); - this.nudTamingSpeed.TabIndex = 0; - this.nudTamingSpeed.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // // groupBox6 // this.groupBox6.Controls.Add(this.label55); @@ -1755,24 +971,6 @@ private void InitializeComponent() this.label55.TabIndex = 13; this.label55.Text = "wait before loading [ms]"; // - // NudWaitBeforeAutoLoad - // - this.NudWaitBeforeAutoLoad.ForeColor = System.Drawing.SystemColors.GrayText; - this.NudWaitBeforeAutoLoad.Location = new System.Drawing.Point(255, 41); - this.NudWaitBeforeAutoLoad.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.NudWaitBeforeAutoLoad.Name = "NudWaitBeforeAutoLoad"; - this.NudWaitBeforeAutoLoad.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.NudWaitBeforeAutoLoad.Size = new System.Drawing.Size(56, 20); - this.NudWaitBeforeAutoLoad.TabIndex = 12; - // // label54 // this.label54.AutoSize = true; @@ -1782,19 +980,6 @@ private void InitializeComponent() this.label54.TabIndex = 5; this.label54.Text = "backup files (0 to disable backups)"; // - // NudKeepBackupFilesCount - // - this.NudKeepBackupFilesCount.ForeColor = System.Drawing.SystemColors.GrayText; - this.NudKeepBackupFilesCount.Location = new System.Drawing.Point(44, 118); - this.NudKeepBackupFilesCount.Name = "NudKeepBackupFilesCount"; - this.NudKeepBackupFilesCount.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.NudKeepBackupFilesCount.Size = new System.Drawing.Size(59, 20); - this.NudKeepBackupFilesCount.TabIndex = 4; - // // label53 // this.label53.AutoSize = true; @@ -1843,25 +1028,12 @@ private void InitializeComponent() this.label2.Text = "Enable both checkboxes if you want to edit the library file with multiple persons" + ". Place the .asb collection-file in a shared-folder that the others have access " + "to."; - // - // NudBackupEveryMinutes - // - this.NudBackupEveryMinutes.ForeColor = System.Drawing.SystemColors.GrayText; - this.NudBackupEveryMinutes.Location = new System.Drawing.Point(132, 144); - this.NudBackupEveryMinutes.Name = "NudBackupEveryMinutes"; - this.NudBackupEveryMinutes.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.NudBackupEveryMinutes.Size = new System.Drawing.Size(47, 20); - this.NudBackupEveryMinutes.TabIndex = 7; // // groupBox7 // this.groupBox7.Controls.Add(this.CbSetMutationLevelsExtractor); this.groupBox7.Controls.Add(this.checkBoxDisplayHiddenStats); - this.groupBox7.Location = new System.Drawing.Point(6, 411); + this.groupBox7.Location = new System.Drawing.Point(6, 383); this.groupBox7.Name = "groupBox7"; this.groupBox7.Size = new System.Drawing.Size(317, 73); this.groupBox7.TabIndex = 2; @@ -2262,34 +1434,6 @@ private void InitializeComponent() this.cbAllowMoreThanHundredImprinting.Text = "Allow more than 100% imprinting"; this.cbAllowMoreThanHundredImprinting.UseVisualStyleBackColor = true; // - // nudWildLevelStep - // - this.nudWildLevelStep.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudWildLevelStep.Location = new System.Drawing.Point(319, 17); - this.nudWildLevelStep.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.nudWildLevelStep.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.nudWildLevelStep.Name = "nudWildLevelStep"; - this.nudWildLevelStep.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudWildLevelStep.Size = new System.Drawing.Size(57, 20); - this.nudWildLevelStep.TabIndex = 1; - this.nudWildLevelStep.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // // cbConsiderWildLevelSteps // this.cbConsiderWildLevelSteps.AutoSize = true; @@ -2488,19 +1632,6 @@ private void InitializeComponent() this.LbSpeciesSelectorCountLastUsed.TabIndex = 0; this.LbSpeciesSelectorCountLastUsed.Text = "Number of displayed last used species"; // - // NudSpeciesSelectorCountLastUsed - // - this.NudSpeciesSelectorCountLastUsed.ForeColor = System.Drawing.SystemColors.GrayText; - this.NudSpeciesSelectorCountLastUsed.Location = new System.Drawing.Point(350, 19); - this.NudSpeciesSelectorCountLastUsed.Name = "NudSpeciesSelectorCountLastUsed"; - this.NudSpeciesSelectorCountLastUsed.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.NudSpeciesSelectorCountLastUsed.Size = new System.Drawing.Size(57, 20); - this.NudSpeciesSelectorCountLastUsed.TabIndex = 1; - // // groupBox16 // this.groupBox16.Controls.Add(this.CbDisplayServerTokenPopup); @@ -2603,20 +1734,6 @@ private void InitializeComponent() this.CbbColorMode.Size = new System.Drawing.Size(222, 21); this.CbbColorMode.TabIndex = 5; // - // nudDefaultFontSize - // - this.nudDefaultFontSize.DecimalPlaces = 2; - this.nudDefaultFontSize.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudDefaultFontSize.Location = new System.Drawing.Point(335, 18); - this.nudDefaultFontSize.Name = "nudDefaultFontSize"; - this.nudDefaultFontSize.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudDefaultFontSize.Size = new System.Drawing.Size(72, 20); - this.nudDefaultFontSize.TabIndex = 3; - // // label33 // this.label33.AutoSize = true; @@ -2707,13 +1824,23 @@ private void InitializeComponent() this.groupBox9.Controls.Add(this.cbLibraryHighlightTopCreatures); this.groupBox9.Controls.Add(this.cbApplyGlobalSpeciesToLibrary); this.groupBox9.Controls.Add(this.cbCreatureColorsLibrary); - this.groupBox9.Location = new System.Drawing.Point(6, 490); + this.groupBox9.Location = new System.Drawing.Point(6, 462); this.groupBox9.Name = "groupBox9"; this.groupBox9.Size = new System.Drawing.Size(317, 248); this.groupBox9.TabIndex = 4; this.groupBox9.TabStop = false; this.groupBox9.Text = "Library"; // + // CbLibraryGenerateNameWarnTooLongName + // + this.CbLibraryGenerateNameWarnTooLongName.AutoSize = true; + this.CbLibraryGenerateNameWarnTooLongName.Location = new System.Drawing.Point(6, 225); + this.CbLibraryGenerateNameWarnTooLongName.Name = "CbLibraryGenerateNameWarnTooLongName"; + this.CbLibraryGenerateNameWarnTooLongName.Size = new System.Drawing.Size(309, 17); + this.CbLibraryGenerateNameWarnTooLongName.TabIndex = 10; + this.CbLibraryGenerateNameWarnTooLongName.Text = "When generating names in library warn about too long name"; + this.CbLibraryGenerateNameWarnTooLongName.UseVisualStyleBackColor = true; + // // CbLibraryDisplayZeroMutationLevels // this.CbLibraryDisplayZeroMutationLevels.AutoSize = true; @@ -2893,36 +2020,7 @@ private void InitializeComponent() this.CbbInfoGraphicFontName.TabIndex = 16; this.CbbInfoGraphicFontName.SelectedIndexChanged += new System.EventHandler(this.CbbInfoGraphicFontName_SelectedIndexChanged); // - // nudInfoGraphicHeight - // - this.nudInfoGraphicHeight.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudInfoGraphicHeight.Location = new System.Drawing.Point(126, 18); - this.nudInfoGraphicHeight.Maximum = new decimal(new int[] { - 99999, - 0, - 0, - 0}); - this.nudInfoGraphicHeight.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.nudInfoGraphicHeight.Name = "nudInfoGraphicHeight"; - this.nudInfoGraphicHeight.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudInfoGraphicHeight.Size = new System.Drawing.Size(57, 20); - this.nudInfoGraphicHeight.TabIndex = 2; - this.nudInfoGraphicHeight.Value = new decimal(new int[] { - 100, - 0, - 0, - 0}); - this.nudInfoGraphicHeight.ValueChanged += new System.EventHandler(this.nudInfoGraphicHeight_ValueChanged); - // - // BtInfoGraphicForeColor + // BtInfoGraphicForeColor // this.BtInfoGraphicForeColor.Location = new System.Drawing.Point(9, 44); this.BtInfoGraphicForeColor.Name = "BtInfoGraphicForeColor"; @@ -3188,15 +2286,6 @@ private void InitializeComponent() this.groupBox14.TabStop = false; this.groupBox14.Text = "Advanced settings - Target folder for save-game working copy (user\'s temp dir if " + "empty). It\'s recommended to leave this setting empty."; - // - // fileSelectorExtractedSaveFolder - // - this.fileSelectorExtractedSaveFolder.Dock = System.Windows.Forms.DockStyle.Fill; - this.fileSelectorExtractedSaveFolder.Link = "filename"; - this.fileSelectorExtractedSaveFolder.Location = new System.Drawing.Point(3, 16); - this.fileSelectorExtractedSaveFolder.Name = "fileSelectorExtractedSaveFolder"; - this.fileSelectorExtractedSaveFolder.Size = new System.Drawing.Size(724, 28); - this.fileSelectorExtractedSaveFolder.TabIndex = 0; // // textBoxImportTribeNameFilter // @@ -3242,28 +2331,6 @@ private void InitializeComponent() this.dataGridView_FileLocations.TabIndex = 2; this.dataGridView_FileLocations.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_FileLocations_CellClick); // - // convenientNameDataGridViewTextBoxColumn - // - this.convenientNameDataGridViewTextBoxColumn.DataPropertyName = "ConvenientName"; - this.convenientNameDataGridViewTextBoxColumn.HeaderText = "Name"; - this.convenientNameDataGridViewTextBoxColumn.Name = "convenientNameDataGridViewTextBoxColumn"; - this.convenientNameDataGridViewTextBoxColumn.ReadOnly = true; - // - // serverNameDataGridViewTextBoxColumn - // - this.serverNameDataGridViewTextBoxColumn.DataPropertyName = "ServerName"; - this.serverNameDataGridViewTextBoxColumn.HeaderText = "Server name"; - this.serverNameDataGridViewTextBoxColumn.Name = "serverNameDataGridViewTextBoxColumn"; - this.serverNameDataGridViewTextBoxColumn.ReadOnly = true; - // - // fileLocationDataGridViewTextBoxColumn - // - this.fileLocationDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.fileLocationDataGridViewTextBoxColumn.DataPropertyName = "FileLocation"; - this.fileLocationDataGridViewTextBoxColumn.HeaderText = "File location"; - this.fileLocationDataGridViewTextBoxColumn.Name = "fileLocationDataGridViewTextBoxColumn"; - this.fileLocationDataGridViewTextBoxColumn.ReadOnly = true; - // // dgvFileLocation_Change // this.dgvFileLocation_Change.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; @@ -3298,11 +2365,6 @@ private void InitializeComponent() this.dgvFileLocation_Delete.UseColumnTextForButtonValue = true; this.dgvFileLocation_Delete.Width = 50; // - // aTImportFileLocationBindingSource - // - this.aTImportFileLocationBindingSource.AllowNew = false; - this.aTImportFileLocationBindingSource.DataSource = typeof(ARKBreedingStats.settings.ATImportFileLocation); - // // btAddSavegameFileLocation // this.btAddSavegameFileLocation.Dock = System.Windows.Forms.DockStyle.Top; @@ -3449,20 +2511,6 @@ private void InitializeComponent() this.label30.TabIndex = 11; this.label30.Text = "%"; // - // nudImportLowerBoundTE - // - this.nudImportLowerBoundTE.DecimalPlaces = 2; - this.nudImportLowerBoundTE.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudImportLowerBoundTE.Location = new System.Drawing.Point(227, 19); - this.nudImportLowerBoundTE.Name = "nudImportLowerBoundTE"; - this.nudImportLowerBoundTE.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudImportLowerBoundTE.Size = new System.Drawing.Size(64, 20); - this.nudImportLowerBoundTE.TabIndex = 1; - // // groupBox22 // this.groupBox22.Controls.Add(this.CbBringToFrontOnImportExportIssue); @@ -3812,6 +2860,1382 @@ private void InitializeComponent() this.dataGridViewExportFolders.TabIndex = 1; this.dataGridViewExportFolders.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewExportFolders_CellClick); // + // dgvExportFolderChange + // + this.dgvExportFolderChange.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.dgvExportFolderChange.HeaderText = "Change"; + this.dgvExportFolderChange.MinimumWidth = 50; + this.dgvExportFolderChange.Name = "dgvExportFolderChange"; + this.dgvExportFolderChange.ReadOnly = true; + this.dgvExportFolderChange.Text = "Change"; + this.dgvExportFolderChange.UseColumnTextForButtonValue = true; + this.dgvExportFolderChange.Width = 50; + // + // dgvExportFolderDelete + // + this.dgvExportFolderDelete.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.dgvExportFolderDelete.HeaderText = "Delete"; + this.dgvExportFolderDelete.MinimumWidth = 50; + this.dgvExportFolderDelete.Name = "dgvExportFolderDelete"; + this.dgvExportFolderDelete.ReadOnly = true; + this.dgvExportFolderDelete.Text = "Delete"; + this.dgvExportFolderDelete.UseColumnTextForButtonValue = true; + this.dgvExportFolderDelete.Width = 50; + // + // dgvExportMakeDefault + // + this.dgvExportMakeDefault.HeaderText = "Default"; + this.dgvExportMakeDefault.Name = "dgvExportMakeDefault"; + this.dgvExportMakeDefault.ReadOnly = true; + this.dgvExportMakeDefault.Text = "Make default"; + this.dgvExportMakeDefault.UseColumnTextForButtonValue = true; + // + // btAddExportFolder + // + this.btAddExportFolder.Dock = System.Windows.Forms.DockStyle.Top; + this.btAddExportFolder.Location = new System.Drawing.Point(3, 16); + this.btAddExportFolder.Name = "btAddExportFolder"; + this.btAddExportFolder.Size = new System.Drawing.Size(730, 23); + this.btAddExportFolder.TabIndex = 0; + this.btAddExportFolder.Text = "Add Export Folder…"; + this.btAddExportFolder.UseVisualStyleBackColor = true; + this.btAddExportFolder.Click += new System.EventHandler(this.btAddExportFolder_Click); + // + // label25 + // + this.label25.AutoSize = true; + this.label25.Location = new System.Drawing.Point(3, 3); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(669, 91); + this.label25.TabIndex = 0; + this.label25.Text = resources.GetString("label25.Text"); + // + // tabPageTimers + // + this.tabPageTimers.Controls.Add(this.groupBox24); + this.tabPageTimers.Controls.Add(this.groupBox8); + this.tabPageTimers.Location = new System.Drawing.Point(4, 22); + this.tabPageTimers.Name = "tabPageTimers"; + this.tabPageTimers.Padding = new System.Windows.Forms.Padding(3); + this.tabPageTimers.Size = new System.Drawing.Size(750, 744); + this.tabPageTimers.TabIndex = 6; + this.tabPageTimers.Text = "Timers"; + this.tabPageTimers.UseVisualStyleBackColor = true; + // + // groupBox24 + // + this.groupBox24.Controls.Add(this.cbKeepExpiredTimersInOverlay); + this.groupBox24.Controls.Add(this.cbDeleteExpiredTimersOnSaving); + this.groupBox24.Controls.Add(this.cbTimersInOverlayAutomatically); + this.groupBox24.Location = new System.Drawing.Point(8, 233); + this.groupBox24.Name = "groupBox24"; + this.groupBox24.Size = new System.Drawing.Size(413, 90); + this.groupBox24.TabIndex = 1; + this.groupBox24.TabStop = false; + this.groupBox24.Text = "Timers"; + // + // cbKeepExpiredTimersInOverlay + // + this.cbKeepExpiredTimersInOverlay.AutoSize = true; + this.cbKeepExpiredTimersInOverlay.Location = new System.Drawing.Point(6, 42); + this.cbKeepExpiredTimersInOverlay.Name = "cbKeepExpiredTimersInOverlay"; + this.cbKeepExpiredTimersInOverlay.Size = new System.Drawing.Size(166, 17); + this.cbKeepExpiredTimersInOverlay.TabIndex = 1; + this.cbKeepExpiredTimersInOverlay.Text = "Keep expired timers in overlay"; + this.cbKeepExpiredTimersInOverlay.UseVisualStyleBackColor = true; + // + // cbDeleteExpiredTimersOnSaving + // + this.cbDeleteExpiredTimersOnSaving.AutoSize = true; + this.cbDeleteExpiredTimersOnSaving.Location = new System.Drawing.Point(6, 65); + this.cbDeleteExpiredTimersOnSaving.Name = "cbDeleteExpiredTimersOnSaving"; + this.cbDeleteExpiredTimersOnSaving.Size = new System.Drawing.Size(217, 17); + this.cbDeleteExpiredTimersOnSaving.TabIndex = 2; + this.cbDeleteExpiredTimersOnSaving.Text = "Delete expired timers when saving library"; + this.cbDeleteExpiredTimersOnSaving.UseVisualStyleBackColor = true; + // + // cbTimersInOverlayAutomatically + // + this.cbTimersInOverlayAutomatically.AutoSize = true; + this.cbTimersInOverlayAutomatically.Location = new System.Drawing.Point(6, 19); + this.cbTimersInOverlayAutomatically.Name = "cbTimersInOverlayAutomatically"; + this.cbTimersInOverlayAutomatically.Size = new System.Drawing.Size(202, 17); + this.cbTimersInOverlayAutomatically.TabIndex = 0; + this.cbTimersInOverlayAutomatically.Text = "Display timers in overlay automatically"; + this.cbTimersInOverlayAutomatically.UseVisualStyleBackColor = true; + // + // groupBox8 + // + this.groupBox8.Controls.Add(this.label22); + this.groupBox8.Controls.Add(this.tbPlayAlarmsSeconds); + this.groupBox8.Controls.Add(this.customSCCustom); + this.groupBox8.Controls.Add(this.customSCWakeup); + this.groupBox8.Controls.Add(this.customSCBirth); + this.groupBox8.Controls.Add(this.customSCStarving); + this.groupBox8.Controls.Add(this.label20); + this.groupBox8.Location = new System.Drawing.Point(8, 6); + this.groupBox8.Name = "groupBox8"; + this.groupBox8.Size = new System.Drawing.Size(413, 221); + this.groupBox8.TabIndex = 0; + this.groupBox8.TabStop = false; + this.groupBox8.Text = "Timer Sounds"; + // + // label22 + // + this.label22.Location = new System.Drawing.Point(6, 171); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(255, 66); + this.label22.TabIndex = 5; + this.label22.Text = "List of seconds the alarms play before they reach 0.\r\nE.g. \"60,0\" to play the ala" + + "rm at 60 s and at 0 s. Use commas to separate the values."; + // + // tbPlayAlarmsSeconds + // + this.tbPlayAlarmsSeconds.Location = new System.Drawing.Point(267, 168); + this.tbPlayAlarmsSeconds.Name = "tbPlayAlarmsSeconds"; + this.tbPlayAlarmsSeconds.Size = new System.Drawing.Size(140, 20); + this.tbPlayAlarmsSeconds.TabIndex = 6; + // + // label20 + // + this.label20.Location = new System.Drawing.Point(6, 16); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(316, 33); + this.label20.TabIndex = 0; + this.label20.Text = "Only PCM-WAV-files are supported. The sound will play 1 min before the timer runs" + + " out."; + // + // tabPageOverlay + // + this.tabPageOverlay.Controls.Add(this.groupBox10); + this.tabPageOverlay.Location = new System.Drawing.Point(4, 22); + this.tabPageOverlay.Name = "tabPageOverlay"; + this.tabPageOverlay.Padding = new System.Windows.Forms.Padding(3); + this.tabPageOverlay.Size = new System.Drawing.Size(750, 744); + this.tabPageOverlay.TabIndex = 5; + this.tabPageOverlay.Text = "Overlay"; + this.tabPageOverlay.UseVisualStyleBackColor = true; + // + // groupBox10 + // + this.groupBox10.Controls.Add(this.label70); + this.groupBox10.Controls.Add(this.label15); + this.groupBox10.Controls.Add(this.nudOverlayInfoHeight); + this.groupBox10.Controls.Add(this.nudOverlayInfoWidth); + this.groupBox10.Controls.Add(this.NudOverlayRelativeFontSize); + this.groupBox10.Controls.Add(this.label65); + this.groupBox10.Controls.Add(this.CbOverlayDisplayInheritance); + this.groupBox10.Controls.Add(this.label45); + this.groupBox10.Controls.Add(this.pCustomOverlayLocation); + this.groupBox10.Controls.Add(this.cbCustomOverlayLocation); + this.groupBox10.Controls.Add(this.label38); + this.groupBox10.Controls.Add(this.nudOverlayInfoPosY); + this.groupBox10.Controls.Add(this.label39); + this.groupBox10.Controls.Add(this.nudOverlayInfoPosDFR); + this.groupBox10.Controls.Add(this.label40); + this.groupBox10.Controls.Add(this.label37); + this.groupBox10.Controls.Add(this.nudOverlayTimerPosY); + this.groupBox10.Controls.Add(this.label36); + this.groupBox10.Controls.Add(this.nudOverlayTimerPosX); + this.groupBox10.Controls.Add(this.label35); + this.groupBox10.Controls.Add(this.cbInventoryCheck); + this.groupBox10.Controls.Add(this.label21); + this.groupBox10.Controls.Add(this.nudOverlayInfoDuration); + this.groupBox10.Controls.Add(this.chkbSpeechRecognition); + this.groupBox10.Controls.Add(this.label66); + this.groupBox10.Location = new System.Drawing.Point(8, 6); + this.groupBox10.Name = "groupBox10"; + this.groupBox10.Size = new System.Drawing.Size(734, 307); + this.groupBox10.TabIndex = 0; + this.groupBox10.TabStop = false; + this.groupBox10.Text = "Overlay"; + // + // label70 + // + this.label70.AutoSize = true; + this.label70.Location = new System.Drawing.Point(509, 187); + this.label70.Name = "label70"; + this.label70.Size = new System.Drawing.Size(36, 13); + this.label70.TabIndex = 23; + this.label70.Text = "height"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(398, 187); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(32, 13); + this.label15.TabIndex = 22; + this.label15.Text = "width"; + // + // label65 + // + this.label65.AutoSize = true; + this.label65.Location = new System.Drawing.Point(6, 252); + this.label65.Name = "label65"; + this.label65.Size = new System.Drawing.Size(141, 13); + this.label65.TabIndex = 18; + this.label65.Text = "Relative font size (default: 1)"; + // + // CbOverlayDisplayInheritance + // + this.CbOverlayDisplayInheritance.AutoSize = true; + this.CbOverlayDisplayInheritance.Location = new System.Drawing.Point(6, 284); + this.CbOverlayDisplayInheritance.Name = "CbOverlayDisplayInheritance"; + this.CbOverlayDisplayInheritance.Size = new System.Drawing.Size(203, 17); + this.CbOverlayDisplayInheritance.TabIndex = 17; + this.CbOverlayDisplayInheritance.Text = "Display creature inheritance on import"; + this.CbOverlayDisplayInheritance.UseVisualStyleBackColor = true; + // + // label45 + // + this.label45.AutoSize = true; + this.label45.Location = new System.Drawing.Point(38, 25); + this.label45.Name = "label45"; + this.label45.Size = new System.Drawing.Size(495, 13); + this.label45.TabIndex = 0; + this.label45.Text = "For the overlay to work, you need to set the window-mode \"Fullscreen-Windowed\" in" + + " the game settings."; + // + // pCustomOverlayLocation + // + this.pCustomOverlayLocation.Controls.Add(this.nudCustomOverlayLocX); + this.pCustomOverlayLocation.Controls.Add(this.label42); + this.pCustomOverlayLocation.Controls.Add(this.label43); + this.pCustomOverlayLocation.Controls.Add(this.nudCustomOverlayLocY); + this.pCustomOverlayLocation.Enabled = false; + this.pCustomOverlayLocation.Location = new System.Drawing.Point(195, 217); + this.pCustomOverlayLocation.Name = "pCustomOverlayLocation"; + this.pCustomOverlayLocation.Size = new System.Drawing.Size(201, 28); + this.pCustomOverlayLocation.TabIndex = 16; + // + // label42 + // + this.label42.AutoSize = true; + this.label42.Location = new System.Drawing.Point(105, 5); + this.label42.Name = "label42"; + this.label42.Size = new System.Drawing.Size(14, 13); + this.label42.TabIndex = 2; + this.label42.Text = "Y"; + // + // label43 + // + this.label43.AutoSize = true; + this.label43.Location = new System.Drawing.Point(4, 5); + this.label43.Name = "label43"; + this.label43.Size = new System.Drawing.Size(14, 13); + this.label43.TabIndex = 0; + this.label43.Text = "X"; + // + // cbCustomOverlayLocation + // + this.cbCustomOverlayLocation.AutoSize = true; + this.cbCustomOverlayLocation.Location = new System.Drawing.Point(6, 221); + this.cbCustomOverlayLocation.Name = "cbCustomOverlayLocation"; + this.cbCustomOverlayLocation.Size = new System.Drawing.Size(138, 17); + this.cbCustomOverlayLocation.TabIndex = 15; + this.cbCustomOverlayLocation.Text = "Custom overlay location"; + this.cbCustomOverlayLocation.UseVisualStyleBackColor = true; + this.cbCustomOverlayLocation.CheckedChanged += new System.EventHandler(this.cbCustomOverlayLocation_CheckedChanged); + // + // label38 + // + this.label38.AutoSize = true; + this.label38.Location = new System.Drawing.Point(120, 187); + this.label38.Name = "label38"; + this.label38.Size = new System.Drawing.Size(93, 13); + this.label38.TabIndex = 11; + this.label38.Text = "distance from right"; + // + // label39 + // + this.label39.AutoSize = true; + this.label39.Location = new System.Drawing.Point(300, 187); + this.label39.Name = "label39"; + this.label39.Size = new System.Drawing.Size(14, 13); + this.label39.TabIndex = 13; + this.label39.Text = "Y"; + // + // label40 + // + this.label40.AutoSize = true; + this.label40.Location = new System.Drawing.Point(6, 187); + this.label40.Name = "label40"; + this.label40.Size = new System.Drawing.Size(94, 13); + this.label40.TabIndex = 10; + this.label40.Text = "Position of the info"; + // + // label37 + // + this.label37.AutoSize = true; + this.label37.Location = new System.Drawing.Point(300, 161); + this.label37.Name = "label37"; + this.label37.Size = new System.Drawing.Size(14, 13); + this.label37.TabIndex = 8; + this.label37.Text = "Y"; + // + // label36 + // + this.label36.AutoSize = true; + this.label36.Location = new System.Drawing.Point(199, 161); + this.label36.Name = "label36"; + this.label36.Size = new System.Drawing.Size(14, 13); + this.label36.TabIndex = 6; + this.label36.Text = "X"; + // + // label35 + // + this.label35.AutoSize = true; + this.label35.Location = new System.Drawing.Point(6, 161); + this.label35.Name = "label35"; + this.label35.Size = new System.Drawing.Size(104, 13); + this.label35.TabIndex = 5; + this.label35.Text = "Position of the timers"; + // + // cbInventoryCheck + // + this.cbInventoryCheck.Location = new System.Drawing.Point(6, 116); + this.cbInventoryCheck.Name = "cbInventoryCheck"; + this.cbInventoryCheck.Size = new System.Drawing.Size(305, 35); + this.cbInventoryCheck.TabIndex = 4; + this.cbInventoryCheck.Text = "Automatically extract inventory levels (needs working OCR and enabled overlay)"; + this.cbInventoryCheck.UseVisualStyleBackColor = true; + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Location = new System.Drawing.Point(6, 84); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(138, 13); + this.label21.TabIndex = 2; + this.label21.Text = "Display info in overlay for [s]"; + // + // chkbSpeechRecognition + // + this.chkbSpeechRecognition.AutoSize = true; + this.chkbSpeechRecognition.Location = new System.Drawing.Point(6, 59); + this.chkbSpeechRecognition.Name = "chkbSpeechRecognition"; + this.chkbSpeechRecognition.Size = new System.Drawing.Size(338, 17); + this.chkbSpeechRecognition.TabIndex = 1; + this.chkbSpeechRecognition.Text = "Speech Recognition (displays taming info, e.g. say \"Rex level 30\")"; + this.chkbSpeechRecognition.UseVisualStyleBackColor = true; + // + // label66 + // + this.label66.AutoSize = true; + this.label66.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label66.Location = new System.Drawing.Point(6, 16); + this.label66.Name = "label66"; + this.label66.Size = new System.Drawing.Size(37, 26); + this.label66.TabIndex = 19; + this.label66.Text = "💡"; + // + // tabPageOCR + // + this.tabPageOCR.AutoScroll = true; + this.tabPageOCR.Controls.Add(this.groupBox1); + this.tabPageOCR.Location = new System.Drawing.Point(4, 22); + this.tabPageOCR.Name = "tabPageOCR"; + this.tabPageOCR.Padding = new System.Windows.Forms.Padding(3); + this.tabPageOCR.Size = new System.Drawing.Size(750, 744); + this.tabPageOCR.TabIndex = 4; + this.tabPageOCR.Text = "OCR"; + this.tabPageOCR.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.BtGameNameAsa); + this.groupBox1.Controls.Add(this.label62); + this.groupBox1.Controls.Add(this.label61); + this.groupBox1.Controls.Add(this.label60); + this.groupBox1.Controls.Add(this.label59); + this.groupBox1.Controls.Add(this.label58); + this.groupBox1.Controls.Add(this.NudOCRClipboardCropHeight); + this.groupBox1.Controls.Add(this.NudOCRClipboardCropWidth); + this.groupBox1.Controls.Add(this.NudOCRClipboardCropTop); + this.groupBox1.Controls.Add(this.NudOCRClipboardCropLeft); + this.groupBox1.Controls.Add(this.CbOCRFromClipboard); + this.groupBox1.Controls.Add(this.BtGameNameAse); + this.groupBox1.Controls.Add(this.cbOCRIgnoreImprintValue); + this.groupBox1.Controls.Add(this.cbShowOCRButton); + this.groupBox1.Controls.Add(this.label23); + this.groupBox1.Controls.Add(this.nudWaitBeforeScreenCapture); + this.groupBox1.Controls.Add(this.label19); + this.groupBox1.Controls.Add(this.nudWhiteThreshold); + this.groupBox1.Controls.Add(this.tbOCRCaptureApp); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.cbbOCRApp); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Location = new System.Drawing.Point(6, 6); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(734, 377); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "OCR"; + // + // BtGameNameAsa + // + this.BtGameNameAsa.Location = new System.Drawing.Point(6, 318); + this.BtGameNameAsa.Name = "BtGameNameAsa"; + this.BtGameNameAsa.Size = new System.Drawing.Size(171, 23); + this.BtGameNameAsa.TabIndex = 21; + this.BtGameNameAsa.Text = "ArkAscended (ASA default)"; + this.BtGameNameAsa.UseVisualStyleBackColor = true; + this.BtGameNameAsa.Click += new System.EventHandler(this.BtGameNameAsa_Click); + // + // label62 + // + this.label62.AutoSize = true; + this.label62.Location = new System.Drawing.Point(34, 211); + this.label62.Name = "label62"; + this.label62.Size = new System.Drawing.Size(616, 13); + this.label62.TabIndex = 20; + this.label62.Text = "Set an area of the clipboard screenshot to be used for the actual OCR. Set all fi" + + "elds to 0 to disable and use the whole screenshot."; + // + // label61 + // + this.label61.AutoSize = true; + this.label61.Location = new System.Drawing.Point(151, 229); + this.label61.Name = "label61"; + this.label61.Size = new System.Drawing.Size(26, 13); + this.label61.TabIndex = 19; + this.label61.Text = "Top"; + // + // label60 + // + this.label60.AutoSize = true; + this.label60.Location = new System.Drawing.Point(258, 229); + this.label60.Name = "label60"; + this.label60.Size = new System.Drawing.Size(35, 13); + this.label60.TabIndex = 18; + this.label60.Text = "Width"; + // + // label59 + // + this.label59.AutoSize = true; + this.label59.Location = new System.Drawing.Point(374, 229); + this.label59.Name = "label59"; + this.label59.Size = new System.Drawing.Size(38, 13); + this.label59.TabIndex = 17; + this.label59.Text = "Height"; + // + // label58 + // + this.label58.AutoSize = true; + this.label58.Location = new System.Drawing.Point(45, 229); + this.label58.Name = "label58"; + this.label58.Size = new System.Drawing.Size(25, 13); + this.label58.TabIndex = 16; + this.label58.Text = "Left"; + // + // CbOCRFromClipboard + // + this.CbOCRFromClipboard.AutoSize = true; + this.CbOCRFromClipboard.Location = new System.Drawing.Point(6, 191); + this.CbOCRFromClipboard.Name = "CbOCRFromClipboard"; + this.CbOCRFromClipboard.Size = new System.Drawing.Size(506, 17); + this.CbOCRFromClipboard.TabIndex = 11; + this.CbOCRFromClipboard.Text = "Use image in clipboard for the OCR. You can press the Print-key to copy a screens" + + "hot to the cliphoard"; + this.CbOCRFromClipboard.UseVisualStyleBackColor = true; + // + // BtGameNameAse + // + this.BtGameNameAse.Location = new System.Drawing.Point(183, 318); + this.BtGameNameAse.Name = "BtGameNameAse"; + this.BtGameNameAse.Size = new System.Drawing.Size(170, 23); + this.BtGameNameAse.TabIndex = 8; + this.BtGameNameAse.Text = "ShooterGame (ASE default)"; + this.BtGameNameAse.UseVisualStyleBackColor = true; + this.BtGameNameAse.Click += new System.EventHandler(this.BtGameNameAse_Click); + // + // cbOCRIgnoreImprintValue + // + this.cbOCRIgnoreImprintValue.AutoSize = true; + this.cbOCRIgnoreImprintValue.Location = new System.Drawing.Point(6, 168); + this.cbOCRIgnoreImprintValue.Name = "cbOCRIgnoreImprintValue"; + this.cbOCRIgnoreImprintValue.Size = new System.Drawing.Size(287, 17); + this.cbOCRIgnoreImprintValue.TabIndex = 6; + this.cbOCRIgnoreImprintValue.Text = "Don\'t read imprinting value (can be overlapped by chat)"; + this.cbOCRIgnoreImprintValue.UseVisualStyleBackColor = true; + // + // cbShowOCRButton + // + this.cbShowOCRButton.AutoSize = true; + this.cbShowOCRButton.Location = new System.Drawing.Point(6, 96); + this.cbShowOCRButton.Name = "cbShowOCRButton"; + this.cbShowOCRButton.Size = new System.Drawing.Size(228, 17); + this.cbShowOCRButton.TabIndex = 1; + this.cbShowOCRButton.Text = "Show OCR-Button instead of Import-Button"; + this.cbShowOCRButton.UseVisualStyleBackColor = true; + // + // label23 + // + this.label23.Location = new System.Drawing.Point(6, 145); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(296, 20); + this.label23.TabIndex = 4; + this.label23.Text = "Wait before screencapture (time to tab into game) in ms"; + // + // label19 + // + this.label19.Location = new System.Drawing.Point(6, 119); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(296, 20); + this.label19.TabIndex = 2; + this.label19.Text = "White Threshold (increase if you increased gamma ingame)"; + // + // tbOCRCaptureApp + // + this.tbOCRCaptureApp.Location = new System.Drawing.Point(6, 292); + this.tbOCRCaptureApp.Name = "tbOCRCaptureApp"; + this.tbOCRCaptureApp.Size = new System.Drawing.Size(722, 20); + this.tbOCRCaptureApp.TabIndex = 9; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(6, 276); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(111, 13); + this.label4.TabIndex = 7; + this.label4.Text = "Process name of ARK"; + // + // cbbOCRApp + // + this.cbbOCRApp.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbbOCRApp.FormattingEnabled = true; + this.cbbOCRApp.Location = new System.Drawing.Point(6, 347); + this.cbbOCRApp.Name = "cbbOCRApp"; + this.cbbOCRApp.Size = new System.Drawing.Size(722, 21); + this.cbbOCRApp.TabIndex = 10; + this.cbbOCRApp.SelectedIndexChanged += new System.EventHandler(this.cbOCRApp_SelectedIndexChanged); + // + // label1 + // + this.label1.Location = new System.Drawing.Point(6, 16); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(722, 77); + this.label1.TabIndex = 0; + this.label1.Text = resources.GetString("label1.Text"); + // + // panel1 + // + this.panel1.Controls.Add(this.buttonCancel); + this.panel1.Controls.Add(this.buttonOK); + this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panel1.Location = new System.Drawing.Point(0, 770); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(758, 30); + this.panel1.TabIndex = 12; + // + // BtOpenLevelColorOptions + // + BtOpenLevelColorOptions.Location = new System.Drawing.Point(6, 114); + BtOpenLevelColorOptions.Name = "BtOpenLevelColorOptions"; + BtOpenLevelColorOptions.Size = new System.Drawing.Size(189, 23); + BtOpenLevelColorOptions.TabIndex = 16; + BtOpenLevelColorOptions.Text = "Open level color options"; + BtOpenLevelColorOptions.UseVisualStyleBackColor = true; + BtOpenLevelColorOptions.Click += new System.EventHandler(this.BtOpenLevelColorOptions_Click); + // + // nudWildLevelStep + // + this.nudWildLevelStep.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudWildLevelStep.Location = new System.Drawing.Point(319, 17); + this.nudWildLevelStep.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nudWildLevelStep.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nudWildLevelStep.Name = "nudWildLevelStep"; + this.nudWildLevelStep.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudWildLevelStep.Size = new System.Drawing.Size(57, 20); + this.nudWildLevelStep.TabIndex = 1; + this.nudWildLevelStep.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudTamedDinoCharacterFoodDrain + // + this.nudTamedDinoCharacterFoodDrain.DecimalPlaces = 6; + this.nudTamedDinoCharacterFoodDrain.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudTamedDinoCharacterFoodDrain.Location = new System.Drawing.Point(183, 227); + this.nudTamedDinoCharacterFoodDrain.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudTamedDinoCharacterFoodDrain.Name = "nudTamedDinoCharacterFoodDrain"; + this.nudTamedDinoCharacterFoodDrain.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudTamedDinoCharacterFoodDrain.Size = new System.Drawing.Size(72, 20); + this.nudTamedDinoCharacterFoodDrain.TabIndex = 21; + this.nudTamedDinoCharacterFoodDrain.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudTamedDinoCharacterFoodDrainEvent + // + this.nudTamedDinoCharacterFoodDrainEvent.DecimalPlaces = 6; + this.nudTamedDinoCharacterFoodDrainEvent.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudTamedDinoCharacterFoodDrainEvent.Location = new System.Drawing.Point(263, 227); + this.nudTamedDinoCharacterFoodDrainEvent.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudTamedDinoCharacterFoodDrainEvent.Name = "nudTamedDinoCharacterFoodDrainEvent"; + this.nudTamedDinoCharacterFoodDrainEvent.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudTamedDinoCharacterFoodDrainEvent.Size = new System.Drawing.Size(72, 20); + this.nudTamedDinoCharacterFoodDrainEvent.TabIndex = 23; + this.nudTamedDinoCharacterFoodDrainEvent.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudBabyImprintAmountEvent + // + this.nudBabyImprintAmountEvent.DecimalPlaces = 6; + this.nudBabyImprintAmountEvent.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudBabyImprintAmountEvent.Location = new System.Drawing.Point(263, 149); + this.nudBabyImprintAmountEvent.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudBabyImprintAmountEvent.Name = "nudBabyImprintAmountEvent"; + this.nudBabyImprintAmountEvent.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudBabyImprintAmountEvent.Size = new System.Drawing.Size(72, 20); + this.nudBabyImprintAmountEvent.TabIndex = 12; + this.nudBabyImprintAmountEvent.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudBabyImprintAmount + // + this.nudBabyImprintAmount.DecimalPlaces = 6; + this.nudBabyImprintAmount.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudBabyImprintAmount.Location = new System.Drawing.Point(183, 149); + this.nudBabyImprintAmount.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudBabyImprintAmount.Name = "nudBabyImprintAmount"; + this.nudBabyImprintAmount.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudBabyImprintAmount.Size = new System.Drawing.Size(72, 20); + this.nudBabyImprintAmount.TabIndex = 5; + this.nudBabyImprintAmount.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudMatingSpeed + // + this.nudMatingSpeed.DecimalPlaces = 6; + this.nudMatingSpeed.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudMatingSpeed.Location = new System.Drawing.Point(183, 19); + this.nudMatingSpeed.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudMatingSpeed.Name = "nudMatingSpeed"; + this.nudMatingSpeed.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudMatingSpeed.Size = new System.Drawing.Size(72, 20); + this.nudMatingSpeed.TabIndex = 0; + this.nudMatingSpeed.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudBabyFoodConsumptionSpeedEvent + // + this.nudBabyFoodConsumptionSpeedEvent.DecimalPlaces = 6; + this.nudBabyFoodConsumptionSpeedEvent.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudBabyFoodConsumptionSpeedEvent.Location = new System.Drawing.Point(263, 201); + this.nudBabyFoodConsumptionSpeedEvent.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudBabyFoodConsumptionSpeedEvent.Name = "nudBabyFoodConsumptionSpeedEvent"; + this.nudBabyFoodConsumptionSpeedEvent.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudBabyFoodConsumptionSpeedEvent.Size = new System.Drawing.Size(72, 20); + this.nudBabyFoodConsumptionSpeedEvent.TabIndex = 13; + this.nudBabyFoodConsumptionSpeedEvent.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudMatingIntervalEvent + // + this.nudMatingIntervalEvent.DecimalPlaces = 6; + this.nudMatingIntervalEvent.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudMatingIntervalEvent.Location = new System.Drawing.Point(263, 45); + this.nudMatingIntervalEvent.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudMatingIntervalEvent.Name = "nudMatingIntervalEvent"; + this.nudMatingIntervalEvent.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudMatingIntervalEvent.Size = new System.Drawing.Size(72, 20); + this.nudMatingIntervalEvent.TabIndex = 8; + this.nudMatingIntervalEvent.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudBabyCuddleIntervalEvent + // + this.nudBabyCuddleIntervalEvent.DecimalPlaces = 6; + this.nudBabyCuddleIntervalEvent.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudBabyCuddleIntervalEvent.Location = new System.Drawing.Point(263, 123); + this.nudBabyCuddleIntervalEvent.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudBabyCuddleIntervalEvent.Name = "nudBabyCuddleIntervalEvent"; + this.nudBabyCuddleIntervalEvent.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudBabyCuddleIntervalEvent.Size = new System.Drawing.Size(72, 20); + this.nudBabyCuddleIntervalEvent.TabIndex = 11; + this.nudBabyCuddleIntervalEvent.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudBabyMatureSpeedEvent + // + this.nudBabyMatureSpeedEvent.DecimalPlaces = 6; + this.nudBabyMatureSpeedEvent.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudBabyMatureSpeedEvent.Location = new System.Drawing.Point(263, 97); + this.nudBabyMatureSpeedEvent.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudBabyMatureSpeedEvent.Name = "nudBabyMatureSpeedEvent"; + this.nudBabyMatureSpeedEvent.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudBabyMatureSpeedEvent.Size = new System.Drawing.Size(72, 20); + this.nudBabyMatureSpeedEvent.TabIndex = 10; + this.nudBabyMatureSpeedEvent.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudEggHatchSpeedEvent + // + this.nudEggHatchSpeedEvent.DecimalPlaces = 6; + this.nudEggHatchSpeedEvent.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudEggHatchSpeedEvent.Location = new System.Drawing.Point(263, 71); + this.nudEggHatchSpeedEvent.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudEggHatchSpeedEvent.Name = "nudEggHatchSpeedEvent"; + this.nudEggHatchSpeedEvent.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudEggHatchSpeedEvent.Size = new System.Drawing.Size(72, 20); + this.nudEggHatchSpeedEvent.TabIndex = 9; + this.nudEggHatchSpeedEvent.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudBabyFoodConsumptionSpeed + // + this.nudBabyFoodConsumptionSpeed.DecimalPlaces = 6; + this.nudBabyFoodConsumptionSpeed.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudBabyFoodConsumptionSpeed.Location = new System.Drawing.Point(183, 201); + this.nudBabyFoodConsumptionSpeed.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudBabyFoodConsumptionSpeed.Name = "nudBabyFoodConsumptionSpeed"; + this.nudBabyFoodConsumptionSpeed.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudBabyFoodConsumptionSpeed.Size = new System.Drawing.Size(72, 20); + this.nudBabyFoodConsumptionSpeed.TabIndex = 7; + this.nudBabyFoodConsumptionSpeed.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudMatingInterval + // + this.nudMatingInterval.DecimalPlaces = 6; + this.nudMatingInterval.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudMatingInterval.Location = new System.Drawing.Point(183, 45); + this.nudMatingInterval.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudMatingInterval.Name = "nudMatingInterval"; + this.nudMatingInterval.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudMatingInterval.Size = new System.Drawing.Size(72, 20); + this.nudMatingInterval.TabIndex = 1; + this.nudMatingInterval.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudBabyCuddleInterval + // + this.nudBabyCuddleInterval.DecimalPlaces = 6; + this.nudBabyCuddleInterval.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudBabyCuddleInterval.Location = new System.Drawing.Point(183, 123); + this.nudBabyCuddleInterval.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudBabyCuddleInterval.Name = "nudBabyCuddleInterval"; + this.nudBabyCuddleInterval.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudBabyCuddleInterval.Size = new System.Drawing.Size(72, 20); + this.nudBabyCuddleInterval.TabIndex = 4; + this.nudBabyCuddleInterval.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudBabyMatureSpeed + // + this.nudBabyMatureSpeed.DecimalPlaces = 6; + this.nudBabyMatureSpeed.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudBabyMatureSpeed.Location = new System.Drawing.Point(183, 97); + this.nudBabyMatureSpeed.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudBabyMatureSpeed.Name = "nudBabyMatureSpeed"; + this.nudBabyMatureSpeed.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudBabyMatureSpeed.Size = new System.Drawing.Size(72, 20); + this.nudBabyMatureSpeed.TabIndex = 3; + this.nudBabyMatureSpeed.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudBabyImprintingStatScale + // + this.nudBabyImprintingStatScale.DecimalPlaces = 6; + this.nudBabyImprintingStatScale.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudBabyImprintingStatScale.Location = new System.Drawing.Point(183, 175); + this.nudBabyImprintingStatScale.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudBabyImprintingStatScale.Name = "nudBabyImprintingStatScale"; + this.nudBabyImprintingStatScale.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudBabyImprintingStatScale.Size = new System.Drawing.Size(72, 20); + this.nudBabyImprintingStatScale.TabIndex = 6; + this.nudBabyImprintingStatScale.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudEggHatchSpeed + // + this.nudEggHatchSpeed.DecimalPlaces = 6; + this.nudEggHatchSpeed.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudEggHatchSpeed.Location = new System.Drawing.Point(183, 71); + this.nudEggHatchSpeed.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudEggHatchSpeed.Name = "nudEggHatchSpeed"; + this.nudEggHatchSpeed.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudEggHatchSpeed.Size = new System.Drawing.Size(72, 20); + this.nudEggHatchSpeed.TabIndex = 2; + this.nudEggHatchSpeed.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudMaxServerLevel + // + this.nudMaxServerLevel.ForeColor = System.Drawing.SystemColors.GrayText; + this.nudMaxServerLevel.Location = new System.Drawing.Point(183, 97); + this.nudMaxServerLevel.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nudMaxServerLevel.Name = "nudMaxServerLevel"; + this.nudMaxServerLevel.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudMaxServerLevel.Size = new System.Drawing.Size(57, 20); + this.nudMaxServerLevel.TabIndex = 3; + // + // nudMaxGraphLevel + // + this.nudMaxGraphLevel.ForeColor = System.Drawing.SystemColors.GrayText; + this.nudMaxGraphLevel.Location = new System.Drawing.Point(183, 71); + this.nudMaxGraphLevel.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nudMaxGraphLevel.Name = "nudMaxGraphLevel"; + this.nudMaxGraphLevel.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudMaxGraphLevel.Size = new System.Drawing.Size(57, 20); + this.nudMaxGraphLevel.TabIndex = 2; + // + // nudMaxWildLevels + // + this.nudMaxWildLevels.ForeColor = System.Drawing.SystemColors.GrayText; + this.nudMaxWildLevels.Location = new System.Drawing.Point(183, 19); + this.nudMaxWildLevels.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nudMaxWildLevels.Name = "nudMaxWildLevels"; + this.nudMaxWildLevels.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudMaxWildLevels.Size = new System.Drawing.Size(57, 20); + this.nudMaxWildLevels.TabIndex = 0; + // + // nudMaxDomLevels + // + this.nudMaxDomLevels.ForeColor = System.Drawing.SystemColors.GrayText; + this.nudMaxDomLevels.Location = new System.Drawing.Point(183, 45); + this.nudMaxDomLevels.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nudMaxDomLevels.Name = "nudMaxDomLevels"; + this.nudMaxDomLevels.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudMaxDomLevels.Size = new System.Drawing.Size(57, 20); + this.nudMaxDomLevels.TabIndex = 1; + // + // NudWildDinoCharacterFoodDrainMultiplier + // + this.NudWildDinoCharacterFoodDrainMultiplier.DecimalPlaces = 6; + this.NudWildDinoCharacterFoodDrainMultiplier.ForeColor = System.Drawing.SystemColors.WindowText; + this.NudWildDinoCharacterFoodDrainMultiplier.Location = new System.Drawing.Point(183, 71); + this.NudWildDinoCharacterFoodDrainMultiplier.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.NudWildDinoCharacterFoodDrainMultiplier.Name = "NudWildDinoCharacterFoodDrainMultiplier"; + this.NudWildDinoCharacterFoodDrainMultiplier.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.NudWildDinoCharacterFoodDrainMultiplier.Size = new System.Drawing.Size(72, 20); + this.NudWildDinoCharacterFoodDrainMultiplier.TabIndex = 4; + this.NudWildDinoCharacterFoodDrainMultiplier.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // NudWildDinoTorporDrainMultiplier + // + this.NudWildDinoTorporDrainMultiplier.DecimalPlaces = 6; + this.NudWildDinoTorporDrainMultiplier.ForeColor = System.Drawing.SystemColors.WindowText; + this.NudWildDinoTorporDrainMultiplier.Location = new System.Drawing.Point(183, 97); + this.NudWildDinoTorporDrainMultiplier.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.NudWildDinoTorporDrainMultiplier.Name = "NudWildDinoTorporDrainMultiplier"; + this.NudWildDinoTorporDrainMultiplier.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.NudWildDinoTorporDrainMultiplier.Size = new System.Drawing.Size(72, 20); + this.NudWildDinoTorporDrainMultiplier.TabIndex = 5; + this.NudWildDinoTorporDrainMultiplier.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudDinoCharacterFoodDrainEvent + // + this.nudDinoCharacterFoodDrainEvent.DecimalPlaces = 6; + this.nudDinoCharacterFoodDrainEvent.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudDinoCharacterFoodDrainEvent.Location = new System.Drawing.Point(263, 45); + this.nudDinoCharacterFoodDrainEvent.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudDinoCharacterFoodDrainEvent.Name = "nudDinoCharacterFoodDrainEvent"; + this.nudDinoCharacterFoodDrainEvent.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudDinoCharacterFoodDrainEvent.Size = new System.Drawing.Size(72, 20); + this.nudDinoCharacterFoodDrainEvent.TabIndex = 3; + this.nudDinoCharacterFoodDrainEvent.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudTamingSpeedEvent + // + this.nudTamingSpeedEvent.DecimalPlaces = 6; + this.nudTamingSpeedEvent.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudTamingSpeedEvent.Location = new System.Drawing.Point(263, 19); + this.nudTamingSpeedEvent.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudTamingSpeedEvent.Name = "nudTamingSpeedEvent"; + this.nudTamingSpeedEvent.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudTamingSpeedEvent.Size = new System.Drawing.Size(72, 20); + this.nudTamingSpeedEvent.TabIndex = 1; + this.nudTamingSpeedEvent.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudDinoCharacterFoodDrain + // + this.nudDinoCharacterFoodDrain.DecimalPlaces = 6; + this.nudDinoCharacterFoodDrain.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudDinoCharacterFoodDrain.Location = new System.Drawing.Point(183, 45); + this.nudDinoCharacterFoodDrain.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudDinoCharacterFoodDrain.Name = "nudDinoCharacterFoodDrain"; + this.nudDinoCharacterFoodDrain.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudDinoCharacterFoodDrain.Size = new System.Drawing.Size(72, 20); + this.nudDinoCharacterFoodDrain.TabIndex = 2; + this.nudDinoCharacterFoodDrain.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // nudTamingSpeed + // + this.nudTamingSpeed.DecimalPlaces = 6; + this.nudTamingSpeed.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudTamingSpeed.Location = new System.Drawing.Point(183, 19); + this.nudTamingSpeed.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudTamingSpeed.Name = "nudTamingSpeed"; + this.nudTamingSpeed.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudTamingSpeed.Size = new System.Drawing.Size(72, 20); + this.nudTamingSpeed.TabIndex = 0; + this.nudTamingSpeed.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // NudSpeciesSelectorCountLastUsed + // + this.NudSpeciesSelectorCountLastUsed.ForeColor = System.Drawing.SystemColors.GrayText; + this.NudSpeciesSelectorCountLastUsed.Location = new System.Drawing.Point(350, 19); + this.NudSpeciesSelectorCountLastUsed.Name = "NudSpeciesSelectorCountLastUsed"; + this.NudSpeciesSelectorCountLastUsed.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.NudSpeciesSelectorCountLastUsed.Size = new System.Drawing.Size(57, 20); + this.NudSpeciesSelectorCountLastUsed.TabIndex = 1; + // + // nudDefaultFontSize + // + this.nudDefaultFontSize.DecimalPlaces = 2; + this.nudDefaultFontSize.ForeColor = System.Drawing.SystemColors.GrayText; + this.nudDefaultFontSize.Location = new System.Drawing.Point(335, 18); + this.nudDefaultFontSize.Name = "nudDefaultFontSize"; + this.nudDefaultFontSize.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudDefaultFontSize.Size = new System.Drawing.Size(72, 20); + this.nudDefaultFontSize.TabIndex = 3; + // + // numericUpDownMaxBreedingSug + // + this.numericUpDownMaxBreedingSug.ForeColor = System.Drawing.SystemColors.GrayText; + this.numericUpDownMaxBreedingSug.Location = new System.Drawing.Point(252, 19); + this.numericUpDownMaxBreedingSug.Maximum = new decimal(new int[] { + 200, + 0, + 0, + 0}); + this.numericUpDownMaxBreedingSug.Name = "numericUpDownMaxBreedingSug"; + this.numericUpDownMaxBreedingSug.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownMaxBreedingSug.Size = new System.Drawing.Size(57, 20); + this.numericUpDownMaxBreedingSug.TabIndex = 1; + // + // NudWaitBeforeAutoLoad + // + this.NudWaitBeforeAutoLoad.ForeColor = System.Drawing.SystemColors.GrayText; + this.NudWaitBeforeAutoLoad.Location = new System.Drawing.Point(255, 41); + this.NudWaitBeforeAutoLoad.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.NudWaitBeforeAutoLoad.Name = "NudWaitBeforeAutoLoad"; + this.NudWaitBeforeAutoLoad.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.NudWaitBeforeAutoLoad.Size = new System.Drawing.Size(56, 20); + this.NudWaitBeforeAutoLoad.TabIndex = 12; + // + // NudKeepBackupFilesCount + // + this.NudKeepBackupFilesCount.ForeColor = System.Drawing.SystemColors.GrayText; + this.NudKeepBackupFilesCount.Location = new System.Drawing.Point(44, 118); + this.NudKeepBackupFilesCount.Name = "NudKeepBackupFilesCount"; + this.NudKeepBackupFilesCount.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.NudKeepBackupFilesCount.Size = new System.Drawing.Size(59, 20); + this.NudKeepBackupFilesCount.TabIndex = 4; + // + // NudBackupEveryMinutes + // + this.NudBackupEveryMinutes.ForeColor = System.Drawing.SystemColors.GrayText; + this.NudBackupEveryMinutes.Location = new System.Drawing.Point(132, 144); + this.NudBackupEveryMinutes.Name = "NudBackupEveryMinutes"; + this.NudBackupEveryMinutes.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.NudBackupEveryMinutes.Size = new System.Drawing.Size(47, 20); + this.NudBackupEveryMinutes.TabIndex = 7; + // + // nudInfoGraphicHeight + // + this.nudInfoGraphicHeight.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudInfoGraphicHeight.Location = new System.Drawing.Point(126, 18); + this.nudInfoGraphicHeight.Maximum = new decimal(new int[] { + 99999, + 0, + 0, + 0}); + this.nudInfoGraphicHeight.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nudInfoGraphicHeight.Name = "nudInfoGraphicHeight"; + this.nudInfoGraphicHeight.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudInfoGraphicHeight.Size = new System.Drawing.Size(57, 20); + this.nudInfoGraphicHeight.TabIndex = 2; + this.nudInfoGraphicHeight.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.nudInfoGraphicHeight.ValueChanged += new System.EventHandler(this.nudInfoGraphicHeight_ValueChanged); + // + // fileSelectorExtractedSaveFolder + // + this.fileSelectorExtractedSaveFolder.Dock = System.Windows.Forms.DockStyle.Fill; + this.fileSelectorExtractedSaveFolder.Link = "filename"; + this.fileSelectorExtractedSaveFolder.Location = new System.Drawing.Point(3, 16); + this.fileSelectorExtractedSaveFolder.Name = "fileSelectorExtractedSaveFolder"; + this.fileSelectorExtractedSaveFolder.Size = new System.Drawing.Size(724, 28); + this.fileSelectorExtractedSaveFolder.TabIndex = 0; + // + // convenientNameDataGridViewTextBoxColumn + // + this.convenientNameDataGridViewTextBoxColumn.DataPropertyName = "ConvenientName"; + this.convenientNameDataGridViewTextBoxColumn.HeaderText = "Name"; + this.convenientNameDataGridViewTextBoxColumn.Name = "convenientNameDataGridViewTextBoxColumn"; + this.convenientNameDataGridViewTextBoxColumn.ReadOnly = true; + // + // serverNameDataGridViewTextBoxColumn + // + this.serverNameDataGridViewTextBoxColumn.DataPropertyName = "ServerName"; + this.serverNameDataGridViewTextBoxColumn.HeaderText = "Server name"; + this.serverNameDataGridViewTextBoxColumn.Name = "serverNameDataGridViewTextBoxColumn"; + this.serverNameDataGridViewTextBoxColumn.ReadOnly = true; + // + // fileLocationDataGridViewTextBoxColumn + // + this.fileLocationDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.fileLocationDataGridViewTextBoxColumn.DataPropertyName = "FileLocation"; + this.fileLocationDataGridViewTextBoxColumn.HeaderText = "File location"; + this.fileLocationDataGridViewTextBoxColumn.Name = "fileLocationDataGridViewTextBoxColumn"; + this.fileLocationDataGridViewTextBoxColumn.ReadOnly = true; + // + // aTImportFileLocationBindingSource + // + this.aTImportFileLocationBindingSource.AllowNew = false; + this.aTImportFileLocationBindingSource.DataSource = typeof(ARKBreedingStats.settings.ATImportFileLocation); + // + // nudImportLowerBoundTE + // + this.nudImportLowerBoundTE.DecimalPlaces = 2; + this.nudImportLowerBoundTE.ForeColor = System.Drawing.SystemColors.GrayText; + this.nudImportLowerBoundTE.Location = new System.Drawing.Point(227, 19); + this.nudImportLowerBoundTE.Name = "nudImportLowerBoundTE"; + this.nudImportLowerBoundTE.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudImportLowerBoundTE.Size = new System.Drawing.Size(64, 20); + this.nudImportLowerBoundTE.TabIndex = 1; + // // convenientNameDataGridViewTextBoxColumn1 // this.convenientNameDataGridViewTextBoxColumn1.DataPropertyName = "ConvenientName"; @@ -3832,147 +4256,11 @@ private void InitializeComponent() this.folderPathDataGridViewTextBoxColumn.Name = "folderPathDataGridViewTextBoxColumn"; this.folderPathDataGridViewTextBoxColumn.ReadOnly = true; // - // dgvExportFolderChange - // - this.dgvExportFolderChange.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; - this.dgvExportFolderChange.HeaderText = "Change"; - this.dgvExportFolderChange.MinimumWidth = 50; - this.dgvExportFolderChange.Name = "dgvExportFolderChange"; - this.dgvExportFolderChange.ReadOnly = true; - this.dgvExportFolderChange.Text = "Change"; - this.dgvExportFolderChange.UseColumnTextForButtonValue = true; - this.dgvExportFolderChange.Width = 50; - // - // dgvExportFolderDelete - // - this.dgvExportFolderDelete.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; - this.dgvExportFolderDelete.HeaderText = "Delete"; - this.dgvExportFolderDelete.MinimumWidth = 50; - this.dgvExportFolderDelete.Name = "dgvExportFolderDelete"; - this.dgvExportFolderDelete.ReadOnly = true; - this.dgvExportFolderDelete.Text = "Delete"; - this.dgvExportFolderDelete.UseColumnTextForButtonValue = true; - this.dgvExportFolderDelete.Width = 50; - // - // dgvExportMakeDefault - // - this.dgvExportMakeDefault.HeaderText = "Default"; - this.dgvExportMakeDefault.Name = "dgvExportMakeDefault"; - this.dgvExportMakeDefault.ReadOnly = true; - this.dgvExportMakeDefault.Text = "Make default"; - this.dgvExportMakeDefault.UseColumnTextForButtonValue = true; - // // aTExportFolderLocationsBindingSource // this.aTExportFolderLocationsBindingSource.AllowNew = false; this.aTExportFolderLocationsBindingSource.DataSource = typeof(ARKBreedingStats.settings.ATImportExportedFolderLocation); // - // btAddExportFolder - // - this.btAddExportFolder.Dock = System.Windows.Forms.DockStyle.Top; - this.btAddExportFolder.Location = new System.Drawing.Point(3, 16); - this.btAddExportFolder.Name = "btAddExportFolder"; - this.btAddExportFolder.Size = new System.Drawing.Size(730, 23); - this.btAddExportFolder.TabIndex = 0; - this.btAddExportFolder.Text = "Add Export Folder…"; - this.btAddExportFolder.UseVisualStyleBackColor = true; - this.btAddExportFolder.Click += new System.EventHandler(this.btAddExportFolder_Click); - // - // label25 - // - this.label25.AutoSize = true; - this.label25.Location = new System.Drawing.Point(3, 3); - this.label25.Name = "label25"; - this.label25.Size = new System.Drawing.Size(669, 91); - this.label25.TabIndex = 0; - this.label25.Text = resources.GetString("label25.Text"); - // - // tabPageTimers - // - this.tabPageTimers.Controls.Add(this.groupBox24); - this.tabPageTimers.Controls.Add(this.groupBox8); - this.tabPageTimers.Location = new System.Drawing.Point(4, 22); - this.tabPageTimers.Name = "tabPageTimers"; - this.tabPageTimers.Padding = new System.Windows.Forms.Padding(3); - this.tabPageTimers.Size = new System.Drawing.Size(750, 744); - this.tabPageTimers.TabIndex = 6; - this.tabPageTimers.Text = "Timers"; - this.tabPageTimers.UseVisualStyleBackColor = true; - // - // groupBox24 - // - this.groupBox24.Controls.Add(this.cbKeepExpiredTimersInOverlay); - this.groupBox24.Controls.Add(this.cbDeleteExpiredTimersOnSaving); - this.groupBox24.Controls.Add(this.cbTimersInOverlayAutomatically); - this.groupBox24.Location = new System.Drawing.Point(8, 233); - this.groupBox24.Name = "groupBox24"; - this.groupBox24.Size = new System.Drawing.Size(413, 90); - this.groupBox24.TabIndex = 1; - this.groupBox24.TabStop = false; - this.groupBox24.Text = "Timers"; - // - // cbKeepExpiredTimersInOverlay - // - this.cbKeepExpiredTimersInOverlay.AutoSize = true; - this.cbKeepExpiredTimersInOverlay.Location = new System.Drawing.Point(6, 42); - this.cbKeepExpiredTimersInOverlay.Name = "cbKeepExpiredTimersInOverlay"; - this.cbKeepExpiredTimersInOverlay.Size = new System.Drawing.Size(166, 17); - this.cbKeepExpiredTimersInOverlay.TabIndex = 1; - this.cbKeepExpiredTimersInOverlay.Text = "Keep expired timers in overlay"; - this.cbKeepExpiredTimersInOverlay.UseVisualStyleBackColor = true; - // - // cbDeleteExpiredTimersOnSaving - // - this.cbDeleteExpiredTimersOnSaving.AutoSize = true; - this.cbDeleteExpiredTimersOnSaving.Location = new System.Drawing.Point(6, 65); - this.cbDeleteExpiredTimersOnSaving.Name = "cbDeleteExpiredTimersOnSaving"; - this.cbDeleteExpiredTimersOnSaving.Size = new System.Drawing.Size(217, 17); - this.cbDeleteExpiredTimersOnSaving.TabIndex = 2; - this.cbDeleteExpiredTimersOnSaving.Text = "Delete expired timers when saving library"; - this.cbDeleteExpiredTimersOnSaving.UseVisualStyleBackColor = true; - // - // cbTimersInOverlayAutomatically - // - this.cbTimersInOverlayAutomatically.AutoSize = true; - this.cbTimersInOverlayAutomatically.Location = new System.Drawing.Point(6, 19); - this.cbTimersInOverlayAutomatically.Name = "cbTimersInOverlayAutomatically"; - this.cbTimersInOverlayAutomatically.Size = new System.Drawing.Size(202, 17); - this.cbTimersInOverlayAutomatically.TabIndex = 0; - this.cbTimersInOverlayAutomatically.Text = "Display timers in overlay automatically"; - this.cbTimersInOverlayAutomatically.UseVisualStyleBackColor = true; - // - // groupBox8 - // - this.groupBox8.Controls.Add(this.label22); - this.groupBox8.Controls.Add(this.tbPlayAlarmsSeconds); - this.groupBox8.Controls.Add(this.customSCCustom); - this.groupBox8.Controls.Add(this.customSCWakeup); - this.groupBox8.Controls.Add(this.customSCBirth); - this.groupBox8.Controls.Add(this.customSCStarving); - this.groupBox8.Controls.Add(this.label20); - this.groupBox8.Location = new System.Drawing.Point(8, 6); - this.groupBox8.Name = "groupBox8"; - this.groupBox8.Size = new System.Drawing.Size(413, 221); - this.groupBox8.TabIndex = 0; - this.groupBox8.TabStop = false; - this.groupBox8.Text = "Timer Sounds"; - // - // label22 - // - this.label22.Location = new System.Drawing.Point(6, 171); - this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(255, 66); - this.label22.TabIndex = 5; - this.label22.Text = "List of seconds the alarms play before they reach 0.\r\nE.g. \"60,0\" to play the ala" + - "rm at 60 s and at 0 s. Use commas to separate the values."; - // - // tbPlayAlarmsSeconds - // - this.tbPlayAlarmsSeconds.Location = new System.Drawing.Point(267, 168); - this.tbPlayAlarmsSeconds.Name = "tbPlayAlarmsSeconds"; - this.tbPlayAlarmsSeconds.Size = new System.Drawing.Size(140, 20); - this.tbPlayAlarmsSeconds.TabIndex = 6; - // // customSCCustom // this.customSCCustom.Location = new System.Drawing.Point(6, 139); @@ -4005,78 +4293,6 @@ private void InitializeComponent() this.customSCStarving.SoundFile = null; this.customSCStarving.TabIndex = 1; // - // label20 - // - this.label20.Location = new System.Drawing.Point(6, 16); - this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(316, 33); - this.label20.TabIndex = 0; - this.label20.Text = "Only PCM-WAV-files are supported. The sound will play 1 min before the timer runs" + - " out."; - // - // tabPageOverlay - // - this.tabPageOverlay.Controls.Add(this.groupBox10); - this.tabPageOverlay.Location = new System.Drawing.Point(4, 22); - this.tabPageOverlay.Name = "tabPageOverlay"; - this.tabPageOverlay.Padding = new System.Windows.Forms.Padding(3); - this.tabPageOverlay.Size = new System.Drawing.Size(750, 744); - this.tabPageOverlay.TabIndex = 5; - this.tabPageOverlay.Text = "Overlay"; - this.tabPageOverlay.UseVisualStyleBackColor = true; - // - // groupBox10 - // - this.groupBox10.Controls.Add(this.label70); - this.groupBox10.Controls.Add(this.label15); - this.groupBox10.Controls.Add(this.nudOverlayInfoHeight); - this.groupBox10.Controls.Add(this.nudOverlayInfoWidth); - this.groupBox10.Controls.Add(this.NudOverlayRelativeFontSize); - this.groupBox10.Controls.Add(this.label65); - this.groupBox10.Controls.Add(this.CbOverlayDisplayInheritance); - this.groupBox10.Controls.Add(this.label45); - this.groupBox10.Controls.Add(this.pCustomOverlayLocation); - this.groupBox10.Controls.Add(this.cbCustomOverlayLocation); - this.groupBox10.Controls.Add(this.label38); - this.groupBox10.Controls.Add(this.nudOverlayInfoPosY); - this.groupBox10.Controls.Add(this.label39); - this.groupBox10.Controls.Add(this.nudOverlayInfoPosDFR); - this.groupBox10.Controls.Add(this.label40); - this.groupBox10.Controls.Add(this.label37); - this.groupBox10.Controls.Add(this.nudOverlayTimerPosY); - this.groupBox10.Controls.Add(this.label36); - this.groupBox10.Controls.Add(this.nudOverlayTimerPosX); - this.groupBox10.Controls.Add(this.label35); - this.groupBox10.Controls.Add(this.cbInventoryCheck); - this.groupBox10.Controls.Add(this.label21); - this.groupBox10.Controls.Add(this.nudOverlayInfoDuration); - this.groupBox10.Controls.Add(this.chkbSpeechRecognition); - this.groupBox10.Controls.Add(this.label66); - this.groupBox10.Location = new System.Drawing.Point(8, 6); - this.groupBox10.Name = "groupBox10"; - this.groupBox10.Size = new System.Drawing.Size(734, 307); - this.groupBox10.TabIndex = 0; - this.groupBox10.TabStop = false; - this.groupBox10.Text = "Overlay"; - // - // label70 - // - this.label70.AutoSize = true; - this.label70.Location = new System.Drawing.Point(509, 187); - this.label70.Name = "label70"; - this.label70.Size = new System.Drawing.Size(36, 13); - this.label70.TabIndex = 23; - this.label70.Text = "height"; - // - // label15 - // - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(398, 187); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(32, 13); - this.label15.TabIndex = 22; - this.label15.Text = "width"; - // // nudOverlayInfoHeight // this.nudOverlayInfoHeight.ForeColor = System.Drawing.SystemColors.GrayText; @@ -4151,52 +4367,11 @@ private void InitializeComponent() 0}); this.NudOverlayRelativeFontSize.Size = new System.Drawing.Size(57, 20); this.NudOverlayRelativeFontSize.TabIndex = 4; - this.NudOverlayRelativeFontSize.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // label65 - // - this.label65.AutoSize = true; - this.label65.Location = new System.Drawing.Point(6, 252); - this.label65.Name = "label65"; - this.label65.Size = new System.Drawing.Size(141, 13); - this.label65.TabIndex = 18; - this.label65.Text = "Relative font size (default: 1)"; - // - // CbOverlayDisplayInheritance - // - this.CbOverlayDisplayInheritance.AutoSize = true; - this.CbOverlayDisplayInheritance.Location = new System.Drawing.Point(6, 284); - this.CbOverlayDisplayInheritance.Name = "CbOverlayDisplayInheritance"; - this.CbOverlayDisplayInheritance.Size = new System.Drawing.Size(203, 17); - this.CbOverlayDisplayInheritance.TabIndex = 17; - this.CbOverlayDisplayInheritance.Text = "Display creature inheritance on import"; - this.CbOverlayDisplayInheritance.UseVisualStyleBackColor = true; - // - // label45 - // - this.label45.AutoSize = true; - this.label45.Location = new System.Drawing.Point(38, 25); - this.label45.Name = "label45"; - this.label45.Size = new System.Drawing.Size(495, 13); - this.label45.TabIndex = 0; - this.label45.Text = "For the overlay to work, you need to set the window-mode \"Fullscreen-Windowed\" in" + - " the game settings."; - // - // pCustomOverlayLocation - // - this.pCustomOverlayLocation.Controls.Add(this.nudCustomOverlayLocX); - this.pCustomOverlayLocation.Controls.Add(this.label42); - this.pCustomOverlayLocation.Controls.Add(this.label43); - this.pCustomOverlayLocation.Controls.Add(this.nudCustomOverlayLocY); - this.pCustomOverlayLocation.Enabled = false; - this.pCustomOverlayLocation.Location = new System.Drawing.Point(195, 217); - this.pCustomOverlayLocation.Name = "pCustomOverlayLocation"; - this.pCustomOverlayLocation.Size = new System.Drawing.Size(201, 28); - this.pCustomOverlayLocation.TabIndex = 16; + this.NudOverlayRelativeFontSize.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); // // nudCustomOverlayLocX // @@ -4226,24 +4401,6 @@ private void InitializeComponent() this.nudCustomOverlayLocX.Size = new System.Drawing.Size(57, 20); this.nudCustomOverlayLocX.TabIndex = 1; // - // label42 - // - this.label42.AutoSize = true; - this.label42.Location = new System.Drawing.Point(105, 5); - this.label42.Name = "label42"; - this.label42.Size = new System.Drawing.Size(14, 13); - this.label42.TabIndex = 2; - this.label42.Text = "Y"; - // - // label43 - // - this.label43.AutoSize = true; - this.label43.Location = new System.Drawing.Point(4, 5); - this.label43.Name = "label43"; - this.label43.Size = new System.Drawing.Size(14, 13); - this.label43.TabIndex = 0; - this.label43.Text = "X"; - // // nudCustomOverlayLocY // this.nudCustomOverlayLocY.ForeColor = System.Drawing.SystemColors.GrayText; @@ -4273,26 +4430,6 @@ private void InitializeComponent() this.nudCustomOverlayLocY.TabIndex = 3; this.nudCustomOverlayLocY.ThousandsSeparator = true; // - // cbCustomOverlayLocation - // - this.cbCustomOverlayLocation.AutoSize = true; - this.cbCustomOverlayLocation.Location = new System.Drawing.Point(6, 221); - this.cbCustomOverlayLocation.Name = "cbCustomOverlayLocation"; - this.cbCustomOverlayLocation.Size = new System.Drawing.Size(138, 17); - this.cbCustomOverlayLocation.TabIndex = 15; - this.cbCustomOverlayLocation.Text = "Custom overlay location"; - this.cbCustomOverlayLocation.UseVisualStyleBackColor = true; - this.cbCustomOverlayLocation.CheckedChanged += new System.EventHandler(this.cbCustomOverlayLocation_CheckedChanged); - // - // label38 - // - this.label38.AutoSize = true; - this.label38.Location = new System.Drawing.Point(120, 187); - this.label38.Name = "label38"; - this.label38.Size = new System.Drawing.Size(93, 13); - this.label38.TabIndex = 11; - this.label38.Text = "distance from right"; - // // nudOverlayInfoPosY // this.nudOverlayInfoPosY.ForeColor = System.Drawing.SystemColors.GrayText; @@ -4316,15 +4453,6 @@ private void InitializeComponent() this.nudOverlayInfoPosY.Size = new System.Drawing.Size(57, 20); this.nudOverlayInfoPosY.TabIndex = 14; // - // label39 - // - this.label39.AutoSize = true; - this.label39.Location = new System.Drawing.Point(300, 187); - this.label39.Name = "label39"; - this.label39.Size = new System.Drawing.Size(14, 13); - this.label39.TabIndex = 13; - this.label39.Text = "Y"; - // // nudOverlayInfoPosDFR // this.nudOverlayInfoPosDFR.ForeColor = System.Drawing.SystemColors.GrayText; @@ -4348,24 +4476,6 @@ private void InitializeComponent() this.nudOverlayInfoPosDFR.Size = new System.Drawing.Size(57, 20); this.nudOverlayInfoPosDFR.TabIndex = 12; // - // label40 - // - this.label40.AutoSize = true; - this.label40.Location = new System.Drawing.Point(6, 187); - this.label40.Name = "label40"; - this.label40.Size = new System.Drawing.Size(94, 13); - this.label40.TabIndex = 10; - this.label40.Text = "Position of the info"; - // - // label37 - // - this.label37.AutoSize = true; - this.label37.Location = new System.Drawing.Point(300, 161); - this.label37.Name = "label37"; - this.label37.Size = new System.Drawing.Size(14, 13); - this.label37.TabIndex = 8; - this.label37.Text = "Y"; - // // nudOverlayTimerPosY // this.nudOverlayTimerPosY.ForeColor = System.Drawing.SystemColors.GrayText; @@ -4385,210 +4495,55 @@ private void InitializeComponent() 0, 0, 0, - 0}); - this.nudOverlayTimerPosY.Size = new System.Drawing.Size(57, 20); - this.nudOverlayTimerPosY.TabIndex = 9; - // - // label36 - // - this.label36.AutoSize = true; - this.label36.Location = new System.Drawing.Point(199, 161); - this.label36.Name = "label36"; - this.label36.Size = new System.Drawing.Size(14, 13); - this.label36.TabIndex = 6; - this.label36.Text = "X"; - // - // nudOverlayTimerPosX - // - this.nudOverlayTimerPosX.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudOverlayTimerPosX.Increment = new decimal(new int[] { - 10, - 0, - 0, - 0}); - this.nudOverlayTimerPosX.Location = new System.Drawing.Point(219, 159); - this.nudOverlayTimerPosX.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.nudOverlayTimerPosX.Name = "nudOverlayTimerPosX"; - this.nudOverlayTimerPosX.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudOverlayTimerPosX.Size = new System.Drawing.Size(57, 20); - this.nudOverlayTimerPosX.TabIndex = 7; - // - // label35 - // - this.label35.AutoSize = true; - this.label35.Location = new System.Drawing.Point(6, 161); - this.label35.Name = "label35"; - this.label35.Size = new System.Drawing.Size(104, 13); - this.label35.TabIndex = 5; - this.label35.Text = "Position of the timers"; - // - // cbInventoryCheck - // - this.cbInventoryCheck.Location = new System.Drawing.Point(6, 116); - this.cbInventoryCheck.Name = "cbInventoryCheck"; - this.cbInventoryCheck.Size = new System.Drawing.Size(305, 35); - this.cbInventoryCheck.TabIndex = 4; - this.cbInventoryCheck.Text = "Automatically extract inventory levels (needs working OCR and enabled overlay)"; - this.cbInventoryCheck.UseVisualStyleBackColor = true; - // - // label21 - // - this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(6, 84); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(138, 13); - this.label21.TabIndex = 2; - this.label21.Text = "Display info in overlay for [s]"; - // - // nudOverlayInfoDuration - // - this.nudOverlayInfoDuration.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudOverlayInfoDuration.Location = new System.Drawing.Point(150, 82); - this.nudOverlayInfoDuration.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.nudOverlayInfoDuration.Name = "nudOverlayInfoDuration"; - this.nudOverlayInfoDuration.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudOverlayInfoDuration.Size = new System.Drawing.Size(57, 20); - this.nudOverlayInfoDuration.TabIndex = 3; - this.nudOverlayInfoDuration.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - // - // chkbSpeechRecognition - // - this.chkbSpeechRecognition.AutoSize = true; - this.chkbSpeechRecognition.Location = new System.Drawing.Point(6, 59); - this.chkbSpeechRecognition.Name = "chkbSpeechRecognition"; - this.chkbSpeechRecognition.Size = new System.Drawing.Size(338, 17); - this.chkbSpeechRecognition.TabIndex = 1; - this.chkbSpeechRecognition.Text = "Speech Recognition (displays taming info, e.g. say \"Rex level 30\")"; - this.chkbSpeechRecognition.UseVisualStyleBackColor = true; - // - // label66 - // - this.label66.AutoSize = true; - this.label66.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label66.Location = new System.Drawing.Point(6, 16); - this.label66.Name = "label66"; - this.label66.Size = new System.Drawing.Size(37, 26); - this.label66.TabIndex = 19; - this.label66.Text = "💡"; - // - // tabPageOCR - // - this.tabPageOCR.AutoScroll = true; - this.tabPageOCR.Controls.Add(this.groupBox1); - this.tabPageOCR.Location = new System.Drawing.Point(4, 22); - this.tabPageOCR.Name = "tabPageOCR"; - this.tabPageOCR.Padding = new System.Windows.Forms.Padding(3); - this.tabPageOCR.Size = new System.Drawing.Size(750, 744); - this.tabPageOCR.TabIndex = 4; - this.tabPageOCR.Text = "OCR"; - this.tabPageOCR.UseVisualStyleBackColor = true; - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.BtGameNameAsa); - this.groupBox1.Controls.Add(this.label62); - this.groupBox1.Controls.Add(this.label61); - this.groupBox1.Controls.Add(this.label60); - this.groupBox1.Controls.Add(this.label59); - this.groupBox1.Controls.Add(this.label58); - this.groupBox1.Controls.Add(this.NudOCRClipboardCropHeight); - this.groupBox1.Controls.Add(this.NudOCRClipboardCropWidth); - this.groupBox1.Controls.Add(this.NudOCRClipboardCropTop); - this.groupBox1.Controls.Add(this.NudOCRClipboardCropLeft); - this.groupBox1.Controls.Add(this.CbOCRFromClipboard); - this.groupBox1.Controls.Add(this.BtGameNameAse); - this.groupBox1.Controls.Add(this.cbOCRIgnoreImprintValue); - this.groupBox1.Controls.Add(this.cbShowOCRButton); - this.groupBox1.Controls.Add(this.label23); - this.groupBox1.Controls.Add(this.nudWaitBeforeScreenCapture); - this.groupBox1.Controls.Add(this.label19); - this.groupBox1.Controls.Add(this.nudWhiteThreshold); - this.groupBox1.Controls.Add(this.tbOCRCaptureApp); - this.groupBox1.Controls.Add(this.label4); - this.groupBox1.Controls.Add(this.cbbOCRApp); - this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Location = new System.Drawing.Point(6, 6); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(734, 377); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "OCR"; - // - // BtGameNameAsa - // - this.BtGameNameAsa.Location = new System.Drawing.Point(6, 318); - this.BtGameNameAsa.Name = "BtGameNameAsa"; - this.BtGameNameAsa.Size = new System.Drawing.Size(171, 23); - this.BtGameNameAsa.TabIndex = 21; - this.BtGameNameAsa.Text = "ArkAscended (ASA default)"; - this.BtGameNameAsa.UseVisualStyleBackColor = true; - this.BtGameNameAsa.Click += new System.EventHandler(this.BtGameNameAsa_Click); - // - // label62 - // - this.label62.AutoSize = true; - this.label62.Location = new System.Drawing.Point(34, 211); - this.label62.Name = "label62"; - this.label62.Size = new System.Drawing.Size(616, 13); - this.label62.TabIndex = 20; - this.label62.Text = "Set an area of the clipboard screenshot to be used for the actual OCR. Set all fi" + - "elds to 0 to disable and use the whole screenshot."; - // - // label61 - // - this.label61.AutoSize = true; - this.label61.Location = new System.Drawing.Point(151, 229); - this.label61.Name = "label61"; - this.label61.Size = new System.Drawing.Size(26, 13); - this.label61.TabIndex = 19; - this.label61.Text = "Top"; - // - // label60 - // - this.label60.AutoSize = true; - this.label60.Location = new System.Drawing.Point(258, 229); - this.label60.Name = "label60"; - this.label60.Size = new System.Drawing.Size(35, 13); - this.label60.TabIndex = 18; - this.label60.Text = "Width"; + 0}); + this.nudOverlayTimerPosY.Size = new System.Drawing.Size(57, 20); + this.nudOverlayTimerPosY.TabIndex = 9; // - // label59 + // nudOverlayTimerPosX // - this.label59.AutoSize = true; - this.label59.Location = new System.Drawing.Point(374, 229); - this.label59.Name = "label59"; - this.label59.Size = new System.Drawing.Size(38, 13); - this.label59.TabIndex = 17; - this.label59.Text = "Height"; + this.nudOverlayTimerPosX.ForeColor = System.Drawing.SystemColors.GrayText; + this.nudOverlayTimerPosX.Increment = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.nudOverlayTimerPosX.Location = new System.Drawing.Point(219, 159); + this.nudOverlayTimerPosX.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nudOverlayTimerPosX.Name = "nudOverlayTimerPosX"; + this.nudOverlayTimerPosX.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudOverlayTimerPosX.Size = new System.Drawing.Size(57, 20); + this.nudOverlayTimerPosX.TabIndex = 7; // - // label58 + // nudOverlayInfoDuration // - this.label58.AutoSize = true; - this.label58.Location = new System.Drawing.Point(45, 229); - this.label58.Name = "label58"; - this.label58.Size = new System.Drawing.Size(25, 13); - this.label58.TabIndex = 16; - this.label58.Text = "Left"; + this.nudOverlayInfoDuration.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudOverlayInfoDuration.Location = new System.Drawing.Point(150, 82); + this.nudOverlayInfoDuration.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nudOverlayInfoDuration.Name = "nudOverlayInfoDuration"; + this.nudOverlayInfoDuration.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudOverlayInfoDuration.Size = new System.Drawing.Size(57, 20); + this.nudOverlayInfoDuration.TabIndex = 3; + this.nudOverlayInfoDuration.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); // // NudOCRClipboardCropHeight // @@ -4682,55 +4637,6 @@ private void InitializeComponent() this.NudOCRClipboardCropLeft.Size = new System.Drawing.Size(69, 20); this.NudOCRClipboardCropLeft.TabIndex = 12; // - // CbOCRFromClipboard - // - this.CbOCRFromClipboard.AutoSize = true; - this.CbOCRFromClipboard.Location = new System.Drawing.Point(6, 191); - this.CbOCRFromClipboard.Name = "CbOCRFromClipboard"; - this.CbOCRFromClipboard.Size = new System.Drawing.Size(506, 17); - this.CbOCRFromClipboard.TabIndex = 11; - this.CbOCRFromClipboard.Text = "Use image in clipboard for the OCR. You can press the Print-key to copy a screens" + - "hot to the cliphoard"; - this.CbOCRFromClipboard.UseVisualStyleBackColor = true; - // - // BtGameNameAse - // - this.BtGameNameAse.Location = new System.Drawing.Point(183, 318); - this.BtGameNameAse.Name = "BtGameNameAse"; - this.BtGameNameAse.Size = new System.Drawing.Size(170, 23); - this.BtGameNameAse.TabIndex = 8; - this.BtGameNameAse.Text = "ShooterGame (ASE default)"; - this.BtGameNameAse.UseVisualStyleBackColor = true; - this.BtGameNameAse.Click += new System.EventHandler(this.BtGameNameAse_Click); - // - // cbOCRIgnoreImprintValue - // - this.cbOCRIgnoreImprintValue.AutoSize = true; - this.cbOCRIgnoreImprintValue.Location = new System.Drawing.Point(6, 168); - this.cbOCRIgnoreImprintValue.Name = "cbOCRIgnoreImprintValue"; - this.cbOCRIgnoreImprintValue.Size = new System.Drawing.Size(287, 17); - this.cbOCRIgnoreImprintValue.TabIndex = 6; - this.cbOCRIgnoreImprintValue.Text = "Don\'t read imprinting value (can be overlapped by chat)"; - this.cbOCRIgnoreImprintValue.UseVisualStyleBackColor = true; - // - // cbShowOCRButton - // - this.cbShowOCRButton.AutoSize = true; - this.cbShowOCRButton.Location = new System.Drawing.Point(6, 96); - this.cbShowOCRButton.Name = "cbShowOCRButton"; - this.cbShowOCRButton.Size = new System.Drawing.Size(228, 17); - this.cbShowOCRButton.TabIndex = 1; - this.cbShowOCRButton.Text = "Show OCR-Button instead of Import-Button"; - this.cbShowOCRButton.UseVisualStyleBackColor = true; - // - // label23 - // - this.label23.Location = new System.Drawing.Point(6, 145); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(296, 20); - this.label23.TabIndex = 4; - this.label23.Text = "Wait before screencapture (time to tab into game) in ms"; - // // nudWaitBeforeScreenCapture // this.nudWaitBeforeScreenCapture.ForeColor = System.Drawing.SystemColors.GrayText; @@ -4749,14 +4655,6 @@ private void InitializeComponent() this.nudWaitBeforeScreenCapture.Size = new System.Drawing.Size(72, 20); this.nudWaitBeforeScreenCapture.TabIndex = 5; // - // label19 - // - this.label19.Location = new System.Drawing.Point(6, 119); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(296, 20); - this.label19.TabIndex = 2; - this.label19.Text = "White Threshold (increase if you increased gamma ingame)"; - // // nudWhiteThreshold // this.nudWhiteThreshold.ForeColor = System.Drawing.SystemColors.GrayText; @@ -4775,60 +4673,6 @@ private void InitializeComponent() this.nudWhiteThreshold.Size = new System.Drawing.Size(72, 20); this.nudWhiteThreshold.TabIndex = 3; // - // tbOCRCaptureApp - // - this.tbOCRCaptureApp.Location = new System.Drawing.Point(6, 292); - this.tbOCRCaptureApp.Name = "tbOCRCaptureApp"; - this.tbOCRCaptureApp.Size = new System.Drawing.Size(722, 20); - this.tbOCRCaptureApp.TabIndex = 9; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(6, 276); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(111, 13); - this.label4.TabIndex = 7; - this.label4.Text = "Process name of ARK"; - // - // cbbOCRApp - // - this.cbbOCRApp.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbbOCRApp.FormattingEnabled = true; - this.cbbOCRApp.Location = new System.Drawing.Point(6, 347); - this.cbbOCRApp.Name = "cbbOCRApp"; - this.cbbOCRApp.Size = new System.Drawing.Size(722, 21); - this.cbbOCRApp.TabIndex = 10; - this.cbbOCRApp.SelectedIndexChanged += new System.EventHandler(this.cbOCRApp_SelectedIndexChanged); - // - // label1 - // - this.label1.Location = new System.Drawing.Point(6, 16); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(722, 77); - this.label1.TabIndex = 0; - this.label1.Text = resources.GetString("label1.Text"); - // - // panel1 - // - this.panel1.Controls.Add(this.buttonCancel); - this.panel1.Controls.Add(this.buttonOK); - this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panel1.Location = new System.Drawing.Point(0, 770); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(758, 30); - this.panel1.TabIndex = 12; - // - // CbLibraryGenerateNameWarnTooLongName - // - this.CbLibraryGenerateNameWarnTooLongName.AutoSize = true; - this.CbLibraryGenerateNameWarnTooLongName.Location = new System.Drawing.Point(6, 225); - this.CbLibraryGenerateNameWarnTooLongName.Name = "CbLibraryGenerateNameWarnTooLongName"; - this.CbLibraryGenerateNameWarnTooLongName.Size = new System.Drawing.Size(309, 17); - this.CbLibraryGenerateNameWarnTooLongName.TabIndex = 10; - this.CbLibraryGenerateNameWarnTooLongName.Text = "When generating names in library warn about too long name"; - this.CbLibraryGenerateNameWarnTooLongName.UseVisualStyleBackColor = true; - // // Settings // this.AcceptButton = this.buttonOK; @@ -4849,50 +4693,14 @@ private void InitializeComponent() this.groupBoxMultiplier.PerformLayout(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudTamedDinoCharacterFoodDrain)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudTamedDinoCharacterFoodDrainEvent)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyImprintAmountEvent)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyImprintAmount)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudMatingSpeed)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyFoodConsumptionSpeedEvent)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudMatingIntervalEvent)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyCuddleIntervalEvent)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyMatureSpeedEvent)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudEggHatchSpeedEvent)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyFoodConsumptionSpeed)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudMatingInterval)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyCuddleInterval)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyMatureSpeed)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudBabyImprintingStatScale)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudEggHatchSpeed)).EndInit(); this.groupBox3.ResumeLayout(false); this.groupBox3.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudMaxServerLevel)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudMaxGraphLevel)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudMaxWildLevels)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudMaxDomLevels)).EndInit(); this.groupBox4.ResumeLayout(false); this.groupBox4.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbChartOddRange)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pbChartEvenRange)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudChartLevelOddMax)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudChartLevelOddMin)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudChartLevelEvenMax)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudChartLevelEvenMin)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxBreedingSug)).EndInit(); this.groupBox5.ResumeLayout(false); this.groupBox5.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.NudWildDinoCharacterFoodDrainMultiplier)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NudWildDinoTorporDrainMultiplier)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudDinoCharacterFoodDrainEvent)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudTamingSpeedEvent)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudDinoCharacterFoodDrain)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudTamingSpeed)).EndInit(); this.groupBox6.ResumeLayout(false); this.groupBox6.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.NudWaitBeforeAutoLoad)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NudKeepBackupFilesCount)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.NudBackupEveryMinutes)).EndInit(); this.groupBox7.ResumeLayout(false); this.groupBox7.PerformLayout(); this.tabControlSettings.ResumeLayout(false); @@ -4909,7 +4717,6 @@ private void InitializeComponent() this.groupBox18.ResumeLayout(false); this.groupBox11.ResumeLayout(false); this.groupBox11.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudWildLevelStep)).EndInit(); this.tabPageGeneral.ResumeLayout(false); this.tabPageGeneral.PerformLayout(); this.groupBox31.ResumeLayout(false); @@ -4919,13 +4726,11 @@ private void InitializeComponent() this.GbImgCacheLocalAppData.ResumeLayout(false); this.GbSpecies.ResumeLayout(false); this.GbSpecies.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.NudSpeciesSelectorCountLastUsed)).EndInit(); this.groupBox16.ResumeLayout(false); this.groupBox26.ResumeLayout(false); this.groupBox26.PerformLayout(); this.groupBox25.ResumeLayout(false); this.groupBox25.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudDefaultFontSize)).EndInit(); this.groupBox20.ResumeLayout(false); this.groupBox20.PerformLayout(); this.groupBox17.ResumeLayout(false); @@ -4937,7 +4742,6 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.PbInfoGraphicPreview)).EndInit(); this.groupBox32.ResumeLayout(false); this.groupBox32.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudInfoGraphicHeight)).EndInit(); this.groupBox28.ResumeLayout(false); this.groupBox28.PerformLayout(); this.PanelDomLevels.ResumeLayout(false); @@ -4948,14 +4752,12 @@ private void InitializeComponent() this.groupBox15.ResumeLayout(false); this.groupBox15.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_FileLocations)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.aTImportFileLocationBindingSource)).EndInit(); this.tabPageImportExported.ResumeLayout(false); this.tabPageImportExported.PerformLayout(); this.groupBox27.ResumeLayout(false); this.groupBox27.PerformLayout(); this.groupBox23.ResumeLayout(false); this.groupBox23.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudImportLowerBoundTE)).EndInit(); this.groupBox22.ResumeLayout(false); this.groupBox22.PerformLayout(); this.panel2.ResumeLayout(false); @@ -4967,7 +4769,6 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.nudWarnImportMoreThan)).EndInit(); this.groupBox13.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewExportFolders)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.aTExportFolderLocationsBindingSource)).EndInit(); this.tabPageTimers.ResumeLayout(false); this.groupBox24.ResumeLayout(false); this.groupBox24.PerformLayout(); @@ -4976,11 +4777,52 @@ private void InitializeComponent() this.tabPageOverlay.ResumeLayout(false); this.groupBox10.ResumeLayout(false); this.groupBox10.PerformLayout(); + this.pCustomOverlayLocation.ResumeLayout(false); + this.pCustomOverlayLocation.PerformLayout(); + this.tabPageOCR.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.nudWildLevelStep)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudTamedDinoCharacterFoodDrain)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudTamedDinoCharacterFoodDrainEvent)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyImprintAmountEvent)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyImprintAmount)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMatingSpeed)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyFoodConsumptionSpeedEvent)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMatingIntervalEvent)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyCuddleIntervalEvent)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyMatureSpeedEvent)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudEggHatchSpeedEvent)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyFoodConsumptionSpeed)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMatingInterval)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyCuddleInterval)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyMatureSpeed)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudBabyImprintingStatScale)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudEggHatchSpeed)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMaxServerLevel)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMaxGraphLevel)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMaxWildLevels)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMaxDomLevels)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudWildDinoCharacterFoodDrainMultiplier)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudWildDinoTorporDrainMultiplier)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudDinoCharacterFoodDrainEvent)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudTamingSpeedEvent)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudDinoCharacterFoodDrain)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudTamingSpeed)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudSpeciesSelectorCountLastUsed)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudDefaultFontSize)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxBreedingSug)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudWaitBeforeAutoLoad)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudKeepBackupFilesCount)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NudBackupEveryMinutes)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudInfoGraphicHeight)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aTImportFileLocationBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudImportLowerBoundTE)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aTExportFolderLocationsBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudOverlayInfoHeight)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudOverlayInfoWidth)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NudOverlayRelativeFontSize)).EndInit(); - this.pCustomOverlayLocation.ResumeLayout(false); - this.pCustomOverlayLocation.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudCustomOverlayLocX)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudCustomOverlayLocY)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudOverlayInfoPosY)).EndInit(); @@ -4988,16 +4830,12 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.nudOverlayTimerPosY)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudOverlayTimerPosX)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudOverlayInfoDuration)).EndInit(); - this.tabPageOCR.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.NudOCRClipboardCropHeight)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NudOCRClipboardCropWidth)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NudOCRClipboardCropTop)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.NudOCRClipboardCropLeft)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudWaitBeforeScreenCapture)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudWhiteThreshold)).EndInit(); - this.panel1.ResumeLayout(false); this.ResumeLayout(false); } @@ -5193,7 +5031,6 @@ private void InitializeComponent() private System.Windows.Forms.Label label48; private System.Windows.Forms.ComboBox CbbColorMode; private System.Windows.Forms.CheckBox CbApplyNamingPatternOnImportAlways; - private System.Windows.Forms.CheckBox CbHighlightLevelEvenOdd; private System.Windows.Forms.CheckBox CbHighlightLevel255; private System.Windows.Forms.TabPage tabPageOverlay; private uiControls.Nud nudBabyImprintAmountEvent; @@ -5250,14 +5087,6 @@ private void InitializeComponent() private System.Windows.Forms.DataGridViewCheckBoxColumn ImportWithQuickImport; private System.Windows.Forms.DataGridViewButtonColumn dgvFileLocation_Delete; private System.Windows.Forms.ComboBox CbbAppDefaultFontName; - private System.Windows.Forms.PictureBox pbChartEvenRange; - private uiControls.Nud nudChartLevelOddMax; - private uiControls.Nud nudChartLevelOddMin; - private uiControls.Nud nudChartLevelEvenMax; - private uiControls.Nud nudChartLevelEvenMin; - private System.Windows.Forms.PictureBox pbChartOddRange; - private System.Windows.Forms.Label label57; - private System.Windows.Forms.Label label56; private System.Windows.Forms.CheckBox CbAutoExtractAddToLibrary; private System.Windows.Forms.Label label62; private System.Windows.Forms.Label label61; diff --git a/ARKBreedingStats/settings/Settings.cs b/ARKBreedingStats/settings/Settings.cs index 69a2f1be..fdf41fbb 100644 --- a/ARKBreedingStats/settings/Settings.cs +++ b/ARKBreedingStats/settings/Settings.cs @@ -12,6 +12,7 @@ using System.Windows.Threading; using ARKBreedingStats.importExportGun; using ARKBreedingStats.library; +using ARKBreedingStats.StatsOptions; using ARKBreedingStats.uiControls; using ARKBreedingStats.utils; @@ -21,6 +22,7 @@ public partial class Settings : Form { private MultiplierSetting[] _multSetter; private readonly CreatureCollection _cc; + private readonly StatsOptionsSettings _statsLevelColors; private ToolTip _tt; private Dictionary _languages; public SettingsTabPages LastTabPageIndex; @@ -28,10 +30,12 @@ public partial class Settings : Form public bool ColorRegionDisplayChanged; private CancellationTokenSource _cancellationTokenSource; - public Settings(CreatureCollection cc, SettingsTabPages page) + public Settings(CreatureCollection cc, SettingsTabPages page, + StatsOptionsSettings statsLevelColors) { InitializeData(); _cc = cc; + _statsLevelColors = statsLevelColors; CreateListOfProcesses(); LoadSettings(cc); Localization(); @@ -50,11 +54,15 @@ private void CreateListOfProcesses() // Wine doesn't support the Process.ProcessName getter and OCR doesn't work there currently try { - cbbOCRApp.DataSource = System.Diagnostics.Process.GetProcesses().Select(p => new ProcessSelector - { ProcessName = p.ProcessName, MainWindowTitle = p.MainWindowTitle }) - .Distinct().Where(pn => - !string.IsNullOrEmpty(pn.MainWindowTitle) && pn.ProcessName != "System" && - pn.ProcessName != "idle").OrderBy(pn => pn.ProcessName).ToArray(); + cbbOCRApp.DataSource = System.Diagnostics.Process.GetProcesses() + .Select(p => new ProcessSelector { ProcessName = p.ProcessName, MainWindowTitle = p.MainWindowTitle }) + .Distinct() + .Where(pn => + !string.IsNullOrEmpty(pn.MainWindowTitle) + && pn.ProcessName != "System" + && pn.ProcessName != "idle") + .OrderBy(pn => pn.ProcessName) + .ToArray(); } catch (InvalidOperationException) { @@ -340,11 +348,6 @@ private void LoadSettings(CreatureCollection cc) cbInventoryCheck.Checked = Properties.Settings.Default.inventoryCheckTimer; cbAllowMoreThanHundredImprinting.Checked = cc.allowMoreThanHundredImprinting; CbHighlightLevel255.Checked = Properties.Settings.Default.Highlight255Level; - CbHighlightLevelEvenOdd.Checked = Properties.Settings.Default.HighlightEvenOdd; - nudChartLevelEvenMin.ValueSave = Properties.Settings.Default.ChartHueEvenMin; - nudChartLevelEvenMax.ValueSave = Properties.Settings.Default.ChartHueEvenMax; - nudChartLevelOddMin.ValueSave = Properties.Settings.Default.ChartHueOddMin; - nudChartLevelOddMax.ValueSave = Properties.Settings.Default.ChartHueOddMax; #region InfoGraphic @@ -616,11 +619,6 @@ private void SaveSettings() Properties.Settings.Default.inventoryCheckTimer = cbInventoryCheck.Checked; _cc.allowMoreThanHundredImprinting = cbAllowMoreThanHundredImprinting.Checked; Properties.Settings.Default.Highlight255Level = CbHighlightLevel255.Checked; - Properties.Settings.Default.HighlightEvenOdd = CbHighlightLevelEvenOdd.Checked; - Properties.Settings.Default.ChartHueEvenMin = (int)nudChartLevelEvenMin.Value; - Properties.Settings.Default.ChartHueEvenMax = (int)nudChartLevelEvenMax.Value; - Properties.Settings.Default.ChartHueOddMin = (int)nudChartLevelOddMin.Value; - Properties.Settings.Default.ChartHueOddMax = (int)nudChartLevelOddMax.Value; #region InfoGraphic @@ -1636,44 +1634,6 @@ private void HighlightMissingFilesInImportSaveFileView() } } - private void nudChartLevelEvenMin_ValueChanged(object sender, EventArgs e) - { - UpdateChartLevelColors(pbChartEvenRange, (int)nudChartLevelEvenMin.Value, (int)nudChartLevelEvenMax.Value); - } - - private void nudChartLevelEvenMax_ValueChanged(object sender, EventArgs e) - { - UpdateChartLevelColors(pbChartEvenRange, (int)nudChartLevelEvenMin.Value, (int)nudChartLevelEvenMax.Value); - } - - private void nudChartLevelOddMin_ValueChanged(object sender, EventArgs e) - { - UpdateChartLevelColors(pbChartOddRange, (int)nudChartLevelOddMin.Value, (int)nudChartLevelOddMax.Value); - } - - private void nudChartLevelOddMax_ValueChanged(object sender, EventArgs e) - { - UpdateChartLevelColors(pbChartOddRange, (int)nudChartLevelOddMin.Value, (int)nudChartLevelOddMax.Value); - } - - private void UpdateChartLevelColors(PictureBox pb, int minHue, int maxHue) - { - var img = new Bitmap(pb.Width, pb.Height); - using (var g = Graphics.FromImage(img)) - using (var brush = new SolidBrush(Color.Black)) - { - var hueRange = maxHue - minHue; - const int segments = 10; - var segmentWidth = img.Width / segments; - for (int i = 0; i < segments; i++) - { - brush.Color = Utils.ColorFromHue(minHue + hueRange * i / segments); - g.FillRectangle(brush, i * segmentWidth, 0, segmentWidth, img.Height); - } - } - pb.SetImageAndDisposeOld(img); - } - #region InfoGraphic Preview private Creature _infoGraphicPreviewCreature; @@ -1919,5 +1879,10 @@ private void BtnUpdateOfficialEventValues_Click(object sender, EventArgs e) MessageBoxes.ExceptionMessageBox(ex, "Server settings file couldn't be loaded."); } } + + private void BtOpenLevelColorOptions_Click(object sender, EventArgs e) + { + LevelGraphOptionsControl.ShowWindow(this, _statsLevelColors); + } } } diff --git a/ARKBreedingStats/settings/Settings.resx b/ARKBreedingStats/settings/Settings.resx index 9bd029ab..cdcfb9c6 100644 --- a/ARKBreedingStats/settings/Settings.resx +++ b/ARKBreedingStats/settings/Settings.resx @@ -120,6 +120,9 @@ 647, 17 + + False + The creature data can be directly imported from the save-game, if you have access to that. This is also possible via an ftp-adress. If you set the according files below, you can start the process automatically from the file-menu. diff --git a/ARKBreedingStats/uiControls/StatsOptionsWindow.cs b/ARKBreedingStats/uiControls/StatsOptionsWindow.cs deleted file mode 100644 index 34e191f6..00000000 --- a/ARKBreedingStats/uiControls/StatsOptionsWindow.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ARKBreedingStats.uiControls -{ - public partial class StatsOptionsWindow : Form - { - public StatsOptionsWindow() - { - InitializeComponent(); - } - } -} From 56e5cb8ddef6a94998d5764407a272b23af1bc1a Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 6 Jul 2024 20:11:53 +0200 Subject: [PATCH 34/36] fixed use of unknown top levels --- ARKBreedingStats/library/LevelStatusFlags.cs | 2 +- ARKBreedingStats/library/TopLevels.cs | 33 ++++++++++++++++---- ARKBreedingStats/uiControls/Hatching.cs | 2 +- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/ARKBreedingStats/library/LevelStatusFlags.cs b/ARKBreedingStats/library/LevelStatusFlags.cs index d86b7a1b..8015f746 100644 --- a/ARKBreedingStats/library/LevelStatusFlags.cs +++ b/ARKBreedingStats/library/LevelStatusFlags.cs @@ -28,7 +28,7 @@ public static void DetermineLevelStatus(Species species, TopLevels topLevels, out List topStatsText, out List newTopStatsText) { // if there are no creatures of the species yet, assume 0 levels to be the current best and worst - if (topLevels == null) topLevels = new TopLevels(); + if (topLevels == null) topLevels = new TopLevels(true); var highSpeciesLevels = topLevels.WildLevelsHighest; var lowSpeciesLevels = topLevels.WildLevelsLowest; var highSpeciesMutationLevels = topLevels.MutationLevelsHighest; diff --git a/ARKBreedingStats/library/TopLevels.cs b/ARKBreedingStats/library/TopLevels.cs index 13b3582f..c533355f 100644 --- a/ARKBreedingStats/library/TopLevels.cs +++ b/ARKBreedingStats/library/TopLevels.cs @@ -7,12 +7,17 @@ namespace ARKBreedingStats.library /// public class TopLevels { - private readonly int[][] _levels = { - Enumerable.Repeat(-1,Stats.StatsCount).ToArray(), - Enumerable.Repeat(int.MaxValue,Stats.StatsCount).ToArray(), - Enumerable.Repeat(-1,Stats.StatsCount).ToArray(), - Enumerable.Repeat(int.MaxValue,Stats.StatsCount).ToArray() - }; + private readonly int[][] _levels; + + public TopLevels() + { + _levels = GetUninitialized(); + } + + public TopLevels(bool allZeros) + { + _levels = allZeros ? GetZeros() : GetUninitialized(); + } public int[] WildLevelsHighest { @@ -34,5 +39,21 @@ public int[] MutationLevelsLowest get => _levels[3]; set => _levels[3] = value; } + + private int[][] GetZeros() => new[] + { + Enumerable.Repeat(0,Stats.StatsCount).ToArray(), + Enumerable.Repeat(0,Stats.StatsCount).ToArray(), + Enumerable.Repeat(0,Stats.StatsCount).ToArray(), + Enumerable.Repeat(0,Stats.StatsCount).ToArray() + }; + + private int[][] GetUninitialized() => new[] + { + Enumerable.Repeat(-1,Stats.StatsCount).ToArray(), + Enumerable.Repeat(int.MaxValue,Stats.StatsCount).ToArray(), + Enumerable.Repeat(-1,Stats.StatsCount).ToArray(), + Enumerable.Repeat(int.MaxValue,Stats.StatsCount).ToArray() + }; } } diff --git a/ARKBreedingStats/uiControls/Hatching.cs b/ARKBreedingStats/uiControls/Hatching.cs index 3a96df31..6f41ed23 100644 --- a/ARKBreedingStats/uiControls/Hatching.cs +++ b/ARKBreedingStats/uiControls/Hatching.cs @@ -27,7 +27,7 @@ public void SetSpecies(Species species, TopLevels topLevels) return; } - if (topLevels == null) topLevels = new TopLevels(); + if (topLevels == null) topLevels = new TopLevels(true); var highLevels = topLevels.WildLevelsHighest; var lowLevels = topLevels.WildLevelsLowest; From d6f2211ea089e0a02fae8882ba7d7068578907a9 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 6 Jul 2024 21:49:10 +0200 Subject: [PATCH 35/36] default level color fix. refactoring --- ARKBreedingStats/ARKBreedingStats.csproj | 16 ++++++++-------- ARKBreedingStats/App.config | 4 ++-- ARKBreedingStats/Properties/Settings.Designer.cs | 4 ++-- ARKBreedingStats/Properties/Settings.settings | 4 ++-- .../HueControl.Designer.cs | 5 ++++- .../{uiControls => StatsOptions}/HueControl.cs | 9 ++++----- .../{uiControls => StatsOptions}/HueControl.resx | 0 .../StatsOptions/LevelGraphOptionsControl.cs | 6 +++--- ... => StatLevelGraphOptionsControl.Designer.cs} | 8 ++++---- ...ontrol.cs => StatLevelGraphOptionsControl.cs} | 6 +++--- ...ol.resx => StatLevelGraphOptionsControl.resx} | 0 11 files changed, 32 insertions(+), 30 deletions(-) rename ARKBreedingStats/{uiControls => StatsOptions}/HueControl.Designer.cs (97%) rename ARKBreedingStats/{uiControls => StatsOptions}/HueControl.cs (98%) rename ARKBreedingStats/{uiControls => StatsOptions}/HueControl.resx (100%) rename ARKBreedingStats/StatsOptions/{StatOptionsControl.Designer.cs => StatLevelGraphOptionsControl.Designer.cs} (95%) rename ARKBreedingStats/StatsOptions/{StatOptionsControl.cs => StatLevelGraphOptionsControl.cs} (92%) rename ARKBreedingStats/StatsOptions/{StatOptionsControl.resx => StatLevelGraphOptionsControl.resx} (100%) diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj index 7a361b04..2c8f217f 100644 --- a/ARKBreedingStats/ARKBreedingStats.csproj +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -145,10 +145,10 @@ Hatching.cs - + UserControl - + HueControl.cs @@ -173,11 +173,11 @@ ScrollForm.cs - + UserControl - - StatOptionsControl.cs + + StatLevelGraphOptionsControl.cs Component @@ -765,7 +765,7 @@ Hatching.cs - + HueControl.cs @@ -777,8 +777,8 @@ ScrollForm.cs - - StatOptionsControl.cs + + StatLevelGraphOptionsControl.cs StatSelector.cs diff --git a/ARKBreedingStats/App.config b/ARKBreedingStats/App.config index 70cb644f..3a0b56eb 100644 --- a/ARKBreedingStats/App.config +++ b/ARKBreedingStats/App.config @@ -409,10 +409,10 @@ False - 120 + 0 - 200 + 120 240 diff --git a/ARKBreedingStats/Properties/Settings.Designer.cs b/ARKBreedingStats/Properties/Settings.Designer.cs index 0b9e2868..b5081cdd 100644 --- a/ARKBreedingStats/Properties/Settings.Designer.cs +++ b/ARKBreedingStats/Properties/Settings.Designer.cs @@ -1840,7 +1840,7 @@ public bool InfoGraphicShowRegionNamesIfNoImage { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("120")] + [global::System.Configuration.DefaultSettingValueAttribute("0")] public int ChartHueEvenMin { get { return ((int)(this["ChartHueEvenMin"])); @@ -1852,7 +1852,7 @@ public int ChartHueEvenMin { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("200")] + [global::System.Configuration.DefaultSettingValueAttribute("120")] public int ChartHueEvenMax { get { return ((int)(this["ChartHueEvenMax"])); diff --git a/ARKBreedingStats/Properties/Settings.settings b/ARKBreedingStats/Properties/Settings.settings index 053fb0c0..230caaf6 100644 --- a/ARKBreedingStats/Properties/Settings.settings +++ b/ARKBreedingStats/Properties/Settings.settings @@ -462,10 +462,10 @@ False - 120 + 0 - 200 + 120 240 diff --git a/ARKBreedingStats/uiControls/HueControl.Designer.cs b/ARKBreedingStats/StatsOptions/HueControl.Designer.cs similarity index 97% rename from ARKBreedingStats/uiControls/HueControl.Designer.cs rename to ARKBreedingStats/StatsOptions/HueControl.Designer.cs index 37bb1575..b0d3e4ba 100644 --- a/ARKBreedingStats/uiControls/HueControl.Designer.cs +++ b/ARKBreedingStats/StatsOptions/HueControl.Designer.cs @@ -1,4 +1,6 @@ -namespace ARKBreedingStats.uiControls +using ARKBreedingStats.uiControls; + +namespace ARKBreedingStats.StatsOptions { partial class HueControl { @@ -53,6 +55,7 @@ private void InitializeComponent() // // PbColorGradient // + this.PbColorGradient.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.PbColorGradient.Location = new System.Drawing.Point(92, 0); this.PbColorGradient.Margin = new System.Windows.Forms.Padding(0); this.PbColorGradient.Name = "PbColorGradient"; diff --git a/ARKBreedingStats/uiControls/HueControl.cs b/ARKBreedingStats/StatsOptions/HueControl.cs similarity index 98% rename from ARKBreedingStats/uiControls/HueControl.cs rename to ARKBreedingStats/StatsOptions/HueControl.cs index 48648051..c41edb59 100644 --- a/ARKBreedingStats/uiControls/HueControl.cs +++ b/ARKBreedingStats/StatsOptions/HueControl.cs @@ -1,12 +1,11 @@ -using ARKBreedingStats.library; -using ARKBreedingStats.utils; -using System; +using System; using System.Drawing; using System.Windows.Forms; -using ARKBreedingStats.StatsOptions; +using ARKBreedingStats.uiControls; +using ARKBreedingStats.utils; using Newtonsoft.Json; -namespace ARKBreedingStats.uiControls +namespace ARKBreedingStats.StatsOptions { public partial class HueControl : UserControl { diff --git a/ARKBreedingStats/uiControls/HueControl.resx b/ARKBreedingStats/StatsOptions/HueControl.resx similarity index 100% rename from ARKBreedingStats/uiControls/HueControl.resx rename to ARKBreedingStats/StatsOptions/HueControl.resx diff --git a/ARKBreedingStats/StatsOptions/LevelGraphOptionsControl.cs b/ARKBreedingStats/StatsOptions/LevelGraphOptionsControl.cs index 59cdce2e..57da9ba3 100644 --- a/ARKBreedingStats/StatsOptions/LevelGraphOptionsControl.cs +++ b/ARKBreedingStats/StatsOptions/LevelGraphOptionsControl.cs @@ -11,7 +11,7 @@ namespace ARKBreedingStats.uiControls { internal class LevelGraphOptionsControl : TableLayoutPanel { - private StatOptionsControl[] _statOptionsControls; + private StatLevelGraphOptionsControl[] _statOptionsControls; private readonly ToolTip _tt = new ToolTip(); private StatsOptions _selectedStatsOptions; private readonly StatsOptionsSettings _statsOptionsSettings; @@ -103,10 +103,10 @@ private void InitializeControls() private void InitializeStatControls(FlowLayoutPanel flpStatControls) { - _statOptionsControls = new StatOptionsControl[Stats.StatsCount]; + _statOptionsControls = new StatLevelGraphOptionsControl[Stats.StatsCount]; foreach (var si in Stats.DisplayOrder) { - var c = new StatOptionsControl($"[{si}] {Utils.StatName(si, true)}", si, _tt); + var c = new StatLevelGraphOptionsControl($"[{si}] {Utils.StatName(si, true)}", si, _tt); _statOptionsControls[si] = c; flpStatControls.Controls.Add(c); flpStatControls.SetFlowBreak(c, true); diff --git a/ARKBreedingStats/StatsOptions/StatOptionsControl.Designer.cs b/ARKBreedingStats/StatsOptions/StatLevelGraphOptionsControl.Designer.cs similarity index 95% rename from ARKBreedingStats/StatsOptions/StatOptionsControl.Designer.cs rename to ARKBreedingStats/StatsOptions/StatLevelGraphOptionsControl.Designer.cs index c50a047e..3f0a9d3d 100644 --- a/ARKBreedingStats/StatsOptions/StatOptionsControl.Designer.cs +++ b/ARKBreedingStats/StatsOptions/StatLevelGraphOptionsControl.Designer.cs @@ -2,7 +2,7 @@ namespace ARKBreedingStats.StatsOptions { - partial class StatOptionsControl + partial class StatLevelGraphOptionsControl { /// /// Required designer variable. @@ -34,8 +34,8 @@ private void InitializeComponent() this.colorDialog1 = new System.Windows.Forms.ColorDialog(); this.panel1 = new System.Windows.Forms.Panel(); this.CbUseDifferentColorsForOddLevels = new System.Windows.Forms.CheckBox(); - this.hueControlOdd = new ARKBreedingStats.uiControls.HueControl(); - this.hueControl = new ARKBreedingStats.uiControls.HueControl(); + this.hueControlOdd = new HueControl(); + this.hueControl = new HueControl(); this.CbOverrideGraphSettings = new System.Windows.Forms.CheckBox(); this.SuspendLayout(); // @@ -104,7 +104,7 @@ private void InitializeComponent() this.Controls.Add(this.CbUseDifferentColorsForOddLevels); this.Controls.Add(this.panel1); this.Controls.Add(this.LbStatName); - this.Name = "StatOptionsControl"; + this.Name = "StatLevelGraphOptionsControl"; this.Size = new System.Drawing.Size(936, 29); this.ResumeLayout(false); this.PerformLayout(); diff --git a/ARKBreedingStats/StatsOptions/StatOptionsControl.cs b/ARKBreedingStats/StatsOptions/StatLevelGraphOptionsControl.cs similarity index 92% rename from ARKBreedingStats/StatsOptions/StatOptionsControl.cs rename to ARKBreedingStats/StatsOptions/StatLevelGraphOptionsControl.cs index 3591f33e..ae4d1cb4 100644 --- a/ARKBreedingStats/StatsOptions/StatOptionsControl.cs +++ b/ARKBreedingStats/StatsOptions/StatLevelGraphOptionsControl.cs @@ -3,18 +3,18 @@ namespace ARKBreedingStats.StatsOptions { - public partial class StatOptionsControl : UserControl + public partial class StatLevelGraphOptionsControl : UserControl { private StatLevelColors _statLevelColors; private readonly int _statIndex; private StatsOptions _parent; - public StatOptionsControl() + public StatLevelGraphOptionsControl() { InitializeComponent(); } - public StatOptionsControl(string name, int statIndex, ToolTip tt) : this() + public StatLevelGraphOptionsControl(string name, int statIndex, ToolTip tt) : this() { LbStatName.Text = name; _statIndex = statIndex; diff --git a/ARKBreedingStats/StatsOptions/StatOptionsControl.resx b/ARKBreedingStats/StatsOptions/StatLevelGraphOptionsControl.resx similarity index 100% rename from ARKBreedingStats/StatsOptions/StatOptionsControl.resx rename to ARKBreedingStats/StatsOptions/StatLevelGraphOptionsControl.resx From f768b50dca40b26698bfb0cec28275023ea7cdc3 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 6 Jul 2024 22:01:40 +0200 Subject: [PATCH 36/36] ver --- ARKBreedingStats/Properties/AssemblyInfo.cs | 2 +- ARKBreedingStats/_manifest.json | 2 +- ARKBreedingStats/json/values/ASA-values.json | 318 +++++++++++++++++-- ARKBreedingStats/json/values/_manifest.json | 10 +- 4 files changed, 304 insertions(+), 28 deletions(-) diff --git a/ARKBreedingStats/Properties/AssemblyInfo.cs b/ARKBreedingStats/Properties/AssemblyInfo.cs index 6b5c8add..a72a0a7d 100644 --- a/ARKBreedingStats/Properties/AssemblyInfo.cs +++ b/ARKBreedingStats/Properties/AssemblyInfo.cs @@ -30,6 +30,6 @@ // Revision // [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("0.61.4.0")] +[assembly: AssemblyFileVersion("0.62.0.0")] [assembly: NeutralResourcesLanguage("en")] diff --git a/ARKBreedingStats/_manifest.json b/ARKBreedingStats/_manifest.json index c523bbc4..5d38d333 100644 --- a/ARKBreedingStats/_manifest.json +++ b/ARKBreedingStats/_manifest.json @@ -4,7 +4,7 @@ "ARK Smart Breeding": { "Id": "ARK Smart Breeding", "Category": "main", - "version": "0.61.4.0" + "version": "0.62.0.0" }, "SpeciesColorImages": { "Id": "SpeciesColorImages", diff --git a/ARKBreedingStats/json/values/ASA-values.json b/ARKBreedingStats/json/values/ASA-values.json index e01693c0..ebd09cb5 100644 --- a/ARKBreedingStats/json/values/ASA-values.json +++ b/ARKBreedingStats/json/values/ASA-values.json @@ -1,5 +1,5 @@ { - "version": "41.18.99", + "version": "43.4.104", "format": "1.16-mod-remap", "mod": { "id": "ASA", @@ -13,43 +13,150 @@ "blueprintPath": "/Game/ASA/Dinos/Ceratosaurus/Dinos/Ceratosaurus_Character_BP_ASA.Ceratosaurus_Character_BP_ASA", "name": "Ceratosaurus", "fullStatsRaw": [ - [ 650, 0.2, 0.27, 0.5, 0 ], - [ 500, 0.1, 0.1, 0, 0 ], + [ 550, 0.2, 0.27, 0.5, 0 ], + [ 400, 0.1, 0.1, 0, 0 ], [ 500, 0.06, 0, 0.5, 0 ], [ 150, 0.1, 0.1, 0, 0 ], - [ 6000, 0.1, 0.1, 0, 0 ], + [ 3000, 0.1, 0.1, 0, 0 ], null, null, - [ 550, 0.02, 0.04, 0, 0 ], + [ 350, 0.02, 0.04, 0, 0 ], [ 1, 0.05, 0.1, 0.5, 0.4 ], [ 1, 0, 0, 0, 0 ], null, null ], + "altBaseStats": { + "0": 650, + "1": 500, + "4": 6000, + "7": 550 + }, + "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0, 0, 0 ], "breeding": { "gestationTime": 0, "incubationTime": 17998.5601, - "eggTempMin": 33, - "eggTempMax": 33, + "eggTempMin": 32, + "eggTempMax": 34, "maturationTime": 476190.476, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, "taming": { "nonViolent": true, - "violent": false + "violent": false, + "tamingIneffectiveness": 1.25, + "affinityNeeded0": 4250, + "affinityIncreasePL": 175, + "wakeAffinityMult": 1, + "wakeFoodDeplMult": 2, + "foodConsumptionBase": 0.002314, + "foodConsumptionMult": 208.0343, + "babyFoodConsumptionMult": 510 }, "displayedStats": 927, "skipWildLevelStats": 512, "colors": [ - { "name": "Accents" }, + { + "name": "Accents", + "colors": [ + "Dino Medium Green", + "Dino Medium Brown", + "Dino Light Orange", + "Dino Light Brown", + "BigFoot0", + "BigFoot5", + "Light Grey", + "Dino Albino", + "DryMoss", + "Custard", + "Dino Light Red", + "Dino Light Green", + "Dino Light Blue", + "Dino Light Purple", + "DragonGreen0", + "WolfFur", + "LightCement", + "ActualBlack", + "Cream", + "MidnightBlue", + "DarkBlue", + "Black", + "DragonFire", + "DarkViolet", + "DragonBase0", + "Dino Dark Red" + ] + }, null, null, null, - { "name": "Spikes" }, - { "name": "Body" } - ], - "immobilizedBy": [ "Chain Bola", "Large Bear Trap" ] + { + "name": "Spikes", + "colors": [ + "Dino Light Red", + "Dino Light Orange", + "Dino Light Yellow", + "Dino Light Green", + "Dino Medium Green", + "Dino Light Blue", + "Dino Light Purple", + "Dino Light Brown", + "Dino Medium Brown", + "Light Grey", + "Black", + "WyvernPurple0", + "WyvernBlue0", + "Lavender", + "Peach", + "Coral", + "Vermillion", + "DarkMagenta", + "Turqoise", + "Dino Dark Red", + "Dino Dark Orange", + "Dino Dark Brown", + "Dino Albino", + "ActualBlack", + "DarkBlue", + "WyvernBlue1" + ] + }, + { + "name": "Body", + "colors": [ + "Dino Light Red", + "Dino Light Orange", + "Dino Light Yellow", + "Dino Light Green", + "Dino Medium Green", + "Dino Light Blue", + "Dino Light Purple", + "Dino Light Brown", + "Dino Medium Brown", + "Light Grey", + "Black", + "Dino Dark Orange", + "Dino Dark Green", + "Dino Dark Brown", + "Dino Darker Grey", + "DragonBase0", + "DragonBase1", + "BigFoot0", + "DarkWolfFur", + "Sage", + "MediumAutumn", + "SpruceGreen", + "Cammo", + "DryMoss", + "Custard", + "Cream", + "Dino Albino", + "BigFoot4", + "NearWhite" + ] + } + ] }, { "blueprintPath": "/Game/ASA/Dinos/Fasolasuchus/Fasola_Character_BP.Fasola_Character_BP", @@ -351,6 +458,49 @@ ], "immobilizedBy": [ "Chain Bola", "Large Bear Trap", "Plant Species Y" ] }, + { + "blueprintPath": "/Game/ASA/Dinos/FireLion/FireLion_Character_BP.FireLion_Character_BP", + "name": "Pyromane", + "fullStatsRaw": [ + [ 600, 0.2, 0.27, 0.5, 0 ], + [ 350, 0.1, 0.1, 0, 0 ], + [ 500, 0.06, 0, 0.5, 0 ], + [ 150, 0.1, 0.1, 0, 0 ], + [ 1000, 0.1, 0.1, 0, 0 ], + null, + null, + [ 300, 0.02, 0.04, 0, 0 ], + [ 1, 0.05, 0.1, 0.5, 0.4 ], + [ 1, 0, 0.01, 0, 0 ], + null, + null + ], + "breeding": { + "gestationTime": 8628.1277, + "incubationTime": 0, + "maturationTime": 175438.596, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, + "taming": { + "nonViolent": true, + "violent": false, + "tamingIneffectiveness": 1.875, + "affinityNeeded0": 5000, + "affinityIncreasePL": 25, + "wakeAffinityMult": 1, + "wakeFoodDeplMult": 2, + "foodConsumptionBase": 0.001157, + "foodConsumptionMult": 0.05, + "babyFoodConsumptionMult": 510 + }, + "boneDamageAdjusters": { + "Head": 1.5, + "Jaw": 1.5 + }, + "displayedStats": 927, + "skipWildLevelStats": 512 + }, { "blueprintPath": "/Game/ASA/Dinos/Gigantoraptor/Gigantoraptor_Character_BP.Gigantoraptor_Character_BP", "name": "Gigantoraptor", @@ -613,6 +763,50 @@ } ] }, + { + "blueprintPath": "/Game/ASA/Dinos/Shastasaurus/Shastasaurus_Character_BP.Shastasaurus_Character_BP", + "name": "Shastasaurus", + "fullStatsRaw": [ + [ 4500, 0.12, 0.21, 0.3, 0 ], + [ 300, 0.1, 0.1, 0, 0 ], + [ 3000, 0.06, 0, 0.5, 0 ], + [ 150, 0.1, 0.1, 0, 0 ], + [ 8000, 0.1, 0.1, 0, 0.15 ], + null, + null, + [ 3000, 0.02, 0.04, 0, 0 ], + [ 1, 0.05, 0.1, 0.65, 0.4 ], + [ 1, 0, 0.005, 0, 0 ], + null, + null + ], + "altBaseStats": { + "0": 3600, + "1": 400, + "7": 1300 + }, + "breeding": { + "gestationTime": 28571.4286, + "incubationTime": 0, + "maturationTime": 666666.667, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, + "taming": { + "nonViolent": true, + "violent": false, + "tamingIneffectiveness": 0.06, + "affinityNeeded0": 11000, + "affinityIncreasePL": 600, + "wakeAffinityMult": 1, + "wakeFoodDeplMult": 2, + "foodConsumptionBase": 0.005, + "foodConsumptionMult": 180.0011, + "babyFoodConsumptionMult": 510 + }, + "displayedStats": 919, + "skipWildLevelStats": 520 + }, { "blueprintPath": "/Game/ASA/Dinos/Xiphactinus/Dinos/Xiphactinus_Character_BP_ASA.Xiphactinus_Character_BP_ASA", "name": "Xiphactinus", @@ -620,36 +814,94 @@ [ 450, 0.2, 0.27, 0.3, 0 ], [ 420, 0.1, 0.1, 0, 0 ], [ 1100, 0.06, 0, 0.5, 0 ], - [ 150, 0, 0, 0, 0 ], + null, [ 2000, 0.1, 0.1, 0, 0.15 ], null, null, [ 300, 0.02, 0.04, 0, 0 ], [ 1, 0.05, 0.1, 1, 0.4 ], - [ 1, 0, 0, 0.2, 0 ], + [ 1, 0, 0.01, 0.2, 0 ], null, null ], "breeding": { "gestationTime": 0, "incubationTime": 17998.5601, - "maturationTime": 200000, + "eggTempMin": -75, + "eggTempMax": 75, + "maturationTime": 333333.333, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, "taming": { "nonViolent": false, - "violent": true + "violent": true, + "tamingIneffectiveness": 1.875, + "affinityNeeded0": 2000, + "affinityIncreasePL": 100, + "torporDepletionPS0": 3.125, + "foodConsumptionBase": 0.001578, + "foodConsumptionMult": 352.0631, + "babyFoodConsumptionMult": 510 }, - "displayedStats": 927, + "displayedStats": 919, "skipWildLevelStats": 520, "colors": [ - { "name": "Base color" }, + { + "name": "Base color", + "colors": [ + "Dino Dark Yellow", + "Dino Medium Green", + "Dino Dark Green", + "Dino Dark Blue", + "Dino Dark Purple", + "Dark Grey", + "Dino Darker Grey", + "Black" + ] + }, null, null, null, - { "name": "Spine" }, - { "name": "Belly and fins" } + { + "name": "Spine", + "colors": [ + "Dino Light Red", + "Dino Dark Red", + "Dino Light Orange", + "Dino Dark Orange", + "Dino Light Yellow", + "Dino Dark Yellow", + "Dino Light Green", + "Dino Medium Green", + "Dino Dark Green", + "Dino Light Blue", + "Dino Dark Blue", + "Dino Light Purple", + "Dino Dark Purple", + "Dino Light Brown", + "Dino Medium Brown", + "Dino Dark Brown", + "Light Grey", + "Dark Grey", + "Dino Darker Grey", + "Black", + "Dino Albino" + ] + }, + { + "name": "Belly and fins", + "colors": [ + "Dino Dark Yellow", + "Dino Medium Green", + "Dino Dark Green", + "Dino Dark Blue", + "Dino Dark Purple", + "Dark Grey", + "Dino Darker Grey", + "Black" + ] + } ] }, { @@ -1962,6 +2214,18 @@ "blueprintPath": "/Game/PrimalEarth/Dinos/Gorilla/Gorilla_Character_BP_Medium.Gorilla_Character_BP_Medium", "skipWildLevelStats": 512 }, + { + "blueprintPath": "/Game/PrimalEarth/Dinos/Gorilla/Gorilla_Character_BP_TheCenter.Gorilla_Character_BP_TheCenter", + "skipWildLevelStats": 512 + }, + { + "blueprintPath": "/Game/PrimalEarth/Dinos/Gorilla/Gorilla_Character_BP_TheCenter_Hard.Gorilla_Character_BP_TheCenter_Hard", + "skipWildLevelStats": 512 + }, + { + "blueprintPath": "/Game/PrimalEarth/Dinos/Gorilla/Gorilla_Character_BP_TheCenter_Medium.Gorilla_Character_BP_TheCenter_Medium", + "skipWildLevelStats": 512 + }, { "blueprintPath": "/Game/PrimalEarth/Dinos/Griffin/Griffin_Character_BP.Griffin_Character_BP", "skipWildLevelStats": 512 @@ -2343,6 +2607,18 @@ "blueprintPath": "/Game/PrimalEarth/Dinos/Spider-Large/SpiderL_Character_BP_Medium.SpiderL_Character_BP_Medium", "skipWildLevelStats": 512 }, + { + "blueprintPath": "/Game/PrimalEarth/Dinos/Spider-Large/SpiderL_Character_BP_TheCenter.SpiderL_Character_BP_TheCenter", + "skipWildLevelStats": 512 + }, + { + "blueprintPath": "/Game/PrimalEarth/Dinos/Spider-Large/SpiderL_Character_BP_TheCenterHard.SpiderL_Character_BP_TheCenterHard", + "skipWildLevelStats": 512 + }, + { + "blueprintPath": "/Game/PrimalEarth/Dinos/Spider-Large/SpiderL_Character_BP_TheCenterMedium.SpiderL_Character_BP_TheCenterMedium", + "skipWildLevelStats": 512 + }, { "blueprintPath": "/Game/PrimalEarth/Dinos/Spider-Small/SpiderS_Character_BP.SpiderS_Character_BP", "skipWildLevelStats": 512 diff --git a/ARKBreedingStats/json/values/_manifest.json b/ARKBreedingStats/json/values/_manifest.json index e2b8adfd..885a849a 100644 --- a/ARKBreedingStats/json/values/_manifest.json +++ b/ARKBreedingStats/json/values/_manifest.json @@ -67,7 +67,7 @@ "mod": { "id": "1356703358", "tag": "Primal_Fear_Noxious_Creatures", "title": "Primal Fear Noxious Creatures" } }, "1373744537-AC2.json": { - "version": "358.24.1713491648", + "version": "358.24.1719328347", "mod": { "id": "1373744537", "tag": "AC2", "title": "Additional Creatures 2: Wild Ark" } }, "1379111008-RealismPlus.json": { @@ -314,7 +314,7 @@ "mod": { "id": "2447186973", "tag": "ArkOmega", "title": "Ark Omega" } }, "2453342929-MoreDragonsMod.json": { - "version": "358.24.1714424674", + "version": "358.24.1718837193", "mod": { "id": "2453342929", "tag": "MoreDragonsMod", "title": "More Dragons Evolved" } }, "2472371628-MilicrocaWarriors_MOD.json": { @@ -378,7 +378,7 @@ "mod": { "id": "883957187", "tag": "WyvernWorld", "title": "Wyvern World" } }, "893735676-AE.json": { - "version": "358.17.1701815786", + "version": "358.24.1701815786", "mod": { "id": "893735676", "tag": "AE", "title": "Ark Eternal" } }, "895711211-ClassicFlyers.json": { @@ -386,7 +386,7 @@ "mod": { "id": "895711211", "tag": "ClassicFlyers", "title": "Classic Flyers" } }, "899987403-Primal_Fear_Bosses.json": { - "version": "344.8.1648844784", + "version": "358.24.1718932606", "mod": { "id": "899987403", "tag": "Primal_Fear_Bosses", "title": "Primal Fear Bosses" } }, "909297874-NorwegianVikings.json": { @@ -398,7 +398,7 @@ "mod": { "id": "919470289", "tag": "SSFlyer", "title": "SSFlyer" } }, "ASA-values.json": { - "version": "41.18.99", + "version": "43.4.104", "format": "1.16-mod-remap", "mod": { "id": "ASA", "tag": "", "title": "Ark: Survival Ascended", "shortTitle": "ASA", "official": true } },