magik hatt
Member
I was looking through TreasuresofTokuno.cs and confused myself. I'm a beginner with C# and am not sure what to search about these formulas. Could someone explain to me what is happening in the following lines?
It looks like AwardPoints is calculating the factor that luck plays into ToT drops. Then x is assigned GetPoints. How do GetPoints and AwardPoints link? Is it the pm part? Why is there a separate GetPoints and AwardPoints? These don't appear anywhere else in the file so I just don't understand this part.
The rest is math to calculate the drop chance so that's straight forward. Any help is appreciated.
C#:
AwardPoints(pm, (int)Math.Max(0, (bc.Fame * (1 + Math.Sqrt(luck) / 100))));
//This is the Exponentional regression with only 2 datapoints.
//A log. func would also work, but it didn't make as much sense.
//This function isn't OSI exact beign that I don't know OSI's func they used ;p
double x = GetPoints(pm);
//const double A = 8.63316841 * Math.Pow( 10, -4 );
const double A = 0.000863316841;
//const double B = 4.25531915 * Math.Pow( 10, -6 );
const double B = 0.00000425531915;
double chance = A * Math.Pow(10, B * x);
It looks like AwardPoints is calculating the factor that luck plays into ToT drops. Then x is assigned GetPoints. How do GetPoints and AwardPoints link? Is it the pm part? Why is there a separate GetPoints and AwardPoints? These don't appear anywhere else in the file so I just don't understand this part.
The rest is math to calculate the drop chance so that's straight forward. Any help is appreciated.
Last edited: