I am trying to figure out an exp formula for levels. I thought I finally
had it when it starts going crazy in the game. This is the stuff I have for
it at the end of utils.c. For the first 10 levels, players have to have -1
exp and then on out, the exp_to_level is far higher than it should be (ie
142K instead of 13K). Here is the code I am using:
int exp_to_level(struct char_data *ch)
{
int exp, mod, h_mod;
/* Level modifications to exp */
if (GET_LEVEL(ch) >= 0 && GET_LEVEL(ch) < 10)
mod = 1;
if (GET_LEVEL(ch) >= 10 && GET_LEVEL(ch) < 20)
mod = 2;
if (GET_LEVEL(ch) >= 20 && GET_LEVEL(ch) < 30)
mod = 4;
if (GET_LEVEL(ch) >= 30 && GET_LEVEL(ch) < 40)
mod = 8;
if (GET_LEVEL(ch) >= 40 && GET_LEVEL(ch) < 50)
mod = 16;
if (GET_LEVEL(ch) >= 50 && GET_LEVEL(ch) < 60)
mod = 25;
else
mod = 30;
/* THE FORMULA!!!!!! */
if (GET_LEVEL(ch) = 1)
exp = 800;
else
exp = GET_LEVEL(ch) * 500 * ((GET_LEVEL(ch) - 1) / 10) * mod;
/* If character is human, grant a 10% xp bonus */
h_mod = exp * (1 / 10);
if (IS_HUMAN(ch))
exp = exp - h_mod;
return exp;
}
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST