Author Topic: More XP for Killing Higher Level Enemies  (Read 396 times)

mart3h

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
    • evo.S//
More XP for Killing Higher Level Enemies
« on: April 26, 2016, 04:17:31 AM »
A player on my server asked if this was the case, I told him unfortunately it's not. It got me to wondering whether it is possible or not. I assume it's not built in to war3source by default, but how hard would it be to implement? It would make starting off as a new player much more fun and less intimidating, I think.

Revan

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: More XP for Killing Higher Level Enemies
« Reply #1 on: April 26, 2016, 10:23:14 AM »
War3Source has this feature but it has to be activated
https://github.com/War3Source/War3Source/blob/0d1b91ff594af238f1dc83f49c29f503806463c7/addons/sourcemod/scripting/War3Source_Engine_XPGold.sp#L61

CVars (they default to 0):
    war3_xp_level_difference_bonus - Bonus Xp awarded per level if victim has a higher level
    war3_xp_level_difference_max_bonus - Where to cap the bonus XP at. 0 to disable

    war3_xp_total_level_difference_bonus - Bonus XP awarded per level if attacker has a higher total level
    war3_xp_total_level_difference_max_bonus - Where to cap the bonus total level XP at. 0.0 to disable
#war3source on gamesurge

mart3h

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
    • evo.S//
Re: More XP for Killing Higher Level Enemies
« Reply #2 on: April 26, 2016, 09:33:20 PM »
Oh you bloody beauty! Thanks Revan! :D

Do you know if this is percentage of kill xp or not? If not, no worries I'll do some testing!
« Last Edit: April 26, 2016, 09:36:28 PM by mart3h »

Revan

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: More XP for Killing Higher Level Enemies
« Reply #3 on: April 27, 2016, 01:32:38 AM »
The kill xp calculation works like this:
XP = killXp + bonusXP + bonusXPTotalLevel

bonusXP and bonusXPTotalLevel are calculated via the values that you set in the cvars MULTIPLIED by the level difference.

Let's say you are level 1 and enemy is level 6 (and war3_xp_level_difference_bonus is set to 20).
Level difference is 6-1=5 -> that means you would get 20*5=100 XP.

#war3source on gamesurge

mart3h

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
    • evo.S//
Re: More XP for Killing Higher Level Enemies
« Reply #4 on: April 27, 2016, 05:41:02 AM »
Oh okay awesome, thanks :)