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:

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?
 
Are you a human? Don't they get +20 to all skills? Could that be it?

*edit: Nope, that's not it, you did your math in the wrong order.

You need to do the division before the addition.
So it'd be more like .5 + ((10/40) *.5)

PEMDAS: Parenthesis, Exponents, Mult/Divi left->right, Add/Sub left->right

:) Hope this helps!
 
Last edited:
Are you a human? Don't they get +20 to all skills? Could that be it?

*edit: Nope, that's not it, you did your math in the wrong order.

You need to do the division before the addition.
So it'd be more like .5 + ((10/40) *.5)

PEMDAS: Parenthesis, Exponents, Mult/Divi left->right, Add/Sub left->right

:) Hope this helps!

I guess I should have paid a little more attention in math and not stayed up so late the past couple of nights and maybe I would have understood this lol

Thank you so much for the fast response! Just trying to get all of the DefTailoring up to par with OSI then a release will probably come to here :D
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back