Skip to content

Commit

Permalink
added event-multipliers for easier switching during an event. crash-f…
Browse files Browse the repository at this point in the history
…ix if no colorinfo is given (unicorn). Improved OCR. OCR can be adjusted with config-files. fix for non-oxygen-species.
  • Loading branch information
cadaei committed May 1, 2017
1 parent 01d8abb commit 808bf54
Show file tree
Hide file tree
Showing 47 changed files with 2,717 additions and 967 deletions.
48 changes: 34 additions & 14 deletions ARKBreedingStats/ARKBreedingStats.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<Compile Include="AboutBox1.Designer.cs">
<DependentUpon>AboutBox1.cs</DependentUpon>
</Compile>
<Compile Include="ArkOCR.cs" />
<Compile Include="ocr\ArkOCR.cs" />
<Compile Include="ARKOverlay.cs">
<SubType>Form</SubType>
</Compile>
Expand All @@ -76,6 +76,17 @@
<Compile Include="NotesControl.Designer.cs">
<DependentUpon>NotesControl.cs</DependentUpon>
</Compile>
<Compile Include="ocr\HammingWeight.cs" />
<Compile Include="ocr\OCRControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="ocr\OCRControl.Designer.cs">
<DependentUpon>OCRControl.cs</DependentUpon>
</Compile>
<Compile Include="ocr\OCRLetterEdit.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ocr\OCRTemplate.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
Expand Down Expand Up @@ -130,12 +141,15 @@
<Compile Include="species\CreatureStat.cs" />
<Compile Include="species\Species.cs" />
<Compile Include="SpeechRecognition.cs" />
<Compile Include="uiControls\customSoundChooser.cs">
<Compile Include="settings\customSoundChooser.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="uiControls\customSoundChooser.Designer.cs">
<Compile Include="settings\customSoundChooser.Designer.cs">
<DependentUpon>customSoundChooser.cs</DependentUpon>
</Compile>
<Compile Include="uiControls\nud.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="uiControls\StatGraphs.cs">
<SubType>Component</SubType>
</Compile>
Expand All @@ -160,10 +174,10 @@
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="ListViewColumnSorter.cs" />
<Compile Include="MultiplierSetting.cs">
<Compile Include="settings\MultiplierSetting.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="MultiplierSetting.Designer.cs">
<Compile Include="settings\MultiplierSetting.Designer.cs">
<DependentUpon>MultiplierSetting.cs</DependentUpon>
</Compile>
<Compile Include="uiControls\MultiSetter.cs">
Expand Down Expand Up @@ -201,10 +215,10 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="Settings.cs">
<Compile Include="settings\Settings.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Settings.Designer.cs">
<Compile Include="settings\Settings.Designer.cs">
<DependentUpon>Settings.cs</DependentUpon>
</Compile>
<Compile Include="StatDisplay.cs">
Expand Down Expand Up @@ -274,6 +288,9 @@
<EmbeddedResource Include="NotesControl.resx">
<DependentUpon>NotesControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ocr\OCRControl.resx">
<DependentUpon>OCRControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="RaisingControl.resx">
<DependentUpon>RaisingControl.cs</DependentUpon>
</EmbeddedResource>
Expand All @@ -283,7 +300,7 @@
<EmbeddedResource Include="OffspringPossibilities.resx">
<DependentUpon>OffspringPossibilities.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="uiControls\customSoundChooser.resx">
<EmbeddedResource Include="settings\customSoundChooser.resx">
<DependentUpon>customSoundChooser.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="uiControls\StatPotential.resx">
Expand All @@ -307,12 +324,15 @@
<EmbeddedResource Include="uiControls\StatPotentials.resx">
<DependentUpon>StatPotentials.cs</DependentUpon>
</EmbeddedResource>
<None Include="classicalFlyers.json" />
<None Include="json\classicalFlyers.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="json\ocr.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Resources\kofi.png" />
<None Include="Resources\ARKCalibration18.png" />
<Content Include="Resources\ARKExtractor.ico" />
<Content Include="Resources\lock.png" />
<Content Include="Resources\ARKCalibration15.png" />
<Content Include="Resources\newPlayer.png" />
<Content Include="Resources\newTribe.png" />
<Content Include="Resources\settings.png" />
Expand All @@ -333,7 +353,7 @@
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MultiplierSetting.resx">
<EmbeddedResource Include="settings\MultiplierSetting.resx">
<DependentUpon>MultiplierSetting.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="uiControls\MultiSetter.resx">
Expand All @@ -353,7 +373,7 @@
<SubType>Designer</SubType>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Settings.resx">
<EmbeddedResource Include="settings\Settings.resx">
<DependentUpon>Settings.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="StatDisplay.resx">
Expand All @@ -363,7 +383,7 @@
<DependentUpon>StatIO.cs</DependentUpon>
</EmbeddedResource>
<Content Include="Resources\pen.png" />
<None Include="values.json">
<None Include="json\values.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
Expand Down
42 changes: 11 additions & 31 deletions ARKBreedingStats/ARKOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,35 +96,18 @@ void inventoryCheckTimer_Tick(object sender, EventArgs e)

public void setValues(float[] wildValues, float[] tamedValues, Color[] colors = null)
{
foreach (KeyValuePair<string, int[]> kv in ArkOCR.OCR.statPositions)
for (int statIndex = 0; statIndex < 10; statIndex++)
{
if (kv.Key == "Torpor")
continue;

int statIndex = -1;
switch (kv.Key)
{
case "NameAndLevel": statIndex = 0; break;
case "Health": statIndex = 1; break;
case "Stamina": statIndex = 2; break;
case "Oxygen": statIndex = 3; break;
case "Food": statIndex = 4; break;
case "Weight": statIndex = 5; break;
case "Melee Damage": statIndex = 6; break;
case "Movement Speed": statIndex = 7; break;
default: break;
}

if (statIndex == -1)
if (statIndex == 7 || statIndex == 8) // torpor / imprinting
continue;

labels[statIndex].Text = "[w" + wildValues[statIndex];
if (tamedValues[statIndex] != 0)
labels[statIndex].Text += " + d" + tamedValues[statIndex];
labels[statIndex].Text += "]";
labels[statIndex].Location = this.PointToClient(ArkOCR.OCR.lastLetterPositions[kv.Key]);
labels[statIndex].Location = this.PointToClient(ArkOCR.OCR.lastLetterPositions[""]);

if (kv.Key != "NameAndLevel")
if (statIndex < 8)
labels[statIndex].ForeColor = colors[statIndex];
}
lblStatus.Location = new Point(labels[0].Location.X - 100, 10);
Expand All @@ -134,18 +117,15 @@ public void setValues(float[] wildValues, float[] tamedValues, Color[] colors =

internal void setExtraText(string p)
{
if (ArkOCR.OCR.lastLetterPositions.ContainsKey("NameAndLevel"))
{
lblExtraText.Visible = true;
labelInfo.Visible = false;
//Point loc = this.PointToClient(ArkOCR.OCR.lastLetterPositions["NameAndLevel"]);
Point loc = this.PointToClient(new Point(ArkOCR.OCR.statPositions["NameAndLevel"][0], ArkOCR.OCR.statPositions["NameAndLevel"][1]));
lblExtraText.Visible = true;
labelInfo.Visible = false;
//Point loc = this.PointToClient(ArkOCR.OCR.lastLetterPositions["NameAndLevel"]);
Point loc = this.PointToClient(new Point(ArkOCR.OCR.ocrConfig.labelRectangles[8].X, ArkOCR.OCR.ocrConfig.labelRectangles[9].Y));

loc.Offset(0, 30);
loc.Offset(0, 30);

lblExtraText.Text = p;
lblExtraText.Location = loc;
}
lblExtraText.Text = p;
lblExtraText.Location = loc;
}

internal void setInfoText(string p)
Expand Down
12 changes: 6 additions & 6 deletions ARKBreedingStats/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
<setting name="lastUpdateCheck" serializeAs="String">
<value>2000-01-01</value>
</setting>
<setting name="OCR" serializeAs="String">
<value>True</value>
</setting>
<setting name="syncCollection" serializeAs="String">
<value>False</value>
</setting>
Expand All @@ -55,9 +52,6 @@
<setting name="OCRApp" serializeAs="String">
<value>ShooterGame</value>
</setting>
<setting name="evolutionMultiplier" serializeAs="String">
<value>1.5</value>
</setting>
<setting name="soundStarving" serializeAs="String">
<value />
</setting>
Expand All @@ -76,6 +70,12 @@
<setting name="OverlayInfoDuration" serializeAs="String">
<value>10</value>
</setting>
<setting name="OCRWhiteThreshold" serializeAs="String">
<value>155</value>
</setting>
<setting name="ocrFile" serializeAs="String">
<value>json/ocr.json</value>
</setting>
</ARKBreedingStats.Properties.Settings>
</userSettings>
</configuration>
26 changes: 13 additions & 13 deletions ARKBreedingStats/BreedingPlan.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 808bf54

Please sign in to comment.