Integrating Arms Lore into Repairs
Posted: Fri May 18, 2012 6:25 pm
Ok, so this isn't the most simple one to post about. It's fairly simple if you understand it, but difficult to explain. The short and narrow is that there is a process for repairs, with various distinct points in it. At any stage you can integrate Arms Lore in, in any way you like.
First the scripts set a variable 'toWeaken' to 1 for AOS. That means if the weapon loses dura, the amount is set at 1. Here you could say set the base to 2, and then use the arms lore skill value to calculate a chance to reduce it to 1.
Next it calculates the chance of it weakening. Here I think is the most appropriate place to integrate Arms Lore, because you gain a benefit of it without it being essential. Weaken chance is calculated like so:
E.g 100 dura weapon on 50 dura remaining at 120 smith skill: (40+50)-(120/10) = 78
Which is then ran against:
So basically if our 78 is more than a random number 1-100, then the weapon will weaken. (78% chance of losing dura)
This is rather high, but loot will be easy to come by so no big deal imo. As an example we could take arms lore skill, divide it by 50 and then divide the chance by that. So 100 arms lore / 50 = 2 = half chance to lose dura.
Finally it checks the repair difficulty vs skill and repairs if it succeeds. I don't think we should modify this as a high smith should still have the same chance to repair imo.
Armor uses the same math basically.
First the scripts set a variable 'toWeaken' to 1 for AOS. That means if the weapon loses dura, the amount is set at 1. Here you could say set the base to 2, and then use the arms lore skill value to calculate a chance to reduce it to 1.
Next it calculates the chance of it weakening. Here I think is the most appropriate place to integrate Arms Lore, because you gain a benefit of it without it being essential. Weaken chance is calculated like so:
Code: Select all
return (40 + (maxHits - curHits)) - (int)(((m_Deed != null)? m_Deed.SkillLevel : mob.Skills[skill].Value) / 10);
Which is then ran against:
Code: Select all
return ( GetWeakenChance( mob, skill, curHits, maxHits ) > Utility.Random( 100 ) );
This is rather high, but loot will be easy to come by so no big deal imo. As an example we could take arms lore skill, divide it by 50 and then divide the chance by that. So 100 arms lore / 50 = 2 = half chance to lose dura.
Finally it checks the repair difficulty vs skill and repairs if it succeeds. I don't think we should modify this as a high smith should still have the same chance to repair imo.
Armor uses the same math basically.