Advertisement

Calculating experience

Started by April 22, 2003 01:02 PM
12 comments, last by Vanz 21 years, 8 months ago
quote: Original post by rhuala
killratio=EnemiesKilled/FriendliesKilled;
ExperienceGained=Killratio*EnemiesKilled/100;

Division by zero if no casualties on hero side.

Anyway, is this a turn-based fight, or real time? If it''s turn-based, it may work OK, but if it''s real time, I doubt it would (at one instant, a division by zero may occur).

Current project: A puzzle game.
% completed: ~0%
Status: Active.
Why should you always give them zero experience when they retreat? If you think about it, many commander throughout history have only lived to be great because they knew when to retreat. As a matter of fact, knowing when to retreat could be considered knowledge gained from experience. How about a victory bonus?

Victory Bonus = some value determined at the start of the battle factored from the relative experience differences between the opponents such as differences in army size, unit strenth totals, experience levels of heroes and commanders -- this could actually turn out negative so you should have a floor of zero for it.

And, then change the formula you put up earlier:

killratio = EnemiesKilled/FriendliesKilled;
ExperienceGained = Killratio*EnemiesKilled/100 + Victory Bonus;
---------------------------------------------------There are 10 kinds of people in the world:Those that understand binary, and those that dont...Mage
Advertisement
I would consider something like

skill = enemy_skill/your_skill
weapon = enemy_weapon_power/your_weapon_power
pain = enemy_health/your_health_lost
efficiency = ammo_carried/ammo_used
courage = enemies/freinds (in this skirmish)
dominance = damage_you_dealt/damage_your_freinds_dealt

multiply these together


********


A Problem Worthy of Attack
Proves It''s Worth by Fighting Back
spraff.net: don't laugh, I'm still just starting...
In my opinion, you should always get experience from a battle, no matter the size of the battle and whether you win or loose(or if it''s a draw). That said, of course a won battle should give more experience (in most cases).

The experience gained should depend on (you could have a billion of factors but these are the main ones I think):

Enemy strength before the battle - EA(Enemy Army).
Enemy losses - EL.
Your army before the battle - FA(Friendly Army).
Your losses - FL(Friendly Losses)
Hero level - HL

The formula could look something like this (this could be tweaked a great bit to get a good experience ''curve'' as someone else said):

Exp = 100*(EA*EL)/(FA*FL*HL)

This would mean that a hit-and-run attack on a larger army could give much experience even though you didn''t "win"(ie annihilate the enemy).
It also means that if you beat another army that is smaller than yours or if you have a high-level hero you won''t get very much experience.

Oh well, just my thoughts.



"The whole problem with the world is that fools and fanatics are
always so certain of themselves, but wiser people so full of doubts."
"The whole problem with the world is that fools and fanatics arealways so certain of themselves, but wiser people so full of doubts."

This topic is closed to new replies.

Advertisement