From 857223a89dedbf83282b2a363231ec7fb4481d83 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 18 May 2024 21:51:07 +0200 Subject: [PATCH 1/7] added server preset all 1 --- ARKBreedingStats/json/serverMultipliers.json | 16 ++++++++++++++++ .../values/ServerMultipliersPresets.cs | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ARKBreedingStats/json/serverMultipliers.json b/ARKBreedingStats/json/serverMultipliers.json index 98efe4c27..6739b2bcd 100644 --- a/ARKBreedingStats/json/serverMultipliers.json +++ b/ARKBreedingStats/json/serverMultipliers.json @@ -82,6 +82,22 @@ "MatingIntervalMultiplier": 0.5, "EggHatchSpeedMultiplier": 2, "BabyMatureSpeedMultiplier": 2 + }, + "all 1": { + "statMultipliers": [ + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null + ] } } } \ No newline at end of file diff --git a/ARKBreedingStats/values/ServerMultipliersPresets.cs b/ARKBreedingStats/values/ServerMultipliersPresets.cs index 65f4ccbbd..959708d3f 100644 --- a/ARKBreedingStats/values/ServerMultipliersPresets.cs +++ b/ARKBreedingStats/values/ServerMultipliersPresets.cs @@ -66,8 +66,8 @@ public static bool TryLoadServerMultipliersPresets(out ServerMultipliersPresets public ServerMultipliers GetPreset(string presetName) { if (!string.IsNullOrEmpty(presetName) - && serverMultiplierDictionary.ContainsKey(presetName)) - return serverMultiplierDictionary[presetName].Copy(true); + && serverMultiplierDictionary.TryGetValue(presetName, out var serverPreset)) + return serverPreset.Copy(true); return null; } From 95783b10ca9992200872432e4f4891190f64d860 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 18 May 2024 21:59:38 +0200 Subject: [PATCH 2/7] wild flag fix export gun --- ARKBreedingStats/importExportGun/ImportExportGun.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ARKBreedingStats/importExportGun/ImportExportGun.cs b/ARKBreedingStats/importExportGun/ImportExportGun.cs index 3615563ff..64254ac23 100644 --- a/ARKBreedingStats/importExportGun/ImportExportGun.cs +++ b/ARKBreedingStats/importExportGun/ImportExportGun.cs @@ -122,13 +122,13 @@ 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 - && ec.TameEffectiveness == 0 ; var isBred = !string.IsNullOrEmpty(ec.ImprinterName) From 5ba73cee6a19efc8c8f8d71b759798eec25d9010 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 18 May 2024 22:24:20 +0200 Subject: [PATCH 3/7] stat percentage flag cleanup --- ARKBreedingStats/Ark.cs | 20 +++++++++++++++++++ ARKBreedingStats/Extraction.cs | 2 +- ARKBreedingStats/Form1.cs | 2 +- ARKBreedingStats/NamePatterns/NamePattern.cs | 2 +- ARKBreedingStats/Pedigree/PedigreeCreature.cs | 8 ++++---- ARKBreedingStats/Stats.cs | 2 +- ARKBreedingStats/Utils.cs | 9 --------- .../importExportGun/ImportExportGun.cs | 2 +- .../library/CreatureInfoGraphic.cs | 4 ++-- .../library/ExportImportCreatures.cs | 4 ++-- .../StatsMultiplierTesting.cs | 2 +- ARKBreedingStats/raising/ParentStats.cs | 8 ++++---- ARKBreedingStats/uiControls/Hatching.cs | 6 +++--- ARKBreedingStats/uiControls/StatPotentials.cs | 2 +- ARKBreedingStats/uiControls/StatsDisplay.cs | 2 +- 15 files changed, 43 insertions(+), 32 deletions(-) diff --git a/ARKBreedingStats/Ark.cs b/ARKBreedingStats/Ark.cs index e8eefd51f..336f644cc 100644 --- a/ARKBreedingStats/Ark.cs +++ b/ARKBreedingStats/Ark.cs @@ -232,5 +232,25 @@ public static class Stats false, //TemperatureFortitude, false, //CraftingSpeedMultiplier }; + + /// + /// Returns if the stat is a percentage value. + /// + public static bool IsPercentage(int statIndex) + { + return statIndex == MeleeDamageMultiplier + || statIndex == SpeedMultiplier + || statIndex == TemperatureFortitude + || statIndex == CraftingSpeedMultiplier; + } + + /// + /// Returns the displayed decimal values of the stat with the given index + /// + public static int Precision(int statIndex) + { + // damage and speed are percentage values and thus the displayed values have a higher precision + return IsPercentage(statIndex) ? 3 : 1; + } } } diff --git a/ARKBreedingStats/Extraction.cs b/ARKBreedingStats/Extraction.cs index 745ae8cf1..3ef2ad6bd 100644 --- a/ARKBreedingStats/Extraction.cs +++ b/ARKBreedingStats/Extraction.cs @@ -186,7 +186,7 @@ public void ExtractLevels(Species species, int level, StatIO[] statIOs, double l statIOs[s].postTame = PostTamed; // determine the precision of the input value - float toleranceForThisStat = StatValueCalculation.DisplayedAberration(statIOs[s].Input, Utils.Precision(s), highPrecisionInputs); + float toleranceForThisStat = StatValueCalculation.DisplayedAberration(statIOs[s].Input, Stats.Precision(s), highPrecisionInputs); //Console.WriteLine($"Precision stat {s}: {toleranceForThisStat}"); MinMaxDouble inputValue = new MinMaxDouble(statIOs[s].Input - toleranceForThisStat, statIOs[s].Input + toleranceForThisStat); diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs index 994021c0d..42c04fbd1 100644 --- a/ARKBreedingStats/Form1.cs +++ b/ARKBreedingStats/Form1.cs @@ -214,7 +214,7 @@ public Form1() statIndex = s }; - if (Utils.Precision(s) == 3) + if (Stats.IsPercentage(s)) { statIo.Percent = true; statIoTesting.Percent = true; diff --git a/ARKBreedingStats/NamePatterns/NamePattern.cs b/ARKBreedingStats/NamePatterns/NamePattern.cs index 3a4803cff..010e3ddf6 100644 --- a/ARKBreedingStats/NamePatterns/NamePattern.cs +++ b/ARKBreedingStats/NamePatterns/NamePattern.cs @@ -355,7 +355,7 @@ public static Dictionary CreateTokenDictionary(Creature creature for (int s = 0; s < Stats.StatsCount; s++) { dict.Add(StatAbbreviationFromIndex[s], creature.levelsWild[s].ToString()); - dict.Add($"{StatAbbreviationFromIndex[s]}_vb", (creature.valuesBreeding[s] * (Utils.Precision(s) == 3 ? 100 : 1)).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) : diff --git a/ARKBreedingStats/Pedigree/PedigreeCreature.cs b/ARKBreedingStats/Pedigree/PedigreeCreature.cs index 9afaae915..fdadd93ee 100644 --- a/ARKBreedingStats/Pedigree/PedigreeCreature.cs +++ b/ARKBreedingStats/Pedigree/PedigreeCreature.cs @@ -208,8 +208,8 @@ public Creature Creature _labels[s].BackColor = Color.WhiteSmoke; _labels[s].ForeColor = Color.LightGray; _ttMonospaced.SetToolTip(_labels[s], Utils.StatName(si, false, _creature.Species?.statNames) + ": " - + $"{_creature.valuesBreeding[si] * (Utils.Precision(si) == 3 ? 100 : 1),7:#,0.0}" - + (Utils.Precision(si) == 3 ? "%" : string.Empty)); + + $"{_creature.valuesBreeding[si] * (Stats.IsPercentage(si) ? 100 : 1),7:#,0.0}" + + (Stats.IsPercentage(si) ? "%" : string.Empty)); } else { @@ -234,8 +234,8 @@ public Creature Creature _labels[s].BackColor = Utils.GetColorFromPercent((int)(_creature.levelsWild[si] * 2.5), _creature.IsTopStat(si) ? 0.2 : 0.7); _labels[s].ForeColor = Parent?.ForeColor ?? Color.Black; // needed so text is not transparent on overlay _ttMonospaced.SetToolTip(_labels[s], Utils.StatName(si, false, _creature.Species?.statNames) + ": " - + $"{_creature.valuesBreeding[si] * (Utils.Precision(si) == 3 ? 100 : 1),7:#,0.0}" - + (Utils.Precision(si) == 3 ? "%" : string.Empty) + + $"{_creature.valuesBreeding[si] * (Stats.IsPercentage(si) ? 100 : 1),7:#,0.0}" + + (Stats.IsPercentage(si) ? "%" : string.Empty) + (_creature.levelsMutated == null ? string.Empty : Environment.NewLine + Loc.S("Mutations") + ": " + _creature.levelsMutated[si] )); diff --git a/ARKBreedingStats/Stats.cs b/ARKBreedingStats/Stats.cs index 4dffedc24..2cfc680b6 100644 --- a/ARKBreedingStats/Stats.cs +++ b/ARKBreedingStats/Stats.cs @@ -48,7 +48,7 @@ public static double CalculateValue(Species species, int stat, int levelWild, in if (result <= 0) return 0; if (roundToIngamePrecision) - return Math.Round(result, Utils.Precision(stat), MidpointRounding.AwayFromZero); + return Math.Round(result, Stats.Precision(stat), MidpointRounding.AwayFromZero); return result; } diff --git a/ARKBreedingStats/Utils.cs b/ARKBreedingStats/Utils.cs index eac71e149..77937df04 100644 --- a/ARKBreedingStats/Utils.cs +++ b/ARKBreedingStats/Utils.cs @@ -390,15 +390,6 @@ public static string StatName(int statIndex, bool abbreviation = false, Dictiona return abbreviation ? _statNamesAbb[statIndex] : _statNames[statIndex]; } - /// - /// Returns the displayed decimal values of the stat with the given index - /// - public static int Precision(int statIndex) - { - // damage and speed are percentage values, need more precision - return (statIndex == Stats.SpeedMultiplier || statIndex == Stats.MeleeDamageMultiplier || statIndex == Stats.CraftingSpeedMultiplier) ? 3 : 1; - } - /// /// String that represents a duration. /// diff --git a/ARKBreedingStats/importExportGun/ImportExportGun.cs b/ARKBreedingStats/importExportGun/ImportExportGun.cs index 64254ac23..6a3cbd6d8 100644 --- a/ARKBreedingStats/importExportGun/ImportExportGun.cs +++ b/ARKBreedingStats/importExportGun/ImportExportGun.cs @@ -116,7 +116,7 @@ private static Creature ConvertExportGunToCreature(ExportGunCreatureFile ec, out wildLevels[si] = s.Wild; domLevels[si] = s.Tamed; mutLevels[si] = s.Mutated; - statValues[si] = s.Value; + statValues[si] = s.Value + (Stats.IsPercentage(si) ? 1 : 0); si++; } diff --git a/ARKBreedingStats/library/CreatureInfoGraphic.cs b/ARKBreedingStats/library/CreatureInfoGraphic.cs index 88b87c312..c5ba8e80c 100644 --- a/ARKBreedingStats/library/CreatureInfoGraphic.cs +++ b/ARKBreedingStats/library/CreatureInfoGraphic.cs @@ -197,7 +197,7 @@ public static Bitmap InfoGraphic(this Creature creature, CreatureCollection cc, } else { - if (Utils.Precision(statIndex) == 3) + if (Stats.IsPercentage(statIndex)) { statValueRepresentation = (100 * displayedValue).ToString("0.0"); g.DrawString("%", font, fontBrush, xRightBrValue, y); @@ -332,7 +332,7 @@ private static int MaxCharLength(double[] values) int max = 0; for (int si = 0; si < Stats.StatsCount; si++) { - int l = values[si].ToString("0").Length + Utils.Precision(si); + int l = values[si].ToString("0").Length + Stats.Precision(si); if (l > max) max = l; } return max; diff --git a/ARKBreedingStats/library/ExportImportCreatures.cs b/ARKBreedingStats/library/ExportImportCreatures.cs index e3f1beaf3..d89a63db1 100644 --- a/ARKBreedingStats/library/ExportImportCreatures.cs +++ b/ARKBreedingStats/library/ExportImportCreatures.cs @@ -240,8 +240,8 @@ private static StringBuilder CreatureStringInfo(Creature c, bool breeding, bool 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]) * (Utils.Precision(si) == 3 ? 100 : 1) + - (Utils.Precision(si) == 3 ? " %" : string.Empty) + + (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] * diff --git a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs index 83d2a0f4d..31c460a29 100644 --- a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs +++ b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs @@ -35,7 +35,7 @@ public StatsMultiplierTesting() for (int s = 0; s < Stats.StatsCount; s++) { var sc = new StatMultiplierTestingControl(); - if (Utils.Precision(s) == 3) + if (Stats.IsPercentage(s)) sc.Percent = true; sc.OnLevelChanged += Sc_OnLevelChanged; sc.OnTECalculated += SetTE; diff --git a/ARKBreedingStats/raising/ParentStats.cs b/ARKBreedingStats/raising/ParentStats.cs index cd8d392ef..3cb6ac44c 100644 --- a/ARKBreedingStats/raising/ParentStats.cs +++ b/ARKBreedingStats/raising/ParentStats.cs @@ -21,7 +21,7 @@ public ParentStats() { var psv = new ParentStatValues { - StatName = Utils.StatName(s, true) + (Utils.Precision(s) == 1 ? string.Empty : " %") + StatName = Utils.StatName(s, true) + (Stats.IsPercentage(s) ? " %" : string.Empty) }; _parentStatValues[s] = psv; flowLayoutPanel1.SetFlowBreak(psv, true); @@ -80,8 +80,8 @@ public void SetParentValues(Creature mother, Creature father) bestLevelPercent = (100 * bestLevel) / MaxChartLevel; } _parentStatValues[s].SetValues( - mother?.valuesBreeding == null ? -1 : (mother.valuesBreeding[s] * (Utils.Precision(s) == 1 ? 1 : 100)), - father?.valuesBreeding == null ? -1 : (father.valuesBreeding[s] * (Utils.Precision(s) == 1 ? 1 : 100)), + mother?.valuesBreeding == null ? -1 : (mother.valuesBreeding[s] * (Stats.IsPercentage(s) ? 100 : 1)), + father?.valuesBreeding == null ? -1 : (father.valuesBreeding[s] * (Stats.IsPercentage(s) ? 100 : 1)), mother?.valuesBreeding != null && father?.valuesBreeding != null ? (mother.valuesBreeding[s] > father.valuesBreeding[s] ? 1 : 2) : 0, bestLevel, bestLevelPercent @@ -119,7 +119,7 @@ public void SetLocalizations() for (int s = Math.Min(_parentStatValues.Length, Stats.StatsCount) - 1; s >= 0; s--) _parentStatValues[s].StatName = - Utils.StatName(s, true) + (Utils.Precision(s) == 1 ? string.Empty : " %"); + Utils.StatName(s, true) + (Stats.IsPercentage(s) ? " %" : string.Empty); } } } diff --git a/ARKBreedingStats/uiControls/Hatching.cs b/ARKBreedingStats/uiControls/Hatching.cs index 4ae6b7a89..5ddbf49dc 100644 --- a/ARKBreedingStats/uiControls/Hatching.cs +++ b/ARKBreedingStats/uiControls/Hatching.cs @@ -40,16 +40,16 @@ public void SetSpecies(Species species, int[] highLevels, int[] lowLevels) { if (!species.UsesStat(si)) continue; - var precision = Utils.Precision(si); + var isPercentage = Stats.IsPercentage(si); var statValue = StatValueCalculation.CalculateValue(species, si, highLevels[si], 0, 0, true, 1, 0); - var statRepresentation = precision == 3 ? $"{statValue * 100:0.0} %" : $"{statValue:0.0} "; + var statRepresentation = isPercentage ? $"{statValue * 100:0.0} %" : $"{statValue:0.0} "; sbNames += $"{Utils.StatName(si, customStatNames: species.statNames)}\n"; sbValues += statRepresentation + "\n"; sbLevels += highLevels[si] + "\n"; statValue = StatValueCalculation.CalculateValue(species, si, lowLevels[si], 0, 0, true, 1, 0); - statRepresentation = precision == 3 ? $"{statValue * 100:0.0} %" : $"{statValue:0.0} "; + statRepresentation = isPercentage ? $"{statValue * 100:0.0} %" : $"{statValue:0.0} "; sbLowestValues += statRepresentation + "\n"; sbLowestLevels += lowLevels[si] + "\n"; diff --git a/ARKBreedingStats/uiControls/StatPotentials.cs b/ARKBreedingStats/uiControls/StatPotentials.cs index 3a8647fa3..869b8a6a7 100644 --- a/ARKBreedingStats/uiControls/StatPotentials.cs +++ b/ARKBreedingStats/uiControls/StatPotentials.cs @@ -17,7 +17,7 @@ public StatPotentials() _stats = new StatPotential[Stats.StatsCount]; for (int s = 0; s < Stats.StatsCount; s++) { - StatPotential stat = new StatPotential(s, Utils.Precision(s) == 3); + StatPotential stat = new StatPotential(s, Stats.IsPercentage(s)); _stats[s] = stat; } for (int s = 0; s < Stats.StatsCount; s++) diff --git a/ARKBreedingStats/uiControls/StatsDisplay.cs b/ARKBreedingStats/uiControls/StatsDisplay.cs index 33ee41355..ff9b9968d 100644 --- a/ARKBreedingStats/uiControls/StatsDisplay.cs +++ b/ARKBreedingStats/uiControls/StatsDisplay.cs @@ -30,7 +30,7 @@ public StatsDisplay() for (int s = 0; s < displayedStatsCount; s++) { int si = displayedStats[s]; - StatDisplay sd = new StatDisplay(si, Utils.Precision(si) == 3); + StatDisplay sd = new StatDisplay(si, Stats.IsPercentage(si)); stats[s] = sd; sd.Location = new System.Drawing.Point(3, 19 + s * 22); From 489f0e60d1f28263575ee5b6cf582343b889dcf0 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 19 May 2024 01:15:57 +0200 Subject: [PATCH 4/7] TaTm solver --- ARKBreedingStats/ARKBreedingStats.csproj | 1 + .../StatMultiplierTestingControl.Designer.cs | 55 ++++- .../StatMultiplierTestingControl.cs | 60 ++++++ .../StatsMultiplierTesting.Designer.cs | 189 +++++++++--------- .../StatsMultiplierTesting.cs | 5 +- .../StatsMultiplierTesting.resx | 5 + .../multiplierTesting/TaTmSolver.cs | 76 +++++++ ARKBreedingStats/uiControls/nud.cs | 2 + 8 files changed, 295 insertions(+), 98 deletions(-) create mode 100644 ARKBreedingStats/multiplierTesting/TaTmSolver.cs diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj index f03597590..5c12179e1 100644 --- a/ARKBreedingStats/ARKBreedingStats.csproj +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -105,6 +105,7 @@ + Component diff --git a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs index 339ba6438..9857c4ba8 100644 --- a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs +++ b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs @@ -87,6 +87,10 @@ private void InitializeComponent() this.CbTrodTa = new System.Windows.Forms.CheckBox(); this.CbTrodTm = new System.Windows.Forms.CheckBox(); this.CbTrodId = new System.Windows.Forms.CheckBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.BtStoreTaTm = new System.Windows.Forms.Button(); + this.BtSolveTaMTmM = new System.Windows.Forms.Button(); + this.BtSolveTaTm = new System.Windows.Forms.Button(); this.contextMenuStrip1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudIdM)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudId)).BeginInit(); @@ -101,6 +105,7 @@ 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 @@ -875,11 +880,54 @@ private void InitializeComponent() 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"; + // + // 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); + // + // 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); + // + // 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); + // // StatMultiplierTestingControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ContextMenuStrip = this.contextMenuStrip1; + this.Controls.Add(this.groupBox1); this.Controls.Add(this.CbTrodId); this.Controls.Add(this.CbTrodTm); this.Controls.Add(this.CbTrodTa); @@ -921,7 +969,7 @@ private void InitializeComponent() this.Controls.Add(this.nudLw); this.Controls.Add(this.lStatName); this.Name = "StatMultiplierTestingControl"; - this.Size = new System.Drawing.Size(1053, 75); + this.Size = new System.Drawing.Size(1188, 75); this.contextMenuStrip1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.nudIdM)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudId)).EndInit(); @@ -936,6 +984,7 @@ 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(); @@ -1001,5 +1050,9 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox CbTrodTa; private System.Windows.Forms.CheckBox CbTrodTm; private System.Windows.Forms.CheckBox CbTrodId; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Button BtStoreTaTm; + private System.Windows.Forms.Button BtSolveTaTm; + private System.Windows.Forms.Button BtSolveTaMTmM; } } diff --git a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs index 52cd3a502..ac74448b3 100644 --- a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs +++ b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs @@ -4,6 +4,7 @@ using System.Drawing; using System.Windows.Forms; using System.Windows.Input; +using ARKBreedingStats.utils; namespace ARKBreedingStats.multiplierTesting { @@ -858,5 +859,64 @@ public void EndUpdate(bool doUpdate = false) if (doUpdate) UpdateCalculations(true); } + + #region Ta-Tm-solver + private TaTmSolver _taTmSolver = null; + + 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); + } + + #endregion + + private void BtSolveTaMTmM_Click(object sender, EventArgs e) + { + SolveTaMTmM(true); + } + + private void BtSolveTaTm_Click(object sender, EventArgs e) + { + SolveTaMTmM(false); + } + + /// + /// Solve a = Ta * TaM and b = Tm * TmM with two equations. + /// + /// If true it solves for TaM and TmM, if false it solves for Ta and Tm + private void SolveTaMTmM(bool serverValues) + { + if (_taTmSolver == null) + { + MessageBoxes.ShowMessageBox("Set first equation first"); + return; + } + + var errorText = _taTmSolver.CalculateTaTm(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, out var taTaM, out var tmTmM); + if (!string.IsNullOrEmpty(errorText)) + { + MessageBoxes.ShowMessageBox(errorText); + return; + } + + if (serverValues) + { + if (nudTa.ValueDouble != 0) + nudTaM.ValueSaveDouble = Math.Round(taTaM / nudTa.ValueDouble, 6); + if (nudTm.ValueDouble != 0) + nudTmM.ValueSaveDouble = Math.Round(tmTmM / nudTm.ValueDouble, 6); + } + else + { + if (nudTaM.ValueDouble != 0) + nudTa.ValueSaveDouble = Math.Round(taTaM / nudTaM.ValueDouble, 6); + if (nudTmM.ValueDouble != 0) + nudTm.ValueSaveDouble = Math.Round(tmTmM / nudTmM.ValueDouble, 6); + } + } } } diff --git a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs index 8f559eaef..3ba8e243d 100644 --- a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs +++ b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs @@ -28,6 +28,7 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(StatsMultiplierTesting)); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.groupBox4 = new System.Windows.Forms.GroupBox(); this.BtResetSpeciesValues = new System.Windows.Forms.Button(); @@ -47,8 +48,11 @@ private void InitializeComponent() this.groupBox2 = new System.Windows.Forms.GroupBox(); this.LbCalculatedWildLevel = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); + this.nudTE = new ARKBreedingStats.uiControls.Nud(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.label2 = new System.Windows.Forms.Label(); + this.nudIBM = new ARKBreedingStats.uiControls.Nud(); + this.nudIB = new ARKBreedingStats.uiControls.Nud(); this.gbFineAdjustment = new System.Windows.Forms.GroupBox(); this.tbFineAdjustments = new System.Windows.Forms.TrackBar(); this.lBDummyEmptyFlowBreak = new System.Windows.Forms.Label(); @@ -70,6 +74,7 @@ private void InitializeComponent() this.lbLevelSumDom = new System.Windows.Forms.Label(); this.lbLevelSumWild = new System.Windows.Forms.Label(); this.label16 = new System.Windows.Forms.Label(); + this.nudCreatureLevel = new ARKBreedingStats.uiControls.Nud(); this.LbAbbreviations = new System.Windows.Forms.Label(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.statMultipliersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -88,25 +93,21 @@ private void InitializeComponent() this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.setAllWildLevelsToTheClosestValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.setAllDomLevelsToTheClosestValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.nudTE = new ARKBreedingStats.uiControls.Nud(); - this.nudIBM = new ARKBreedingStats.uiControls.Nud(); - this.nudIB = new ARKBreedingStats.uiControls.Nud(); - this.nudCreatureLevel = new ARKBreedingStats.uiControls.Nud(); this.flowLayoutPanel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox5.SuspendLayout(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudTE)).BeginInit(); this.groupBox3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudIBM)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudIB)).BeginInit(); this.gbFineAdjustment.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.tbFineAdjustments)).BeginInit(); this.panel1.SuspendLayout(); this.gbLevel.SuspendLayout(); - this.menuStrip1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudTE)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudIBM)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudIB)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudCreatureLevel)).BeginInit(); + this.menuStrip1.SuspendLayout(); this.SuspendLayout(); // // flowLayoutPanel1 @@ -331,6 +332,21 @@ private void InitializeComponent() this.label1.TabIndex = 2; this.label1.Text = "%"; // + // nudTE + // + this.nudTE.DecimalPlaces = 3; + this.nudTE.ForeColor = System.Drawing.SystemColors.GrayText; + this.nudTE.Location = new System.Drawing.Point(6, 19); + this.nudTE.Name = "nudTE"; + this.nudTE.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudTE.Size = new System.Drawing.Size(71, 20); + this.nudTE.TabIndex = 1; + this.nudTE.ValueChanged += new System.EventHandler(this.nudTE_ValueChanged); + // // groupBox3 // this.groupBox3.Controls.Add(this.label2); @@ -352,6 +368,51 @@ private void InitializeComponent() this.label2.TabIndex = 3; this.label2.Text = "% IBM"; // + // nudIBM + // + this.nudIBM.DecimalPlaces = 4; + this.nudIBM.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudIBM.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.nudIBM.Location = new System.Drawing.Point(135, 19); + this.nudIBM.Name = "nudIBM"; + this.nudIBM.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudIBM.Size = new System.Drawing.Size(71, 20); + this.nudIBM.TabIndex = 2; + this.nudIBM.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nudIBM.ValueChanged += new System.EventHandler(this.nudIBM_ValueChanged); + // + // nudIB + // + this.nudIB.DecimalPlaces = 6; + this.nudIB.ForeColor = System.Drawing.SystemColors.GrayText; + this.nudIB.Location = new System.Drawing.Point(6, 19); + this.nudIB.Maximum = new decimal(new int[] { + 200, + 0, + 0, + 0}); + this.nudIB.Name = "nudIB"; + this.nudIB.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudIB.Size = new System.Drawing.Size(80, 20); + this.nudIB.TabIndex = 1; + this.nudIB.ValueChanged += new System.EventHandler(this.nudIB_ValueChanged); + // // gbFineAdjustment // this.gbFineAdjustment.Controls.Add(this.tbFineAdjustments); @@ -574,16 +635,33 @@ private void InitializeComponent() this.label16.TabIndex = 14; this.label16.Text = "Creature-Level"; // + // nudCreatureLevel + // + this.nudCreatureLevel.ForeColor = System.Drawing.SystemColors.GrayText; + this.nudCreatureLevel.Location = new System.Drawing.Point(87, 19); + this.nudCreatureLevel.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nudCreatureLevel.Name = "nudCreatureLevel"; + this.nudCreatureLevel.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudCreatureLevel.Size = new System.Drawing.Size(107, 20); + this.nudCreatureLevel.TabIndex = 13; + this.nudCreatureLevel.ValueChanged += new System.EventHandler(this.nudCreatureLevel_ValueChanged); + // // LbAbbreviations // this.LbAbbreviations.AutoSize = true; this.LbAbbreviations.Location = new System.Drawing.Point(209, 188); this.LbAbbreviations.Name = "LbAbbreviations"; - this.LbAbbreviations.Size = new System.Drawing.Size(780, 13); + this.LbAbbreviations.Size = new System.Drawing.Size(780, 39); this.LbAbbreviations.TabIndex = 13; - this.LbAbbreviations.Text = "C: Calculate best value; R: Reset value (hold Ctrl to reset to game default); TE:" + - " Taming Effectivenes; IB: Imprinting Bonus; IBM: ~Multiplier; Trod: Troodonism-v" + - "ariant"; + this.LbAbbreviations.Text = resources.GetString("LbAbbreviations.Text"); // // menuStrip1 // @@ -718,85 +796,6 @@ private void InitializeComponent() this.setAllDomLevelsToTheClosestValueToolStripMenuItem.Text = "Set all Dom levels to the closest value"; this.setAllDomLevelsToTheClosestValueToolStripMenuItem.Click += new System.EventHandler(this.setAllDomLevelsToTheClosestValueToolStripMenuItem_Click); // - // nudTE - // - this.nudTE.DecimalPlaces = 3; - this.nudTE.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudTE.Location = new System.Drawing.Point(6, 19); - this.nudTE.Name = "nudTE"; - this.nudTE.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudTE.Size = new System.Drawing.Size(71, 20); - this.nudTE.TabIndex = 1; - this.nudTE.ValueChanged += new System.EventHandler(this.nudTE_ValueChanged); - // - // nudIBM - // - this.nudIBM.DecimalPlaces = 4; - this.nudIBM.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudIBM.Increment = new decimal(new int[] { - 1, - 0, - 0, - 65536}); - this.nudIBM.Location = new System.Drawing.Point(135, 19); - this.nudIBM.Name = "nudIBM"; - this.nudIBM.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudIBM.Size = new System.Drawing.Size(71, 20); - this.nudIBM.TabIndex = 2; - this.nudIBM.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.nudIBM.ValueChanged += new System.EventHandler(this.nudIBM_ValueChanged); - // - // nudIB - // - this.nudIB.DecimalPlaces = 6; - this.nudIB.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudIB.Location = new System.Drawing.Point(6, 19); - this.nudIB.Maximum = new decimal(new int[] { - 200, - 0, - 0, - 0}); - this.nudIB.Name = "nudIB"; - this.nudIB.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudIB.Size = new System.Drawing.Size(80, 20); - this.nudIB.TabIndex = 1; - this.nudIB.ValueChanged += new System.EventHandler(this.nudIB_ValueChanged); - // - // nudCreatureLevel - // - this.nudCreatureLevel.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudCreatureLevel.Location = new System.Drawing.Point(87, 19); - this.nudCreatureLevel.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.nudCreatureLevel.Name = "nudCreatureLevel"; - this.nudCreatureLevel.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudCreatureLevel.Size = new System.Drawing.Size(107, 20); - this.nudCreatureLevel.TabIndex = 13; - this.nudCreatureLevel.ValueChanged += new System.EventHandler(this.nudCreatureLevel_ValueChanged); - // // StatsMultiplierTesting // this.AllowDrop = true; @@ -818,19 +817,19 @@ private void InitializeComponent() this.groupBox1.PerformLayout(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudTE)).EndInit(); this.groupBox3.ResumeLayout(false); this.groupBox3.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudIBM)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudIB)).EndInit(); this.gbFineAdjustment.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.tbFineAdjustments)).EndInit(); this.panel1.ResumeLayout(false); this.gbLevel.ResumeLayout(false); this.gbLevel.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudCreatureLevel)).EndInit(); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudTE)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudIBM)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudIB)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudCreatureLevel)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); diff --git a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs index 31c460a29..a1b8d55c9 100644 --- a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs +++ b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs @@ -153,10 +153,11 @@ private void UpdateLevelSums() private void nudTE_ValueChanged(object sender, EventArgs e) { + var te = (double)nudTE.Value / 100; for (int s = 0; s < Stats.StatsCount; s++) - _statControls[s].TE = (double)nudTE.Value / 100; + _statControls[s].TE = te; if (rbTamed.Checked) - LbCalculatedWildLevel.Text = $"LW: {Creature.CalculatePreTameWildLevel(_statControls[Stats.Torpidity].LevelWild + 1, (double)nudTE.Value / 100)}"; + LbCalculatedWildLevel.Text = $"LW: {Creature.CalculatePreTameWildLevel(_statControls[Stats.Torpidity].LevelWild + 1, te)}"; } private void nudIB_ValueChanged(object sender, EventArgs e) diff --git a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.resx b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.resx index d5494e305..2866a77df 100644 --- a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.resx +++ b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.resx @@ -117,6 +117,11 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + C: Calculate best value; R: Reset value (hold Ctrl to reset to game default); TE: Taming Effectivenes; IB: Imprinting Bonus; IBM: ~Multiplier; Trod: Troodonism-variant +Ta-Tm-Solver: Solves the Ta and Tm multipliers of either the server or a species from two different stat combinations (TE must be different, levels need to be correct). +1. enter values, 2. click Store first, 3. enter second values, 4. solve for server or species values. + 17, 17 diff --git a/ARKBreedingStats/multiplierTesting/TaTmSolver.cs b/ARKBreedingStats/multiplierTesting/TaTmSolver.cs new file mode 100644 index 000000000..f83bebc4b --- /dev/null +++ b/ARKBreedingStats/multiplierTesting/TaTmSolver.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ARKBreedingStats.multiplierTesting +{ + /// + /// Solves Ta*TaM and Tm*TmM with two given equations. + /// + internal class TaTmSolver + { + // The general stat equation is + // 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 + // the formula is + // W = (a + ta) * (1 + TE * tm) + + // f like first equation, s like second equation + private double _fW; + private double _fA; + private double _fTe; + + 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; + } + + /// + /// Calculate the products of Ta * TaM and Tm * TmM with a second equation. + /// Returns error text or null on success. + /// + 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; + + taTaM = 0; + tmTmM = 0; + + if (_fTe == sTe) + { + return "Both TE values need to be different"; + } + + 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); + + if (dividend == 0) + { + return "div by 0 error"; + } + + 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; + } + } +} diff --git a/ARKBreedingStats/uiControls/nud.cs b/ARKBreedingStats/uiControls/nud.cs index 7c5219bb9..6bd993551 100644 --- a/ARKBreedingStats/uiControls/nud.cs +++ b/ARKBreedingStats/uiControls/nud.cs @@ -36,6 +36,8 @@ public double ValueSaveDouble set => ValueSave = (decimal)value; } + public double ValueDouble => (double)Value; + protected override void OnValueChanged(EventArgs e) { base.OnValueChanged(e); From 60a6c1ea6b962f0024b2d0bb9386f7d30125422f Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 19 May 2024 02:58:12 +0200 Subject: [PATCH 5/7] added calculate Iw and Id and export json values --- .../multiplierTesting/CalculateMultipliers.cs | 22 +- .../StatMultiplierTestingControl.Designer.cs | 66 +++-- .../StatMultiplierTestingControl.cs | 45 +++- .../StatsMultiplierTesting.Designer.cs | 228 ++++++++++-------- .../StatsMultiplierTesting.cs | 54 ++++- 5 files changed, 294 insertions(+), 121 deletions(-) diff --git a/ARKBreedingStats/multiplierTesting/CalculateMultipliers.cs b/ARKBreedingStats/multiplierTesting/CalculateMultipliers.cs index b5275b12d..bcb444bd9 100644 --- a/ARKBreedingStats/multiplierTesting/CalculateMultipliers.cs +++ b/ARKBreedingStats/multiplierTesting/CalculateMultipliers.cs @@ -8,13 +8,23 @@ public static class CalculateMultipliers /// /// Calculates the Increase per wild level multiplier (IwM) to the value that solves the equation, assuming all other values are correct. /// - public static double? IwM(double statValue, double baseValue, int wildLevel, double iw, double iwM, double iwSingleplayer, double tbhm, double ta, double taM, double taSingleplayer, double tm, double tmM, double tmSingleplayer, bool tamed, bool bred, bool noIb, double te, int domLevel, double id, double idM, double idSingleplayer, double ib, double ibm, double sIBM) + public static double? IwM(double statValue, double baseValue, int wildLevel, double iw, double iwSingleplayer, double tbhm, double ta, double taM, double taSingleplayer, double tm, double tmM, double tmSingleplayer, bool tamed, bool bred, bool noIb, double te, int domLevel, double id, double idM, double idSingleplayer, double ib, double ibm, double sIBM) { if (wildLevel == 0 || iw == 0) return null; return ((statValue / (tamed || bred ? (1 + (bred ? 1 : te) * tm * (tm > 0 ? tmM * tmSingleplayer : 1)) * (1 + domLevel * id * idSingleplayer * idM) : 1) - (tamed || bred ? ta * (ta > 0 ? taM * taSingleplayer : 1) : 0)) / (baseValue * (tamed || bred ? tbhm : 1) * (!noIb && bred ? 1 + ib * ibm * sIBM : 1)) - 1) / (wildLevel * iw * iwSingleplayer); } + /// + /// Calculates the Increase per wild level (Iw) to the value that solves the equation, assuming all other values are correct. + /// + public static double? Iw(double statValue, double baseValue, int wildLevel, double iwM, double iwSingleplayer, double tbhm, double ta, double taM, double taSingleplayer, double tm, double tmM, double tmSingleplayer, bool tamed, bool bred, bool noIb, double te, int domLevel, double id, double idM, double idSingleplayer, double ib, double ibm, double sIBM) + { + if (wildLevel == 0 || iwM == 0) return null; + + return ((statValue / (tamed || bred ? (1 + (bred ? 1 : te) * tm * (tm > 0 ? tmM * tmSingleplayer : 1)) * (1 + domLevel * id * idSingleplayer * idM) : 1) - (tamed || bred ? ta * (ta > 0 ? taM * taSingleplayer : 1) : 0)) / (baseValue * (tamed || bred ? tbhm : 1) * (!noIb && bred ? 1 + ib * ibm * sIBM : 1)) - 1) / (wildLevel * iwM * iwSingleplayer); + } + /// /// Stat value after taming with bonus, without dom levels. /// @@ -65,6 +75,16 @@ private static double ValueDomWithDomLevel(double baseValue, int wildLevel, doub return (statValue / valueDom - 1) / (domLevel * id * idSingleplayer); } + /// + /// Calculates the Increase per domesticated level (Id) to the value that solves the equation, assuming all other values are correct. + /// + public static double? Id(double statValue, double valueDom, int domLevel, double idM, double idSingleplayer) + { + if (valueDom == 0 || domLevel == 0 || idM == 0) return null; + + return (statValue / valueDom - 1) / (domLevel * idM * idSingleplayer); + } + /// /// Calculates the Tame additive bonus multiplier (TaM) to the value that solves the equation, assuming all other values are correct. /// diff --git a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs index 9857c4ba8..ca23ffa4d 100644 --- a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs +++ b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.Designer.cs @@ -88,9 +88,12 @@ 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.BtStoreTaTm = new System.Windows.Forms.Button(); - this.BtSolveTaMTmM = new System.Windows.Forms.Button(); 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.contextMenuStrip1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudIdM)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudId)).BeginInit(); @@ -196,6 +199,9 @@ private void InitializeComponent() this.calculateTEToolStripMenuItem, this.calculateIBToolStripMenuItem, this.calculateIBMToolStripMenuItem, + this.toolStripSeparator4, + this.calculateIwToolStripMenuItem, + this.calculateIdToolStripMenuItem, this.toolStripSeparator2, this.setWildLevelToClosestValueToolStripMenuItem, this.setDomLevelToClosestValueToolStripMenuItem, @@ -206,7 +212,7 @@ private void InitializeComponent() this.resetIdMToolStripMenuItem, this.resetAllMultiplierOfThisStatToolStripMenuItem}); this.contextMenuStrip1.Name = "contextMenuStrip1"; - this.contextMenuStrip1.Size = new System.Drawing.Size(231, 330); + this.contextMenuStrip1.Size = new System.Drawing.Size(231, 402); // // calculateIwMToolStripMenuItem // @@ -892,15 +898,15 @@ private void InitializeComponent() this.groupBox1.TabStop = false; this.groupBox1.Text = "Ta-Tm-Solver"; // - // BtStoreTaTm + // BtSolveTaTm // - 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); + 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 // @@ -912,15 +918,34 @@ private void InitializeComponent() this.BtSolveTaMTmM.UseVisualStyleBackColor = true; this.BtSolveTaMTmM.Click += new System.EventHandler(this.BtSolveTaMTmM_Click); // - // BtSolveTaTm + // BtStoreTaTm // - 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); + 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 // @@ -1054,5 +1079,8 @@ private void InitializeComponent() private System.Windows.Forms.Button BtStoreTaTm; private System.Windows.Forms.Button BtSolveTaTm; private System.Windows.Forms.Button BtSolveTaMTmM; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; + private System.Windows.Forms.ToolStripMenuItem calculateIwToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem calculateIdToolStripMenuItem; } } diff --git a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs index ac74448b3..1cdc065ff 100644 --- a/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs +++ b/ARKBreedingStats/multiplierTesting/StatMultiplierTestingControl.cs @@ -210,6 +210,8 @@ public void SetStatValues(double[] statValues, double?[] customOverrides, double } } + public double[] StatValues => new[] { nudB.ValueDouble, nudIw.ValueDouble, nudId.ValueDouble, nudTa.ValueDouble, nudTm.ValueDouble }; + public double StatValue { set => nudStatValue.ValueSave = (decimal)value * (_percent ? 100 : 1); @@ -369,8 +371,8 @@ public bool CalculateIwM(bool silent = true) { if (nudLw.Value != 0 && nudIw.Value != 0) { - var iwM = CalculateMultipliers.IwM((double)nudStatValue.Value * (_percent ? 0.01 : 1), (double)nudB.Value * AtlasBaseMultiplier, (int)nudLw.Value, (double)nudIw.Value, - (double)nudIwM.Value, _spIw, (double)nudTBHM.Value, (double)nudTa.Value, (double)nudTaM.Value, _spTa, + var iwM = CalculateMultipliers.IwM((double)nudStatValue.Value * (_percent ? 0.01 : 1), (double)nudB.Value * AtlasBaseMultiplier, (int)nudLw.Value, + (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); @@ -425,6 +427,35 @@ public bool CalculateTmM(bool silent = true) return false; } + public bool CalculateIw(bool silent = true) + { + if (nudB.ValueDouble == 0) return true; // silently ignore this apparently unused stat + if (nudLw.Value != 0 && nudIwM.Value != 0) + { + var iw = CalculateMultipliers.Iw((double)nudStatValue.Value * (_percent ? 0.01 : 1), (double)nudB.Value * AtlasBaseMultiplier, (int)nudLw.Value, + (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); + return true; + } + if (!silent) MessageBox.Show("Divide by Zero-error, e.g. Lw or IwM needs to be greater than 0."); + return false; + } + + 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); + return true; + } + + if (!silent) MessageBox.Show("Divide by Zero-error, e.g. Ld needs to be at least 1."); + return false; + } + private void CalculateTE() { // set TE to the value that solves the equation, assuming all other values are correct @@ -781,6 +812,16 @@ private void btResetTmM_Click(object sender, EventArgs e) ResetMultiplier(1, Keyboard.Modifiers.HasFlag(System.Windows.Input.ModifierKeys.Control)); } + private void calculateIwToolStripMenuItem_Click(object sender, EventArgs e) + { + CalculateIw(false); + } + + private void calculateIdToolStripMenuItem_Click(object sender, EventArgs e) + { + CalculateId(false); + } + private void btCalculateDomLevel_Click(object sender, EventArgs e) { SetClosestDomLevel(); diff --git a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs index 3ba8e243d..802b91bb3 100644 --- a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs +++ b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.Designer.cs @@ -48,11 +48,8 @@ private void InitializeComponent() this.groupBox2 = new System.Windows.Forms.GroupBox(); this.LbCalculatedWildLevel = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); - this.nudTE = new ARKBreedingStats.uiControls.Nud(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.label2 = new System.Windows.Forms.Label(); - this.nudIBM = new ARKBreedingStats.uiControls.Nud(); - this.nudIB = new ARKBreedingStats.uiControls.Nud(); this.gbFineAdjustment = new System.Windows.Forms.GroupBox(); this.tbFineAdjustments = new System.Windows.Forms.TrackBar(); this.lBDummyEmptyFlowBreak = new System.Windows.Forms.Label(); @@ -74,7 +71,6 @@ private void InitializeComponent() this.lbLevelSumDom = new System.Windows.Forms.Label(); this.lbLevelSumWild = new System.Windows.Forms.Label(); this.label16 = new System.Windows.Forms.Label(); - this.nudCreatureLevel = new ARKBreedingStats.uiControls.Nud(); this.LbAbbreviations = new System.Windows.Forms.Label(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.statMultipliersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -93,21 +89,29 @@ private void InitializeComponent() 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.nudTE = new ARKBreedingStats.uiControls.Nud(); + this.nudIBM = new ARKBreedingStats.uiControls.Nud(); + this.nudIB = new ARKBreedingStats.uiControls.Nud(); + this.nudCreatureLevel = new ARKBreedingStats.uiControls.Nud(); this.flowLayoutPanel1.SuspendLayout(); this.groupBox4.SuspendLayout(); this.groupBox5.SuspendLayout(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudTE)).BeginInit(); this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudIBM)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudIB)).BeginInit(); this.gbFineAdjustment.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.tbFineAdjustments)).BeginInit(); this.panel1.SuspendLayout(); this.gbLevel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudCreatureLevel)).BeginInit(); this.menuStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudTE)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudIBM)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudIB)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudCreatureLevel)).BeginInit(); this.SuspendLayout(); // // flowLayoutPanel1 @@ -332,21 +336,6 @@ private void InitializeComponent() this.label1.TabIndex = 2; this.label1.Text = "%"; // - // nudTE - // - this.nudTE.DecimalPlaces = 3; - this.nudTE.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudTE.Location = new System.Drawing.Point(6, 19); - this.nudTE.Name = "nudTE"; - this.nudTE.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudTE.Size = new System.Drawing.Size(71, 20); - this.nudTE.TabIndex = 1; - this.nudTE.ValueChanged += new System.EventHandler(this.nudTE_ValueChanged); - // // groupBox3 // this.groupBox3.Controls.Add(this.label2); @@ -368,51 +357,6 @@ private void InitializeComponent() this.label2.TabIndex = 3; this.label2.Text = "% IBM"; // - // nudIBM - // - this.nudIBM.DecimalPlaces = 4; - this.nudIBM.ForeColor = System.Drawing.SystemColors.WindowText; - this.nudIBM.Increment = new decimal(new int[] { - 1, - 0, - 0, - 65536}); - this.nudIBM.Location = new System.Drawing.Point(135, 19); - this.nudIBM.Name = "nudIBM"; - this.nudIBM.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudIBM.Size = new System.Drawing.Size(71, 20); - this.nudIBM.TabIndex = 2; - this.nudIBM.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.nudIBM.ValueChanged += new System.EventHandler(this.nudIBM_ValueChanged); - // - // nudIB - // - this.nudIB.DecimalPlaces = 6; - this.nudIB.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudIB.Location = new System.Drawing.Point(6, 19); - this.nudIB.Maximum = new decimal(new int[] { - 200, - 0, - 0, - 0}); - this.nudIB.Name = "nudIB"; - this.nudIB.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudIB.Size = new System.Drawing.Size(80, 20); - this.nudIB.TabIndex = 1; - this.nudIB.ValueChanged += new System.EventHandler(this.nudIB_ValueChanged); - // // gbFineAdjustment // this.gbFineAdjustment.Controls.Add(this.tbFineAdjustments); @@ -635,25 +579,6 @@ private void InitializeComponent() this.label16.TabIndex = 14; this.label16.Text = "Creature-Level"; // - // nudCreatureLevel - // - this.nudCreatureLevel.ForeColor = System.Drawing.SystemColors.GrayText; - this.nudCreatureLevel.Location = new System.Drawing.Point(87, 19); - this.nudCreatureLevel.Maximum = new decimal(new int[] { - 100000, - 0, - 0, - 0}); - this.nudCreatureLevel.Name = "nudCreatureLevel"; - this.nudCreatureLevel.NeutralNumber = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.nudCreatureLevel.Size = new System.Drawing.Size(107, 20); - this.nudCreatureLevel.TabIndex = 13; - this.nudCreatureLevel.ValueChanged += new System.EventHandler(this.nudCreatureLevel_ValueChanged); - // // LbAbbreviations // this.LbAbbreviations.AutoSize = true; @@ -668,7 +593,8 @@ private void InitializeComponent() this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.statMultipliersToolStripMenuItem, this.calculateToolStripMenuItem, - this.setAllLvlToToolStripMenuItem}); + this.setAllLvlToToolStripMenuItem, + this.copyStatValuesToClipboardToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Size = new System.Drawing.Size(1011, 24); @@ -718,10 +644,13 @@ private void InitializeComponent() this.idMToolStripMenuItem1, this.idMToolStripMenuItem, this.taMToolStripMenuItem, - this.tmMToolStripMenuItem}); + this.tmMToolStripMenuItem, + this.toolStripSeparator3, + this.allIwToolStripMenuItem, + this.allIdToolStripMenuItem}); this.calculateToolStripMenuItem.Name = "calculateToolStripMenuItem"; - this.calculateToolStripMenuItem.Size = new System.Drawing.Size(68, 20); - this.calculateToolStripMenuItem.Text = "Calculate"; + this.calculateToolStripMenuItem.Size = new System.Drawing.Size(83, 20); + this.calculateToolStripMenuItem.Text = "Calculate all"; // // idMToolStripMenuItem1 // @@ -796,6 +725,111 @@ 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.Click += new System.EventHandler(this.copyStatValuesToClipboardToolStripMenuItem_Click); + // + // nudTE + // + this.nudTE.DecimalPlaces = 3; + this.nudTE.ForeColor = System.Drawing.SystemColors.GrayText; + this.nudTE.Location = new System.Drawing.Point(6, 19); + this.nudTE.Name = "nudTE"; + this.nudTE.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudTE.Size = new System.Drawing.Size(71, 20); + this.nudTE.TabIndex = 1; + this.nudTE.ValueChanged += new System.EventHandler(this.nudTE_ValueChanged); + // + // nudIBM + // + this.nudIBM.DecimalPlaces = 4; + this.nudIBM.ForeColor = System.Drawing.SystemColors.WindowText; + this.nudIBM.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.nudIBM.Location = new System.Drawing.Point(135, 19); + this.nudIBM.Name = "nudIBM"; + this.nudIBM.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudIBM.Size = new System.Drawing.Size(71, 20); + this.nudIBM.TabIndex = 2; + this.nudIBM.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nudIBM.ValueChanged += new System.EventHandler(this.nudIBM_ValueChanged); + // + // nudIB + // + this.nudIB.DecimalPlaces = 6; + this.nudIB.ForeColor = System.Drawing.SystemColors.GrayText; + this.nudIB.Location = new System.Drawing.Point(6, 19); + this.nudIB.Maximum = new decimal(new int[] { + 200, + 0, + 0, + 0}); + this.nudIB.Name = "nudIB"; + this.nudIB.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudIB.Size = new System.Drawing.Size(80, 20); + this.nudIB.TabIndex = 1; + this.nudIB.ValueChanged += new System.EventHandler(this.nudIB_ValueChanged); + // + // nudCreatureLevel + // + this.nudCreatureLevel.ForeColor = System.Drawing.SystemColors.GrayText; + this.nudCreatureLevel.Location = new System.Drawing.Point(87, 19); + this.nudCreatureLevel.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nudCreatureLevel.Name = "nudCreatureLevel"; + this.nudCreatureLevel.NeutralNumber = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudCreatureLevel.Size = new System.Drawing.Size(107, 20); + this.nudCreatureLevel.TabIndex = 13; + this.nudCreatureLevel.ValueChanged += new System.EventHandler(this.nudCreatureLevel_ValueChanged); + // // StatsMultiplierTesting // this.AllowDrop = true; @@ -817,19 +851,19 @@ private void InitializeComponent() this.groupBox1.PerformLayout(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudTE)).EndInit(); this.groupBox3.ResumeLayout(false); this.groupBox3.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudIBM)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudIB)).EndInit(); this.gbFineAdjustment.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.tbFineAdjustments)).EndInit(); this.panel1.ResumeLayout(false); this.gbLevel.ResumeLayout(false); this.gbLevel.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudCreatureLevel)).EndInit(); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nudTE)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudIBM)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudIB)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudCreatureLevel)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -901,5 +935,9 @@ private void InitializeComponent() private System.Windows.Forms.Label LbCalculatedWildLevel; private System.Windows.Forms.CheckBox CbAtlas; private System.Windows.Forms.CheckBox CbAllowSpeedLeveling; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripMenuItem allIwToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem allIdToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem copyStatValuesToClipboardToolStripMenuItem; } } diff --git a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs index a1b8d55c9..b741c4592 100644 --- a/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs +++ b/ARKBreedingStats/multiplierTesting/StatsMultiplierTesting.cs @@ -10,6 +10,7 @@ using System.Windows.Forms; using ARKBreedingStats.utils; using System.Linq; +using System.Text; using ARKBreedingStats.importExportGun; namespace ARKBreedingStats.multiplierTesting @@ -374,7 +375,7 @@ private void iwMToolStripMenuItem_Click(object sender, EventArgs e) if (s != Stats.Torpidity) error = !_statControls[s].CalculateIwM() || error; } - if (error) MessageBox.Show("For some stats the IwM couldn't be calculated, because of a Divide by Zero-error, e.g. Lw and Iw needs to be >0."); + if (error) SetMessageLabelText?.Invoke("For some stats the IwM couldn't be calculated, because of a Divide by Zero-error, e.g. Lw and Iw needs to be >0.", MessageBoxIcon.Error); } private void idMToolStripMenuItem_Click(object sender, EventArgs e) @@ -385,7 +386,7 @@ private void idMToolStripMenuItem_Click(object sender, EventArgs e) if (s != Stats.Torpidity) error = !_statControls[s].CalculateIdM() || error; } - if (error) MessageBox.Show("For some stats the IdM couldn't be calculated, because of a Divide by Zero-error, e.g. Ld needs to be at least 1."); + if (error) SetMessageLabelText?.Invoke("For some stats the IdM couldn't be calculated, because of a Divide by Zero-error, e.g. Ld needs to be at least 1.", MessageBoxIcon.Error); } private void taMToolStripMenuItem_Click(object sender, EventArgs e) @@ -396,7 +397,7 @@ private void taMToolStripMenuItem_Click(object sender, EventArgs e) if (s != Stats.Torpidity) error = !_statControls[s].CalculateTaM() || error; } - if (error) MessageBox.Show("For some stats the TaM couldn't be calculated, because of a Divide by Zero-error, e.g. Ta needs to be at least 1."); + if (error) SetMessageLabelText?.Invoke("For some stats the TaM couldn't be calculated, because of a Divide by Zero-error, e.g. Ta needs to be at least 1.", MessageBoxIcon.Error); } private void tmMToolStripMenuItem_Click(object sender, EventArgs e) @@ -407,7 +408,29 @@ private void tmMToolStripMenuItem_Click(object sender, EventArgs e) if (s != Stats.Torpidity) error = !_statControls[s].CalculateTmM() || error; } - if (error) MessageBox.Show("For some stats the TmM couldn't be calculated, because of a Divide by Zero-error, e.g. Tm needs to be at least 1."); + if (error) SetMessageLabelText?.Invoke("For some stats the TmM couldn't be calculated, because of a Divide by Zero-error, e.g. Tm needs to be at least 1.", MessageBoxIcon.Error); + } + + private void allIwToolStripMenuItem_Click(object sender, EventArgs e) + { + bool error = false; + for (int s = 0; s < Stats.StatsCount; s++) + { + error = !_statControls[s].CalculateIw() || error; + } + if (error) SetMessageLabelText?.Invoke("Divide by Zero-error, e.g. Lw or IwM needs to be greater than 0.", MessageBoxIcon.Error); + } + + private void allIdToolStripMenuItem_Click(object sender, EventArgs e) + { + bool error = false; + for (int s = 0; s < Stats.StatsCount; s++) + { + if (s != Stats.Torpidity) + error = !_statControls[s].CalculateId() || error; + } + if (error) SetMessageLabelText?.Invoke("Divide by Zero-error, e.g. Ld needs to be at least 1.", MessageBoxIcon.Error); + } private void useStatMultipliersOfSettingsToolStripMenuItem_Click(object sender, EventArgs e) @@ -679,5 +702,28 @@ private void SetServerMultipliers(ExportGunServerFile esm) CheckIfMultipliersAreEqualToSettings(); } + + private void copyStatValuesToClipboardToolStripMenuItem_Click(object sender, EventArgs e) + { + // copy stat values in the format of the values.json to clipboard + var sb = new StringBuilder(); + sb.AppendLine("\"fullStatsRaw\": ["); + for (var s = 0; s < Stats.StatsCount; s++) + { + var sv = _statControls[s].StatValues; + if (sv == null || sv.All(v => v == 0)) + { + sb.AppendLine(" null,"); + } + else + { + sb.AppendLine($" [ {sv[0]}, {sv[1]}, {sv[2]}, {sv[3]}, {sv[4]} ],"); + } + } + + sb.Append("]"); + Clipboard.SetText(sb.ToString()); + SetMessageLabelText?.Invoke("Raw stat values copied to clipboard.", MessageBoxIcon.Information); + } } } From 2a8875861bbebcbd6bbf7ac587baadbf3e64bbf2 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 19 May 2024 23:02:25 +0200 Subject: [PATCH 6/7] sorting fix if name ends with whitespace --- ARKBreedingStats/utils/NaturalComparer.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ARKBreedingStats/utils/NaturalComparer.cs b/ARKBreedingStats/utils/NaturalComparer.cs index 2b4c9d292..3a5a76c60 100644 --- a/ARKBreedingStats/utils/NaturalComparer.cs +++ b/ARKBreedingStats/utils/NaturalComparer.cs @@ -21,11 +21,6 @@ int IComparer.Compare(string aStr, string bStr) while (true) { - // Handle when we hit the end of either string - if (aI >= aLen && bI >= bLen) return 0; - if (aI >= aLen) return -1; // The shorter string sorts first - if (bI >= bLen) return 1; - // Skip spaces on both sides, if requested if (SkipSpaces) { @@ -33,6 +28,11 @@ int IComparer.Compare(string aStr, string bStr) bI += SkipWhiteSpace(bStr, bI); } + // Handle when we hit the end of either string + if (aI >= aLen && bI >= bLen) return 0; + if (aI >= aLen) return -1; // The shorter string sorts first + if (bI >= bLen) return 1; + // Pick up the next character from each string char a = aStr[aI]; char b = bStr[bI]; From a3a047e125d22d5e2b2539d5f6a47d2970493602 Mon Sep 17 00:00:00 2001 From: cadon Date: Sun, 19 May 2024 23:09:33 +0200 Subject: [PATCH 7/7] ver --- ARKBreedingStats/Properties/AssemblyInfo.cs | 2 +- ARKBreedingStats/_manifest.json | 2 +- ARKBreedingStats/json/values/ASA-values.json | 507 ++++++++++++++++++- ARKBreedingStats/json/values/_manifest.json | 2 +- 4 files changed, 485 insertions(+), 28 deletions(-) diff --git a/ARKBreedingStats/Properties/AssemblyInfo.cs b/ARKBreedingStats/Properties/AssemblyInfo.cs index 15e7a43f3..6b5c8add2 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.3.0")] +[assembly: AssemblyFileVersion("0.61.4.0")] [assembly: NeutralResourcesLanguage("en")] diff --git a/ARKBreedingStats/_manifest.json b/ARKBreedingStats/_manifest.json index a42d31eb0..c523bbc43 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.3.0" + "version": "0.61.4.0" }, "SpeciesColorImages": { "Id": "SpeciesColorImages", diff --git a/ARKBreedingStats/json/values/ASA-values.json b/ARKBreedingStats/json/values/ASA-values.json index 002834bf3..e01693c0e 100644 --- a/ARKBreedingStats/json/values/ASA-values.json +++ b/ARKBreedingStats/json/values/ASA-values.json @@ -1,5 +1,5 @@ { - "version": "38.690.452718", + "version": "41.18.99", "format": "1.16-mod-remap", "mod": { "id": "ASA", @@ -9,6 +9,48 @@ "official": true }, "species": [ + { + "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 ], + [ 500, 0.06, 0, 0.5, 0 ], + [ 150, 0.1, 0.1, 0, 0 ], + [ 6000, 0.1, 0.1, 0, 0 ], + null, + null, + [ 550, 0.02, 0.04, 0, 0 ], + [ 1, 0.05, 0.1, 0.5, 0.4 ], + [ 1, 0, 0, 0, 0 ], + null, + null + ], + "breeding": { + "gestationTime": 0, + "incubationTime": 17998.5601, + "eggTempMin": 33, + "eggTempMax": 33, + "maturationTime": 476190.476, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, + "taming": { + "nonViolent": true, + "violent": false + }, + "displayedStats": 927, + "skipWildLevelStats": 512, + "colors": [ + { "name": "Accents" }, + null, + null, + null, + { "name": "Spikes" }, + { "name": "Body" } + ], + "immobilizedBy": [ "Chain Bola", "Large Bear Trap" ] + }, { "blueprintPath": "/Game/ASA/Dinos/Fasolasuchus/Fasola_Character_BP.Fasola_Character_BP", "name": "Fasolasuchus", @@ -310,9 +352,8 @@ "immobilizedBy": [ "Chain Bola", "Large Bear Trap", "Plant Species Y" ] }, { - "name": "Gigantoraptor", "blueprintPath": "/Game/ASA/Dinos/Gigantoraptor/Gigantoraptor_Character_BP.Gigantoraptor_Character_BP", - "skipWildLevelStats": 512, + "name": "Gigantoraptor", "fullStatsRaw": [ [ 770, 0.2, 0.27, 0.5, 0 ], [ 350, 0.1, 0.1, 0, 0 ], @@ -327,15 +368,6 @@ null, null ], - "colors": [ - { "name": "Body Main" }, - { "name": "Neck Main" }, - { "name": "Feather Tips" }, - { "name": "Feather Highlights" }, - { "name": "Legs And Beak" }, - { "name": "Feather Pattern" } - ], - "immobilizedBy": [ "Chain Bola", "Large Bear Trap", "Plant Species Y" ], "breeding": { "gestationTime": 0, "incubationTime": 5999.52004, @@ -348,15 +380,277 @@ "taming": { "nonViolent": true, "violent": false, - "tamingIneffectiveness": 0.06, - "affinityNeeded0": 6800, - "affinityIncreasePL": 160, - "torporDepletionPS0": 2.8333332, + "tamingIneffectiveness": 1, + "affinityNeeded0": 2400, + "affinityIncreasePL": 100, + "wakeAffinityMult": 1.6, + "wakeFoodDeplMult": 2, "foodConsumptionBase": 0.002314, "foodConsumptionMult": 180.0634, "babyFoodConsumptionMult": 510 }, - "displayedStats": 927 + "boneDamageAdjusters": { + "Cnt_Head_JNT_SKL": 3, + "Cnt_Neck_002_JNT_SKL": 3, + "Cnt_Neck_000_JNT_SKL": 3 + }, + "displayedStats": 927, + "skipWildLevelStats": 512, + "colors": [ + { + "name": "Feathers main", + "colors": [ + "Dino Dark Orange", + "Dino Dark Blue", + "Dino Medium Brown", + "Dino Dark Brown", + "Dino Darker Grey", + "DarkWolfFur", + "DragonBase0", + "DragonGreen0", + "DragonGreen3", + "WyvernPurple0", + "WyvernBlue0", + "WyvernBlue1", + "NearBlack", + "DarkTurquoise", + "MediumTurquoise", + "GreenSlate", + "DarkWarmGray", + "MediumWarmGray", + "DarkCement", + "BurntSienna", + "MidnightBlue", + "BlackSands", + "Light Grey", + "DarkTeal", + "Cammo", + "DryMoss", + "Dino Albino", + "Dino Medium Blue", + "Glacial" + ] + }, + { + "name": "Wattle", + "colors": [ + "Dino Light Orange", + "DragonFire", + "DragonBase0", + "DragonBase1", + "DragonGreen0", + "DragonGreen1", + "DragonGreen3", + "WyvernPurple0", + "WyvernPurple1", + "WyvernBlue0", + "Dino Medium Blue", + "MediumTurquoise", + "Turquoise", + "BurntSienna", + "MediumAutumn", + "Coral", + "Orange", + "Peach", + "LightAutumn", + "Mustard", + "MediumTeal", + "Teal", + "Dino Dark Orange", + "DarkTurquoise", + "DarkCement", + "MidnightBlue", + "BlackSands", + "Dino Dark Blue" + ] + }, + { + "name": "Wattle pattern", + "colors": [ + "Dino Light Red", + "Dino Light Orange", + "Dino Light Green", + "Dino Light Blue", + "Dino Light Purple", + "DragonFire", + "DragonBase0", + "DragonBase1", + "DragonGreen0", + "DragonGreen1", + "DragonGreen3", + "WyvernPurple0", + "WyvernPurple1", + "WyvernBlue0", + "Dino Medium Blue", + "MediumTurquoise", + "Turquoise", + "LightPink", + "BurntSienna", + "MediumAutumn", + "Vermillion", + "Coral", + "Orange", + "Peach", + "LightAutumn", + "Mustard", + "Mint", + "LeafGreen", + "Lavender", + "MediumTeal", + "Teal", + "PowderBlue", + "Custard", + "Cream" + ] + }, + { + "name": "Accent", + "colors": [ + "Dino Light Red", + "Dino Light Orange", + "Dino Light Green", + "Dino Light Blue", + "Dino Light Purple", + "DragonFire", + "DragonBase0", + "DragonBase1", + "DragonGreen0", + "DragonGreen1", + "DragonGreen3", + "WyvernPurple0", + "WyvernPurple1", + "WyvernBlue0", + "Dino Medium Blue", + "MediumTurquoise", + "Turquoise", + "LightPink", + "BurntSienna", + "MediumAutumn", + "Vermillion", + "Coral", + "Orange", + "Peach", + "LightAutumn", + "Mustard", + "Mint", + "Jade", + "LeafGreen", + "Lavender", + "MediumTeal", + "Teal", + "PowderBlue", + "Custard", + "Cream" + ] + }, + { + "name": "Skin", + "colors": [ + "Dino Light Orange", + "Dino Light Brown", + "Dino Medium Brown", + "Dino Dark Brown", + "Light Grey", + "Dino Darker Grey", + "Dino Albino", + "BigFoot0", + "BigFoot4", + "BigFoot5", + "WolfFur", + "DarkWolfFur", + "NearBlack", + "DarkWarmGray", + "MediumWarmGray", + "LightWarmGray", + "Dino Light Yellow", + "LightAutumn", + "Cream", + "NearBlack", + "Glacial" + ] + }, + { + "name": "Main pattern", + "colors": [ + "Dino Light Red", + "Dino Light Orange", + "Dino Light Green", + "Dino Light Blue", + "Dino Light Purple", + "DragonFire", + "DragonBase0", + "DragonBase1", + "DragonGreen0", + "DragonGreen1", + "DragonGreen3", + "WyvernPurple0", + "WyvernPurple1", + "WyvernBlue0", + "Dino Medium Blue", + "MediumTurquoise", + "Turquoise", + "LightPink", + "BurntSienna", + "MediumAutumn", + "Vermillion", + "Coral", + "Orange", + "Peach", + "LightAutumn", + "Mustard", + "Jade", + "Lavender", + "MediumTeal", + "Teal", + "PowderBlue", + "Custard", + "Cream", + "Dino Dark Blue", + "Dino Dark Brown", + "NearBlack", + "BlackSands" + ] + } + ] + }, + { + "blueprintPath": "/Game/ASA/Dinos/Xiphactinus/Dinos/Xiphactinus_Character_BP_ASA.Xiphactinus_Character_BP_ASA", + "name": "Xiphactinus", + "fullStatsRaw": [ + [ 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 ], + [ 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 ], + null, + null + ], + "breeding": { + "gestationTime": 0, + "incubationTime": 17998.5601, + "maturationTime": 200000, + "matingCooldownMin": 64800, + "matingCooldownMax": 172800 + }, + "taming": { + "nonViolent": false, + "violent": true + }, + "displayedStats": 927, + "skipWildLevelStats": 520, + "colors": [ + { "name": "Base color" }, + null, + null, + null, + { "name": "Spine" }, + { "name": "Belly and fins" } + ] }, { "blueprintPath": "/Game/Aberration/Dinos/Basilisk/Basilisk_Character_BP.Basilisk_Character_BP", @@ -930,7 +1224,7 @@ }, { "blueprintPath": "/Game/Genesis2/Dinos/Summoner/SummonedDinos/RockGolem_Character_BP_Summoned.RockGolem_Character_BP_Summoned", - "skipWildLevelStats": 512 + "skipWildLevelStats": 520 }, { "blueprintPath": "/Game/Genesis2/Dinos/Summoner/SummonedDinos/Saber_Character_BP_Summoned.Saber_Character_BP_Summoned", @@ -1056,11 +1350,11 @@ }, { "blueprintPath": "/Game/Mods/Valguero/Assets/Dinos/RockGolem/ChalkGolem/ChalkGolem_Character_BP.ChalkGolem_Character_BP", - "skipWildLevelStats": 512 + "skipWildLevelStats": 520 }, { "blueprintPath": "/Game/Mods/Valguero/Assets/Dinos/RockGolem/IceGolem/IceGolem_Character_BP.IceGolem_Character_BP", - "skipWildLevelStats": 512 + "skipWildLevelStats": 520 }, { "blueprintPath": "/Game/Packs/Frontier/Dinos/Oasisaur/Oasisaur_Character_BP.Oasisaur_Character_BP", @@ -2242,7 +2536,7 @@ }, { "blueprintPath": "/Game/ScorchedEarth/Dinos/Manticore/RockGolem_Character_Minion_BP.RockGolem_Character_Minion_BP", - "skipWildLevelStats": 512 + "skipWildLevelStats": 520 }, { "blueprintPath": "/Game/ScorchedEarth/Dinos/Mantis/Ghost_Mantis_Character_BP.Ghost_Mantis_Character_BP", @@ -2258,15 +2552,178 @@ }, { "blueprintPath": "/Game/ScorchedEarth/Dinos/Phoenix/Phoenix_Character_BP.Phoenix_Character_BP", - "skipWildLevelStats": 512 + "skipWildLevelStats": 512, + "colors": [ + { + "name": "Body main", + "colors": [ + "Dino Light Red", + "Dino Light Orange", + "Dino Light Green", + "Dino Light Blue", + "Dino Light Purple", + "DragonFire", + "DragonBase0", + "DragonBase1", + "DragonGreen0", + "DragonGreen1", + "DragonGreen3", + "WyvernPurple0", + "WyvernPurple1", + "WyvernBlue0", + "Dino Medium Blue", + "MediumTurquoise", + "Turquoise", + "BurntSienna", + "MediumAutumn", + "Vermillion", + "Coral", + "Orange", + "Peach", + "LightAutumn", + "Mustard", + "LemonLime", + "Lavender", + "MediumTeal", + "Teal", + "PowderBlue", + "Custard", + "Cream" + ] + }, + { + "name": "Beak and feet", + "colors": [ + "Dino Dark Red", + "Dino Dark Orange", + "Dino Light Orange", + "Dino Medium Brown", + "BigFoot5", + "DragonBase1", + "Black" + ] + }, + null, + { + "name": "Fire", + "colors": [ + "Dino Light Red", + "Dino Light Orange", + "Dino Light Green", + "Dino Light Blue", + "Dino Light Purple", + "DragonFire", + "DragonBase0", + "DragonBase1", + "DragonGreen0", + "DragonGreen1", + "DragonGreen3", + "WyvernPurple0", + "WyvernPurple1", + "WyvernBlue0", + "Dino Medium Blue", + "MediumTurquoise", + "Turquoise", + "BurntSienna", + "MediumAutumn", + "Vermillion", + "Coral", + "Orange", + "Peach", + "LightAutumn", + "Mustard", + "LemonLime", + "Lavender", + "MediumTeal", + "Teal", + "PowderBlue", + "Custard", + "Cream" + ] + }, + { + "name": "Feather highlights", + "colors": [ + "Dino Light Red", + "Dino Light Orange", + "Dino Light Green", + "Dino Light Blue", + "Dino Light Purple", + "DragonFire", + "DragonBase0", + "DragonBase1", + "DragonGreen0", + "DragonGreen1", + "DragonGreen3", + "WyvernPurple0", + "WyvernPurple1", + "WyvernBlue0", + "Dino Medium Blue", + "MediumTurquoise", + "Turquoise", + "BurntSienna", + "MediumAutumn", + "Vermillion", + "Coral", + "Orange", + "Peach", + "LightAutumn", + "Mustard", + "LemonLime", + "Lavender", + "MediumTeal", + "Teal", + "PowderBlue", + "Custard", + "Cream" + ] + }, + { + "name": "Underbelly and wing highlights", + "colors": [ + "Dino Light Red", + "Dino Light Orange", + "Dino Light Green", + "Dino Light Blue", + "Dino Light Purple", + "DragonFire", + "DragonBase0", + "DragonBase1", + "DragonGreen0", + "DragonGreen1", + "DragonGreen3", + "WyvernPurple0", + "WyvernPurple1", + "WyvernBlue0", + "Dino Medium Blue", + "MediumTurquoise", + "Turquoise", + "BurntSienna", + "MediumAutumn", + "Vermillion", + "Coral", + "Orange", + "Peach", + "LightAutumn", + "Mustard", + "LemonLime", + "Lavender", + "MediumTeal", + "Teal", + "PowderBlue", + "Custard", + "Cream" + ] + } + ] }, { "blueprintPath": "/Game/ScorchedEarth/Dinos/RockGolem/RockGolem_Character_BP.RockGolem_Character_BP", - "skipWildLevelStats": 512 + "skipWildLevelStats": 520 }, { "blueprintPath": "/Game/ScorchedEarth/Dinos/RockGolem/RubbleGolem_Character_BP.RubbleGolem_Character_BP", - "skipWildLevelStats": 512 + "skipWildLevelStats": 520 }, { "blueprintPath": "/Game/ScorchedEarth/Dinos/SpineyLizard/SpineyLizard_Character_BP.SpineyLizard_Character_BP", @@ -2565,4 +3022,4 @@ "remaps": { "/Gigantoraptor/Gigantoraptor/Gigantoraptor_Character_BP.Gigantoraptor_Character_BP": "/Game/ASA/Dinos/Gigantoraptor/Gigantoraptor_Character_BP.Gigantoraptor_Character_BP" } -} +} \ No newline at end of file diff --git a/ARKBreedingStats/json/values/_manifest.json b/ARKBreedingStats/json/values/_manifest.json index 9d145e605..e2b8adfd8 100644 --- a/ARKBreedingStats/json/values/_manifest.json +++ b/ARKBreedingStats/json/values/_manifest.json @@ -398,7 +398,7 @@ "mod": { "id": "919470289", "tag": "SSFlyer", "title": "SSFlyer" } }, "ASA-values.json": { - "version": "38.690.452718", + "version": "41.18.99", "format": "1.16-mod-remap", "mod": { "id": "ASA", "tag": "", "title": "Ark: Survival Ascended", "shortTitle": "ASA", "official": true } },