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
➜ Compiling the server
➜ changing level system from one class to eight
|
changing level system from one class to eight
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Phobos
(79 posts) Bio
|
| Date
| Tue 09 Oct 2007 07:27 PM (UTC) |
| Message
| I'm running SMAUG and i am rather new to coding. My question is how might i change the level system from only being able to level one thing to a level system more like what SWR muds run, below is how i want to set it up instead of all exp going to one level max
----------------------------------------------------------------------------
Combat Level: 1 Max: 150 Exp: 0 Next: 500
Piloting Level: 1 Max: 40 Exp: 0 Next: 500
Engineering Level: 1 Max: 2 Exp: 0 Next: 500
Bounty hunting Level: 1 Max: 1 Exp: 0 Next: 500
Smuggling Level: 1 Max: 26 Exp: 0 Next: 500
Diplomacy Level: 1 Max: 9 Exp: 0 Next: 500
Leadership Level: 1 Max: 75 Exp: 0 Next: 500
Force Level: 1 Max: ??? Exp: ??? Next: ???
Slicer Level: 1 Max: 16 Exp: 0 Next: 500
-----------------------------------------------------------
Now if someone could be kind enough to assist me in changing this over i would be greatfull. My hand kind of needs to be held with this because like i said im newer to coding. | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #1 on Tue 09 Oct 2007 08:41 PM (UTC) |
| Message
| You need to keep separate experience tallies: you would have not just one but many fields in the char_data structure. Then you would need to decide when and how those tallies get updated: during combat? talking? something else? So before you even start coding, you need to figure out precisely how your system is going to be designed.
You might want to look at snippets for multi-classing to get an idea, but those typically assume that experience is divided among the classes evenly.
By the way, this post really shouldn't be in the Area Editor section... |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #2 on Tue 09 Oct 2007 09:29 PM (UTC) |
| Message
| I have moved the post into the SMAUG section.
I you are new to coding I would start with something simpler to get your hand in. Something like the current level is pretty ingrained into the source.
For example, a quick check found that there are 1507 lines in the source with the word "level" in them - so if you made 8 different levels that is 1507 changes, at least, to indicate which level you want.
However you could conceivably leave all those alone as the "combat level" and simply add new fields to the character structure (like engineering level).
One approach that might save you grief is to look at the stuff I did for questing:
http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=119
The changes I made there (to incorporate Lua) required only minimal changes to the source.
You could do that, and like I did with quests (tasks), handle things like Engineering levels and so on in Lua. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | 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.
16,581 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top