For my own game I'd like to know if any of you have an idea about how some popular RPG games handle XP distribution? What I'd be particularly interested in is how the amount of XP a certain enemy gives the player after it's defeat is determined.
For my game I'm struggling to find a proper algorithm/formular to determine that specific amount, since it's a rather small game with not that many enemies types it might be okay to set a value for each enemy type by hand. At first I was experimenting with a formular which takes certain stats of an enemy and then calculates the amount of XP the enemy is 'worth' but as I already said I could not achieve a satisfying result by this.
Nonetheless it would be interesting to know how large games handle this determination. I'd assume that it's not done by hand because you have too many different enemies but I also might be wrong. If anyone could give me any insights or good reads on this I'd be very thankful.
Another thing I'd be interested in is how the XP gaining for the player with a level difference is handled. For instance: If the player is 10 levels ahead of an enemy he should gain 100% less XP from that enemy. If he is 5 levels ahead he only should get 50%. Of course that's a bit depended on my game and the entire design but would that be a common approach to deal with farming low level enemies and still gaining full XP from that? Or are there other approaches such games usually use?
Thanks for any hints, comments and opinions!