Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CF: suggestion for Exp system (damage vs. kill)



The system for gaining experience in CrossFire has been discussed
many times on this list, with the most common question being "why
don't I get experience points when I damage a monster without
killing it?".

Here is a suggestion: keep two separate fields in the object struct
for the monsters (exp and kill_exp).  When loading a map, half of
the exp specified in the file is stored in each field.  Then the
experience points would be awarded as follows:
- Every time the player hits a monster successfully, he is awarded
  some points from "exp".  The number of points to be transfered is
  proportional to the damage (dam / max_hp), so if a monster looses
  10% of its hp, the player will get 10% of its exp.  So the
  formula is something like this: exp_gain = kill_exp * dam / max_hp.
  (note: kill_exp is used in this formula because it will not
  decrease, so it represents the maximum value of exp).
- The points are substracted from "exp", so that after a while the
  player not get anything for damaging the monster.  So the exp is
  transfered with: player_exp = player_exp + exp_gain * level_adj,
  and for the monster: exp = exp - exp_gain.
- When the player kills the monster, he gets all points in "kill_exp"
  plus whatever is left in "exp".
- If there are several players in a party, then _only_ the "kill_exp"
  is shared among the members of the party.  This means that the
  players who are attacking and damaging the monster will have a
  chance to get more points than those who are just sitting there
  waiting until the beast is dead.

Here is an example: let's take a monster that has 100 max_hp and
600 exp, and three players attacking it.  When loading the monster
from the map, 300 points go in exp and 300 in kill_exp.
- Player A casts a spell towards the monster, who looses 30 hp.
  Exp gain = 300 * (30 / 100) = 90 (player A, magic skill)
  Monster stats: kill_exp = 300, exp = 210, max_hp = 100, hp = 70.
- Player B hits with a sword, the monster looses 40 hp.
  Exp_gain = 300 * (40 / 100) = 120 (player B, physique skill).
  Monster stats: kill_exp = 300, exp = 90, max_hp = 100, hp = 30.
- The players go away and wait a bit for player A's mana to be
  regenerated.  In the meantime, the monster's hp raises to 50.
- Player A casts the spell again, and the monster looses 35 hp.
  Exp gain = 300 * (35 / 100) = 105, but only 90 points are awarded
  to player A, because the exp count of the monster has reached 0.
  Monster stats: kill_exp = 300, exp = 0, max_hp = 100, hp = 15.
- All other hits will not gain any exp.
- When the monster is finally killed, the remaining 300 exp points
  (from kill_exp) are shared between players A, B and C, so each
  player gets 100 points.
In the end, it is still the same 600 points that are distributed.
But instead of being distributed all at once, they are distributed
according to who did the real work: player A gets 280 points (90 +
90 + 100), player B gets 220 points (120 + 100) and player C only
gets 100 points because he has not damaged the monster.

This system is also useful in single-player mode, because the
points would be awarded to the correct skill.  So you could damage
a monster with "holy word", finish it with a bow, and get some
experience for each skill, instead of everything on "missile
weapons" as you would get with the current system.

Of course, the exp gains are adjusted according to the respective
levels of the players, as in the current system.

Well, this is just a proposal.  I haven't written any code for doing
that (yet).  I'd like to get some opinions...

-Raphaël
-
[you can put yourself on the announcement list only or unsubscribe altogether
by sending an email stating your wishes to crossfire-request@ifi.uio.no]