mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 08:08:25 +00:00
58d5983ef1
* [Skills] Exponential Decay Skill Up Formula Added an exponential decay skill up formula option. The current, linear, formula results in negative chances to skill up, which have been mitigated via a multiplier and minimum of 1% * [Skills]Configurable Exponential Decay Formala for Skill Up What this fixes: The existing formula for determining whether or not to skill up could result in negative chances, and made an assumption around the number 252. This would ultimately result in an override that would set the chance to 1. My fix: I created 2 new rules: Character:SkillUpMaximumChancePercentage Character:SkillUpMinimumChancePercentage I changed the forumla to: chance = ((max - min + skill_modification) * (.99^skill)) + min This results in an exponential decay that starts at skill-modified maximum and approaches minimum. I decided that max-min+skill_modification should never be less than min I also decided to continue to apply the Character:SkillUpModifier rule post-calculation. I do not really think this is necessary anymore, given this new formula, but we can discuss removing it. I chose 25 and 2 as default maximum and minimum based on feel. Related method signature fix: Client::mod_increase_skill_chance was changed to return a double and accept a double as an input for chance. This matches the actual data types provided while calling the method and eliminates some type coersion and resultant truncation. Right now, this method doesn't do anything, but in the future we could implement skill-specific training dummies that accelerate skill ups. I deduce that this is the purpose of this method call. * [Skills]Configurable Exponential Decay Formula for Skill Up What this fixes: The existing formula for determining whether or not to skill up could result in negative chances, and made an assumption around the number 252. This would ultimately result in an override that would set the chance to 1. My fix: I created 2 new rules: Character:SkillUpMaximumChancePercentage Character:SkillUpMinimumChancePercentage I changed the forumla to: chance = ((max - min + skill_modification) * (.99^skill)) + min This results in an exponential decay that starts at skill-modified maximum and approaches minimum. I decided that max-min+skill_modification should never be less than min I also decided to continue to apply the Character:SkillUpModifier rule post-calculation. I do not really think this is necessary anymore, given this new formula, but we can discuss removing it. I chose 25 and 2 as default maximum and minimum based on feel. Related method signature fix: Client::mod_increase_skill_chance was changed to return a double and accept a double as an input for chance. This matches the actual data types provided while calling the method and eliminates some type coersion and resultant truncation. Right now, this method doesn't do anything, but in the future we could implement skill-specific training dummies that accelerate skill ups. I deduce that this is the purpose of this method call. * fixup! [Skills]Configurable Exponential Decay Formula for Skill Up * fixup! [Skills]Configurable Exponential Decay Formula for Skill Up