mmcgarvey 58d5983ef1
[Skills] Configurable Exponential Decay Formula for Skill Up (#1887)
* [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
2022-01-29 20:01:58 -06:00
..
2020-07-07 02:09:39 -05:00
2020-05-09 14:40:33 -05:00
2013-02-16 16:14:39 -08:00
2014-08-21 16:44:02 -07:00
2014-08-21 17:26:32 -07:00
2013-05-09 11:37:51 -04:00
2013-05-09 11:13:16 -04:00
2021-02-25 00:07:36 -05:00
2016-05-30 06:52:25 -04:00
2013-05-09 11:37:51 -04:00
2017-01-22 22:26:34 -08:00
2014-08-21 19:33:02 -07:00
2014-08-21 19:33:02 -07:00
2014-08-21 17:26:32 -07:00
2016-05-25 16:10:28 -04:00
2014-08-21 17:26:32 -07:00
2020-03-11 02:43:21 -05:00
2015-12-17 14:14:04 -08:00
2015-12-17 14:14:04 -08:00
2013-05-09 11:37:51 -04:00
2018-04-27 21:41:52 -04:00
2018-04-27 21:41:52 -04:00
2016-05-25 02:38:06 -04:00
2013-05-09 11:37:51 -04:00
2013-05-09 11:37:51 -04:00
2020-01-16 17:17:31 -05:00
2014-08-21 19:33:02 -07:00
2013-05-09 11:13:16 -04:00
2013-02-16 16:14:39 -08:00
2019-09-01 21:04:58 -05:00
2014-08-21 19:36:50 -07:00
2013-05-09 11:13:16 -04:00
2019-07-05 18:16:09 -05:00
2020-05-09 14:40:33 -05:00
2013-05-09 11:37:51 -04:00
2013-05-09 11:37:51 -04:00
2021-07-16 21:50:46 -04:00
2014-12-15 22:42:59 -06:00
2013-05-09 11:37:51 -04:00
2015-01-19 04:02:45 -06:00
2019-04-16 01:09:25 -07:00
2019-04-16 01:09:25 -07:00
2019-09-01 23:54:24 -05:00
2016-10-16 21:36:39 -04:00
2019-09-01 23:41:26 -05:00
2018-07-14 17:41:42 -04:00
2013-05-09 11:37:51 -04:00
2014-08-21 19:33:02 -07:00