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
➜ Coding Tutorial: How do I add skills to SMAUG?
Coding Tutorial: How do I add skills to SMAUG?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Aqueus
USA (47 posts) Bio
|
Date
| Fri 16 Feb 2007 05:27 AM (UTC) |
Message
| Ok, I just a quick run-by on what all to add.
I'm pretty sure you need to add the gsn_constant for that specific skill to the mud.h (perhaps twice...) add the two different ifchecks to tables.c...
Can anyone just go over the places I need to update to add a skill to SMAUG? I'm drawing a blank. The MUD compiles cleanly, but I get these after-compile errors:
tables.o(.text+0x7f40):/home/mirage21/dbsc/src/tables.c:1542: undefined reference to `do_rename'
tables.o(.text+0x7f95):/home/mirage21/dbsc/src/tables.c:1547: undefined reference to `do_radar'
That's just two... there're like... ~100 more... I must be missing something important. | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #1 on Fri 16 Feb 2007 05:30 AM (UTC) |
Message
| Seems like you forgot the do_ lines in mud.h, and maybe tables.c.
Why not just follow how another skill is coded in? Like punch? |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Aqueus
USA (47 posts) Bio
|
Date
| Reply #2 on Fri 16 Feb 2007 05:41 AM (UTC) |
Message
| I tried that, but couldn't figure out where I'd gone wrong, I had hoped that someone would spot the error and be able to say "Oh! You simply forgot to put the skills (or do_ calls, or whatever) <here>."
Sadness!
Also, I think this would be a good idea to have on hand. Basically a checklist of what exactly to do whenever you want to implement a skill.
Lastly, it's REALLY hard to tell where all a string of text touches. I'm not really sure I know all the places "do_punch" is used. So, again... a little help, please? >.> | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #3 on Fri 16 Feb 2007 06:50 AM (UTC) |
Message
|
Don't forget to do a clean compile, which seems like something you might have forgotten. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #4 on Fri 16 Feb 2007 06:53 AM (UTC) |
Message
| Are all those skills that don't have references things you added, or stock skills? It's very strange that skills would suddenly stop working... you must have broken something. Do you have a specific log of what you changed? You can download a stock copy of your code base and do "diff" to compare files.
I'd make sure you didn't mess up your Makefile by removing object files, but I'm not sure what you'd have been doing in there doing that. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Aqueus
USA (47 posts) Bio
|
Date
| Reply #5 on Fri 16 Feb 2007 06:23 PM (UTC) |
Message
| Those are skills that I've added. I think it's because I haven't actually defined the functions, it's a long story, but again, I was really hoping for a kind of tutorial, afraid that I was missing some vital place to mention the skill, though I will try that grep, it'd be cool if you explained exactly what that string of characters searched for, I'm quite the newbie at using grep. | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #6 on Fri 16 Feb 2007 06:29 PM (UTC) |
Message
| Wait... if you haven't actually defined the skill functions, why is it surprising that the linker is unable to find them? Or is that not what you meant?
Maybe it would help if you said what exactly you have done, so we can have a better picture of what's going on. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #7 on Fri 16 Feb 2007 09:25 PM (UTC) Amended on Fri 16 Feb 2007 10:06 PM (UTC) by Zeno
|
Message
| I've always planned to write some tutorials for Smaug (how to add new command, skill, etc). Maybe I'll start doing that now.
[EDIT] Tutorial: http://www.mudbytes.net/index.php?a=articles&s=smaug_add_skill |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Aqueus
USA (47 posts) Bio
|
Date
| Reply #8 on Sat 17 Feb 2007 04:43 AM (UTC) |
Message
| Excellent! Thank you so much Zeno! I think I forgot some lines in db.c and a declare in tables.c. Ok, many thanks all!
Bai! | 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.
20,590 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top