Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ 2 things I'm needing help on.

2 things I'm needing help on.

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


Posted by Rob Harper   (108 posts)  Bio
Date Fri 17 Oct 2003 03:04 AM (UTC)
Message
Ok,

1) How would I go about making it so, I can make a brand new formula for advancing levels, let me clearify this, right now the thing the controls advancing levels is the lvl*lvl*lvl = exp needed for your next level or gain/advancement somthing of that sought from what I remember. Heres the question what would I need to do to set up another exp formula, so I can seperate, the normal level gain from lets say the mana gain, so that when they level up according to one formula they gain the new level alone, and then have another exp formula that would advance mana.

2) Like practice points how would I go about adding "training points"? Basicly the same thing as practice points but used differently.

I'v been racking my brains over these for a while hope you can help.


Thanks
Top

Posted by Rob Harper   (108 posts)  Bio
Date Reply #1 on Sun 19 Oct 2003 01:03 AM (UTC)
Message
Ok I greped "prac" and got a handle on how to install training points and such, thou I still need help with the adding an additional gain formula to the current one so mana can be seperated from the normal gain.

Hope you can help me on this one.
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #2 on Sun 19 Oct 2003 08:10 AM (UTC)
Message
I dunno how its set up in smuag, but as far as I know, you should be able to go into the update, find the call to gain_hp, or whatever its called, and add a call to gain_mana, then write gain_mana seperately, outside of gain_hp. As far as I know, though, there is a seperate call for gain_mana anyways, at least in SWR, and I can't see it being that much different, so just find it, should be in update.c, and edit the formula in there. Please excuse the nonsensical babble.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Rob Harper   (108 posts)  Bio
Date Reply #3 on Sun 19 Oct 2003 04:33 PM (UTC)
Message
Thats what I dont get I know I would have to pull mana from the "advance level" section and make somthing like advance_mana, other sections like that, but I dont know how to relate the exp formula in there allready to the advance section. I'm very lost in this, it's one of the last stages of getting the code to a point where I can offically open, well open for building...then theres minor stuff, but I think this is my main problem right now.
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #4 on Sun 19 Oct 2003 07:59 PM (UTC)

Amended on Sun 19 Oct 2003 08:00 PM (UTC) by Greven

Message
Ok, are you trying to increase the players max mana when they level? or are you trying to set up the function to replenish lost mana? If its the first case, look in update.c for the gain_exp function, and look for something similiar to this:
ch_printf( ch, "You have now obtained %s level %d!\n\r", ability_name[ability], ++ch->skill_level[ability] );
advance_level( ch , ability);
That should be at the end of the function. You need to add something like this to the end of it
if ( ability == COMBAT_ABILITY )
{
ch->max_mana += 1 + (ch->perm_con * 0.25);
send_to_char("Your maximum mana has increased!.\n\r", ch);
}

Assuming that you wanted mana to increase with combat, of course, and adjust the formula accordingly. As far as the second option goes, I beleive that the should be a function called mana_gain in update.c, just change the formula in there.


Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Rob Harper   (108 posts)  Bio
Date Reply #5 on Sun 19 Oct 2003 11:36 PM (UTC)

Amended on Sun 19 Oct 2003 11:37 PM (UTC) by Rob Harper

Message
Gah this problem has me feeling like a tard, I still cant figure this out, I'v looked all around for things in the code to give me a hint as to how the leveling relates the exp formula to the advancement it self and nothing, swr levels work a bit off from what I see in smaug..thou maby how they set theres up could help thanks for try'en, thou yeah...stuck again. As for the question it was how to make a second exp formula/table that would seperate the regular level up in smaug from the mana gain, so you could level up at 21412 exp but you dont get a mana gain till I dont know 2343222 exp just as an example.


Utterly Lost
Top

Posted by Rob Harper   (108 posts)  Bio
Date Reply #6 on Wed 22 Oct 2003 01:07 AM (UTC)
Message
No one can help with this one eh?
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #7 on Wed 22 Oct 2003 01:10 AM (UTC)
Message
You probably want to change the exp_gain function... that's the thing that looks at ch's XP compared to the XP ch needs to advance. You'd need to make a new function to determine when the ch's "mana level" advances... but I think you're going to get into a mess, because you'll ALSO need a new version of advance_level (or whatever it is) to up the "mana level" when mana is gained.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Rob Harper   (108 posts)  Bio
Date Reply #8 on Wed 22 Oct 2003 05:20 AM (UTC)
Message
Ahhhh! Thanks just what I was looking for a good start on where to begin coding this change.

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.


25,503 views.

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

Go to topic:           Search the forum


[Go to top] top

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