ID:265348
 
I've got two ideas...
Experience per hit.
Every tenth you lower the enemies HP, you get one tenth of their max experience giving.

Don't steal my kill!
If you deal over half of the damage for the monster, it's basically your's. But if you stop attacking it after then, 10 seconds later it'll be an open kill for the next person who hits it.

Which one would work best? I'm thinking of using the Experience per hit, but not sure...
Hell Ramen wrote:
I've got two ideas...
Experience per hit.
Every tenth you lower the enemies HP, you get one tenth of their max experience giving.

Don't steal my kill!
If you deal over half of the damage for the monster, it's basically your's. But if you stop attacking it after then, 10 seconds later it'll be an open kill for the next person who hits it.

Which one would work best? I'm thinking of using the Experience per hit, but not sure...

Why not just dole out experience by number of attacks--whether they're hits or not? Whoever attacks most, gets most. So if you spend a while whacking away at a tough monster and some high-level player comes along and finishes it in one blow, they get maybe 1 or 2 points at most and you get the rest. Simple formula for that:
var/total_attacks = 0
for(var/mob/M in participants)
total_attacks += participants[M]
for(var/mob/M in participants)
if(total_exp <= 0) break
var/dole_exp = round(total_exp * participants[M] / total_attacks)
total_exp -= dole_exp
M.exp += dole_exp
M.levelup()


Lummox JR
Give each monster a variable that starts out as null. When the monster is hit for the first time (check to see if that variable is null), then set the variable to list() and set list[attacker_name] += damage_done.

When the monster is killed, loop through all the players in that list that have contributed damage and total it up. Next, scan the player list (you know, the list you should be keeping of all players currently logged in?) for the players with names matching the names on the list, and give them some experience based on the experience the monster gives and what percentage of the damage the player did to that monster.

Give them this much experience:
<code>monster_experience / 100 * (100 / total_damage * damage_done)</code>

So lets say a certain monster regenerates, and over the course of its lifetime it has taken 1211 points of damage. That monster is worth 1000 experience. Now, a certain solo-player took a bold shot at attacking the monster but run away after doing 276 points of damage. Later on, a more qualified group slays the monster proper, so the solo-player gets his portion of the experience: 228 experience points.

If you logout before the monster dies, you don't get squat.

Example:

monster
var/list/damaged
var/experience = 1000

proc/Damage(from, amount)
if(!damaged)
damaged = list()
damaged[from.name] += amount

proc/Die()
var/total_damage
for(var/attacker in damaged)
total_damage += damaged[attacker]
for(var/attacker in damaged)
if(playerlist.Find(attacker))
var/mob/M = playerlist[attacker]
M.GiveExp(experience / 100 * (100 / total_damage * damaged[attacker]))
del(src)


Something to that effect. Improve as you may.
In response to Foomer
I was thinking of doing that, but...if a low-leveled person goes to attack a monster, and dies, and they keep attacking it. Then, wouldn't that give them a lot of experience?
In response to Hell Ramen
That shouldn't be a problem unless low-level monsters give 10 exp and high-level monsters give 1,000,000 exp...

Just make sure its a big enough nuisance to get back to that high-level monster every time you die.
In response to Foomer
It would also be conceivably possible to have the player keep a list of the monsters it has damaged. Then when a monster dies, it has to make sure that its on the list of monsters that the player has damaged (using a direct link, not a name). If its not, the player gets no experience. Then just clear the list when the player dies.
In response to Foomer
I think I may use that idea.
Thanks, Foomer!
In response to Lummox JR
Lummox JR wrote:>
Why not just dole out experience by number of attacks--whether they're hits or not?

Good idea, but magnitude should be a factor. If player A hits Monster X for 1000 points, player B hits X for 2 points, and monster X dies, player A should get the majority of the experience. Actually, Lummox, I think we had almost the exact same discussion last week <_< lol
Hell Ramen wrote:
I've got two ideas...
Experience per hit.
Every tenth you lower the enemies HP, you get one tenth of their max experience giving.

Arcanum uses a system not unlike this. You get a proportional amount of experience for causing damage, and then get the final lump of experience (20%, I believe) upon killing the creature. So, for example, if I wound someone for 50% of their health, then I'll have received 50% of 80% of their experience award, or 40% of their experience total. If I reduce them to 10% health thereafter, I get another 40% of 80% of their experience award, giving me another 32% of the experience award (so I have 72% of the total experience from this creature -- the creature is probably unconscious by this point). If I deliver the deathblow, I get 20% of the experience award plus whatever experience award was left over from the creature's remaining HP.

This means that someone who inflicts a little damage on bad guys will still gain in skill for so doing, and allows character concepts where people choose to incapacitate their enemies. (It's a shame the game didn't support that non-lethal style better... all NPCs fight to the death.) But because it's assumed that the people who don't intend to kill their enemies aren't fighting for a living, they don't get quite as much experience as those people who kill the monsters they come across.


In my own game, it doesn't matter who you're fighting -- there's no such thing as experience -- but rather, it only matters how much practice you're getting while you're doing it. A one-hit-kill against each member of a horde of 30 marauding beastmen will only yield the same experience as you would receive if you were fighting against one highly skilled swordsman and managed to get in 30 swings against him. (It's a little more complicated than that, since skill gain is acquired through use over time instead of per use, but assuming it takes a bit of time to make each swing, the example holds.)
The simplest approach I've seen is in World of Warcraft. First player or group to hit the mob gets the experience.

No complicated algorithms, no disputes.

Solves an amazing number of problems.
In response to Lummox JR
Wouldn't that enable some pretty bad twinking though? So a high end character could let a lowbie whack on a monster a bit, then kill it with a hit or two and the lowbie nets a big windfall? Just a thought....
In response to Deadron
Deadron wrote:
The simplest approach I've seen is in World of Warcraft. First player or group to hit the mob gets the experience.

No complicated algorithms, no disputes.

Solves an amazing number of problems.

Yep, WoW has the best farming system around, All you have to do is grab as many mobs as you can and let everyone else kill them for you :P. I made a lot of $$ & exp in WoW this way during the beta days.
The other ideas are much better, but for the sake of presenting a new angle I'll throw in another idea.

Monster tagging. When you see a monster in the wild you can tag it. When tagged only the tagger can attack the monter. Naturally you can only tag one monster at a time and tags expire after a certian amount of time if you stop attacking it.
When the monster dies anything it drops can only be picked up by the tagger. After waiting thirty seconds (from the time the mosnter dies) the items can be picked up by anyone.

It's not a very realistic system but wacking each other with swords until one of you dies isn't either.
In response to DarkView
DarkView wrote:
After waiting thirty seconds (from the time the mosnter dies) the items can be picked up by anyone.

I'd say a better idea to add onto that would be to delete it. Just so a non-suspecting newbie can't come along & pick up some valuable piece of high-level equipment. =P
In response to Jmurph
Jmurph wrote:
Wouldn't that enable some pretty bad twinking though? So a high end character could let a lowbie whack on a monster a bit, then kill it with a hit or two and the lowbie nets a big windfall? Just a thought....

That's why it has to include the magnitude of the blow(s) in the algorithim :P
In response to Jmurph
Jmurph wrote:
Wouldn't that enable some pretty bad twinking though? So a high end character could let a lowbie whack on a monster a bit, then kill it with a hit or two and the lowbie nets a big windfall? Just a thought....

No, if another does most of the damage, your experience from it is significantly reduced.

In response to Xzar
Xzar wrote:
Deadron wrote:
The simplest approach I've seen is in World of Warcraft. First player or group to hit the mob gets the experience.

No complicated algorithms, no disputes.

Solves an amazing number of problems.

Yep, WoW has the best farming system around, All you have to do is grab as many mobs as you can and let everyone else kill them for you :P. I made a lot of $$ & exp in WoW this way during the beta days.

Not really...in almost all cases this results in trains that kill you.

Anyway you can immediately tell if a mob exp is going to someone else, in which case you stop fighting it.