[MUD-Dev] [TECH] algorithm request

Malcolm Tester II malcolm.tester at planetcad.com
Wed Dec 19 16:58:28 CET 2001


Hi,

I could use a little help with some math, if someone would be so
inclined.  I need a good way to shell out experience for combat, and
I'm having a little difficulty coming up with a good way.

First, this is using LDMud, so it's LPC.

Second, just for information's sake, combat experience isn't the
only type of experience a player can gain.  There's also quest,
trade, exploring, and maybe a couple of other things I haven't
decided yet.  I really don't want a hack'n'slash mud.

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.


A few issues you might be thinking of...eventually, if the player is
a real killer, they may not be able to get enough experience at all.
I have two answers :) 1.  I don't want a hack'n'slash mud, so
hopefully no one will kill that much.  I'm not concerned about those
types of players.  Lots of other muds that can cater to them.  2.
There will be ways (in the form of spells, potions, whatever) to
reduce the number of times they've killed monsters (most likely, on
an overall basis, not individual monsters).  Then they can start
receiving more experience again.

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 :)

For other curious people out there, I intend to accomplish this with
MySQL.  I think the mappings structure within the lib would be too
overloaded for this type of functionality.

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



More information about the mud-dev-archive mailing list