xG00BERx
I am trying to get the algorithm for crafting so that I can figure out how to get the % Chance of Success the same that of OSI
Currently the only thing when adding something to craft is the min skill and the max skill shown here:
I then back tracked everything I could to CraftItem.cs and this is the closest thing I can get to finding the success %
to do this we must know the value of
"craftSystem.GetChanceAtMin"
so we go back to the DefBowFletching.cs and we see:
we also must know the valMainSkill so lets assume you have 100 Fletching!
With this information we can then plug in the following:
chance = .5 + (100 - 90.0) / (130.0 - 90.0) * (1.0 - .5)
Now lets break this down:
100 - 90 = 10
130 - 90 = 40
1.0 - .5 = .5
Now the equation looks like this:
.5 + 10 / 40 * .5
.5 + 10 = 10.5
40 * .5 = 20
last step:
10.5 / 20 = 0.525
so basically chance = .52 which would make 52%?
Well soon as I get in game the percentages are not that way! using all of this info pulled from ServUO I get in game and my Success chance is 62.5%
Anyone know what I am doing if your even still apart of this?
Currently the only thing when adding something to craft is the min skill and the max skill shown here:
Code:
index = this.AddCraft(typeof(Yumi), 1044566, 1030224, 90.0, 130.0, typeof(Board), 1044041, 10, 1044351);
I then back tracked everything I could to CraftItem.cs and this is the closest thing I can get to finding the success %
Code:
chance = craftSystem.GetChanceAtMin(this) +
((valMainSkill - minMainSkill) / (maxMainSkill - minMainSkill) * (1.0 - craftSystem.GetChanceAtMin(this)));
to do this we must know the value of
"craftSystem.GetChanceAtMin"
so we go back to the DefBowFletching.cs and we see:
Code:
public override double GetChanceAtMin(CraftItem item)
{
return 0.5; // 50%
}
we also must know the valMainSkill so lets assume you have 100 Fletching!
With this information we can then plug in the following:
chance = .5 + (100 - 90.0) / (130.0 - 90.0) * (1.0 - .5)
Now lets break this down:
100 - 90 = 10
130 - 90 = 40
1.0 - .5 = .5
Now the equation looks like this:
.5 + 10 / 40 * .5
.5 + 10 = 10.5
40 * .5 = 20
last step:
10.5 / 20 = 0.525
so basically chance = .52 which would make 52%?
Well soon as I get in game the percentages are not that way! using all of this info pulled from ServUO I get in game and my Success chance is 62.5%
Anyone know what I am doing if your even still apart of this?