From d2bba99063c1c2784a194057717f0905ee13eb22 Mon Sep 17 00:00:00 2001 From: Jaymei <45423364+JaymeiF@users.noreply.github.com> Date: Mon, 24 Apr 2023 09:30:37 +0100 Subject: [PATCH 1/5] Updated ATLAS Values File (#1308) * Added mammal breeding timers * Added all egg laying stats * Add "Immobilized by " to ATLAS --- .../json/values/ATLAS/ATLAS_values.json | 272 ++++++++++++------ 1 file changed, 190 insertions(+), 82 deletions(-) diff --git a/ARKBreedingStats/json/values/ATLAS/ATLAS_values.json b/ARKBreedingStats/json/values/ATLAS/ATLAS_values.json index 36ffc7dc..5491b856 100644 --- a/ARKBreedingStats/json/values/ATLAS/ATLAS_values.json +++ b/ARKBreedingStats/json/values/ATLAS/ATLAS_values.json @@ -27,7 +27,14 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], + "breeding": { + "gestationTime": 14400.1958, + "incubationTime": 0, + "maturationTime": 151199.6939, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, "colors": [ { "name": "Main", @@ -127,7 +134,7 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "colors": [ { "name": "Body Main", @@ -260,7 +267,14 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], + "breeding": { + "gestationTime": 12600.4095, + "incubationTime": 0, + "maturationTime": 147599.7331, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, "colors": [ { "name": "Main", @@ -412,7 +426,16 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], + "breeding": { + "gestationTime": 0, + "incubationTime": 17998.5601, + "eggTempMin": 24, + "eggTempMax": 28, + "maturationTime": 60600.3311, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, "colors": [ { "name": "Middle Body", @@ -573,7 +596,14 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], + "breeding": { + "gestationTime": 10800.0108, + "incubationTime": 0, + "maturationTime": 142199.7736, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, "colors": [ { "name": "Main", @@ -672,7 +702,7 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "colors": [ { "name": "Body", @@ -784,7 +814,16 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], + "breeding": { + "gestationTime": 0, + "incubationTime": 5999.5200, + "eggTempMin": 49, + "eggTempMax": 70, + "maturationTime": 180000.1800, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, "colors": [ { "name": "Main Body Color", @@ -868,7 +907,16 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], + "breeding": { + "gestationTime": 0, + "incubationTime": 3599.7120, + "eggTempMin": 35, + "eggTempMax": 45, + "maturationTime": 93600.0936, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, "colors": [ { "name": "Main Body", @@ -989,7 +1037,14 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], + "breeding": { + "gestationTime": 16326.5306, + "incubationTime": 0, + "maturationTime": 158399.7820, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, "colors": [ { "name": "Medium Skin", @@ -1094,7 +1149,14 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], + "breeding": { + "gestationTime": 24299.5650, + "incubationTime": 0, + "maturationTime": 243000.3742, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, "colors": [ { "name": "Main Body", @@ -1195,7 +1257,14 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], + "breeding": { + "gestationTime": 20699.7338, + "incubationTime": 0, + "maturationTime": 237599.6730, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, "colors": [ { "name": "Fur Secondary", @@ -1306,7 +1375,14 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], + "breeding": { + "gestationTime": 14400.1958, + "incubationTime": 0, + "maturationTime": 158399.7820, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, "colors": [ { "name": "Body Main", @@ -1399,7 +1475,14 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], + "breeding": { + "gestationTime": 17100.4480, + "incubationTime": 0, + "maturationTime": 208799.2165, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, "colors": [ { "name": "Main Body", @@ -1491,7 +1574,14 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], + "breeding": { + "gestationTime": 8099.6253, + "incubationTime": 0, + "maturationTime": 97200.1496, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, "colors": [ { "name": "Shoulders and Legs", @@ -1601,7 +1691,14 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], + "breeding": { + "gestationTime": 19800.0198, + "incubationTime": 0, + "maturationTime": 219600.1958, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, "colors": [ { "name": "Main", @@ -1695,13 +1792,6 @@ ] } ], - "breeding": { - "gestationTime": 15037.594, - "incubationTime": 0, - "maturationTime": 175438.596, - "matingCooldownMin": 64800, - "matingCooldownMax": 172800 - }, "taming": { "nonViolent": true, "violent": false, @@ -1736,11 +1826,13 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 15037.594, - "incubationTime": 0, - "maturationTime": 172800, + "gestationTime": 0, + "incubationTime": 5999.5200, + "eggTempMin": 49, + "eggTempMax": 57, + "maturationTime": 180000.1800, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -1892,11 +1984,13 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 15037.594, - "incubationTime": 0, - "maturationTime": 86400, + "gestationTime": 0, + "incubationTime": 2999.7600, + "eggTempMin": 45, + "eggTempMax": 55, + "maturationTime": 88200.2215, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -2061,11 +2155,13 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 15037.594, - "incubationTime": 0, - "maturationTime": 86400, + "gestationTime": 0, + "incubationTime": 4499.6400, + "eggTempMin": 8, + "eggTempMax": 16, + "maturationTime": 120600.3485, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -2198,11 +2294,11 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 15037.594, + "gestationTime": 9900.0099, "incubationTime": 0, - "maturationTime": 115200, + "maturationTime": 136799.8413, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -2302,11 +2398,11 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 15037.594, + "gestationTime": 6300.2047, "incubationTime": 0, - "maturationTime": 28800, + "maturationTime": 29699.5886, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -2379,11 +2475,13 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 15037.594, - "incubationTime": 0, - "maturationTime": 259200, + "gestationTime": 0, + "incubationTime": 11699.5320, + "eggTempMin": 52, + "eggTempMax": 58, + "maturationTime": 277200.2772, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -2533,11 +2631,11 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 15037.594, + "gestationTime": 22499.8453, "incubationTime": 0, - "maturationTime": 230400, + "maturationTime": 248400.3020, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -2674,11 +2772,13 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 15037.594, - "incubationTime": 0, - "maturationTime": 86400, + "gestationTime": 0, + "incubationTime": 3300.0660, + "eggTempMin": 31, + "eggTempMax": 41, + "maturationTime": 90899.5877, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -2779,11 +2879,11 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 14400.195, + "gestationTime": 14400.1958, "incubationTime": 0, - "maturationTime": 151199.693, + "maturationTime": 151199.6939, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -2884,11 +2984,11 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 14400.195, + "gestationTime": 9000.2925, "incubationTime": 0, - "maturationTime": 151199.693, + "maturationTime": 133200.1332, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -3010,11 +3110,13 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 14400.195, - "incubationTime": 0, - "maturationTime": 151199.693, + "gestationTime": 0, + "incubationTime": 9900.1980, + "eggTempMin": 50, + "eggTempMax": 56, + "maturationTime": 268198.6171, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -3187,11 +3289,13 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 15037.594, - "incubationTime": 0, - "maturationTime": 201600, + "gestationTime": 0, + "incubationTime": 5999.5200, + "eggTempMin": 25, + "eggTempMax": 50, + "maturationTime": 214199.7283, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -3368,11 +3472,11 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 15037.594, + "gestationTime": 18000.0180, "incubationTime": 0, - "maturationTime": 201600, + "maturationTime": 214199.7283, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -3479,11 +3583,13 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 15037.594, - "incubationTime": 0, - "maturationTime": 201600, + "gestationTime": 0, + "incubationTime": 12599.6220, + "eggTempMin": 54, + "eggTempMax": 60, + "maturationTime": 279000.7309, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -3620,11 +3726,13 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 15037.594, - "incubationTime": 0, - "maturationTime": 86400, + "gestationTime": 0, + "incubationTime": 5100.1870, + "eggTempMin": 49, + "eggTempMax": 57, + "maturationTime": 126000.1260, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -3773,11 +3881,11 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 15037.594, + "gestationTime": 12600.4095, "incubationTime": 0, - "maturationTime": 201600, + "maturationTime": 188999.8317, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, @@ -3925,11 +4033,11 @@ null ], "statImprintMult": [ 0.2, 0, 0.2, 0, 0.2, 0.2, 0, 0.2, 0.2, 0.2, 0, 0 ], - "immobilizedBy": [], + "immobilizedBy": ["Bola"], "breeding": { - "gestationTime": 15037.594, + "gestationTime": 21978.0219, "incubationTime": 0, - "maturationTime": 201600, + "maturationTime": 237599.6730, "matingCooldownMin": 64800, "matingCooldownMax": 172800 }, From 3cea8582dec1ed27b162c35223f04a769e9818fe Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 29 Apr 2023 22:21:15 +0200 Subject: [PATCH 2/5] custom even/odd level for each stat per species --- ARKBreedingStats/App.config | 3 - .../BreedingPlanning/BreedingPlan.Designer.cs | 41 ++- .../BreedingPlanning/BreedingPlan.cs | 34 ++- .../BreedingPlanning/BreedingPlan.resx | 27 +- .../BreedingPlanning/BreedingScore.cs | 60 ++++- ARKBreedingStats/Form1.cs | 27 +- ARKBreedingStats/Form1.extractor.cs | 36 ++- ARKBreedingStats/Form1.library.cs | 31 +-- ARKBreedingStats/Form1.resx | 254 +++++++++--------- .../Properties/Settings.Designer.cs | 23 +- ARKBreedingStats/Properties/Settings.settings | 6 +- ARKBreedingStats/library/DummyCreatures.cs | 2 +- .../uiControls/StatWeighting.Designer.cs | 7 +- ARKBreedingStats/uiControls/StatWeighting.cs | 106 +++++++- 14 files changed, 397 insertions(+), 260 deletions(-) diff --git a/ARKBreedingStats/App.config b/ARKBreedingStats/App.config index 000a28b7..d2e8cf10 100644 --- a/ARKBreedingStats/App.config +++ b/ARKBreedingStats/App.config @@ -360,9 +360,6 @@ False - - False - False diff --git a/ARKBreedingStats/BreedingPlanning/BreedingPlan.Designer.cs b/ARKBreedingStats/BreedingPlanning/BreedingPlan.Designer.cs index feeb3377..0035d259 100644 --- a/ARKBreedingStats/BreedingPlanning/BreedingPlan.Designer.cs +++ b/ARKBreedingStats/BreedingPlanning/BreedingPlan.Designer.cs @@ -38,7 +38,6 @@ private void InitializeComponent() this.gbBPBreedingMode = new System.Windows.Forms.GroupBox(); this.CbIgnoreSexInPlanning = new System.Windows.Forms.CheckBox(); this.CbDontSuggestOverLimitOffspring = new System.Windows.Forms.CheckBox(); - this.CbConsiderOnlyEvenForHighStats = new System.Windows.Forms.CheckBox(); this.cbBPMutationLimitOnlyOnePartner = new System.Windows.Forms.CheckBox(); this.cbBPOnlyOneSuggestionForFemales = new System.Windows.Forms.CheckBox(); this.cbBPIncludeCryoCreatures = new System.Windows.Forms.CheckBox(); @@ -146,7 +145,6 @@ private void InitializeComponent() // this.gbBPBreedingMode.Controls.Add(this.CbIgnoreSexInPlanning); this.gbBPBreedingMode.Controls.Add(this.CbDontSuggestOverLimitOffspring); - this.gbBPBreedingMode.Controls.Add(this.CbConsiderOnlyEvenForHighStats); this.gbBPBreedingMode.Controls.Add(this.cbBPMutationLimitOnlyOnePartner); this.gbBPBreedingMode.Controls.Add(this.cbBPOnlyOneSuggestionForFemales); this.gbBPBreedingMode.Controls.Add(this.cbBPIncludeCryoCreatures); @@ -157,9 +155,9 @@ private void InitializeComponent() this.gbBPBreedingMode.Controls.Add(this.rbBPHighStats); this.gbBPBreedingMode.Controls.Add(this.rbBPTopStats); this.gbBPBreedingMode.Dock = System.Windows.Forms.DockStyle.Fill; - this.gbBPBreedingMode.Location = new System.Drawing.Point(3, 482); + this.gbBPBreedingMode.Location = new System.Drawing.Point(3, 503); this.gbBPBreedingMode.Name = "gbBPBreedingMode"; - this.gbBPBreedingMode.Size = new System.Drawing.Size(238, 273); + this.gbBPBreedingMode.Size = new System.Drawing.Size(238, 252); this.gbBPBreedingMode.TabIndex = 6; this.gbBPBreedingMode.TabStop = false; this.gbBPBreedingMode.Text = "Breeding-Mode"; @@ -178,7 +176,7 @@ private void InitializeComponent() // CbDontSuggestOverLimitOffspring // this.CbDontSuggestOverLimitOffspring.AutoSize = true; - this.CbDontSuggestOverLimitOffspring.Location = new System.Drawing.Point(6, 252); + this.CbDontSuggestOverLimitOffspring.Location = new System.Drawing.Point(6, 229); this.CbDontSuggestOverLimitOffspring.Name = "CbDontSuggestOverLimitOffspring"; this.CbDontSuggestOverLimitOffspring.Size = new System.Drawing.Size(178, 17); this.CbDontSuggestOverLimitOffspring.TabIndex = 10; @@ -186,17 +184,6 @@ private void InitializeComponent() this.CbDontSuggestOverLimitOffspring.UseVisualStyleBackColor = true; this.CbDontSuggestOverLimitOffspring.CheckedChanged += new System.EventHandler(this.CbDontSuggestOverLimitOffspring_CheckedChanged); // - // CbConsiderOnlyEvenForHighStats - // - this.CbConsiderOnlyEvenForHighStats.AutoSize = true; - this.CbConsiderOnlyEvenForHighStats.Location = new System.Drawing.Point(6, 229); - this.CbConsiderOnlyEvenForHighStats.Name = "CbConsiderOnlyEvenForHighStats"; - this.CbConsiderOnlyEvenForHighStats.Size = new System.Drawing.Size(164, 17); - this.CbConsiderOnlyEvenForHighStats.TabIndex = 9; - this.CbConsiderOnlyEvenForHighStats.Text = "Consider only even high stats"; - this.CbConsiderOnlyEvenForHighStats.UseVisualStyleBackColor = true; - this.CbConsiderOnlyEvenForHighStats.CheckedChanged += new System.EventHandler(this.CbConsiderOnlyEvenForHighStats_CheckedChanged); - // // cbBPMutationLimitOnlyOnePartner // this.cbBPMutationLimitOnlyOnePartner.AutoSize = true; @@ -318,7 +305,7 @@ private void InitializeComponent() this.tabControl1.MinimumSize = new System.Drawing.Size(0, 200); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(238, 473); + this.tabControl1.Size = new System.Drawing.Size(238, 494); this.tabControl1.TabIndex = 8; // // tabPageBreedableSpecies @@ -327,7 +314,7 @@ private void InitializeComponent() this.tabPageBreedableSpecies.Location = new System.Drawing.Point(4, 22); this.tabPageBreedableSpecies.Name = "tabPageBreedableSpecies"; this.tabPageBreedableSpecies.Padding = new System.Windows.Forms.Padding(3); - this.tabPageBreedableSpecies.Size = new System.Drawing.Size(230, 447); + this.tabPageBreedableSpecies.Size = new System.Drawing.Size(230, 468); this.tabPageBreedableSpecies.TabIndex = 0; this.tabPageBreedableSpecies.Text = "Breedable Species"; this.tabPageBreedableSpecies.UseVisualStyleBackColor = true; @@ -343,7 +330,7 @@ private void InitializeComponent() this.listViewSpeciesBP.Location = new System.Drawing.Point(3, 3); this.listViewSpeciesBP.MultiSelect = false; this.listViewSpeciesBP.Name = "listViewSpeciesBP"; - this.listViewSpeciesBP.Size = new System.Drawing.Size(224, 441); + this.listViewSpeciesBP.Size = new System.Drawing.Size(224, 462); this.listViewSpeciesBP.TabIndex = 3; this.listViewSpeciesBP.UseCompatibleStateImageBehavior = false; this.listViewSpeciesBP.View = System.Windows.Forms.View.Details; @@ -452,7 +439,20 @@ private void InitializeComponent() // // statWeighting1 // - this.statWeighting1.CustomWeightings = ((System.Collections.Generic.Dictionary)(resources.GetObject("statWeighting1.CustomWeightings"))); + this.statWeighting1.AnyOddEven = new byte[] { + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0)), + ((byte)(0))}; + this.statWeighting1.CustomWeightings = ((System.Collections.Generic.Dictionary>)(resources.GetObject("statWeighting1.CustomWeightings"))); this.statWeighting1.Dock = System.Windows.Forms.DockStyle.Fill; this.statWeighting1.Location = new System.Drawing.Point(3, 761); this.statWeighting1.Name = "statWeighting1"; @@ -881,7 +881,6 @@ private void InitializeComponent() private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; private System.Windows.Forms.CheckBox cbTribeFilterLibrary; private PedigreeCreature pedigreeCreatureBestPossibleInSpeciesFiltered; - private System.Windows.Forms.CheckBox CbConsiderOnlyEvenForHighStats; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel5; private System.Windows.Forms.CheckBox CbDontSuggestOverLimitOffspring; private System.Windows.Forms.CheckBox CbIgnoreSexInPlanning; diff --git a/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs b/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs index bdbba233..2f1136c9 100644 --- a/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs +++ b/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs @@ -30,10 +30,14 @@ public partial class BreedingPlan : UserControl private List _breedingPairs; private Species _currentSpecies; /// - /// how much are the stats weighted when looking for the best + /// How much are the stats weighted when looking for the best /// private double[] _statWeights = new double[Stats.StatsCount]; /// + /// Indicates if high stats are only considered if any, odd or even. + /// + private byte[] _statOddEvens = new byte[Stats.StatsCount]; + /// /// The best possible levels of the selected species for each stat. /// If the weighting is negative, a low level is considered better. /// @@ -65,8 +69,6 @@ public partial class BreedingPlan : UserControl public CreatureCollection CreatureCollection; private readonly ToolTip _tt = new ToolTip { AutoPopDelay = 10000 }; - - public BreedingPlan() { InitializeComponent(); @@ -105,7 +107,6 @@ public BreedingPlan() cbBPOnlyOneSuggestionForFemales.Checked = Settings.Default.BreedingPlanOnlyBestSuggestionForEachFemale; cbBPMutationLimitOnlyOnePartner.Checked = Settings.Default.BreedingPlanOnePartnerMoreMutationsThanLimit; CbIgnoreSexInPlanning.Checked = Settings.Default.IgnoreSexInBreedingPlan; - CbConsiderOnlyEvenForHighStats.Checked = Settings.Default.BreedingPlannerConsiderOnlyEvenForHighStats; CbDontSuggestOverLimitOffspring.Checked = Settings.Default.BreedingPlanDontSuggestOverLimitOffspring; tagSelectorList1.OnTagChanged += TagSelectorList1_OnTagChanged; @@ -117,18 +118,21 @@ public BreedingPlan() private void StatWeighting_WeightingsChanged() { // check if sign of a weighting changed (then the best levels change) - bool signChanged = false; + bool signChangedOrOddEven = false; var newWeightings = StatWeighting.Weightings; + var newOddEvens = StatWeighting.AnyOddEven; for (int s = 0; s < Stats.StatsCount; s++) { - if (Math.Sign(_statWeights[s]) != Math.Sign(newWeightings[s])) + if (_statOddEvens[s] != newOddEvens[s] + || Math.Sign(_statWeights[s]) != Math.Sign(newWeightings[s])) { - signChanged = true; + signChangedOrOddEven = true; break; } } _statWeights = newWeightings; - if (signChanged) DetermineBestLevels(); + _statOddEvens = newOddEvens; + if (signChangedOrOddEven) DetermineBestLevels(); CalculateBreedingScoresAndDisplayPairs(); } @@ -177,6 +181,7 @@ public void DetermineBestBreeding(Creature chosenCreature = null, bool forceUpda } _statWeights = StatWeighting.Weightings; + _statOddEvens = StatWeighting.AnyOddEven; if (forceUpdate || BreedingPlanNeedsUpdate || _onlyShowingASubset) { @@ -394,7 +399,7 @@ private void DoCalculateBreedingScoresAndDisplayPairs() bestPossLevels, _statWeights, _bestLevels, _breedingMode, considerChosenCreature, considerMutationLimit, (int)nudBPMutationLimit.Value, ref creaturesMutationsFilteredOut, levelLimitWithOutDomLevels, CbDontSuggestOverLimitOffspring.Checked, - cbBPOnlyOneSuggestionForFemales.Checked); + cbBPOnlyOneSuggestionForFemales.Checked, _statOddEvens); //double minScore = _breedingPairs.LastOrDefault()?.BreedingScore ?? 0; //if (minScore < 0) @@ -773,7 +778,7 @@ private void DetermineBestLevels(List creatures = null) /// If true, the display of the best species library will be updated, if false the best filtered species will be updated. private void SetBestLevels(int[] bestLevels, IEnumerable creatures, bool bestInSpecies) { - BreedingScore.SetBestLevels(creatures, bestLevels, _statWeights, CbConsiderOnlyEvenForHighStats.Checked); + BreedingScore.SetBestLevels(creatures, bestLevels, _statWeights, _statOddEvens); // display top levels in species int? levelStep = CreatureCollection.getWildLevelStep(); @@ -839,7 +844,7 @@ private void SetParents(int comboIndex) for (int s = 0; s < Stats.StatsCount; s++) { if (s == Stats.Torpidity) continue; - crB.levelsWild[s] = _statWeights[s] < 0 ? Math.Min(mother.levelsWild[s], father.levelsWild[s]) : Math.Max(mother.levelsWild[s], father.levelsWild[s]); + crB.levelsWild[s] = _statWeights[s] < 0 ? Math.Min(mother.levelsWild[s], father.levelsWild[s]) : BreedingScore.GetHigherBestLevel(mother.levelsWild[s], father.levelsWild[s], _statOddEvens[s]); crB.valuesBreeding[s] = StatValueCalculation.CalculateValue(_currentSpecies, s, crB.levelsWild[s], 0, true, 1, 0); crB.topBreedingStats[s] = (_currentSpecies.stats[s].IncPerTamedLevel != 0 && crB.levelsWild[s] == _bestLevels[s]); crW.levelsWild[s] = _statWeights[s] < 0 ? Math.Max(mother.levelsWild[s], father.levelsWild[s]) : Math.Min(mother.levelsWild[s], father.levelsWild[s]); @@ -1179,13 +1184,6 @@ private void CbIgnoreSexInPlanning_CheckedChanged(object sender, EventArgs e) CalculateBreedingScoresAndDisplayPairs(); } - private void CbConsiderOnlyEvenForHighStats_CheckedChanged(object sender, EventArgs e) - { - Settings.Default.BreedingPlannerConsiderOnlyEvenForHighStats = CbConsiderOnlyEvenForHighStats.Checked; - CalculateBreedingScoresAndDisplayPairs(); - DetermineBestLevels(); - } - private void CbDontSuggestOverLimitOffspring_CheckedChanged(object sender, EventArgs e) { Settings.Default.BreedingPlanDontSuggestOverLimitOffspring = CbDontSuggestOverLimitOffspring.Checked; diff --git a/ARKBreedingStats/BreedingPlanning/BreedingPlan.resx b/ARKBreedingStats/BreedingPlanning/BreedingPlan.resx index a35b95b5..dbc5f07c 100644 --- a/ARKBreedingStats/BreedingPlanning/BreedingPlan.resx +++ b/ARKBreedingStats/BreedingPlanning/BreedingPlan.resx @@ -119,18 +119,21 @@ - AAEAAAD/////AQAAAAAAAAAMAgAAAPkBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u - ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLkRvdWJsZVtdLCBt - c2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3 - N2E1YzU2MTkzNGUwODldXSwgb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yYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2 + MTkzNGUwODldXSwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJs + aWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1 + bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQwDAAAAmgFtc2Nvcmxp + YiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2 + MTkzNGUwODldXSwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJs + aWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAA2U3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMu + RGljdGlvbmFyeWAyW1tTeXN0ZW0uU3RyaW5nAwAAAAdWZXJzaW9uCENvbXBhcmVyCEhhc2hTaXplAAQA + CENTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5HZW5lcmljRXF1YWxpdHlDb21wYXJlcmAxW1tTeXN0 + ZW0uU3RyaW5nAwAAAAgCAAAAAAAAAAkEAAAAAAAAAAUEAAAAQ1N5c3RlbS5Db2xsZWN0aW9ucy5HZW5l + cmljLkdlbmVyaWNFcXVhbGl0eUNvbXBhcmVyYDFbW1N5c3RlbS5TdHJpbmcAAAAAAwAAAAs= \ No newline at end of file diff --git a/ARKBreedingStats/BreedingPlanning/BreedingScore.cs b/ARKBreedingStats/BreedingPlanning/BreedingScore.cs index 02357807..bf22cd03 100644 --- a/ARKBreedingStats/BreedingPlanning/BreedingScore.cs +++ b/ARKBreedingStats/BreedingPlanning/BreedingScore.cs @@ -29,15 +29,25 @@ public static class BreedingScore /// If > 0, pairs that can result in a creature with a level higher than that, are highlighted. This can be used if there's a level cap. /// Downgrade score if level is higher than limit. /// Only the pairing with the highest score is kept for each female. Is not used if species has no sex or sex is ignored in breeding planner. + /// Array for each stat if the higher level should be considered for score: 0: consider any level, 1: consider only if odd, 2: consider only if even. /// public static List CalculateBreedingScores(Creature[] females, Creature[] males, Species species, short[] bestPossLevels, double[] statWeights, int[] bestLevelsOfSpecies, BreedingPlan.BreedingMode breedingMode, bool considerChosenCreature, bool considerMutationLimit, int mutationLimit, ref bool creaturesMutationsFilteredOut, int offspringLevelLimit = 0, bool downGradeOffspringWithLevelHigherThanLimit = false, - bool onlyBestSuggestionForFemale = false) + bool onlyBestSuggestionForFemale = false, byte[] anyOddEven = null) { var breedingPairs = new List(); var ignoreSex = Properties.Settings.Default.IgnoreSexInBreedingPlan || species.noGender; + if (anyOddEven != null && anyOddEven.Length != Stats.StatsCount) + anyOddEven = null; + + var customIgnoreTopStatsEvenOdd = new bool[Stats.StatsCount]; + for (int s = 0; s < Stats.StatsCount; s++) + { + customIgnoreTopStatsEvenOdd[s] = anyOddEven != null && statWeights[s] > 0; + } + for (int fi = 0; fi < females.Length; fi++) { var female = females[fi]; @@ -82,9 +92,22 @@ public static List CalculateBreedingScores(Creature[] females, Cre if (lowerLevel < 0) lowerLevel = 0; maxPossibleOffspringLevel += higherLevel; - bool ignoreTopStats = Settings.Default.BreedingPlannerConsiderOnlyEvenForHighStats - && higherLevel % 2 != 0 - && statWeights[s] > 0; + bool ignoreTopStats = false; + + if (customIgnoreTopStatsEvenOdd[s]) + { + // if there is a custom setting for this species, consider that for higher levels + // 0: consider all levels, 1: consider only odd levels, 2: consider only even levels + switch (anyOddEven[s]) + { + case 1: + ignoreTopStats = higherLevel % 2 == 0; + break; + case 2: + ignoreTopStats = higherLevel % 2 != 0; + break; + } + } double weightedExpectedStatLevel = statWeights[s] * (Ark.ProbabilityInheritHigherLevel * higherLevel + Ark.ProbabilityInheritLowerLevel * lowerLevel) / 40; if (weightedExpectedStatLevel != 0) @@ -208,7 +231,7 @@ public static List CalculateBreedingScores(Creature[] females, Cre /// /// Sets the best levels in the passed bestLevels array, depending on the statWeights and onlyHighEvenLevels. /// - public static void SetBestLevels(IEnumerable creatures, int[] bestLevels, double[] statWeights, bool onlyHighEvenLevels) + public static void SetBestLevels(IEnumerable creatures, int[] bestLevels, double[] statWeights, byte[] anyOddEven = null) { for (int s = 0; s < Stats.StatsCount; s++) bestLevels[s] = -1; @@ -219,7 +242,10 @@ public static void SetBestLevels(IEnumerable creatures, int[] bestLeve { if ((s == Stats.Torpidity || statWeights[s] >= 0) && c.levelsWild[s] > bestLevels[s]) { - if (!onlyHighEvenLevels || c.levelsWild[s] % 2 == 0) + if ((anyOddEven?[s] ?? 0) == 0 + || (anyOddEven[s] == 1 && c.levelsWild[s] % 2 == 1) + || (anyOddEven[s] == 2 && c.levelsWild[s] % 2 == 0) + ) bestLevels[s] = c.levelsWild[s]; } else if (s != Stats.Torpidity && statWeights[s] < 0 && c.levelsWild[s] >= 0 && (c.levelsWild[s] < bestLevels[s] || bestLevels[s] < 0)) @@ -227,5 +253,27 @@ public static void SetBestLevels(IEnumerable creatures, int[] bestLeve } } } + + /// + /// Returns better of two given levels. If anyOddEven == 0: higher of both, if == 1: higher of odd levels, if == 2: higher of even levels. + /// If both levels don't match odd/even, -1 is returned. + /// + public static int GetHigherBestLevel(int level1, int level2, byte anyOddEven) + { + switch (anyOddEven) + { + case 1: + if (level1 % 2 == 1 && level2 % 2 == 1) return Math.Max(level1, level2); + if (level1 % 2 == 1) return level1; + if (level2 % 2 == 1) return level2; + return -1; + case 2: + if (level1 % 2 == 0 && level2 % 2 == 0) return Math.Max(level1, level2); + if (level1 % 2 == 0) return level1; + if (level2 % 2 == 0) return level2; + return -1; + default: return Math.Max(level1, level2); + } + } } } diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 616b475c..26fda1ed 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -229,13 +229,14 @@ private void Form1_Load(object sender, EventArgs e) // load stat weights double[][] custWd = Properties.Settings.Default.customStatWeights; + var customStatWeightOddEven = Properties.Settings.Default.CustomStatWeightOddEven; string[] custWs = Properties.Settings.Default.customStatWeightNames; - Dictionary custW = new Dictionary(); + var custW = new Dictionary(); if (custWs != null && custWd != null) { - for (int i = 0; i < custWs.Length && i < custWd.Length; i++) + for (int i = 0; i < custWs.Length && i < custWd.Length && i < customStatWeightOddEven.Length; i++) { - custW.Add(custWs[i], custWd[i]); + custW.Add(custWs[i], (custWd[i], customStatWeightOddEven[i])); } } @@ -243,6 +244,8 @@ private void Form1_Load(object sender, EventArgs e) // last set values are saved at the end of the custom weightings if (custWs != null && custWd != null && custWd.Length > custWs.Length) breedingPlan1.StatWeighting.WeightValues = custWd[custWs.Length]; + if (custWs != null && customStatWeightOddEven != null && customStatWeightOddEven.Length > custWs.Length) + breedingPlan1.StatWeighting.AnyOddEven = customStatWeightOddEven[custWs.Length]; // load weapon damages tamingControl1.WeaponDamages = Properties.Settings.Default.weaponDamages; @@ -1272,17 +1275,23 @@ private void Form1_FormClosed(object sender, FormClosedEventArgs e) Properties.Settings.Default.TimerPresets = timerList1.GetTimerPresets(); // save custom statWeights - List custWs = new List(); - List custWd = new List(); - foreach (KeyValuePair w in breedingPlan1.StatWeighting.CustomWeightings) + var custWs = new List(); + var custWd = new List(); + var custOddEven = new List(); + foreach (KeyValuePair w in breedingPlan1.StatWeighting.CustomWeightings) { custWs.Add(w.Key); - custWd.Add(w.Value); + custWd.Add(w.Value.Item1); + custOddEven.Add(w.Value.Item2); } - custWd.Add(breedingPlan1.StatWeighting.WeightValues); // add current values - Properties.Settings.Default.customStatWeights = custWd.ToArray(); + // add current values without name + custWd.Add(breedingPlan1.StatWeighting.WeightValues); + custOddEven.Add(breedingPlan1.StatWeighting.AnyOddEven); + Properties.Settings.Default.customStatWeightNames = custWs.ToArray(); + Properties.Settings.Default.customStatWeights = custWd.ToArray(); + Properties.Settings.Default.CustomStatWeightOddEven = custOddEven.ToArray(); // save weaponDamages for KO calculation Properties.Settings.Default.weaponDamages = tamingControl1.WeaponDamages; diff --git a/ARKBreedingStats/Form1.extractor.cs b/ARKBreedingStats/Form1.extractor.cs index f1c41c24..149f7e2a 100644 --- a/ARKBreedingStats/Form1.extractor.cs +++ b/ARKBreedingStats/Form1.extractor.cs @@ -121,7 +121,7 @@ private void ShowSumOfChosenLevels() var customStatNames = species.statNames; var statWeights = breedingPlan1.StatWeighting.GetWeightingByPresetName(species.name); - if (statWeights == null) checkLowLevels = false; + if (statWeights.Item1 == null) checkLowLevels = false; var analysisState = LevelStatus.Neutral; var newTopStatsText = new List(); var topStatsText = new List(); @@ -134,24 +134,32 @@ private void ShowSumOfChosenLevels() var levelStatus = LevelStatus.Neutral; - if (checkTopLevels && (statWeights?[s] ?? 0) >= 0) + if (checkTopLevels && (statWeights.Item1?[s] ?? 0) >= 0) { // higher stats are considered to be good. If no custom weightings are available, consider higher levels to be better. - if (_statIOs[s].LevelWild == topSpeciesLevels[s]) - { - levelStatus = LevelStatus.TopLevel; - topStatsText.Add(Utils.StatName(s, false, customStatNames)); - if (analysisState != LevelStatus.NewTopLevel) - analysisState = LevelStatus.TopLevel; - } - else if (topSpeciesLevels[s] != -1 && _statIOs[s].LevelWild > topSpeciesLevels[s]) + + // check if higher level is only considered if even or odd + if ((statWeights.Item2?[s] ?? 0) == 0 // even/odd doesn't matter + || (statWeights.Item2[s] == 1 && _statIOs[s].LevelWild % 2 == 1) + || (statWeights.Item2[s] == 2 && _statIOs[s].LevelWild % 2 == 0) + ) { - levelStatus = LevelStatus.NewTopLevel; - newTopStatsText.Add(Utils.StatName(s, false, customStatNames)); - analysisState = LevelStatus.NewTopLevel; + if (_statIOs[s].LevelWild == topSpeciesLevels[s]) + { + levelStatus = LevelStatus.TopLevel; + topStatsText.Add(Utils.StatName(s, false, customStatNames)); + if (analysisState != LevelStatus.NewTopLevel) + analysisState = LevelStatus.TopLevel; + } + else if (topSpeciesLevels[s] != -1 && _statIOs[s].LevelWild > topSpeciesLevels[s]) + { + levelStatus = LevelStatus.NewTopLevel; + newTopStatsText.Add(Utils.StatName(s, false, customStatNames)); + analysisState = LevelStatus.NewTopLevel; + } } } - else if (checkLowLevels && statWeights[s] < 0) + else if (checkLowLevels && statWeights.Item1[s] < 0) { // lower stats are considered to be good if (_statIOs[s].LevelWild == lowSpeciesLevels[s]) diff --git a/ARKBreedingStats/Form1.library.cs b/ARKBreedingStats/Form1.library.cs index 2935e224..2730be9b 100644 --- a/ARKBreedingStats/Form1.library.cs +++ b/ARKBreedingStats/Form1.library.cs @@ -354,6 +354,7 @@ private void CalculateTopStats(List creatures) List usedAndConsideredStatIndices = new List(Stats.StatsCount); int[] bestStat = new int[Stats.StatsCount]; int[] lowestStat = new int[Stats.StatsCount]; + var statWeights = breedingPlan1.StatWeighting.GetWeightingByPresetName(species.name); for (int s = 0; s < Stats.StatsCount; s++) { bestStat[s] = -1; @@ -407,29 +408,21 @@ private void CalculateTopStats(List creatures) } else if (c.levelsWild[si] > bestStat[si]) { - bestCreatures[si] = new List { c }; - bestStat[si] = c.levelsWild[si]; + // check if highest stats are only counted if odd or even + if ((statWeights.Item2?[s] ?? 0) == 0 // even/odd doesn't matter + || (statWeights.Item2[s] == 1 && c.levelsWild[si] % 2 == 1) + || (statWeights.Item2[s] == 2 && c.levelsWild[si] % 2 == 0) + ) + { + bestCreatures[si] = new List { c }; + bestStat[si] = c.levelsWild[si]; + } } } } - if (!_topLevels.ContainsKey(species)) - { - _topLevels.Add(species, bestStat); - } - else - { - _topLevels[species] = bestStat; - } - - if (!_lowestLevels.ContainsKey(species)) - { - _lowestLevels.Add(species, lowestStat); - } - else - { - _lowestLevels[species] = lowestStat; - } + _topLevels[species] = bestStat; + _lowestLevels[species] = lowestStat; // bestStat and bestCreatures now contain the best stats and creatures for each stat. diff --git a/ARKBreedingStats/Form1.resx b/ARKBreedingStats/Form1.resx index 8876b794..6d64181b 100644 --- a/ARKBreedingStats/Form1.resx +++ b/ARKBreedingStats/Form1.resx @@ -125,9 +125,89 @@ The TE can differ 0.1% due to ingame-rounding. 17, 17 - - 364, 17 - + + + + iVBORw0KGgoAAAANSUhEUgAAAGQAAAAyCAYAAACqNX6+AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAACDpJREFUeF7tWX9slOUdf3AkVocTN/7ossVgYlznjMFNLL01GzFu8Z85M8jSKTka + rICWUX5bqNy6gsMB0pq48aMy/3FjIwtmgwsNw9SMLXS4ecgEpVavqUKr5frDg7Z34H32+dzdM98dveu1 + 9Mi4vp/mm+f98dz7vO/383x/1rhw4eIq4luUfYnD/8J5TcdIkRcpUygucoBsCHHeFxEiZF78zMW4Y7SE + CA9RRIqLHGC0hLgWkmNI4akxQuIkJPXeOoqLHGG0FuIix3AJ+T+DS0iOoCBrfXwrpZKSDa6UkLGum9eQ + 0qSML8fPEqPO74if5Q6Z1tU9kTQhoV05XOaT62o607oTmhDtTH28lCNFOGF3sURz5H7Gi6hM62odu96E + hNzEFopVvN25dqdahY13UTfSui4IKekIRS0OKca5S1PPxxOp67qEOCD/LhkdIbvMDLPT1FOayzaVdWpM + ynb+zU7OygTnuhOWELkMiTPb0U6VUiRyJ7qWvg/1gimk0g9OajB91682uOkJg9ra2vgoKVhpMGmr6eWc + o5Si5K8yrau1Jiwh+ngpRgqQiAC5DcESkurjP8MO8yAJOXfDEoOvlBt8fZnBPTUJQoo3G3zTZ3DncoPp + CwxuXMRnNJgQSanmLzOtK4gcXXfhgAhJ76Lonib90vRO9SaUXlJvMGsDx+oEIR5aRwktpqTOwMN7d/P6 + l+YZTF5vzsuizEumIPkkF1kiPSE7TdkP6x4a+tqCqZi5yeA+Kv0+EjN3qUEFrUKEVNFCFtUaPEqXVUoi + ZtFyvrtlCn688kFMrjFhPqM2+TQXVwTFDLqp2x6bhhU/X4zvrfwqZpOMRSRl6TMGi2kVImTBQl5bYbCE + pCzfajBnYSGW1VTg+5sLMY3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LEmF6N72r872uaUih+nAr+mBnypsdIeo/ + 7TBHnzrVi6GhEDo6TqI9FMaFSBSDwTV45K9diA51ItgWwOlgK85dGMSF9jVxy4iToR5WwlU5Yd9N60j0 + brYO0ahzi+xT9QmDl8zUR49+iP5QEG3tbTjN4jDU1YrmQywA/3EC3QPtCDLgv0WyunvOoaPZm3BTsozL + ybCQpYiYCVOpjyM88PkDePejMMJDlEFKz7s4fsCLWzY34tSbLTjeGkCAVnLynRb493vgNhKvFmgtnhf8 + 8P+JSlflvccHf2cjvDquJXF/88P3nbg7cnG14PGREFbpydP4eYCVelwavS4ZLvIL2fa3tPPTBd/UjM6K + izFChGTKdFLT4lSMdN/FKKFCzNnOUO6vFoeF6gBbswwHl5Bxhooxq3BZipTr7COJHCldEHGyKLkkzVOV + nYkQ2yHQfP3OWaG7SAPFEatQKVwWob6SVZ6NMZon5doWh23ZixBn7JBYgvVbW2nbeS6ygFW6FCmFiwwp + 3EnWcIqXZLIQ3XdChGq+ixGgOCJFOf//oGNZTLqel4VLSA4ga5BrcTbyRIRIsQqUtViLEDTXxpd0hLgu + a4ywyrbxQbAB3Ak3qLu41mHMfwCWaqdyEzp1TQAAAABJRU5ErkJggg== + + Extraction failed, common causes: @@ -153,11 +233,55 @@ The TE can differ 0.1% due to ingame-rounding. 11. The stat-values in this tool are wrong or the game does show wrong stats. You can via reddit or github send me a screenshot that contains the stats of the creature ingame and the extractor with the typed in values along with the stat-multipliers in the settings. + + 364, 17 + Use this to fix the color ids. This will probably work if you play on a server with no new mod colors. If you play on a server with new colors, this will screw the colors up. It's recommended to first create a backup file of you library. + + + + iVBORw0KGgoAAAANSUhEUgAAAGQAAAAyCAYAAACqNX6+AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vAAADrwBlbxySQAACDpJREFUeF7tWX9slOUdf3AkVocTN/7ossVgYlznjMFNLL01GzFu8Z85M8jSKTka + rICWUX5bqNy6gsMB0pq48aMy/3FjIwtmgwsNw9SMLXS4ecgEpVav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i6GhEDo6TqI9FMaFSBSDwTV45K9diA51ItgWwOlgK85dGMSF9jVxy4iToR5WwlU5Yd9N60j0 + brYO0ahzi+xT9QmDl8zUR49+iP5QEG3tbTjN4jDU1YrmQywA/3EC3QPtCDLgv0WyunvOoaPZm3BTsozL + ybCQpYiYCVOpjyM88PkDePejMMJDlEFKz7s4fsCLWzY34tSbLTjeGkCAVnLynRb493vgNhKvFmgtnhf8 + 8P+JSlflvccHf2cjvDquJXF/88P3nbg7cnG14PGREFbpydP4eYCVelwavS4ZLvIL2fa3tPPTBd/UjM6K + izFChGTKdFLT4lSMdN/FKKFCzNnOUO6vFoeF6gBbswwHl5Bxhooxq3BZipTr7COJHCldEHGyKLkkzVOV + nYkQ2yHQfP3OWaG7SAPFEatQKVwWob6SVZ6NMZon5doWh23ZixBn7JBYgvVbW2nbeS6ygFW6FCmFiwwp + 3EnWcIqXZLIQ3XdChGq+ixGgOCJFOf//oGNZTLqel4VLSA4ga5BrcTbyRIRIsQqUtViLEDTXxpd0hLgu + a4ywyrbxQbAB3Ak3qLu41mHMfwCWaqdyEzp1TQAAAABJRU5ErkJggg== + 248, 17 @@ -165,7 +289,6 @@ It's recommended to first create a backup file of you library. 655, 17 - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 @@ -362,129 +485,6 @@ It's recommended to first create a backup file of you library. 760, 17 - - - iVBORw0KGgoAAAANSUhEUgAAAGQAAAAyCAYAAACqNX6+AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vAAADrwBlbxySQAACDpJREFUeF7tWX9slOUdf3AkVocTN/7ossVgYlznjMFNLL01GzFu8Z85M8jSKTka - rICWUX5bqNy6gsMB0pq48aMy/3FjIwtmgwsNw9SMLXS4ecgEpVavqUKr5frDg7Z34H32+dzdM98dveu1 - 9Mi4vp/mm+f98dz7vO/383x/1rhw4eIq4luUfYnD/8J5TcdIkRcpUygucoBsCHHeF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UR49+iP5QEG3tbTjN4jDU1YrmQywA/3EC3QPtCDLgv0WyunvOoaPZm3BTsozL - ybCQpYiYCVOpjyM88PkDePejMMJDlEFKz7s4fsCLWzY34tSbLTjeGkCAVnLynRb493vgNhKvFmgtnhf8 - 8P+JSlflvccHf2cjvDquJXF/88P3nbg7cnG14PGREFbpydP4eYCVelwavS4ZLvIL2fa3tPPTBd/UjM6K - izFChGTKdFLT4lSMdN/FKKFCzNnOUO6vFoeF6gBbswwHl5Bxhooxq3BZipTr7COJHCldEHGyKLkkzVOV - nYkQ2yHQfP3OWaG7SAPFEatQKVwWob6SVZ6NMZon5doWh23ZixBn7JBYgvVbW2nbeS6ygFW6FCmFiwwp - 3EnWcIqXZLIQ3XdChGq+ixGgOCJFOf//oGNZTLqel4VLSA4ga5BrcTbyRIRIsQqUtViLEDTXxpd0hLgu - a4ywyrbxQbAB3Ak3qLu41mHMfwCWaqdyEzp1TQAAAABJRU5ErkJggg== - - - - - iVBORw0KGgoAAAANSUhEUgAAAGQAAAAyCAYAAACqNX6+AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - vAAADrwBlbxySQAACDpJREFUeF7tWX9slOUdf3AkVocTN/7ossVgYlznjMFNLL01GzFu8Z85M8jSKTka - rICWUX5bqNy6gsMB0pq48aMy/3FjIwtmgwsNw9SMLXS4ecgEpVavqUKr5frDg7Z34H32+dzdM98dveu1 - 9Mi4vp/mm+f98dz7vO/383x/1rhw4eIq4luUfYnD/8J5TcdIkRcpUygucoBsCHHeFxEiZF78zMW4Y7SE - CA9RRIqLHGC0hLgWkmNI4akxQuIkJPXeOoqLHGG0FuIix3AJ+T+DS0iOoCBrfXwrpZKSDa6UkLGum9eQ - 0qSML8fPEqPO74if5Q6Z1tU9kTQhoV05XOaT62o607oTmhDtTH28lCNFOGF3sURz5H7Gi6hM62odu96E - hNzEFopVvN25dqdahY13UTfSui4IKekIRS0OKca5S1PPxxOp67qEOCD/LhkdIbvMDLPT1FOayzaVdWpM - ynb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Jggg== - - 76 diff --git a/ARKBreedingStats/Properties/Settings.Designer.cs b/ARKBreedingStats/Properties/Settings.Designer.cs index cdd81809..fe53e14b 100644 --- a/ARKBreedingStats/Properties/Settings.Designer.cs +++ b/ARKBreedingStats/Properties/Settings.Designer.cs @@ -1602,18 +1602,6 @@ public bool AutoImportedExportFileRename { } } - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool BreedingPlannerConsiderOnlyEvenForHighStats { - get { - return ((bool)(this["BreedingPlannerConsiderOnlyEvenForHighStats"])); - } - set { - this["BreedingPlannerConsiderOnlyEvenForHighStats"] = value; - } - } - [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] @@ -2195,5 +2183,16 @@ public bool AlwaysShowAllColorRegions { this["AlwaysShowAllColorRegions"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public byte[][] CustomStatWeightOddEven { + get { + return ((byte[][])(this["CustomStatWeightOddEven"])); + } + set { + this["CustomStatWeightOddEven"] = value; + } + } } } diff --git a/ARKBreedingStats/Properties/Settings.settings b/ARKBreedingStats/Properties/Settings.settings index b8ad4f5b..e05bf72d 100644 --- a/ARKBreedingStats/Properties/Settings.settings +++ b/ARKBreedingStats/Properties/Settings.settings @@ -401,9 +401,6 @@ False - - False - False @@ -551,5 +548,8 @@ False + + + \ No newline at end of file diff --git a/ARKBreedingStats/library/DummyCreatures.cs b/ARKBreedingStats/library/DummyCreatures.cs index 1775ce5a..341561ac 100644 --- a/ARKBreedingStats/library/DummyCreatures.cs +++ b/ARKBreedingStats/library/DummyCreatures.cs @@ -204,7 +204,7 @@ private static List BreedCreatures(Creature[] creatures, Species speci allCreatures.AddRange(femalesMales[Sex.Male]); } - BreedingScore.SetBestLevels(allCreatures, bestLevels, statWeights, true); + BreedingScore.SetBestLevels(allCreatures, bestLevels, statWeights); var allCreaturesArray = noGender ? allCreatures.ToArray() : null; var pairs = BreedingScore.CalculateBreedingScores(noGender ? allCreaturesArray : femalesMales[Sex.Female].ToArray(), diff --git a/ARKBreedingStats/uiControls/StatWeighting.Designer.cs b/ARKBreedingStats/uiControls/StatWeighting.Designer.cs index 0a2bbd58..25bcbce1 100644 --- a/ARKBreedingStats/uiControls/StatWeighting.Designer.cs +++ b/ARKBreedingStats/uiControls/StatWeighting.Designer.cs @@ -142,9 +142,10 @@ private void InitializeComponent() // // tableLayoutPanelMain // - this.tableLayoutPanelMain.ColumnCount = 2; - this.tableLayoutPanelMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 40F)); - this.tableLayoutPanelMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 60F)); + this.tableLayoutPanelMain.ColumnCount = 3; + this.tableLayoutPanelMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F)); + this.tableLayoutPanelMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanelMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 17F)); this.tableLayoutPanelMain.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanelMain.Location = new System.Drawing.Point(3, 21); this.tableLayoutPanelMain.Name = "tableLayoutPanelMain"; diff --git a/ARKBreedingStats/uiControls/StatWeighting.cs b/ARKBreedingStats/uiControls/StatWeighting.cs index 1bfc42d4..152473e4 100644 --- a/ARKBreedingStats/uiControls/StatWeighting.cs +++ b/ARKBreedingStats/uiControls/StatWeighting.cs @@ -1,5 +1,4 @@ using ARKBreedingStats.species; -using ARKBreedingStats.values; using System; using System.Collections.Generic; using System.Linq; @@ -11,10 +10,11 @@ namespace ARKBreedingStats.uiControls { public partial class StatWeighting : UserControl { - private Dictionary _customWeightings = new Dictionary(); + private Dictionary _customWeightings = new Dictionary(); private Species _currentSpecies; - private readonly Label[] _statLabels; - private readonly Nud[] _weightNuds; + private readonly Label[] _statLabels = new Label[Stats.StatsCount]; + private readonly Nud[] _weightNuds = new Nud[Stats.StatsCount]; + private readonly TriButton[] _statEvenOddButtons = new TriButton[Stats.StatsCount]; public event Action WeightingsChanged; private readonly Debouncer _valueChangedDebouncer = new Debouncer(); private readonly ToolTip _tt = new ToolTip(); @@ -24,8 +24,6 @@ public StatWeighting() InitializeComponent(); _tt.SetToolTip(groupBox1, "Increase the weights for stats that are more important to you to be high in the offspring.\nRight click for Presets."); _currentSpecies = null; - _weightNuds = new Nud[Stats.StatsCount]; - _statLabels = new Label[Stats.StatsCount]; var displayedStats = new int[]{ Stats.Health, @@ -51,13 +49,22 @@ public StatWeighting() Minimum = -1000 }; n.ValueChanged += Input_ValueChanged; + var tBt = new TriButton(_tt) + { + Margin = new Padding() + }; + tBt.StateChanged += WeightingsChangedNotifier; tableLayoutPanelMain.Controls.Add(l); tableLayoutPanelMain.Controls.Add(n); + tableLayoutPanelMain.Controls.Add(tBt); tableLayoutPanelMain.SetRow(l, ds); tableLayoutPanelMain.SetRow(n, ds); + tableLayoutPanelMain.SetRow(tBt, ds); tableLayoutPanelMain.SetColumn(n, 1); + tableLayoutPanelMain.SetColumn(tBt, 2); _statLabels[displayedStats[ds]] = l; _weightNuds[displayedStats[ds]] = n; + _statEvenOddButtons[displayedStats[ds]] = tBt; } } @@ -75,9 +82,14 @@ public void SetSpecies(Species species) } private void Input_ValueChanged(object sender, EventArgs e) + { + WeightingsChangedNotifier(); + } + + private void WeightingsChangedNotifier() { if (WeightingsChanged != null) - _valueChangedDebouncer.Debounce(200, WeightingsChanged, Dispatcher.CurrentDispatcher); + _valueChangedDebouncer.Debounce(500, WeightingsChanged, Dispatcher.CurrentDispatcher); } public double[] Weightings @@ -124,6 +136,25 @@ public double[] WeightValues } } + /// + /// Array that for each stat indicates if the level, if high, should be only considered if odd (1), even (2), or always (0). + /// + public byte[] AnyOddEven + { + set + { + if (value == null) + return; + + for (int s = 0; s < Stats.StatsCount; s++) + { + if (_statEvenOddButtons[s] != null) + _statEvenOddButtons[s].ButtonState = value[s]; + } + } + get => _statEvenOddButtons.Select(b => b?.ButtonState ?? 0).ToArray(); + } + private void btAllToOne_Click(object sender, EventArgs e) { cbbPresets.SelectedIndex = 0; @@ -160,11 +191,17 @@ public bool TrySetPresetByName(string presetName) private bool SelectPresetByName(string presetName) { if (!_customWeightings.TryGetValue(presetName, out var weightings)) return false; - WeightValues = weightings; + WeightValues = weightings.Item1; + AnyOddEven = weightings.Item2; return true; } - public double[] GetWeightingByPresetName(string presetName) => _customWeightings.TryGetValue(presetName, out var weightings) ? weightings : null; + public (double[], byte[]) GetWeightingByPresetName(string presetName, bool useDefaultBackupIfAvailable = true) + { + if (_customWeightings.TryGetValue(presetName, out var weightings)) return weightings; + return useDefaultBackupIfAvailable + && _customWeightings.TryGetValue("Default", out weightings) ? weightings : (null, null); + } private void btDelete_Click(object sender, EventArgs e) { @@ -197,19 +234,19 @@ private void SavePreset() if (MessageBox.Show("Preset-Name exists already, overwrite?", "Overwrite Preset?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { - _customWeightings[presetName] = WeightValues; + _customWeightings[presetName] = (WeightValues, AnyOddEven); } else return; } else - _customWeightings.Add(presetName, WeightValues); + _customWeightings.Add(presetName, (WeightValues, AnyOddEven)); CustomWeightings = _customWeightings; TrySetPresetByName(presetName); } } - public Dictionary CustomWeightings + public Dictionary CustomWeightings { get => _customWeightings; set @@ -223,5 +260,50 @@ public Dictionary CustomWeightings cbbPresets.SelectedIndex = 0; } } + + private class TriButton : Button + { + private readonly ToolTip _tt; + private byte _buttonState; + public event Action StateChanged; + + public byte ButtonState + { + get => _buttonState; + set => SetState(value); + } + + public TriButton(ToolTip tt) + { + _tt = tt; + Click += BtClicked; + } + + private void BtClicked(object sender, EventArgs e) + { + SetState(++_buttonState); + StateChanged?.Invoke(); + } + + private void SetState(byte state) + { + _buttonState = state; + switch (state) + { + case 1: + Text = "1"; + _tt.SetToolTip(this, "high level has to be odd"); + break; + case 2: + Text = "2"; + _tt.SetToolTip(this, "high level has to be even"); + break; + default: + _buttonState = 0; + Text = string.Empty; + break; + } + } + } } } From 92e91228eb2fe4cdcba52f734dbd7314470d20c0 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 30 Apr 2023 13:08:19 +0200 Subject: [PATCH 3/5] weighting preset by species more granular --- .../BreedingPlanning/BreedingPlan.cs | 3 +- ARKBreedingStats/uiControls/StatWeighting.cs | 52 +++++++++++++++---- 2 files changed, 42 insertions(+), 13 deletions(-) diff --git a/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs b/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs index 2f1136c9..8baf3075 100644 --- a/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs +++ b/ARKBreedingStats/BreedingPlanning/BreedingPlan.cs @@ -941,8 +941,7 @@ public void SetSpecies(Species species) // automatically set preset if preset with the species name exists _updateBreedingPlanAllowed = false; - if (!StatWeighting.TrySetPresetByName(species.name)) - StatWeighting.TrySetPresetByName("Default"); + StatWeighting.TrySetPresetBySpecies(species); _updateBreedingPlanAllowed = true; DetermineBestBreeding(setSpecies: species); diff --git a/ARKBreedingStats/uiControls/StatWeighting.cs b/ARKBreedingStats/uiControls/StatWeighting.cs index 152473e4..e5c58ffa 100644 --- a/ARKBreedingStats/uiControls/StatWeighting.cs +++ b/ARKBreedingStats/uiControls/StatWeighting.cs @@ -158,24 +158,30 @@ public byte[] AnyOddEven private void btAllToOne_Click(object sender, EventArgs e) { cbbPresets.SelectedIndex = 0; - double[] values = new double[Stats.StatsCount]; - for (int s = 0; s < Stats.StatsCount; s++) values[s] = 1; - WeightValues = values; } - private void cbbPresets_SelectedIndexChanged(object sender, EventArgs e) + /// + /// Sets weightings to species. First the blueprint path is checked, then the full species name inclusive mod and variant, then only the base name. + /// + public bool TrySetPresetBySpecies(Species species, bool useDefaultBackupIfAvailable = true) { - SelectPresetByName((sender as ComboBox)?.SelectedItem.ToString()); + if (TrySetPresetByName(species.blueprintPath)) return true; + if (TrySetPresetByName(species.DescriptiveNameAndMod)) return true; + if (TrySetPresetByName(species.DescriptiveName)) return true; + if (TrySetPresetByName(species.name)) return true; + return useDefaultBackupIfAvailable + && TrySetPresetByName("Default"); } /// /// Sets the according preset. If not available, false is returned. /// - /// - /// public bool TrySetPresetByName(string presetName) { - int index = presetName == null ? -1 : cbbPresets.Items.IndexOf(presetName); + if (presetName == null) return false; + if (cbbPresets.SelectedItem as string == presetName) return true; + + int index = cbbPresets.Items.IndexOf(presetName); if (index == -1) return false; @@ -183,6 +189,11 @@ public bool TrySetPresetByName(string presetName) return true; } + private void cbbPresets_SelectedIndexChanged(object sender, EventArgs e) + { + SelectPresetByName((sender as ComboBox)?.SelectedItem.ToString()); + } + /// /// Sets the statWeighting to the preset with the given name, if that is available. If not available, nothing happens. /// @@ -190,12 +201,31 @@ public bool TrySetPresetByName(string presetName) /// True if the preset was set, false if there is no preset with the given name private bool SelectPresetByName(string presetName) { + if (presetName == "-") + { + WeightValues = Enumerable.Repeat(1d, Stats.StatsCount).ToArray(); + AnyOddEven = Enumerable.Repeat((byte)0, Stats.StatsCount).ToArray(); + return true; + } if (!_customWeightings.TryGetValue(presetName, out var weightings)) return false; WeightValues = weightings.Item1; AnyOddEven = weightings.Item2; return true; } + /// + /// Returns weightings for species. First the blueprint path is checked, then the full species name inclusive mod and variant, then only the base name. + /// + public (double[], byte[]) GetWeightingForSpecies(Species species, bool useDefaultBackupIfAvailable = true) + { + if (_customWeightings.TryGetValue(species.blueprintPath, out var weightings)) return weightings; + if (_customWeightings.TryGetValue(species.DescriptiveNameAndMod, out weightings)) return weightings; + if (_customWeightings.TryGetValue(species.DescriptiveName, out weightings)) return weightings; + if (_customWeightings.TryGetValue(species.name, out weightings)) return weightings; + return useDefaultBackupIfAvailable + && _customWeightings.TryGetValue("Default", out weightings) ? weightings : (null, null); + } + public (double[], byte[]) GetWeightingByPresetName(string presetName, bool useDefaultBackupIfAvailable = true) { if (_customWeightings.TryGetValue(presetName, out var weightings)) return weightings; @@ -222,12 +252,12 @@ private void DeletePresetByName(string presetName) private void btSavePreset_Click(object sender, EventArgs e) { - SavePreset(); + SavePreset(_currentSpecies.name); } - private void SavePreset() + private void SavePreset(string presetName) { - if (Utils.ShowTextInput("Preset-Name", out string presetName, "New Preset", _currentSpecies.name) && presetName.Length > 0) + if (Utils.ShowTextInput("Preset-Name", out presetName, "New Preset", presetName) && presetName.Length > 0) { if (_customWeightings.ContainsKey(presetName)) { From 49b53f3507d6d2fe9c0af97ced386387ec262a81 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 30 Apr 2023 13:11:06 +0200 Subject: [PATCH 4/5] more descriptive tooltip for topstat even/odd --- ARKBreedingStats/uiControls/StatWeighting.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ARKBreedingStats/uiControls/StatWeighting.cs b/ARKBreedingStats/uiControls/StatWeighting.cs index e5c58ffa..964cf6f6 100644 --- a/ARKBreedingStats/uiControls/StatWeighting.cs +++ b/ARKBreedingStats/uiControls/StatWeighting.cs @@ -322,15 +322,16 @@ private void SetState(byte state) { case 1: Text = "1"; - _tt.SetToolTip(this, "high level has to be odd"); + _tt.SetToolTip(this, "high level has to be odd to be a top stat"); break; case 2: Text = "2"; - _tt.SetToolTip(this, "high level has to be even"); + _tt.SetToolTip(this, "high level has to be even to be a top stat"); break; default: _buttonState = 0; Text = string.Empty; + _tt.SetToolTip(this, "high level can be even or odd"); break; } } From b1f795ef5c9294a48f967bb8a3523156dbea7865 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 30 Apr 2023 13:14:26 +0200 Subject: [PATCH 5/5] ver --- ARKBreedingStats/Properties/AssemblyInfo.cs | 2 +- ARKBreedingStats/_manifest.json | 2 +- ARKBreedingStats/json/values/_manifest.json | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ARKBreedingStats/Properties/AssemblyInfo.cs b/ARKBreedingStats/Properties/AssemblyInfo.cs index 0a5cba3a..6bf2b047 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.52.1.1")] +[assembly: AssemblyFileVersion("0.53.0.0")] [assembly: NeutralResourcesLanguage("en")] diff --git a/ARKBreedingStats/_manifest.json b/ARKBreedingStats/_manifest.json index 76177ea5..97371e62 100644 --- a/ARKBreedingStats/_manifest.json +++ b/ARKBreedingStats/_manifest.json @@ -4,7 +4,7 @@ "ARK Smart Breeding": { "Id": "ARK Smart Breeding", "Category": "main", - "version": "0.52.1.1" + "version": "0.53.0.0" }, "SpeciesColorImages": { "Id": "SpeciesColorImages", diff --git a/ARKBreedingStats/json/values/_manifest.json b/ARKBreedingStats/json/values/_manifest.json index 0fa06db5..38186a2b 100644 --- a/ARKBreedingStats/json/values/_manifest.json +++ b/ARKBreedingStats/json/values/_manifest.json @@ -6,7 +6,7 @@ "mod": { "id": "1083349027", "tag": "SpeedyFlyers", "title": "Najs Speedy Flyers" } }, "1090809604-Pyria.json": { - "version": "357.12.1681020738", + "version": "357.14.1682203587", "mod": { "id": "1090809604", "tag": "Pyria", "title": "Pyria: Mythos Evolved" } }, "1092784125-Gryphons.json": { @@ -170,11 +170,11 @@ "mod": { "id": "1729512589", "tag": "Brachiosaurus", "title": "ARK Additions: Brachiosaurus!" } }, "1734595558-Pyria2.json": { - "version": "357.5.1680228174", + "version": "357.15.1681408567.1", "mod": { "id": "1734595558", "tag": "Pyria2", "title": "Pyria: The Second Chapter" } }, "1754846792-Zythara_Critters.json": { - "version": "357.14.1680668333", + "version": "357.15.1682481287.1", "mod": { "id": "1754846792", "tag": "Zythara_Critters", "title": "Zythara Critters" } }, "1768499278-BalancedJPE.json": { @@ -291,7 +291,7 @@ "mod": { "id": "2362246280", "tag": "GigaFullTame", "title": "Giga Full Tame" } }, "2447186973-ArkOmega.json": { - "version": "357.14.1681967408", + "version": "357.15.1682658841", "mod": { "id": "2447186973", "tag": "ArkOmega", "title": "Ark Omega" } }, "2493949846-Endemics.json": { @@ -307,11 +307,11 @@ "mod": { "id": "2804332920", "tag": "PaleoARKlegends", "title": "Paleo ARK: Legends Expansion!" } }, "2869411055-SDinoVariants.json": { - "version": "355.3.1671458793", + "version": "357.15.1682518886", "mod": { "id": "2869411055", "tag": "SDinoVariants", "title": "SDinoVariants" } }, "710880648-DinoOverHaulMODX.json": { - "version": "357.14.1682108466", + "version": "357.15.1682737580", "mod": { "id": "710880648", "tag": "DinoOverHaulMODX", "title": "DinoOverhaul X -- Hardcore PvE Experience" } }, "729352919-IndomRex.json": {