From 70da90c1047a300a99f2c53e5a31bbb6432a2246 Mon Sep 17 00:00:00 2001 From: cadon Date: Sat, 21 Nov 2015 20:18:51 +0100 Subject: [PATCH] initial commit --- ARKBreedingStats.sln | 22 + ARKBreedingStats/ARKBreedingStats.csproj | 103 ++++ ARKBreedingStats/App.config | 6 + ARKBreedingStats/Form1.Designer.cs | 447 ++++++++++++++++++ ARKBreedingStats/Form1.cs | 436 +++++++++++++++++ ARKBreedingStats/Form1.resx | 124 +++++ ARKBreedingStats/Program.cs | 22 + ARKBreedingStats/Properties/AssemblyInfo.cs | 36 ++ .../Properties/Resources.Designer.cs | 71 +++ ARKBreedingStats/Properties/Resources.resx | 117 +++++ .../Properties/Settings.Designer.cs | 30 ++ ARKBreedingStats/Properties/Settings.settings | 7 + ARKBreedingStats/StatIO.Designer.cs | 134 ++++++ ARKBreedingStats/StatIO.cs | 181 +++++++ ARKBreedingStats/StatIO.resx | 120 +++++ ARKBreedingStats/stats.csv | 365 ++++++++++++++ LICENSE | 22 + README.md | 12 + 18 files changed, 2255 insertions(+) create mode 100644 ARKBreedingStats.sln create mode 100644 ARKBreedingStats/ARKBreedingStats.csproj create mode 100644 ARKBreedingStats/App.config create mode 100644 ARKBreedingStats/Form1.Designer.cs create mode 100644 ARKBreedingStats/Form1.cs create mode 100644 ARKBreedingStats/Form1.resx create mode 100644 ARKBreedingStats/Program.cs create mode 100644 ARKBreedingStats/Properties/AssemblyInfo.cs create mode 100644 ARKBreedingStats/Properties/Resources.Designer.cs create mode 100644 ARKBreedingStats/Properties/Resources.resx create mode 100644 ARKBreedingStats/Properties/Settings.Designer.cs create mode 100644 ARKBreedingStats/Properties/Settings.settings create mode 100644 ARKBreedingStats/StatIO.Designer.cs create mode 100644 ARKBreedingStats/StatIO.cs create mode 100644 ARKBreedingStats/StatIO.resx create mode 100644 ARKBreedingStats/stats.csv create mode 100644 LICENSE create mode 100644 README.md diff --git a/ARKBreedingStats.sln b/ARKBreedingStats.sln new file mode 100644 index 00000000..4ee21d31 --- /dev/null +++ b/ARKBreedingStats.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ARKBreedingStats", "ARKBreedingStats\ARKBreedingStats.csproj", "{991563CE-6B2C-40AE-BC80-A14F090A4D26}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {991563CE-6B2C-40AE-BC80-A14F090A4D26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {991563CE-6B2C-40AE-BC80-A14F090A4D26}.Debug|Any CPU.Build.0 = Debug|Any CPU + {991563CE-6B2C-40AE-BC80-A14F090A4D26}.Release|Any CPU.ActiveCfg = Release|Any CPU + {991563CE-6B2C-40AE-BC80-A14F090A4D26}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/ARKBreedingStats/ARKBreedingStats.csproj b/ARKBreedingStats/ARKBreedingStats.csproj new file mode 100644 index 00000000..bff8b2e1 --- /dev/null +++ b/ARKBreedingStats/ARKBreedingStats.csproj @@ -0,0 +1,103 @@ + + + + + Debug + AnyCPU + {991563CE-6B2C-40AE-BC80-A14F090A4D26} + WinExe + Properties + ARKBreedingStats + ARKBreedingStats + v4.6 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + UserControl + + + StatIO.cs + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + StatIO.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + PreserveNewest + + + + + + + + \ No newline at end of file diff --git a/ARKBreedingStats/App.config b/ARKBreedingStats/App.config new file mode 100644 index 00000000..8324aa6f --- /dev/null +++ b/ARKBreedingStats/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ARKBreedingStats/Form1.Designer.cs b/ARKBreedingStats/Form1.Designer.cs new file mode 100644 index 00000000..8233c876 --- /dev/null +++ b/ARKBreedingStats/Form1.Designer.cs @@ -0,0 +1,447 @@ +namespace ARKBreedingStats +{ + partial class Form1 + { + /// + /// Erforderliche Designervariable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Verwendete Ressourcen bereinigen. + /// + /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Windows Form-Designer generierter Code + + /// + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); + this.buttonCalculate = new System.Windows.Forms.Button(); + this.labelHeaderW = new System.Windows.Forms.Label(); + this.labelHeaderD = new System.Windows.Forms.Label(); + this.numericUpDownLowerTEffL = new System.Windows.Forms.NumericUpDown(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.label1 = new System.Windows.Forms.Label(); + this.labelHBV = new System.Windows.Forms.Label(); + this.numericUpDownLevel = new System.Windows.Forms.NumericUpDown(); + this.groupBoxLevel = new System.Windows.Forms.GroupBox(); + this.comboBoxCreatures = new System.Windows.Forms.ComboBox(); + this.listBoxPossibilities = new System.Windows.Forms.ListBox(); + this.groupBoxPossibilities = new System.Windows.Forms.GroupBox(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.label2 = new System.Windows.Forms.Label(); + this.labelDoc = new System.Windows.Forms.Label(); + this.buttonCopyClipboard = new System.Windows.Forms.Button(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); + this.labelFootnote = new System.Windows.Forms.Label(); + this.numericUpDownLowerTEffU = new System.Windows.Forms.NumericUpDown(); + this.label3 = new System.Windows.Forms.Label(); + this.statIOTorpor = new ARKBreedingStats.StatIO(); + this.statIOSpeed = new ARKBreedingStats.StatIO(); + this.statIODamage = new ARKBreedingStats.StatIO(); + this.statIOWeight = new ARKBreedingStats.StatIO(); + this.statIOFood = new ARKBreedingStats.StatIO(); + this.statIOOxygen = new ARKBreedingStats.StatIO(); + this.statIOStamina = new ARKBreedingStats.StatIO(); + this.statIOHealth = new ARKBreedingStats.StatIO(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffL)).BeginInit(); + this.groupBox3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLevel)).BeginInit(); + this.groupBoxLevel.SuspendLayout(); + this.groupBoxPossibilities.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffU)).BeginInit(); + this.SuspendLayout(); + // + // buttonCalculate + // + this.buttonCalculate.Location = new System.Drawing.Point(313, 115); + this.buttonCalculate.Name = "buttonCalculate"; + this.buttonCalculate.Size = new System.Drawing.Size(154, 89); + this.buttonCalculate.TabIndex = 4; + this.buttonCalculate.Text = "Extract Level Distribution"; + this.buttonCalculate.UseVisualStyleBackColor = true; + this.buttonCalculate.Click += new System.EventHandler(this.buttonCalculate_Click); + // + // labelHeaderW + // + this.labelHeaderW.AutoSize = true; + this.labelHeaderW.Location = new System.Drawing.Point(135, 41); + this.labelHeaderW.Name = "labelHeaderW"; + this.labelHeaderW.Size = new System.Drawing.Size(28, 13); + this.labelHeaderW.TabIndex = 5; + this.labelHeaderW.Text = "Wild"; + // + // labelHeaderD + // + this.labelHeaderD.AutoSize = true; + this.labelHeaderD.Location = new System.Drawing.Point(180, 41); + this.labelHeaderD.Name = "labelHeaderD"; + this.labelHeaderD.Size = new System.Drawing.Size(29, 13); + this.labelHeaderD.TabIndex = 6; + this.labelHeaderD.Text = "Dom"; + // + // numericUpDownLowerTEffL + // + this.numericUpDownLowerTEffL.Location = new System.Drawing.Point(6, 19); + this.numericUpDownLowerTEffL.Name = "numericUpDownLowerTEffL"; + this.numericUpDownLowerTEffL.Size = new System.Drawing.Size(45, 20); + this.numericUpDownLowerTEffL.TabIndex = 10; + this.numericUpDownLowerTEffL.Value = new decimal(new int[] { + 80, + 0, + 0, + 0}); + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.label3); + this.groupBox3.Controls.Add(this.numericUpDownLowerTEffU); + this.groupBox3.Controls.Add(this.label1); + this.groupBox3.Controls.Add(this.numericUpDownLowerTEffL); + this.groupBox3.Location = new System.Drawing.Point(313, 65); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(154, 44); + this.groupBox3.TabIndex = 11; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "TamingEfficiency Range"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(124, 21); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(15, 13); + this.label1.TabIndex = 11; + this.label1.Text = "%"; + // + // labelHBV + // + this.labelHBV.AutoSize = true; + this.labelHBV.Location = new System.Drawing.Point(215, 41); + this.labelHBV.Name = "labelHBV"; + this.labelHBV.Size = new System.Drawing.Size(79, 13); + this.labelHBV.TabIndex = 13; + this.labelHBV.Text = "Breeding Value"; + // + // numericUpDownLevel + // + this.numericUpDownLevel.Location = new System.Drawing.Point(6, 19); + this.numericUpDownLevel.Maximum = new decimal(new int[] { + 2000, + 0, + 0, + 0}); + this.numericUpDownLevel.Name = "numericUpDownLevel"; + this.numericUpDownLevel.Size = new System.Drawing.Size(56, 20); + this.numericUpDownLevel.TabIndex = 21; + this.numericUpDownLevel.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // groupBoxLevel + // + this.groupBoxLevel.Controls.Add(this.numericUpDownLevel); + this.groupBoxLevel.Location = new System.Drawing.Point(313, 12); + this.groupBoxLevel.Name = "groupBoxLevel"; + this.groupBoxLevel.Size = new System.Drawing.Size(70, 47); + this.groupBoxLevel.TabIndex = 22; + this.groupBoxLevel.TabStop = false; + this.groupBoxLevel.Text = "Level"; + // + // comboBoxCreatures + // + this.comboBoxCreatures.FormattingEnabled = true; + this.comboBoxCreatures.Location = new System.Drawing.Point(12, 12); + this.comboBoxCreatures.Name = "comboBoxCreatures"; + this.comboBoxCreatures.Size = new System.Drawing.Size(121, 21); + this.comboBoxCreatures.TabIndex = 23; + this.comboBoxCreatures.SelectedIndexChanged += new System.EventHandler(this.comboBoxCreatures_SelectedIndexChanged); + // + // listBoxPossibilities + // + this.listBoxPossibilities.Dock = System.Windows.Forms.DockStyle.Fill; + this.listBoxPossibilities.FormattingEnabled = true; + this.listBoxPossibilities.Location = new System.Drawing.Point(3, 16); + this.listBoxPossibilities.Name = "listBoxPossibilities"; + this.listBoxPossibilities.Size = new System.Drawing.Size(162, 382); + this.listBoxPossibilities.TabIndex = 24; + this.listBoxPossibilities.MouseClick += new System.Windows.Forms.MouseEventHandler(this.listBoxPossibilities_MouseClick); + // + // groupBoxPossibilities + // + this.groupBoxPossibilities.Controls.Add(this.tableLayoutPanel1); + this.groupBoxPossibilities.Location = new System.Drawing.Point(473, 12); + this.groupBoxPossibilities.Name = "groupBoxPossibilities"; + this.groupBoxPossibilities.Size = new System.Drawing.Size(174, 420); + this.groupBoxPossibilities.TabIndex = 25; + this.groupBoxPossibilities.TabStop = false; + this.groupBoxPossibilities.Text = "Possible Levels"; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Controls.Add(this.listBoxPossibilities, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.label2, 0, 0); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 16); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 13F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(168, 401); + this.tableLayoutPanel1.TabIndex = 25; + // + // label2 + // + this.label2.Dock = System.Windows.Forms.DockStyle.Fill; + this.label2.Location = new System.Drawing.Point(3, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(162, 13); + this.label2.TabIndex = 25; + this.label2.Text = "Wild Dom TEfficiency"; + // + // labelDoc + // + this.labelDoc.Location = new System.Drawing.Point(313, 207); + this.labelDoc.Name = "labelDoc"; + this.labelDoc.Size = new System.Drawing.Size(154, 174); + this.labelDoc.TabIndex = 26; + this.labelDoc.Text = resources.GetString("labelDoc.Text"); + // + // buttonCopyClipboard + // + this.buttonCopyClipboard.Enabled = false; + this.buttonCopyClipboard.Location = new System.Drawing.Point(313, 384); + this.buttonCopyClipboard.Name = "buttonCopyClipboard"; + this.buttonCopyClipboard.Size = new System.Drawing.Size(154, 45); + this.buttonCopyClipboard.TabIndex = 27; + this.buttonCopyClipboard.Text = "Copy retrieved Values as Table to Clipboard"; + this.buttonCopyClipboard.UseVisualStyleBackColor = true; + this.buttonCopyClipboard.Click += new System.EventHandler(this.buttonCopyClipboard_Click); + // + // linkLabel1 + // + this.linkLabel1.AutoSize = true; + this.linkLabel1.Location = new System.Drawing.Point(573, 443); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(67, 13); + this.linkLabel1.TabIndex = 28; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "(c) cad 2015"; + this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + // + // labelFootnote + // + this.labelFootnote.Location = new System.Drawing.Point(314, 432); + this.labelFootnote.Name = "labelFootnote"; + this.labelFootnote.Size = new System.Drawing.Size(253, 27); + this.labelFootnote.TabIndex = 29; + this.labelFootnote.Text = "label3"; + // + // numericUpDownLowerTEffU + // + this.numericUpDownLowerTEffU.Location = new System.Drawing.Point(73, 19); + this.numericUpDownLowerTEffU.Name = "numericUpDownLowerTEffU"; + this.numericUpDownLowerTEffU.Size = new System.Drawing.Size(45, 20); + this.numericUpDownLowerTEffU.TabIndex = 12; + this.numericUpDownLowerTEffU.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(57, 21); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(10, 13); + this.label3.TabIndex = 13; + this.label3.Text = "-"; + // + // statIOTorpor + // + this.statIOTorpor.Id = 0; + this.statIOTorpor.Input = 100D; + this.statIOTorpor.Location = new System.Drawing.Point(12, 414); + this.statIOTorpor.Name = "statIOTorpor"; + this.statIOTorpor.Percent = false; + this.statIOTorpor.PostTame = true; + this.statIOTorpor.Size = new System.Drawing.Size(295, 45); + this.statIOTorpor.TabIndex = 20; + // + // statIOSpeed + // + this.statIOSpeed.Id = 0; + this.statIOSpeed.Input = 100D; + this.statIOSpeed.Location = new System.Drawing.Point(12, 363); + this.statIOSpeed.Name = "statIOSpeed"; + this.statIOSpeed.Percent = false; + this.statIOSpeed.PostTame = true; + this.statIOSpeed.Size = new System.Drawing.Size(295, 45); + this.statIOSpeed.TabIndex = 19; + this.statIOSpeed.Click += new System.EventHandler(this.statIO_Click); + // + // statIODamage + // + this.statIODamage.Id = 0; + this.statIODamage.Input = 100D; + this.statIODamage.Location = new System.Drawing.Point(12, 312); + this.statIODamage.Name = "statIODamage"; + this.statIODamage.Percent = false; + this.statIODamage.PostTame = true; + this.statIODamage.Size = new System.Drawing.Size(295, 45); + this.statIODamage.TabIndex = 18; + this.statIODamage.Click += new System.EventHandler(this.statIO_Click); + // + // statIOWeight + // + this.statIOWeight.Id = 0; + this.statIOWeight.Input = 100D; + this.statIOWeight.Location = new System.Drawing.Point(12, 261); + this.statIOWeight.Name = "statIOWeight"; + this.statIOWeight.Percent = false; + this.statIOWeight.PostTame = true; + this.statIOWeight.Size = new System.Drawing.Size(295, 45); + this.statIOWeight.TabIndex = 17; + this.statIOWeight.Click += new System.EventHandler(this.statIO_Click); + // + // statIOFood + // + this.statIOFood.Id = 0; + this.statIOFood.Input = 100D; + this.statIOFood.Location = new System.Drawing.Point(12, 210); + this.statIOFood.Name = "statIOFood"; + this.statIOFood.Percent = false; + this.statIOFood.PostTame = true; + this.statIOFood.Size = new System.Drawing.Size(295, 45); + this.statIOFood.TabIndex = 16; + this.statIOFood.Click += new System.EventHandler(this.statIO_Click); + // + // statIOOxygen + // + this.statIOOxygen.Id = 0; + this.statIOOxygen.Input = 100D; + this.statIOOxygen.Location = new System.Drawing.Point(12, 159); + this.statIOOxygen.Name = "statIOOxygen"; + this.statIOOxygen.Percent = false; + this.statIOOxygen.PostTame = true; + this.statIOOxygen.Size = new System.Drawing.Size(295, 45); + this.statIOOxygen.TabIndex = 15; + this.statIOOxygen.Click += new System.EventHandler(this.statIO_Click); + // + // statIOStamina + // + this.statIOStamina.Id = 0; + this.statIOStamina.Input = 100D; + this.statIOStamina.Location = new System.Drawing.Point(12, 108); + this.statIOStamina.Name = "statIOStamina"; + this.statIOStamina.Percent = false; + this.statIOStamina.PostTame = true; + this.statIOStamina.Size = new System.Drawing.Size(295, 45); + this.statIOStamina.TabIndex = 14; + this.statIOStamina.Click += new System.EventHandler(this.statIO_Click); + // + // statIOHealth + // + this.statIOHealth.Id = 0; + this.statIOHealth.Input = 100D; + this.statIOHealth.Location = new System.Drawing.Point(12, 57); + this.statIOHealth.Name = "statIOHealth"; + this.statIOHealth.Percent = false; + this.statIOHealth.PostTame = true; + this.statIOHealth.Size = new System.Drawing.Size(295, 45); + this.statIOHealth.TabIndex = 12; + this.statIOHealth.Click += new System.EventHandler(this.statIO_Click); + // + // Form1 + // + this.AcceptButton = this.buttonCalculate; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(650, 460); + this.Controls.Add(this.labelFootnote); + this.Controls.Add(this.linkLabel1); + this.Controls.Add(this.buttonCopyClipboard); + this.Controls.Add(this.labelDoc); + this.Controls.Add(this.groupBoxPossibilities); + this.Controls.Add(this.comboBoxCreatures); + this.Controls.Add(this.groupBoxLevel); + this.Controls.Add(this.statIOTorpor); + this.Controls.Add(this.statIOSpeed); + this.Controls.Add(this.statIODamage); + this.Controls.Add(this.statIOWeight); + this.Controls.Add(this.statIOFood); + this.Controls.Add(this.statIOOxygen); + this.Controls.Add(this.statIOStamina); + this.Controls.Add(this.labelHBV); + this.Controls.Add(this.statIOHealth); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.labelHeaderD); + this.Controls.Add(this.labelHeaderW); + this.Controls.Add(this.buttonCalculate); + this.Name = "Form1"; + this.Text = "ARK Breeding Stat Extractor"; + this.Load += new System.EventHandler(this.Form1_Load); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffL)).EndInit(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLevel)).EndInit(); + this.groupBoxLevel.ResumeLayout(false); + this.groupBoxPossibilities.ResumeLayout(false); + this.tableLayoutPanel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLowerTEffU)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Button buttonCalculate; + private System.Windows.Forms.Label labelHeaderW; + private System.Windows.Forms.Label labelHeaderD; + private System.Windows.Forms.NumericUpDown numericUpDownLowerTEffL; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label label1; + private StatIO statIOHealth; + private System.Windows.Forms.Label labelHBV; + private StatIO statIOStamina; + private StatIO statIOOxygen; + private StatIO statIOFood; + private StatIO statIOWeight; + private StatIO statIODamage; + private StatIO statIOSpeed; + private StatIO statIOTorpor; + private System.Windows.Forms.NumericUpDown numericUpDownLevel; + private System.Windows.Forms.GroupBox groupBoxLevel; + private System.Windows.Forms.ComboBox comboBoxCreatures; + private System.Windows.Forms.ListBox listBoxPossibilities; + private System.Windows.Forms.GroupBox groupBoxPossibilities; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label labelDoc; + private System.Windows.Forms.Button buttonCopyClipboard; + private System.Windows.Forms.LinkLabel linkLabel1; + private System.Windows.Forms.Label labelFootnote; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.NumericUpDown numericUpDownLowerTEffU; + } +} + diff --git a/ARKBreedingStats/Form1.cs b/ARKBreedingStats/Form1.cs new file mode 100644 index 00000000..0c9cecbb --- /dev/null +++ b/ARKBreedingStats/Form1.cs @@ -0,0 +1,436 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ARKBreedingStats +{ + public partial class Form1 : Form + { + private List creatures = new List(); + private string[] statNames = new string[] { "Health", "Stamina", "Oxygen", "Food", "Weight", "Damage", "Speed", "Torpor" }; + private List> stats = new List>(); + private List statIOs = new List(); + private List> results = new List>(); + private int c = 0; // current creature + private bool postTamed = false; + private int activeStat = 0; + private List statWithEff = new List(); + private List chosenResults = new List(); + private int[] precisions = new int[] { 1, 1, 1, 1, 1, 3, 3, 1 }; // damage and speed are percentagevalues, need more precision + + public Form1() + { + InitializeComponent(); + } + + private void Form1_Load(object sender, EventArgs e) + { + linkLabel1.Links.Add(0, 12, "https://github.com/cadon/ARKStatsExtractor"); + statIOs.Add(this.statIOHealth); + statIOs.Add(this.statIOStamina); + statIOs.Add(this.statIOOxygen); + statIOs.Add(this.statIOFood); + statIOs.Add(this.statIOWeight); + statIOs.Add(this.statIODamage); + statIOs.Add(this.statIOSpeed); + statIOs.Add(this.statIOTorpor); + for (int s = 0; s < statNames.Length; s++) + { + statIOs[s].Title = statNames[s]; + statIOs[s].Id = s; + } + statIOs[5].Percent = true; + statIOs[6].Percent = true; + loadFile(); + comboBoxCreatures.SelectedIndex = 0; + } + + private void clearAll() + { + results.Clear(); + listBoxPossibilities.Items.Clear(); + chosenResults.Clear(); + for (int s = 0; s < 8; s++) + { + statIOs[s].Clear(); + chosenResults.Add(0); + statIOs[s].BarLength = 0; + } + this.labelFootnote.Text = ""; + statWithEff.Clear(); + this.numericUpDownLevel.BackColor = SystemColors.Window; + this.numericUpDownLowerTEffL.BackColor = SystemColors.Window; + this.numericUpDownLowerTEffU.BackColor = SystemColors.Window; + buttonCopyClipboard.Enabled = false; + } + + private void buttonCalculate_Click(object sender, EventArgs e) + { + clearAll(); + bool resultsValid = true; + // torpor is directly proportional to wild level (after taming it's a too high estimate, making the upper bound worse) + postTamed = (stats[c][7][0] + stats[c][7][0] * stats[c][7][1] * Math.Round((statIOs[7].Input - stats[c][7][0]) / (stats[c][7][0] * stats[c][7][1]), 0) != statIOs[7].Input); + for (int s = 0; s < statIOs.Count; s++) + { + results.Add(new List()); + statIOs[s].PostTame = postTamed; + double inputValue = Math.Round(statIOs[s].Input / (precisions[s] == 3 ? 100 : 1), precisions[s]); + double maxLW = 0; + if (stats[c][s][0] > 0 && stats[c][s][1] > 0) + { + maxLW = Math.Floor((inputValue - stats[c][s][0]) / (stats[c][s][0] * stats[c][s][1])); + } + double maxLD = 0; + if (stats[c][s][0] > 0 && stats[c][s][2] > 0 && postTamed) + { + maxLD = Math.Floor((inputValue - stats[c][s][0]) / (stats[c][s][0] * stats[c][s][2])); + } + double vWildL = 0; // value with only wild levels + double tamingEfficiency = 0; + bool withTEff = (postTamed && stats[c][s][4] > 0); + if (withTEff) { statWithEff.Add(s); } + for (int w = 0; w < maxLW + 1; w++) + { + for (int d = 0; d < maxLD + 1; d++) + { + vWildL = stats[c][s][0] + stats[c][s][0] * stats[c][s][1] * w + (postTamed ? stats[c][s][3] : 0); + if (withTEff) + { + // taming bonus is percentual, this means the taming-efficiency plays a role + // get tamingEfficiency-possibility + tamingEfficiency = Math.Round((inputValue / (1 + stats[c][s][2] * d) - vWildL) / (vWildL * stats[c][s][4]), 3); + if (tamingEfficiency * 100 >= (double)this.numericUpDownLowerTEffL.Value) + { + if (tamingEfficiency * 100 <= (double)this.numericUpDownLowerTEffU.Value) + { + results[s].Add(new double[] { w, d, tamingEfficiency }); + } + else { continue; } + } + else { + // if tamingEff < lowerBound, break, as in this loop it's getting only smaller + break; + } + } + else if (Math.Round(vWildL + vWildL * stats[c][s][2] * d, precisions[s]) == inputValue) + { + results[s].Add(new double[] { w, d, tamingEfficiency }); + } + } + } + } + // max level for wild according to torpor (torpor is depending on taming efficiency up to 1.5 times "too high" for level + int maxLW2 = (int)Math.Round((statIOs[7].Input - (postTamed ? stats[c][7][3] : 0) - stats[c][7][0]) / (stats[c][7][0] * stats[c][7][1]), 0); + int maxLD2 = (int)this.numericUpDownLevel.Value - (int)Math.Floor(200 * maxLW2 / (200 + (double)this.numericUpDownLowerTEffU.Value)) - 1; // the first level is always wild. middle-term is equal to maxLW2/(1*TEffU.Value/200) + int wildSpeedLevel = maxLW2; + // substract all uniquely solved stat-levels + for (int s = 0; s < 7; s++) + { + if (results[s].Count == 1) + { + // result is uniquely solved + maxLW2 -= (int)results[s][0][0]; + maxLD2 -= (int)results[s][0][1]; + } + } + if (maxLW2 < 0 || maxLD2 < 0) + { + this.numericUpDownLevel.BackColor = Color.LightSalmon; + results.Clear(); + } + else + { + // if more than one parameter is affected by tamingEfficiency filter all numbers that occure only in one + if (statWithEff.Count > 1) + { + for (int es = 0; es < statWithEff.Count; es++) + { + for (int et = es + 1; et < statWithEff.Count; et++) + { + List equalEffs1 = new List(); + List equalEffs2 = new List(); + for (int ere = 0; ere < results[statWithEff[es]].Count; ere++) + { + for (int erf = 0; erf < results[statWithEff[et]].Count; erf++) + { + if (results[statWithEff[es]][ere][2] == results[statWithEff[et]][erf][2]) + { + // if entry is not yet in whitelist, add it + if (equalEffs1.IndexOf(ere) == -1) { equalEffs1.Add(ere); } + if (equalEffs2.IndexOf(erf) == -1) { equalEffs2.Add(erf); } + } + } + } + // copy all results that have an efficiency that occurs more than once and replace the others + List validResults1 = new List(); + for (int ev = 0; ev < equalEffs1.Count; ev++) + { + validResults1.Add(results[statWithEff[es]][equalEffs1[ev]]); + } + // replace long list with (hopefully) shorter list with valid entries + results[statWithEff[es]] = validResults1; + List validResults2 = new List(); + for (int ev = 0; ev < equalEffs2.Count; ev++) + { + validResults2.Add(results[statWithEff[et]][equalEffs2[ev]]); + } + results[statWithEff[et]] = validResults2; + } + if (es >= statWithEff.Count - 2) + { + // only one stat left, not enough to compare it + break; + } + } + } + for (int s = 0; s < 8; s++) + { + // remove all results that are violate restrictions + if (s < 7) + { + for (int r = 0; r < results[s].Count; r++) + { + if (results[s].Count > 1 && (results[s][r][0] > maxLW2 || results[s][r][1] > maxLD2)) + { + results[s].RemoveAt(r--); + // if result gets unique due to this, check if remaining result doesn't violate for max level + if (results[s].Count == 1) + { + maxLW2 -= (int)results[s][0][0]; + maxLD2 -= (int)results[s][0][1]; + if (maxLW2 < 0 || maxLD2 < 0) + { + this.numericUpDownLevel.BackColor = Color.LightSalmon; + results[s].Clear(); + break; + } + } + } + } + } + + if (s < results.Count && results[s].Count > 0) + { + setPossibility(s, 0); + if (results[s].Count == 1) + { + statIOs[s].Warning = 0; + } + else + { + statIOs[s].Warning = 1; + } + } + else + { + statIOs[s].Warning = 2; + results[s].Clear(); + resultsValid = false; + if (this.numericUpDownLowerTEffL.Value > 0) + { + this.numericUpDownLowerTEffL.BackColor = Color.LightSalmon; + } + if (this.numericUpDownLowerTEffU.Value < 100) + { + this.numericUpDownLowerTEffU.BackColor = Color.LightSalmon; + } + } + } + } + if (results.Count == 8) + { + // speed gets remaining wild levels if all other are unique + bool setSpeed = true; + for (int s = 0; s < 6; s++) + { + if (results[s].Count != 1) + { + setSpeed = false; + break; + } + wildSpeedLevel -= (int)results[s][0][0]; + + } + if (setSpeed) + { + statIOs[6].LevelWild = wildSpeedLevel.ToString(); + } + } + if (resultsValid) + { + buttonCopyClipboard.Enabled = true; + } + if (!postTamed) + { + labelFootnote.Text = "* Creature is not yet tamed and gets bonus-level which are added to the breeding values"; + } + } + + private void statIO_Click(object sender, EventArgs e) + { + StatIO se = (StatIO)sender; + if (se != null) + { + int ss = se.Id; + for (int s = 0; s < 8; s++) + { + if (s == ss) + { + statIOs[s].Selected = true; + activeStat = s; + setCombobox(s); + } + else + { + statIOs[s].Selected = false; + } + } + } + } + + private void setCombobox(int s) + { + if (s < results.Count) + { + this.listBoxPossibilities.Items.Clear(); + for (int r = 0; r < results[s].Count; r++) + { + this.listBoxPossibilities.Items.Add(results[s][r][0].ToString() + "\t" + results[s][r][1].ToString() + (results[s][r][2] > 0 ? "\t" + (results[s][r][2] * 100).ToString() + "%" : "")); + } + } + } + + private void loadFile() + { + // read entities from file + string path = "stats.csv"; + + // check if file exists + if (!System.IO.File.Exists(path)) + { + MessageBox.Show("Creatures-File 'stats.csv' not found.", "Error"); + Close(); + } + else + { + string[] rows; + rows = System.IO.File.ReadAllLines(path); + string[] values; + int c = -1; + int s = 0; + foreach (string row in rows) + { + if (row.Length > 1 && row.Substring(0, 2) != "//") + { + values = row.Split(','); + if (values.Length == 1) + { + // new creature + List cs = new List(); + for (s = 0; s < 8; s++) + { + cs.Add(new double[] { 0, 0, 0, 0, 0 }); + } + s = 0; + stats.Add(cs); + this.comboBoxCreatures.Items.Add(values[0].Trim()); + c++; + } + else if (values.Length > 1 && values.Length < 6) + { + for (int v = 0; v < values.Length; v++) + { + if (s == 5 && v == 0) { stats[c][5][0] = 1; } // damage and speed are handled as percentage of a hidden base value + else + { + double value = 0; + if (Double.TryParse(values[v], System.Globalization.NumberStyles.Any, System.Globalization.CultureInfo.InvariantCulture, out value)) + { + stats[c][s][v] = value; + } + } + } + s++; + } + } + } + } + } + + private void comboBoxCreatures_SelectedIndexChanged(object sender, EventArgs e) + { + if (comboBoxCreatures.SelectedIndex >= 0) + { + c = comboBoxCreatures.SelectedIndex; + clearAll(); + } + } + + private void listBoxPossibilities_MouseClick(object sender, MouseEventArgs e) + { + int index = this.listBoxPossibilities.IndexFromPoint(e.Location); + if (index != System.Windows.Forms.ListBox.NoMatches) + { + setPossibility(activeStat, index); + } + } + + private void setPossibility(int s, int i) + { + if (s == 7) + { + statIOs[s].LevelWild = "(" + results[s][i][0].ToString() + ")"; + } + else + { + statIOs[s].LevelWild = results[s][i][0].ToString(); + statIOs[s].BarLength = (int)results[s][i][0]; + } + statIOs[s].LevelDom = results[s][i][1].ToString(); + statIOs[s].BreedingValue = breedingValue(s, i); + chosenResults[s] = i; + } + + private void buttonCopyClipboard_Click(object sender, EventArgs e) + { + if (results.Count == 8 && chosenResults.Count == 8) + { + List tsv = new List(); + tsv.Add(comboBoxCreatures.Items[comboBoxCreatures.SelectedIndex].ToString() + "\tLevel " + numericUpDownLevel.Value.ToString()); + tsv.Add("Stat\tWildLevel\tDomLevel\tBreedingValue"); + for (int s = 0; s < 8; s++) + { + if (chosenResults[s] < results[s].Count) + { + tsv.Add(statNames[s] + "\t" + results[s][chosenResults[s]][0].ToString() + "\t" + results[s][chosenResults[s]][1].ToString() + "\t" + breedingValue(s, chosenResults[s]).ToString()); + } + else { return; } + } + Clipboard.SetText(string.Join("\n", tsv)); + } + } + + private double breedingValue(int s, int r) + { + if (s >= 0 && s < 8) + { + if (r >= 0 && r < results[s].Count) + { + return Math.Round((stats[c][s][0] + stats[c][s][0] * stats[c][s][1] * results[s][r][0] + stats[c][s][3]) * (1 + stats[c][s][4] * results[s][r][2]), precisions[s]); + } + } + return -1; + } + + private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + System.Diagnostics.Process.Start(e.Link.LinkData.ToString()); + } + } +} diff --git a/ARKBreedingStats/Form1.resx b/ARKBreedingStats/Form1.resx new file mode 100644 index 00000000..a6092731 --- /dev/null +++ b/ARKBreedingStats/Form1.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + If the levels cannot be determined uniquely, the stat-box on the left becomes dark-grey. Click on it to choose a possibility from the list on the right. For example if you know that you never leveled up oxygen, you can choose the entry with the 0 in the Domesticated-column. +The exacter / narrower the "Taming Efficiency Range", the fewer possible results. + + \ No newline at end of file diff --git a/ARKBreedingStats/Program.cs b/ARKBreedingStats/Program.cs new file mode 100644 index 00000000..8c85b212 --- /dev/null +++ b/ARKBreedingStats/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ARKBreedingStats +{ + static class Program + { + /// + /// Der Haupteinstiegspunkt für die Anwendung. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/ARKBreedingStats/Properties/AssemblyInfo.cs b/ARKBreedingStats/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..9f24e07f --- /dev/null +++ b/ARKBreedingStats/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("ARKBreedingStats")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ARKBreedingStats")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar +// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("991563ce-6b2c-40ae-bc80-a14f090a4d26")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern +// übernehmen, indem Sie "*" eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ARKBreedingStats/Properties/Resources.Designer.cs b/ARKBreedingStats/Properties/Resources.Designer.cs new file mode 100644 index 00000000..4efc5f3a --- /dev/null +++ b/ARKBreedingStats/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion: 4.0.30319.42000 +// +// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn +// der Code neu generiert wird. +// +//------------------------------------------------------------------------------ + +namespace ARKBreedingStats.Properties +{ + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse + // über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ARKBreedingStats.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/ARKBreedingStats/Properties/Resources.resx b/ARKBreedingStats/Properties/Resources.resx new file mode 100644 index 00000000..af7dbebb --- /dev/null +++ b/ARKBreedingStats/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ARKBreedingStats/Properties/Settings.Designer.cs b/ARKBreedingStats/Properties/Settings.Designer.cs new file mode 100644 index 00000000..6e91f739 --- /dev/null +++ b/ARKBreedingStats/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ARKBreedingStats.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/ARKBreedingStats/Properties/Settings.settings b/ARKBreedingStats/Properties/Settings.settings new file mode 100644 index 00000000..39645652 --- /dev/null +++ b/ARKBreedingStats/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ARKBreedingStats/StatIO.Designer.cs b/ARKBreedingStats/StatIO.Designer.cs new file mode 100644 index 00000000..818564db --- /dev/null +++ b/ARKBreedingStats/StatIO.Designer.cs @@ -0,0 +1,134 @@ +namespace ARKBreedingStats +{ + partial class StatIO + { + /// + /// Erforderliche Designervariable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Verwendete Ressourcen bereinigen. + /// + /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Komponenten-Designer generierter Code + + /// + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// + private void InitializeComponent() + { + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.labelBValue = new System.Windows.Forms.Label(); + this.labelLvD = new System.Windows.Forms.Label(); + this.labelLvW = new System.Windows.Forms.Label(); + this.numericUpDownInput = new System.Windows.Forms.NumericUpDown(); + this.panelBar = new System.Windows.Forms.Panel(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownInput)).BeginInit(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.panelBar); + this.groupBox1.Controls.Add(this.labelBValue); + this.groupBox1.Controls.Add(this.labelLvD); + this.groupBox1.Controls.Add(this.labelLvW); + this.groupBox1.Controls.Add(this.numericUpDownInput); + this.groupBox1.Location = new System.Drawing.Point(0, 0); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(295, 43); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + // + // labelBValue + // + this.labelBValue.AutoSize = true; + this.labelBValue.Location = new System.Drawing.Point(204, 14); + this.labelBValue.Name = "labelBValue"; + this.labelBValue.Size = new System.Drawing.Size(35, 13); + this.labelBValue.TabIndex = 3; + this.labelBValue.Text = "label1"; + this.labelBValue.Click += new System.EventHandler(this.labelBValue_Click); + // + // labelLvD + // + this.labelLvD.AutoSize = true; + this.labelLvD.Location = new System.Drawing.Point(163, 14); + this.labelLvD.Name = "labelLvD"; + this.labelLvD.Size = new System.Drawing.Size(35, 13); + this.labelLvD.TabIndex = 2; + this.labelLvD.Text = "label1"; + this.labelLvD.Click += new System.EventHandler(this.labelLvD_Click); + // + // labelLvW + // + this.labelLvW.AutoSize = true; + this.labelLvW.Location = new System.Drawing.Point(122, 14); + this.labelLvW.Name = "labelLvW"; + this.labelLvW.Size = new System.Drawing.Size(35, 13); + this.labelLvW.TabIndex = 1; + this.labelLvW.Text = "label1"; + this.labelLvW.Click += new System.EventHandler(this.labelLvW_Click); + // + // numericUpDownInput + // + this.numericUpDownInput.DecimalPlaces = 1; + this.numericUpDownInput.Location = new System.Drawing.Point(6, 12); + this.numericUpDownInput.Maximum = new decimal(new int[] { + 10000000, + 0, + 0, + 0}); + this.numericUpDownInput.Name = "numericUpDownInput"; + this.numericUpDownInput.Size = new System.Drawing.Size(110, 20); + this.numericUpDownInput.TabIndex = 0; + this.numericUpDownInput.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.numericUpDownInput.Enter += new System.EventHandler(this.numericUpDownInput_Enter); + // + // panelBar + // + this.panelBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128))))); + this.panelBar.Location = new System.Drawing.Point(6, 34); + this.panelBar.Name = "panelBar"; + this.panelBar.Size = new System.Drawing.Size(283, 7); + this.panelBar.TabIndex = 4; + // + // StatIO + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.groupBox1); + this.Name = "StatIO"; + this.Size = new System.Drawing.Size(295, 43); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownInput)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label labelBValue; + private System.Windows.Forms.Label labelLvD; + private System.Windows.Forms.Label labelLvW; + private System.Windows.Forms.NumericUpDown numericUpDownInput; + private System.Windows.Forms.Panel panelBar; + } +} diff --git a/ARKBreedingStats/StatIO.cs b/ARKBreedingStats/StatIO.cs new file mode 100644 index 00000000..d1c7c3f4 --- /dev/null +++ b/ARKBreedingStats/StatIO.cs @@ -0,0 +1,181 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ARKBreedingStats +{ + + public partial class StatIO : UserControl + { + private bool postTame; + private int id; + private int warning; + private bool percent; + + public StatIO() + { + InitializeComponent(); + this.labelLvW.Text = ""; + this.labelLvD.Text = ""; + this.labelBValue.Text = ""; + postTame = true; + id = 0; + percent = false; + this.groupBox1.Click += new System.EventHandler(this.groupBox1_Click); + } + + private void groupBox1_Click(object sender, System.EventArgs e) + { + if (warning == 1) + { + this.OnClick(e); + } + } + private void labelLvW_Click(object sender, EventArgs e) + { + if (warning == 1) + { + this.OnClick(e); + } + } + + private void labelLvD_Click(object sender, EventArgs e) + { + if (warning == 1) + { + this.OnClick(e); + } + } + + private void labelBValue_Click(object sender, EventArgs e) + { + if (warning == 1) + { + this.OnClick(e); + } + } + + public double Input + { + get { return (double)this.numericUpDownInput.Value; } + set { this.numericUpDownInput.Value = (decimal)value; } + } + + public string Title + { + set { this.groupBox1.Text = value; } + } + + public string LevelWild + { + set { this.labelLvW.Text = value; } + } + + public string LevelDom + { + set { this.labelLvD.Text = value; } + } + + public double BreedingValue + { + set + { + if (value > 0) { this.labelBValue.Text = Math.Round((percent ? 100 : 1) * value, 1).ToString() + (percent ? " %" : "") + (postTame ? "" : "*"); } + else { this.labelBValue.Text = "error"; } + } + } + + public bool PostTame + { + set { postTame = value; } + get { return postTame; } + } + + public int Id + { + set { id = value; } + get { return id; } + } + + public bool Percent + { + set { percent = value; } + get { return percent; } + } + + public bool Selected + { + set + { + if (value) + { + this.BackColor = SystemColors.Highlight; + this.ForeColor = SystemColors.HighlightText; + } + else + { + Warning = warning; + } + } + } + + public int Warning + { + set + { + warning = value; + this.ForeColor = SystemColors.ControlText; + switch (warning) + { + case 0: + this.numericUpDownInput.BackColor = System.Drawing.SystemColors.Window; + this.BackColor = SystemColors.Control; + break; + case 1: + this.numericUpDownInput.BackColor = Color.LightYellow; + this.BackColor = SystemColors.ControlDark; + break; + case 2: + this.numericUpDownInput.BackColor = Color.LightSalmon; + this.BackColor = SystemColors.ControlDarkDark; + break; + } + } + } + + public int BarLength + { + set + { + this.panelBar.Width = value * 283 / 100; + int r = 511 - value * 255 / 33; + int g = value * 255 / 33; + if (r < 0) { r = 0; } + if (g < 0) { g = 0; } + if (r > 255) { r = 255; } + if (g > 255) { g = 255; } + this.panelBar.BackColor = Color.FromArgb(r, g, 0); + } + } + + private void numericUpDownInput_Enter(object sender, EventArgs e) + { + numericUpDownInput.Select(0, numericUpDownInput.Text.Length); + } + + public void Clear() + { + Warning = 0; + labelLvD.Text = "n/a"; + labelLvW.Text = "n/a"; + labelBValue.Text = ""; + } + + } +} diff --git a/ARKBreedingStats/StatIO.resx b/ARKBreedingStats/StatIO.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/ARKBreedingStats/StatIO.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ARKBreedingStats/stats.csv b/ARKBreedingStats/stats.csv new file mode 100644 index 00000000..fecb1efb --- /dev/null +++ b/ARKBreedingStats/stats.csv @@ -0,0 +1,365 @@ +// a line with only one value marks a new creature +// the other lines are interpreted as follows, where the Inc is always as part of level1 +// level1, IncWild, IncDom, TameBonusAdd, TameBonusMult +// the order is always: Health, Stamina, Oxygen, Food, Weight, MeleeDamage, Speed, Torpor +Ankylosaurus +700,0.2,0.27,0.5,0 +175,0.1,0.1,0,0 +150,0.1,0.1,0,0 +3000,0.1,0.1,0,0.15 +250,0.02,0.04,0,0 +50,0.05,0.1,1,0.4 +1,0,0.025,1.25,0 +420,0.06,0,0.5,0 +Araneo +150,0.2,0.135,0.5,0 +100,0.1,0.1,0,0 +150,0.1,0.1,0,0 +900,0.1,0.1,0,0 +100,0.02,0.08,0,0 +10,0.05,0.1,0.5,0.4 +1,0,0.025,0.67,0 +80,0.06,0,0.5,0 +Argentavis +290,0.2,0.27,0.5,0 +750,0.1,0.1,0,0 +150,0.1,0.1,0,0 +2000,0.1,0.1,0,0 +350,0.02,0.04,0,0 +20,0.05,0.1,.5,0.4 +1,0,0.025,0,0 +600,0.06,0,0.5,0 +Beelzebufo +220,0.2,0.27,0.5,0 +190,0.1,0.1,0,0 +0,0.1,0.1,0,0 +1500,0.1,0.1,0,0 +160,0.02,0.04,0,0 +12,0.05,0.1,.2,0.25 +1,0,0.025,1,0 +200,0.06,0,0.5,0 +Brontosaurus +1850,0.2,0.27,0.5,0 +240,0.1,0.1,0,0 +150,0.1,0.1,0,0 +10000,0.1,0.1,0,0 +900,0.02,0.04,0,0 +60,0.05,0.1,.5,0.4 +1,0,0.025,0,0 +1900,0.06,0,0.5,0 +Carbonemys +700,0.2,0.27,0.5,0 +200,0.1,0.1,0,0 +0,0.1,0.1,0,0 +3000,0.1,0.1,0,0 +250,0.02,0.04,0,0 +13,0.05,0.1,.5,0.4 +1,0,0.025,.7,0 +275,0.06,0,0.5,0 +Carnotaurus +420,0.2,0.27,0.5,0 +300,0.1,0.1,0,0 +150,0.1,0.1,0,0 +2000,0.1,0.1,0,0.15 +300,0.02,0.04,0,0 +35,0.05,0.1,.5,0.4 +1,0,0.025,0,0 +350,0.06,0,0.5,0 +Dilophosaur +130,0.2,0.27,0.5,0 +100,0.1,0.1,0,0 +150,0.1,0.1,0,0 +450,0.1,0.1,0,0.15 +45,0.02,0.04,0,0 +10,0.05,0.1,1,0.4 +1,0,0.025,2,0 +75,0.06,0,0.5,0 +Dimorphodon +125,0.2,0.27,0.5,0 +150,0.1,0.1,0,0 +150,0.1,0.1,0,0 +900,0.1,0.1,0,0 +50,0.02,0.04,0,0 +20,0.05,0.1,.5,0.4 +1,0,0.025,0,0 +100,0.06,0,0.5,0 +Direwolf +300,0.2,0.27,0.5,0 +260,0.1,0.1,0,0 +150,0.1,0.1,0,0 +1200,0.1,0.1,0,0.15 +170,0.02,0.04,0,0 +40,0.05,0.1,.4,0.35 +1,0,0.025,.3,0 +450,0.06,0,0.5,0 +Dodo +40,0.2,0.27,0.5,0 +100,0.1,0.1,0,0 +150,0.1,0.1,0,0 +450,0.1,0.1,0,0.15 +50,0.02,0.04,0,0 +5,0.05,0.1,1,0.4 +1,0,0.025,2,0 +30,0.06,0,0.5,0 +DodoRex +666666,0.2,0.27,0.5,0 +420,0.1,0.1,0,0 +150,0.1,0.1,0,0 +3000,0.1,0.1,0,0 +500,0.02,0.04,0,0 +600,0.05,0.1,.5,0.4 +1,0,0.025,0,0 +1550,0.06,0,0.5,0 +Doedicurus +850,0.2,0.27,0.5,0 +300,0.1,0.1,0,0 +150,0.1,0.1,0,0 +3000,0.1,0.1,0,0.15 +250,0.02,0.04,0,0 +32,0.05,0.1,1,0.4 +1,0,0.025,1.25,0 +800,0.06,0,0.5,0 +Giganotosaurus +300000,0.0005,0.0027,-225000,0 +400,0.0005,0.01,0,0 +150,0.0025,0.01,0,0 +4000,0.0025,0.025,0,0 +700,0.01,0.01,0,0 +1200,0.05,0.05,-.5,0 +1,0,0.003,0,0 +10000,0.06,0,0.5,0 +Gigantopithecus +640,0.1,0.27,0.5,0 +300,0.1,0.1,0,0 +150,0.1,0.1,0,0 +1500,0.1,0.1,0,0 +220,0.02,0.04,0,0 +40,0.04,0.1,.5,0.4 +1,0,0.025,6,0 +1100,0.06,0,0.5,0 +Ichthy +275,0.05,0.05,0.5,0 +300,0.2,0.2,0,0 +0,0.1,0.1,0,0 +1000,0.1,0.1,0,0.15 +250,0.02,0.04,0,0 +20,0.05,0.1,1,0.4 +1,0,0.025,0,0 +300,0.06,0,0.5,0 +Kairuku +95.5,0.2,0.27,0.5,0 +200,0.1,0.1,0,0 +0,0.1,0.1,0,0 +1035,0.1,0.1,0,0 +70,0.02,0.04,0,0 +8,0.05,0.1,.5,0.4 +1,0,0.025,0,0 +300.5,0.06,0,0.5,0 +Mammoth +850,0.2,0.27,0.5,0 +330,0.1,0.1,0,0 +150,0.1,0.1,0,0 +50000,0.1,0.1,0,0 +500,0.02,0.04,0,0 +40,0.05,0.1,.5,0.4 +1,0,0.025,1.22.6,0 +550,0.06,0,0.5,0 +Megaloceros +300,0.2,0.27,0.5,0 +280,0.1,0.1,0,0 +150,0.1,0.1,0,0 +1200,0.1,0.1,0,0 +220,0.02,0.04,0,0 +30,0.05,0.1,.5,0.4 +1,0,0.025,.2,0 +175,0.06,0,0.5,0 +Megalodon +600,0.2,0.27,0.3,0 +320,0.1,0.1,0,0 +0,0.1,0.1,0,0 +2000,0.1,0.1,0,0.15 +250,0.02,0.04,0,0 +40,0.05,0.1,1,0.4 +1,0,0.025,0,0 +800,0.06,0,0.5,0 +Mesopithecus +115,0.2,0.27,0.5,0 +10,0.1,0.1,0,0 +150,0.1,0.1,0,0 +450,0.1,0.1,0,0.15 +70,0.02,0.04,0,0 +10,0.05,0.1,1,0.4 +1,0,0.025,1.3,0 +60,0.06,0,0.5,0 +Mosasaurus +3600,0.12,0.243,0.5,0 +400,0.1,0.1,0,0 +0,0.1,0.1,0,0 +8000,0.1,0.1,0,0.15 +1300,0.02,0.04,0,0 +100,0.05,0.1,.9,0.4 +1,0,0.025,0,0 +3000,0.06,0,0.5,0 +Onyc +250,0.2,0.27,0.5,0 +100,0.1,0.1,0,0 +150,0.1,0.1,0,0 +1500,0.1,0.1,0,0 +50,0.02,0.04,0,0 +25,0.05,0.1,.5,0.4 +1,0,0.025,0,0 +200,0.06,0,0.5,0 +Pachy +175,0.2,0.27,0.5,0 +150,0.1,0.1,0,0 +150,0.1,0.1,0,0 +1200,0.1,0.1,0,0 +150,0.02,0.04,0,0 +10,0.05,0.1,.5,0.4 +1,0,0.025,.2,0 +160,0.06,0,0.5,0 +Paracer +1140,0.2,0.27,0.5,0 +300,0.1,0.1,0,0 +150,0.1,0.1,0,0 +6500,0.1,0.1,0,0 +500,0.02,0.04,0,0 +45,0.05,0.1,.5,0.4 +1,0,0.025,0,0 +1300,0.06,0,0.5,0 +Parasaur +200,0.2,0.27,0.5,0 +200,0.1,0.1,0,0 +150,0.1,0.1,0,0 +1500,0.1,0.1,0,0 +255,0.02,0.04,0,0 +10,0.05,0.1,.5,0.4 +1,0,0.025,.67,0 +150,0.06,0,0.5,0 +Phiomia +300,0.2,0.27,0.5,0 +300,0.1,0.1,0,0 +150,0.1,0.1,0,0 +3000,0.1,0.1,0,0.15 +200,0.02,0.04,0,0 +10,0.05,0.1,1,0.4 +1,0,0.025,.35,0 +240,0.06,0,0.5,0 +Plesiosaur +2400,0.12,0.162,0.5,0 +200,0.1,0.1,0,0 +0,0.1,0.1,0,0 +5000,0.1,0.1,0,0.15 +800,0.02,0.04,0,0 +75,0.05,0.1,1,0.4 +1,0,0.025,0,0 +1600,0.06,0,0.5,0 +Pteranodon +150,0.2,0.27,0.5,0 +300,0.1,0.1,0,0 +150,0.1,0.1,0,0 +1200,0.1,0.1,0,0.15 +150,0.02,0.04,0,0 +15,0.05,0.1,1,0.4 +1,0,0.025,.365,0 +120,0.06,0,0.5,0 +Pulmonoscorpius +300,0.2,0.27,0.5,0 +200,0.1,0.1,0,0 +150,0.1,0.1,0,0 +1500,0.1,0.1,0,0 +200,0.02,0.04,0,0 +15,0.05,0.1,.5,0.4 +1,0,0.025,1,0 +150,0.06,0,0.5,0 +Quetzal +1500,0.2,0.27,0.5,0 +750,0.1,0.1,0,0 +150,0.1,0.1,0,0 +1200,0.1,0.1,0,0.15 +820,0.02,0.04,0,0 +32,0.04,0.1,.4,0.4 +1,0,0.025,.365,0 +1850,0.06,0,0.5,0 +Raptor +200,0.2,0.27,0.5,0 +150,0.1,0.1,0,0 +150,0.1,0.1,0,0 +1200,0.1,0.1,0,0 +140,0.02,0.04,0,0 +15,0.05,0.1,.5,0.4 +1,0,0.025,.2,0 +180,0.06,0,0.5,0 +Rex +1000,0.2,0.27,0.5,0 +420,0.1,0.1,0,0 +150,0.1,0.1,0,0 +3000,0.1,0.1,0,0 +500,0.02,0.04,0,0 +60,0.05,0.1,.5,0.4 +1,0,0.025,0,0 +1550,0.06,0,0.5,0 +Sabertooth +275,0.2,0.27,0.5,0 +200,0.1,0.1,0,0 +150,0.1,0.1,0,0 +1200,0.1,0.1,0,0.15 +200,0.02,0.04,0,0 +30,0.05,0.1,.4,0.35 +1,0,0.025,.3,0 +500,0.06,0,0.5,0 +Sarco +400,0.2,0.27,0.5,0 +450,0.1,0.1,0,0 +0,0.1,0.1,0,0 +1500,0.1,0.1,0,0 +300,0.02,0.04,0,0 +35,0.05,0.1,.8,0.5 +1,0,0.025,.6,0 +400,0.06,0,0.5,0 +Spinosaur +700,0.2,0.27,0.5,0 +350,0.1,0.1,0,0 +650,0.1,0.1,0,0 +2600,0.1,0.1,0,0 +350,0.02,0.04,0,0 +50,0.05,0.1,.5,0.4 +1,0,0.025,0,0 +850,0.06,0,0.5,0 +Stegosaurus +570,0.2,0.27,0.5,0 +300,0.1,0.1,0,0 +150,0.1,0.1,0,0 +6000,0.1,0.1,0,0 +440,0.02,0.04,0,0 +41,0.05,0.1,.5,0.4 +1,0,0.025,.964,0 +500,0.06,0,0.5,0 +The Dragon +20000,0.2,0.27,0.3,0 +400,0.1,0.1,0,0 +2000,0.1,0.1,0,0 +2600,0.1,0.1,0,0 +3000,0.02,0.02,0,0 +300,0.05,0.04,.3,0.3 +1,0,0,0,0 +350,0.06,0,0.5,0 +Titanoboa +300,0.2,0.27,0.5,0 +150,0.1,0.1,0,0 +150,0.1,0.1,0,0 +1200,0.1,0.1,0,0 +150,0.02,0.04,0,0 +30,0.05,0.1,.5,0.4 +1,0,0.025,.2,0 +175,0.06,0,0.5,0 +Triceratops +375,0.2,0.27,0.5,0 +150,0.1,0.1,0,0 +150,0.1,0.1,0,0 +3000,0.1,0.1,0,0 +365,0.02,0.04,0,0 +32,0.05,0.1,.5,0.4 +1,0,0.025,1.226,0 +250,0.06,0,0.5,0 + diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..2121c3ef --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 cadon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/README.md b/README.md new file mode 100644 index 00000000..c6b67c08 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# ARKStatsExtractor +For the game ARK Survival Evolved. Extracts possible levelups of creatures to get the values that are inherited. + +* Type in stats of creature +* Click Extract +* View possible wild and domesticated levelups +* Copy Stats in Breeding-Spreadsheet + +## Download +Download the latest release to run here: https://github.com/cadon/ARKStatsExtractor/releases + +The file stats.csv contains all the stats, it can be edited and updated if necessary.