Author Topic: skill increase formula  (Read 3127 times)

Offline HoriceGump

  • Acquaintance
  • *
  • Posts: 16
    • View Profile
skill increase formula
« on: May 04, 2011, 05:27:35 am »
Hello All,

Does anyone have a formula for standard skill increases?  I've added a few skills, 'hack', 'swing', etc, based on skill levels, doing more damage, they higher the skills are, but I'm looking for a standard formula for increasing the skill levels, where the first 1% is a whole load easier than the last 1%.  Any suggestions?

Thanks.

Horice.

Offline Sluggy

  • Friend
  • **
  • Posts: 91
    • View Profile
    • Stellarmass
Re: skill increase formula
« Reply #1 on: May 04, 2011, 11:12:02 am »
An exact formula is mostly arbitrary. However, what you are looking for is called diminishing returns. Try using a formula based on logarithms and you'll probably get what you want. You could go so far as to get a graphing calculator and work out the math of a single function that hits the various key points on the curve you want.

Offline Nulvect

  • BFF
  • ***
  • Posts: 127
    • View Profile
Re: skill increase formula
« Reply #2 on: May 04, 2011, 12:39:40 pm »
Some tips from having done this before:

You'll want to manipulate your logarithmic formula by squishing it sideways so that the extreme diminishing part doesn't happen too soon. Something like:
Code: [Select]
  damage = 7 * log( 500 * skill + 1 ) + 10;
Getting it just right is a royal pain though.

You could also use a stepped linear function, where every X skill points counts half as much as the X before it. For example, having 200 skill points and a step of 50:
Code: [Select]
  int skill = 200;
  int step = 50;
  int divisor = 1;
  int damage = 0;

  while (skill > step) {
    damage += step / divisor;
    skill -= step;
    divisor += divisor;
  }
  damage += skill / divisor;
This is much easier to get right, in my opinion. You don't have to do endless logarithm manipulation just to get to the sweet spot, and you can tweak it easily too. If you wanted each stepping to count more, you could change divisor += divisor to divisor++ for example.

Hope this helps.

Offline HoriceGump

  • Acquaintance
  • *
  • Posts: 16
    • View Profile
Re: skill increase formula
« Reply #3 on: May 05, 2011, 03:56:04 am »
Thank you all.

Offline detah

  • BFF
  • ***
  • Posts: 190
  • Ruler of 2D
    • View Profile
Re: skill increase formula
« Reply #4 on: May 05, 2011, 01:19:07 pm »
You guys seem to be on the same page, but I have no idea how "damage" fits in with a question about skill increases. I thought the question related to how skill points translate into skill ratings. eg
if Skill points=0, then Skill rating=0
if Skill points=201, then Skill rating=1
if Skill points=404, then Skill rating=2
if Skill points=609, then Skill rating=3
if Skill points=816, then Skill rating=4 and so on.

Are you asking a different question than this? If Nulvect gave a satisfactory answer, I would love to know what the question was.

Offline Nulvect

  • BFF
  • ***
  • Posts: 127
    • View Profile
Re: skill increase formula
« Reply #5 on: May 05, 2011, 06:07:11 pm »
I may have misinterpreted the question as: how do I translate higher skills into more damage? Even if the question was, how do I translate higher skills into costs for raising them?, the same basic principles apply though.