Changing Exp needed for next level

Posted by Malelder on Tue 22 Jun 2004 12:51 AM — 6 posts, 24,769 views.

#0
I've searched around, and can't find any good answers on this one...

In stock smaug (1.4a), the formula the code uses to calculate experience needed for the next level is (lvl * lvl * lvl * exp_base) and is located in handler.c. What I'm trying to accomplish is to make the exp needed for the next lvl just be the (lvl * expbase).

I'm guessing the former formula must be adhered to, because if i change that line to just be (lvl * exp_base) then not only does experience needed not get calculated correctly, but it also seems that from that point on, the char receives no experience at all for anything they kill.

Code is still mostly stock, although i've commented out the code that gives experience for each successful hit, and plan on removing the code that gives experience for using skills and spells. I want players to only receive exp for the actual kill.

Am i looking in the wrong place? Does it need to be changed somewhere else? I've been staring at this for a couple days now, and can't see why it's not calculating correctly. I'm not the world's best coder, but I've been on a roll getting other things to work...this one is giving me a huge headache though (: Anyone?

Kurt
USA #1
Quote:

I'm guessing the former formula must be adhered to, because if i change that line to just be (lvl * exp_base) then not only does experience needed not get calculated correctly, but it also seems that from that point on, the char receives no experience at all for anything they kill.


Are you testing this with existing characters that already have experience and levels built up? If so, you will need to adjust their experience downward to where it would be under the new formula to do any proper testing since the old formula would very easily take them over the new xp cap after just a few levels. Also worth mentioning is that testing with immortals won't give experience on kills either.
#2
Yup, I've been making a brand new test char each time I've made a change, and then invoking a room full of mobs for the test char to plow through (after buffing out the test char).
USA #3
Chances are you missed a spot or two where experience is calculated. I would trace this backwards, looking at the code that determines if the player is ready to gain and seeing what it looks at, and then find out what that looks at etc. until you find the source. This shouldn't be that hard and you shouldn't have problems like the one you describe.
Australia #4
On the chronicals website is a snippet for the differenc exp system that they use, there are a lot of places that get changed to make the way they do things work, my guess is that you also need to change those other things and mine is only a guess, im a tinkerer not a coder LOL
#5
Thanks to all the replies (: There definately was a lot more places to look than i had originally thought. Got it to work how I wanted after playing with it a few days (: