Experience Points from Combat
how to handle "who" gets how many Exp points from Victory
A way to handle Experience Points (rather than 50 points per battle)
There should be a constant value of experience gained for enemy Combat Value. My numeric placeholders would be 2 x combat value. This experience should then be adjusted based upon number of kills and ratio of strength. However being stronger than your opponent should not cause less experience to be gained, although being weaker than your opponent should increase your potential experience points considerably.
This experience is then split into the participating units, proportionally based upon total damage dealt to the enemy x (1.10)^n where n equals the number of enemy soldiers* killed. *for killing a company, n would equal 10, and so on.
The actual experience that each unit gets is decided by taking the previous value that the individual unit recieved, and multiplying it by ( 1 + total enemy combat value/ unit's combat value).
In this case, if the individual unit is one third the power of the opposing army (that was defeated), then its experience gained is 4 times as much as its "share" of experience. However, if it dealt no damage to the enemy, then it recieves 0 share of the experience.
//examples
You fight 10 enemy soldiers. Lets say it was a company of infantry with total battle rank of 150. We then multiply this by 2, to get 300.
Lets say you fought against them with a company of archers and a Champion. Lets say the Archers did 70% of the damage, however the Champion got all 10 kills.
The archer would have 210 base experience while the Champion would have 90x(1.1)^10 or 233 base experience.
Lets say that the archer company had a battle rank of 50, while the melee Champion had a battle rank of 200. According to our equation, the archer would get 210 x ( 1 + 150/50) or 840 experience. The Champion would get 233 x (1 + 150/200) or 408 experience.
However, if the archers only dealt 30% of the damage, and the Champion dealt 70% of the damage and killed all 10, then the Champion would get 953 experience and the Archers would get 360 experience.
If the Champion dealt 70% of total damage, however the Archers got all 10 kills (and only totaled 30% total damage) then the Champion would get 367 experience points and the Archers would get 934 experience.
If the Champion dealt 50% damage and 5 kills, and the archers dealt 50% damage and 5 kills, then the Champion would get 423 experience and the Archer Unit (combat rank 50) would get 966 experience.
As another example, if that same champion of battle rank 200 fights a spider of battle rank 30, then it would get 76 experience. (30 x 1.1 x ( 1 + 30/200)) = 76 (rounded) ... I would prefer for experience to at least store 2 decimal places during calculation, and round to the nearest whole number before applying to the unit. Then units would only store experience as integers. Also, Units should probably level up as a whole.
My Final example will be a Sovereign of battle rank 46 vs a Spider of battle rank 20. The Sovereign would get 40 x 1.1 x ( 1 + 20/46 ) experience, or 63 experience.
The only thing I don't have a clear idea about is how many points it should take to level up. Personally I think that it should take 100 points to achieve level 2, and then 50% more points for each new level.