[MUD-Dev] [TECH] algorithm request

Travis Casey efindel at earthlink.net
Thu Dec 20 12:17:26 New Zealand Daylight Time 2001


Wednesday, December 19, 2001, 6:58:28 PM, Malcolm Tester II wrote:

> So, you set a monster's exp.  this amount is divided by a constant
> upon death.  I.e.  1000/50 as in the old lp mud style.

> This amount is sent to an experience daemon that does things like
> wizlist, static stats information, and decides how much actual
> experience to give the player.  So, here's the twist.  I track how
> many monsters a player has killed total.  I track how many times
> they've slayed a particular monster (not 100% foolproof).  The
> grand total doesn't matter, that's just for them.  However, the
> more times they kill "Harry" for example, the less experience they
> get for it.  And that's where I am having trouble.

> Let's say there is a monster named Bob.  Bob has 10,000
> experience.  Player kills him.  The experience daemon receives a
> notice that Player killed Bob for 200 exp.  The experience daemon
> notes that Player has killed Bob 0 times before.  So the
> experience daemon gives 200 exp to Player.

> Bob resets, Player kills him again.  200 exp is sent to the
> experience daemon again.  Now, the exp daemon notes that Player
> has killed Bob 1 time before.  So the exp daemon gives the player
> some exp amount less than 200.

> And so forth.  I've tried creating some algorithms myself, but
> they frankly stink.  My talents do not lie in math.  So if anyone
> could offer help, it would be appreciated.  I also want to set a
> "minimum" level of experience too.  So the player never gets to 0,
> they always get at least a little.

What do you want the curve to look like?  Is there a certain number of
kills of a particular monster that should lower the XP payout to the
minimum?  Do you want a linear fall, like:


  \
   \
    \
     \______
  
or do you want a curved one:
 
  *
   *
     *
         *
                 *
                                 *
                                                                 *

(there'd be curved lines joining those... ASCII isn't the ideal
medium for making smooth graphs)

<EdNote: I'm fine with people attaching small images (GIF/JPG/PNG)>

Here's some samples of what you could do, with "nok" being "number
of kills".

  linear fall to minimum, after X kills:

    payout = minimum + ((base - minimum) * (X - nok/X))

  falling towards minimum, quickly at first, but never quite reaching it:

    payout = minimum + ((base - minimum) / (nok+1))

Depending on what you want, there are lots of other possibilities.
   
> In addition, from a player's viewpoint, they only get to see
> limited information.  Maybe how many grand total kills they've
> had.  Maybe which monsters they've killed.  But never how many
> times they've killed a particular one.  Can't have them dissecting
> it too much :)

Another sort of possibility would be to do what some of the older
RPGs that had killing-based XP did -- scale it by level.  If you're
higher level than the monster you kill, the XP you get is multiplied
by:

  monster_level / your_level

This helps encourage high-level characters not to bother with
low-level monsters -- the payout starts becoming very small quickly.

--
Travis Casey
efindel at earthlink.net

_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the MUD-Dev mailing list