Skip to content

Commit

Permalink
fixed extraction-issue for HP of aberrant species. fix for crash in r…
Browse files Browse the repository at this point in the history
…aising-tab if one parent was not declared. changed stat-names for glow-species in tester and extractor. fixed visual if creature in library is set to mature. fixed recalculation of breeding plan after a creature is set to ready-to-mate. fixed edit-timer-control in raising-tab. updated reaper-king values.
  • Loading branch information
cadaei committed Jan 7, 2018
1 parent f6f7e6d commit ee6f3e4
Show file tree
Hide file tree
Showing 15 changed files with 86 additions and 53 deletions.
8 changes: 4 additions & 4 deletions ARKBreedingStats/BreedingPlan.Designer.cs

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

12 changes: 11 additions & 1 deletion ARKBreedingStats/Extraction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,17 @@ public void extractLevels(int speciesI, int level, List<StatIO> statIOs, double
double maxLW = 0;
if (Values.V.species[speciesI].stats[s].BaseValue > 0 && Values.V.species[speciesI].stats[s].IncPerWildLevel > 0)
{
maxLW = Math.Round(((inputValue / (postTamed ? 1 + lowerTEBound * Values.V.species[speciesI].stats[s].MultAffinity : 1) - (postTamed ? Values.V.species[speciesI].stats[s].AddWhenTamed : 0)) / (postTamed ? statBaseValueTamed : statBaseValueWild) - 1) / Values.V.species[speciesI].stats[s].IncPerWildLevel); // floor is too unprecise
double multAffinityFactor = Values.V.species[speciesI].stats[s].MultAffinity;
if (postTamed)
{
// the multiplicative bonus is only multiplied with the TE if it is positive (i.e. negative boni won't get less bad if the TE is low)
if (multAffinityFactor > 0)
multAffinityFactor *= lowerTEBound;
multAffinityFactor += 1;
}
else
multAffinityFactor = 1;
maxLW = Math.Round(((inputValue / multAffinityFactor - (postTamed ? Values.V.species[speciesI].stats[s].AddWhenTamed : 0)) / (postTamed ? statBaseValueTamed : statBaseValueWild) - 1) / Values.V.species[speciesI].stats[s].IncPerWildLevel); // floor is too unprecise
}
if (s != 7 && maxLW > levelWildFromTorporRange[1]) { maxLW = levelWildFromTorporRange[1]; } // torpor level can be too high right after taming (torpor bug in the game)

Expand Down
8 changes: 4 additions & 4 deletions ARKBreedingStats/Form1.Designer.cs

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

10 changes: 7 additions & 3 deletions ARKBreedingStats/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -897,10 +897,13 @@ private void comboBoxSpeciesGlobal_SelectedIndexChanged(object sender, EventArgs
speciesIndex = comboBoxSpeciesGlobal.SelectedIndex;
creatureInfoInputExtractor.SpeciesIndex = speciesIndex;
creatureInfoInputTester.SpeciesIndex = speciesIndex;
bool isglowSpecies = (Values.V.glowSpecies.IndexOf(Values.V.species[speciesIndex].name) != -1);
for (int s = 0; s < 8; s++)
{
activeStats[s] = (Values.V.species[speciesIndex].stats[s].BaseValue > 0) && (s != 2 || !Values.V.species[speciesIndex].doesNotUseOxygen || oxygenForAll);
statIOs[s].Enabled = activeStats[s];
statIOs[s].Title = Utils.statName(s, false, isglowSpecies);
testingIOs[s].Title = Utils.statName(s, false, isglowSpecies);
}
if (tabControlMain.SelectedTab == tabPageExtractor)
{
Expand Down Expand Up @@ -3070,13 +3073,14 @@ private void removeCooldownGrowingToolStripMenuItem_Click(object sender, EventAr
if (c.growingUntil > DateTime.Now)
c.growingUntil = DateTime.Now;

i.SubItems[9].Text = "-";
i.SubItems[10].Text = "-";
// color for cooldown
Color forecolor, backcolor;
cooldownColors(c, out forecolor, out backcolor);
i.SubItems[9].ForeColor = forecolor;
i.SubItems[9].BackColor = backcolor;
i.SubItems[10].ForeColor = forecolor;
i.SubItems[10].BackColor = backcolor;
}
breedingPlan1.breedingPlanNeedsUpdate = true;
listViewLibrary.EndUpdate();
}

Expand Down
2 changes: 1 addition & 1 deletion ARKBreedingStats/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("0.24.3")]
[assembly: AssemblyFileVersion("0.24.4")]
1 change: 1 addition & 0 deletions ARKBreedingStats/RaisingControl.Designer.cs

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

5 changes: 5 additions & 0 deletions ARKBreedingStats/RaisingControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,11 @@ private void dateTimePickerEditTimerFinish_ValueChanged(object sender, EventArgs
dhmsInputTimerEditTimer.Timespan = dateTimePickerEditTimerFinish.Value.Subtract(DateTime.Now);
}

private void dhmsInputTimerEditTimer_ValueChanged(uiControls.dhmsInput sender, TimeSpan timespan)
{
dateTimePickerEditTimerFinish.Value = DateTime.Now.Add(timespan);
}

private void bSaveTimerEdit_Click(object sender, EventArgs e)
{
if (iteEdit != null)
Expand Down
1 change: 1 addition & 0 deletions ARKBreedingStats/Stats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public static double calculateValue(int speciesIndex, int stat, int levelWild, i
{
add = Values.V.species[speciesIndex].stats[stat].AddWhenTamed;
domMultAffinity = Values.V.species[speciesIndex].stats[stat].MultAffinity;
// the multiplicative bonus is only multiplied with the TE if it is positive (i.e. negative boni won't get less bad if the TE is low)
if (domMultAffinity >= 0)
domMultAffinity *= tamingEff;
domMult = (tamingEff >= 0 ? (1 + domMultAffinity) : 1) * (1 + levelDom * Values.V.species[speciesIndex].stats[stat].IncPerTamedLevel);
Expand Down
14 changes: 11 additions & 3 deletions ARKBreedingStats/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,21 @@ public static string levelPercentile(int l)
return "This level is in the top " + prb[l].ToString("N2") + "% of what you can find.";
}

public static string statName(int s, bool abr = false)
public static string statName(int s, bool abr = false, bool glow=false)
{
if (s >= 0 && s < 8)
{
string[] statNames;
if (abr) statNames = new string[] { "HP", "St", "Ox", "Fo", "We", "Dm", "Sp", "To" };
else statNames = new string[] { "Health", "Stamina", "Oxygen", "Food", "Weight", "Damage", "Speed", "Torpidity" };
if (glow)
{
if (abr) statNames = new string[] { "HP", "CC", "CRe", "Fo", "We", "CRa", "Sp", "To" };
else statNames = new string[] { "Health", "Ch Capacity", "Ch Regen", "Food", "Weight", "Ch Emission Range", "Speed", "Torpidity" };
}
else
{
if (abr) statNames = new string[] { "HP", "St", "Ox", "Fo", "We", "Dm", "Sp", "To" };
else statNames = new string[] { "Health", "Stamina", "Oxygen", "Food", "Weight", "Damage", "Speed", "Torpidity" };
}
return statNames[s];
}
return "";
Expand Down
4 changes: 4 additions & 0 deletions ARKBreedingStats/Values.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public class Values
public double tamingSpeedMultiplierSP = 1;
public bool celsius = true;

public List<string> glowSpecies = new List<string>();

public Values()
{
}
Expand Down Expand Up @@ -105,6 +107,8 @@ public bool loadValues()
sp.initialize();
_V.speciesNames.Add(sp.name);
}

_V.glowSpecies = new List<string> { "Bulbdog", "Featherlight", "Glowbug", "Glowtail", "Shinehorn" };
}

//saveJSON();
Expand Down
2 changes: 1 addition & 1 deletion ARKBreedingStats/json/ocr_2560x1440_100.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ARKBreedingStats/json/values.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions ARKBreedingStats/raising/ParentStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public void setParentValues(Creature mother, Creature father)
mother != null && father != null ? (mother.valuesBreeding[s] > father.valuesBreeding[s] ? 1 : 2) : 0
);
}
labelMother.Text = mother.name;
labelFather.Text = (labelMother.Width > 78 ? "\n" : "") + father.name;
labelMother.Text = mother == null ? "unknown" : mother.name;
labelFather.Text = father == null ? "unknown" : (labelMother.Width > 78 ? "\n" : "") + father.name;
}
}
}
Expand Down
64 changes: 32 additions & 32 deletions ARKBreedingStats/settings/Settings.Designer.cs

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

2 changes: 1 addition & 1 deletion ARKBreedingStats/ver.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
276.12,0.24.3
276.21,0.24.4

0 comments on commit ee6f3e4

Please sign in to comment.