| 04-16-2006, 03:35 AM | #1 |
Hero Experience Gain Explained Since I couldn’t find anything to tell me these things after searching the forum a dozen times, I did my own testing, and shall now magnanimously share the wisdom. ^_^ This will explain the four fields: Hero XP Gained – Normal, Constant Factor Hero XP Gained – Normal, Level Factor Hero XP Gained – Normal, Previous Value Factor Hero XP Gained – Normal, Table ...which are found near the top of the list of Gameplay Constants, in the Advanced options menu (the ‘Normal’ prefix simply denotes that these are the values that apply to non-hero units, as opposed to ‘Hero’ fields, which are found above these four. I would assume they function the same in the end, however). For testing purposes, this was done in a non-melee environment, with global exp distribution disabled. I’m not sure if those are responsible, but I noticed that before I messed with things a hero was getting 50 exp per level 1 kill and 80 per level 2, and that is certainly now not the case :) Now then, to the meat and potatoes. A – Constant Factor The Constant Factor is a good friend of mine, as it’s what allowed me to customize the hero experience in the map I’m working on as I liked. Basically, the Constant Factor takes whatever value is entered (by default, and for example, we’ll say 5.00) and adds it to the total gained experience for that unit. So. For a level 2 creep, it would add 5, and for a level 7 creep, it would add 5. It’s indiscriminate—when on its own. More on this below. B – Level Factor The oddball of the group, and the last one I figured out. It seems straightforward, but it throws you a curveball until you get the hang of things. The basic function of Level Factor is to take the value entered (by default, again, 5.00) and multiplies that by the creep’s level. So, for a Level 2 creep, it would add 10, but; while you’d expect a Level 3 creep to add 15, if you’re using the standard constants, it won’t be 15; it’ll be 25. This is explained just below, with… C – Previous Value Factor This value makes lots of things possible, but also makes lots of things work in ways you can’t figure out, until you grasp how the whole thing works. How is that? Like this: Previous Value Factor takes all the figures from the previous level and adds them to the current one. This is why a Level 3 creep will gain 25 exp, not 15; it actually is gaining 15, but Previous Value Factor is adding Level 2’s 10 to it to make it 25. Previous Value Factor also applies to Constant Factor, but it does so linearly. So if you set a Constant Factor of 5, then it will add 5 to Level 2, 10 to Level 3, 15 to Level 4, and so on. D – Table Table is simple, but integral, for a single slightly inconvenient reason; Level 1 creeps, without a Table value, give no experience when killed. Why? You’d think that Level Factor and Constant Factor would assure at least their base sum, wouldn’t you? Yeah, so would I, but I can only assume Blizzard was lazy and the system is flawed. ;p Anyway. Table is a flat rate, and it gets added to every creep, indiscriminately of level. If it’s, for example, 25 (which it is by default), then a Level 1 creep will give 25 exp, and creeps above that will give their A+B*C values +25. Regardless of creep levels or other values, Table never changes. You can think of it like the minimum base exp awarded. Table also works like the other tables, in that if you like, you can set the other values to 0 and specify custom experience values by level here, for simplicity (as well, testing has shown Previous Value Factor only affects Table values explicitly applied to that level; it can act as a multiplier, and will carry from that, but it doesn’t add the previous level’s assigned value. Odd, I know…). If experience is applied beyond the last level specified in the Table, like all others, the last value will be used. So. Now that I’ve explained what these things are, I’ll give a little example of how they work. For my personal experience system, I wanted to do something that seems (and is, once you muddle through this abomination) very simple; make creeps worth (Creep Level*25) experience. So; Level 1 creeps are worth 25, Level 2 creeps worth 50, and so on; simple linear progression. The way I did this was to set Constant Factor to 25, Level Factor to 0, and leave Previous Value Factor at 1, and Table at 25. It can also by done by setting Constant Factor to 0, Level Factor to 25, Previous Value Factor to 0, and leaving Table at 25; both these methods achieved the same ends. Say that you wanted Creeps to provide their level worth of experience? To do that, you would set Level Factor to 1, Table to 1, and the other two values at 0; alternately, Table, Previous Value Factor, and Constant Factor to 1, and Level Factor to 0. Or that you wanted an exponentially multiplied exp scale? Set your Table to, say, 1, and your Previous Value Factor to 2, thereby multiplying previous values to double; Level 1 creeps will give 1, Level 2 creeps 2, Level 3 creeps 4…and so on; whatever base value you put in the Table will be multiplied by the Previous Value Factor, and it's really that simple. In summation…the system is flawed, obviously; but it works, and once you know how, you can apply a quite varied arrangement of experience gain systems. Linear systems can be achieved with both Constant Factor and Level Factor independently, or direct Table entry can be linear or nonlinear as desired; exponential systems are also possible. That about does it. Now, hopefully this won’t disappear into the bowels of the forum :) |
