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
➜ Rebuilding SMAUG FUSS 1.6
|
Rebuilding SMAUG FUSS 1.6
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Dralnu
USA (277 posts) Bio
|
| Date
| Sat 20 Aug 2005 03:29 PM (UTC) |
| Message
| | From the way I see things, there are alot of flaws in the design of Smaug (mostly combat related items). I want to rebuild it so that either the system is more stat-based, and change armor to a + number and use it to reduce damage inflicted, plus a %resist code, and redo pretty much all spell types and all that jazz. Would it be easier to just rework the existing code, or do I need to just use Smaug as a template and just start from scratch? | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #1 on Sat 20 Aug 2005 11:33 PM (UTC) |
| Message
| That depends on an awful lot of things. Chances are that if all you want to do is change the combat system, you'd be better off working with SMAUG. After all it has an entire infrastructure set up for everything else, even if it's flawed here and there.
If you're feeling adventurous and you know what you're doing, then writing your own MUD server would be better and more satisfying. It is, however, a lot harder and will take you a rather large chunk of time to complete. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Dralnu
USA (277 posts) Bio
|
| Date
| Reply #2 on Sun 21 Aug 2005 12:27 AM (UTC) |
| Message
| | I was thinking of using the header files and then pretty much rebuilding each file in turn so I have, also, a better understanding of what is going on. As is, I have a fair idea on what is happening, but alot of pointers and things are a bit confusing, plus how it itself seems to read and write to files. | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #3 on Sun 21 Aug 2005 08:16 AM (UTC) |
| Message
| If you keep the header files and rewrite the code, you're basically building on top of the same old SMAUG design. In all honesty, that's a waste of time IMHO. It's a lot of work and you're not really changing a whole lot. You'll also swap one set of bugs for another. If you're going to do all that, it should be for the sake of a design change, not a rewriting of the implementation.
What's the problem with read/writing files? Do you have more specific issues with it? save.c has a wealth of information - in fact save.c and build.c are where most of it happens. (And db.c of course, where a lot of it is read back in for area files.) |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Dralnu
USA (277 posts) Bio
|
| Date
| Reply #4 on Sun 21 Aug 2005 03:54 PM (UTC) |
| Message
| | If you can tell me a somewhat easy way (or just how), to rebuild the magic types, the resist system, armor system, general combat.... | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #5 on Sun 21 Aug 2005 04:22 PM (UTC) |
| Message
| Err, well, there is no 'easy way'. It's a chunk of work, a very big chunk of work at that. It also depends on what exactly you want to do. The short answer is that I can't tell you what you need to do because
a) I don't know what your goal is and hence I don't know what kind of design you need;
b) it's a hard problem and beyond generalities it would take an awfully long time to give the answer.
What you need to do is look at the system and list out what flaws it has that prevent you from doing what you want. You should see if you can address those flaws without rewriting the system. Rewrite as little as possible - you really don't want to go in completely revamping the whole thing just for the sake of it. So yes, if possible, rewrite in very small chunks. But always try to keep in mind what your end goal is, and how you plan on achieving it. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Dralnu
USA (277 posts) Bio
|
| Date
| Reply #6 on Sun 21 Aug 2005 10:52 PM (UTC) |
| Message
| My goals are pretty much this:
1) A more stat-based combat system (save long-term uselessness of stats, armor, ect.)
2) Use armor to lower receved damage (100 armor means 100 less damage)
3) Redo parts of the spell system (basically changing the spell types, and add in multiple spell tpyes for one spell (like Iceshield = Water + Wind)
4) %resist system that works and can support multiple spell types
5) Diseases/Conditions (like changing vamp into a disease/condition, and adding in things that are basically self-casting spells that build up over time on the victim)
6) Poisons that affect things other then just mst
7) Professions
I think that covers the basics. From what I have seen in the code, alot of this is coded into the system in a way that I'd pretty much have to rework it completly. Like stat-based combat, and reworked armor would pretty much require a recoding of the fight code since that changes so much of it as is. | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #7 on Mon 22 Aug 2005 08:51 PM (UTC) |
| Message
| Actually, the things you mention as being very big changes - stat-based combat and armor reducing damage - require relatively small changes. Armor reducing damage is a simple matter of changing how hits connect (no longer looking at armor) and how damage is dealt (reducing damage by a factor depending on armor). As for stats, it depends on what exactly you want to do, but the changes aren't that big.
For the others:
Quote: 3) Redo parts of the spell system (basically changing the spell types, and add in multiple spell tpyes for one spell (like Iceshield = Water + Wind) This might be a little tricky and would require a design change, but at a small scale. You'd have to allow damage types to be structures of types (e.g. a list), and the code that looks at damage types would have to look at all the elements of the list. Same for spell types, or however you represent it.
Quote: 4) %resist system that works and can support multiple spell types This is pretty easy, in fact, it's almost very easy. For supporting multiple damage types on a spell, you'll have to complete #3 first, obviously.
Quote: 5) Diseases/Conditions (like changing vamp into a disease/condition, and adding in things that are basically self-casting spells that build up over time on the victim)
6) Poisons that affect things other then just mst Why can't you do these two already with effects? Even if you can't, you can probably slightly modify them and you'll be alright.
Quote: 7) Professions I'm not sure what exactly you mean by 'professions' so it's hard to assess what kind of changes would be necessary.
In sum, given this list of changes, I would strongly recommend against a significant rewrite. What you want to do is similar enough that, for the most part, you can do it in the existing framework. Of course, if you want to rewrite the code, or if you have to for other reasons, you might as well go ahead. But IMHO it would be a bad idea to rewrite for this list of changes.
|
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Dralnu
USA (277 posts) Bio
|
| Date
| Reply #8 on Mon 22 Aug 2005 09:50 PM (UTC) Amended on Mon 22 Aug 2005 09:57 PM (UTC) by Dralnu
|
| Message
| Hence why I posted here.
As for professions, I think I've been over that somewhere. Basically a second class, plus some added AV levels (just small gains for doing something besides sitting on your ass). Those I know are fairly easy since they are just added fields
As for the spells, I'm thinking kinda live bitvectors? 1 = Earth 2 = Air 3= Water 4= Fire 5= Spirit, then just figre a good way to add them together and all to prevent trying Earth and Air and getting water.
There are a few other things I'd like to do as well, like add arguments that resemble shell arguments into commands, like area -l (range) gives all areas with that level allowed (I know thats in there already, just an example), or something like area -dsl (range) for devout-align, soft level (range).
As for the poison/disease bit, I don't want them to work like spells. Poisons I want to have an accumulative effect, not built up by times cast, but by duration (like lose one str every other turn), and disease I want to make permanent unless it is cured, with an added flag for the accumulated effect part (like a curse/chill touch combo in a spell/skill/whatever to reduce a person's str as well as effect their ability to recall, albeit slower and more painful. Something you could cast and just leave and let them sit there and suffer for awhile before returning.)
One more thing (these I had thought about, so I'm throwing them out now), is more creature-specific types, like canine and feline, with mud-wide progs (altered via flag), so like is a canine sees a hoofed-vegitarian (i.e. deer), they can run it down and kill it, and maybe be able to call others in the area to help it. This would be great for linking areas where a person could watch a pack of wolves bring down a deer, or see a wolf aided by its friends when some brutal Av attacks it. Nothing like 5 on 1 to even the odds :) | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #9 on Mon 22 Aug 2005 10:00 PM (UTC) |
| Message
| Sounds like for your spells you can just use a bitvector instead of a simple number, and that will represent whatever types you want it to have (to the limit of 32 types for a simple bitvector, of course).
Professions seem like a big chunk, but fortunately I don't think you'd have to rewrite a lot, just add to it.
I've also been thinking of having a more intelligent command parser, that would take a string and generate an array of arguments. do_commands would then have two arguments (perhaps three): the character, an array of arguments, and perhaps the original command string, in case the function has special parsing. I'm not a big fan of the one_argument function; I'd rather have a proper array to deal with. (In C++ it's much easier to do that kind of thing.) |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Dralnu
USA (277 posts) Bio
|
| Date
| Reply #10 on Mon 22 Aug 2005 11:06 PM (UTC) |
| Message
| I know that you could set up a series of mprogs that could do something similar, and honestly I think a decent way would to give something, such as a canine, track, and via mprog, allow the dog in question to send a message, another receive it (use like 2.dog or 3.dog to make things a bit easier), and allow them to track, then just have something along the lines of
if (target->is_fighting && target->is_wolf)
do_attack (target->is_fighting->ch/npc)
more or less. That would also allow oyu to factor in the time it owuld take for them to find the defending creature, find the attacker, and kill it, at least help.
Also, being able to use something that resembled more or less C in mprogs (like allow the use of pointers for some mob progs), to allow a builder to make a mob that, one on one, could take on another player without being totally blind as the their capabilites.
If you want, Ksilyan, we could see about getting something together and you could help me get this whole thing started up. | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #11 on Mon 22 Aug 2005 11:23 PM (UTC) |
| Message
| If you're looking at extending the SMAUG scripting language, I'd recommend using Lua (www.lua.org). Lua is an excellent language and furthermore is relatively easy to embed in an existing application.
As for getting something together, I'm afraid that I can't commit to anything other than the kind of advice I give here. I'm actually in the process of working on a whole new codebase - babble.the-haleys.org - and what with work, school and that, I don't have a lot of leftover time. :) |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | 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.
39,500 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top