[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Changing Exp needed for next level
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Changing Exp needed for next level

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Malelder   (9 posts)  [Biography] bio
Date Tue 22 Jun 2004 12:51 AM (UTC)
Message
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
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #1 on Tue 22 Jun 2004 12:56 AM (UTC)
Message
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.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Malelder   (9 posts)  [Biography] bio
Date Reply #2 on Tue 22 Jun 2004 01:20 AM (UTC)
Message
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).
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #3 on Tue 22 Jun 2004 08:57 PM (UTC)
Message
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.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Robert Powell   Australia  (367 posts)  [Biography] bio
Date Reply #4 on Wed 23 Jun 2004 04:52 AM (UTC)
Message
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

Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
[Go to top] top

Posted by Malelder   (9 posts)  [Biography] bio
Date Reply #5 on Sat 10 Jul 2004 06:39 PM (UTC)
Message
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 (:
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


4,826 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]