• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Making heroes give no exp

Status
Not open for further replies.
Level 22
Joined
Feb 3, 2009
Messages
3,292
Hello, in my map I've made it so that creeps give the ordinary exp, but heroes just give far too much exp for being killed.

How could I reduce the amount of exp that killing heroes gives or at least remove it completely? Note that creeps exp isn't triggered, meaning it shouldn't affect the amount of exp creeps give.
 
This should help you
  • Hero - Set (Triggering unit) experience to ((Hero experience of (Triggering unit)) - 1000), Hide level-up graphics
Use this while trigger that checks if unit (hero died).
  • init
    • Events
      • Unit - Unit dies
    • Conditions
      • (Triggering unit) is Hero)) Equal to True
    • Actions
      • <stuff here>
Customize Triggering unit field, and amount of experience lost.
I think you could use formula here, since heroes with higher lvl give more exp. Egzample: amount of substract experienn equal to Hero lvl x 200.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Advanced -> Gameplay constants

Hero XP Gained - Hero, Constant factor (the starting XP on death, a level 1 hero will give this amount of XP, unless overidden by the table).
Hero XP Gained - Hero, Table (experience given on death per level).

Edit: there are other values as well, of course, but these 2 are enough for completely removing the experience that heroes give.
 
Gameplay constants.
Experience needed to get a new level

Hero XP Required, Constant factor: 0
Hero XP Required, Level factor: 100
Hero XP Required, Previous value factor: 1
Hero XP Required, Table: 200

This set of values determines when your Heroes gain new levels.

As usual, it all starts with the table.
Your Hero gains a level at 200 experience.

After that, the usual formula applies:

Experience required = "Previous value" * "Previous value factor" + "Level" * "Level factor" + "Constant factor"

So, to reach level 3:
200 (previous value) * 1 (previous value factor) + 3 (level) * 100 (level factor) + 0 (constant)
= 200 * 1 + 3 * 100 + 0
= 200 + 300 + 0
= 500

To reach level 4, your Hero needs:
500 * 1 + 4 * 100 + 0
= 500 + 400 + 0
= 900

Level 5: 900 * 1 + 5 * 100 + 0 = 1400

And so on.
Quote taken from thehelper (link here), this should also give you all informations you need for exp gain/exp required.
 
Level 22
Joined
Feb 3, 2009
Messages
3,292
Advanced -> Gameplay constants

Hero XP Gained - Hero, Constant factor (the starting XP on death, a level 1 hero will give this amount of XP, unless overidden by the table).
Hero XP Gained - Hero, Table (experience given on death per level).

Edit: there are other values as well, of course, but these 2 are enough for completely removing the experience that heroes give.

I've put both constant factor to 0 and removed everything from table, and yet it still appears to give experience (less though).

EDIT: Looks like neutral hostile heroes give +1 level always, regardless of level, works fine for player heroes.
 
Last edited:
Status
Not open for further replies.
Top