New to creating muds

Posted by Reshad on Mon 27 Dec 2004 02:10 PM — 61 posts, 212,689 views.

#0
Hello,

I am new to creating muds... I have Windows XP.
I downloaded this: http://www.gammon.com.au/files/smaug/smaug1.4a.sce.zip - 814 Kb - Source (only) for SMAUG server v 1.4a for Win32

And I don't know if that is the correct one...
If it isn't, can someone tell me which to download EXACTLY.
I also downloaded the Area Editor.

If it is the right one, I must make a .exe file of it, right? And how do I make a .exe file of it? And which of those files in that is the area file? So I can edit it with the Area Editor...

Thanks in advance
USA #1
You should read this:
http://www.gammon.com.au/smaug/howtocompile.htm

and this:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=2293
just to make sure you know what you're getting into. It's a lot of interesting work, but it truly is a lot of work and you should be aware of all the difficulties involved.
#2
Thanks for the reply, but I am a master in PHP & MySQL, so I know that it is pretty difficult and you need alot of time...

You have me this url: http://www.gammon.com.au/smaug/howtocompile.htm

I already have readed that, but the files mentioned in that, like: commands.dat - commands players can type
skills.dat - skills they can use including spells
socials.dat - socials they can use, eg. "smile"
herbs.dat - herbs they can use
tongues.dat - tongues they can speak in

Are not in this http://www.gammon.com.au/files/smaug/smaug1.4a.sce.zip...

So, maybe I have the wrong one...
USA #3
Ah. Well, you need to download the whole thing, not just the source.

Go here:
http://www.gammon.com.au/downloads/dlsmaug.htm

You'll want one that's not 'source only'. You might want to get the FUSS package, but I think you'll need a Unix-like environment for it (e.g. Cygwin.)
#4
I downloaded already from somewhere else... And it's pretty great! I Already changed the start up screen... And changed some races and classes. Now second question: When you sign up, and login for the first time you get a message:

[=] February 1998, the Ill month [=]
And then lots of text etc. etc.

Whats the file for that to change? Which file I must change?

Thanks
#5
And where can I change the startup screens of the types of graphics?
Because after I chosed that it says, put your Title screen here... But where to do that?
#6
And where to change the message of the day? And where to change the fighting? Like the it says: You demlosh the gnome or whatever... But where? And don't say in the Area Editor, but also say which file please.
USA #7
You change the fighting in fight.c. If you'd grepped for 'demolish' you'd have found it. :)
The title screens are, I believe, help files. Check the code for accepting new connections to see what it does.
The MOTD is a helpfile - surprisingly enough, called 'motd'. :)

If you're a master with PHP, it shouldn't be too hard to trace through most of the functions to find the login messages. It'd do you good, anyway, because you'll get more of a feeling for the code.

There's an awful lot of documentation on these things - you should try searching this forum and the web in general (using e.g. Google), you'll get your answers much faster.
#8
Thanks, I changed the MOTD file, thanks for that! But I still couldn't find the title files... I do not think theyre in the Help...
#9
[=] February 1998, the Ill month [=]
text, text, lots of text...


This is not the MOTD, the MOTD is a different file... You get this message at your first login...

Can someone tell me which file this is? And which file the titles are?
USA #10
Quote:
But I still couldn't find the title files... I do not think theyre in the Help..
Try help greeting...
Quote:
Can someone tell me which file this is? And which file the titles are?
Try help nmotd...

Do you know about the grep command? Are you on Windows or Unix?
#11
And why doesn't it save the location? I login, I go a few to east, I type SAVE, it saves and then when I login again, I am back on the starting position...

Help please...
#12
Oh, nevermind, it does save...
#13
Thanks alot! The NMOTD worked, but the I do not mean the first starting screen. After you choose which style you want, for example, you choose RIP style, and then you login, and then you get a message: Place your RIP Title screen here.............................

Or something like that, and that is NOT in the GREETINGS

And I do not know what GREP command is... And I am on Windows XP
USA #14
Grep is basically a find command. On Windows XP, you can use the search command and use the 'find in files' option. That should tell you where the messages are... as I said before, you're going to have to do this anyhow, so you might as well start now. :-) If you seriously plan on coding for this, you should start tracing through the code, even just the login code, which really isn't that bad especially if you're a 'master' at PHP. Trust me - it will do you loads of good. :) (and save everybody a fair amount of time.)
#15
Jeez... Whats wrong with helping someone? Thanks for helping and you don't need to say I am a master with php all the time...
This is my site:
www.filarn.com

But, please, just one question; After you choose which style you want, for example, you choose RIP style, and then you login, and then you get a message: Place your RIP Title screen here.............................

Where to edit that?

Please!
USA #16
Quote:
Whats wrong with helping someone?
Nothing's wrong with helping somebody. But it's a waste of your time and my time for me to spoon-feed you the answers, especially if you're a competent programmer as you said you were. I'm not here only to give you answers but also to help you find the answers yourself.

I don't know where the RIP title screen message is. I don't have a magic wand or anything: I would have to search for it using e.g. the Windows explorer search button or cygwin's grep command. But since it's your question, you might as well do the searching yourself. :-)

It's either hard-coded in the code somewhere, or in one of the helpfiles, or the system configuration files. You should be able to find something like that rather easily. I looked at it doesn't seem to be on the version I have; and I don't feel like downloading it when the answer can be found so simply by using a search button.
#17
Thanks for answering for the questions you could answer :-)

But, may I ask what codebase you are using and where to download? :-P
USA #18
About 45 seconds of searching turned up these 3 files:

mudtitle.rip
mudtitle.ans
mudtitle.asc

All say something like:
Draw your title screen here.........

Try editing those. They are found in the system directory.
#19
Wow, thanks alot! Your holy! Thanks!!!
Canada #20
As Ksilyan said though, you want to learn how to use the search function. It will be invaluable in future development. Before you can apply any changes, you have to know where to change, right? So learn to use these functions like the back of your hand and you'll have a huge advantage that you didn't start with.

Also, since you've made some cosmetic changes to the log in process, you might want to read through the code that controls this. It is all in comm.c, and this is a very good place to look to understand how this specific codebase works if your a veteran programmer. If you search through there, for example, you will find things like calls to 'do_help(ch, "nmotd")' and the call to the mudtitle.* files.
#21
Is it possible to make it so, that you do not have to be level 2 to save your character?
Australia Forum Administrator #22
Of course it's possible, but I must agree with my colleagues here that it is important to understand how things work, and work it out for yourself rather than posting simple questions. Here are some clues:

  • The message about "You must be at least second level to save" appears when you save, right? So it must be something to do with saving.
  • Most commands in SMAUG are handled by a function do_xxxx where xxxx is the command.
  • Thus, you want the do_save command.
  • If you go to the src (source) directory of SMAUG, and type:


    grep do_save *.c


    You will soon find which file do_save is.
  • Another approach is to use "ctags" (or gctags as it seems to be these days). To do this, type (in the src directory):


    gctacs *.c *.h


    Then you can just type:


    vi -t do_save


    This will open the vi editor pointing to the do_save function.
  • If you do that you will see something that makes it pretty obvious what the answer to your question is:

    
    void do_save( CHAR_DATA *ch, char *argument )
    {
      if ( IS_NPC(ch) )
          return;
      if ( ch->level < 2 ) {
          send_to_char_color( 
        "&BYou must be at least second level to save.\n\r", ch );
          return;
        }
      WAIT_STATE( ch, 2 ); /* For big muds with save-happy players, like RoD */
      update_aris(ch);     /* update char affects and RIS */
      save_char_obj( ch );
      saving_char = NULL;
      send_to_char( "Saved...\n\r", ch );
      return;
    }
    



A lot of this is covered in my web page:


http://www.gammon.com.au/smaug/howtocompile.htm


Read it. Try the examples. You will save us the effort of explaining everything again, and save yourself time while you wait for someone else to answer your questions.


Amended on Tue 28 Dec 2004 08:10 PM by Nick Gammon
#23
Thanks, but how do I do a ''grep''

Sorry, I promise this is my last question!
Canada #24
Grep is a *nix comamnd that is used to search through files. If you want to make any substantial changes, you will need to change the code, and to do this you will need a way to compile your source files. One popular choice is a *nix emulator called "cygwin". Nick has a guide on how to download and install it, I would suggest you read through that. The grep function, if downloaded during installation, will work in cygwin.
USA #25
You can also use explorer's built-in search function. Go to the directory you want to search in (includes subfolders by default) and press the search button. Then, don't specify a file name; specify what you're searching for. Other programs such as Visual Studio also have find-in-files support that you can use.

Quote:
But, may I ask what codebase you are using and where to download? :-P
I have an old heavily modified SMAUG 1.0 codebase, in addition to stock 1.4a from smaug.org. I already gave you the download link, Nick's site.

You might really want to look into getting Cygwin, though. It really is a nice environment, especially for any kind of work with MUDs.
#26
Ah, oke thanks. Lol, I had promised that I wouldn't ask anymore... Well, I still have lots of questions;

How to choose which vnum a players goes when he/she dies?
#27
And does anyone know how to make a mob so that it stays on 1 vnum so it doesnt move?
Canada #28
For the second one, you can look into your help files, they should have an explanation of what needs to be done. The other is defined in mud.h, something that I would recommend you look through, many helpfil things to know in there.


If you've never code a mud before and don't know how to build on one, I would suggest you try to get some direct help with an experienced person. A good builder is worth their weight in gold, and most builders are willing to teach people as well.
#29
Thanks for answering...

Well, ok, which builder is willing to help me? I just have a few small questions, nothing more, nothing less.

Please?
#30
Add me to msn:

reshadbashir@hotmail.com
Australia Forum Administrator #31
I suggest you read the SMAUG FAQ:

http://www.gammon.com.au/scripts/showfaq.php?productid=6

What do you mean "add me to msn"? You can do that yourself by editing your forum profile, if that is what you mean.
#32
Ah, nice FAQ! I hadn't found that earlier.
#33
Eh, it's a nice FAQ, but it doesn't answer any of my 2 questions...
#34
So,
if anyone knows:

How to choose which vnum a players goes when he dies.

How to make a mob stay on 1 vnum and does not move.

And I don't really understand how to make a Schop. I created a mob, called The Tutorial Shopkeeper, and then went to shops and used him for the shopkeeper. Then I went to the room I wanted to have him and added him there. But, if I want to buy something, it does not work.

If I type LIST, it says, I do not sell anything...

Any help? Someone?
USA #35
Quote:
How to choose which vnum a players goes when he dies.
Look at the code that handles a player dying. You might want to examine the raw_kill function.
Quote:
How to make a mob stay on 1 vnum and does not move.
You might want to check the mob flag help files.

Making shops and shopkeepers should be explained in some detail in the SMAUG documentation, e.g. the helpfiles. You could also google for: smaug "making shops" - you might find some interesting information...
Quote:
What do you mean "add me to msn"?
I believe he wanted people to add him to their MSN contact lists, so that he could ask them questions over MSN...
#36
Thanks for answering...

Look at the code that handles a player dying. You might want to examine the raw_kill function.

Alright, but which file is that?



You might want to check the mob flag help files.

I am using this little help: http://www.mudworld.org/CBHQ/smaug/smaugi.htm

And there is hasn't mentioned about the mob flags...




#37
Alright, I got the mob not moving working. You just must use in the areas arround it the nomob flag.
Canada #38
Thats one way, certainly, but there are better. Look at the sentinel flag.

As for what file raw_kill is in, use the instructions above and you should have no problem using grep or windows search to find the raw_kill function.
#39
Oke, thanks
#40
Alright, it is going pretty well now...

Some muds theyre adres is for example: www.theyremud.com (just made up something)

And some of them when you want to connect, they're telnet is:
telnet:theyremud.com:4000

Do they have theyre server on theyre webhosting server?

I mean, I have a server, in Amsterdam, it is for webhosting, and I don't think I am allowed to host the mud server at home... So, some people theyre adres of theyre site and the place to connect to is the same, do they have theyre mud server on theyre webhosting server? If yes, how to do that?
Canada #41
Usually this is a different kind of account, however, some hosts have both web and shell services available. Check your servers web site, and see if they have account with shell access. If not, then there are a plethera of hosts available. I suggest a google search for "mud host". I would suggest a few, but don't want to start a war on here :)
#42
Are there also free ones? Or do they all cost money? And if my server does have shell, I must upload all the files and documents to the server? And then run startup.bat?
#43
Alright, my webhost has got shell and SSH... dont know what it is though, but can you tell me what I must do to get it online?
USA #44
It's somewhat like running a php server. You'll need to upload your MUD files using ftp (or sftp), and then login via the shell (using e.g. ssh - 'secure shell' for secure telnet) and start the server.

However, what you have at home is Windows, and your host is most likely Unix. You'll have to know Unix.

There is a great deal of documentation on how to start the server once you have it all uploaded, both on this forum and online in general.
#45
Eh, I am not totally sure how to do it, but I am sure my brothers knows...

Eh, I guess doing this is right:

1) Upload Files

2) Open port 4000 on the server

3) Run the startup.bat trough shell, or telnet? Which one? Or a different one?
Australia Forum Administrator #46
Try this FAQ:

http://www.gammon.com.au/scripts/showfaq.php?productid=7

It talks about setting up your own server (and finding a host).

Also try reading this:

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=2293
#47
Thanks for answering, Nick, I already readed this: http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=2293

And in that FAQ you gave, it just says where to find a host, but that isn't really my question...
I already have a server, in Amsterdam, it has SSH and shell. I can upload the files my self, that isn't hard, and my brother knows how to open a port. (We must do that right?). And what then? Is it then done? We must run it trough telnet? Or something else?
#48
I mean, we must run the startup.bat trough telnet? Or shell? Or what?
#49
And if I have created new areas, I must upload the new areas and upload the startup.bat again? Or I must first stop it? And then run it again?
#50
And I must CHMOD all the files of the mud to 777?
#51
And I also don't know how to use grep...

I open Cygwin, and type: grep do_save, because I want to it to be so that you can save when your level 1... But it doesn't search, it just stays like that...
#52
Never mind, it worked, but not with cygwin, i used windows search... But, now I must compile... *READS FAQ*
#53
Huh?
I type this:
ccmake c:/software/winsmaug1.4a/src

and then it says: that is not a directory, but it is!

Well, lots of questions, I know but can someone answer all of them? And before you ask: Yes,-I am dumb.
Australia Forum Administrator #54
Quote:

I open Cygwin, and type: grep do_save, because I want to it to be so that you can save when your level 1... But it doesn't search, it just stays like that...


You haven't really read this page have you? ....

http://www.gammon.com.au/smaug/howtocompile.htm

It describes how to use grep. You need to tell it which files to search, it can't just guess.

I don't want to sound unkind, but you are asking really, really fundamental questions here, like:

  • How do I search through some files to find something?
  • How do I compile a program?
  • How do I start the server?


You really will help yourself if you stop posting questions every 5 minutes and make an effort to work some of these out yourself. Find a web site or book about learning to program in C, and do a "hello world" program. Learn how to use the editor, compiler, linker, and so on.

The SMAUG server is about 124,000 lines of code in 49 files, plus support files like the area files, system files and so on.

It isn't a trivial exercise to run a MUD, particularly to change it, if your first questions are "how do I get the compiler to work".

You are best off working out the basics on a small, 10-line test program. Get familiar with using C, compiling it, making changes and so on.

We would help you limp along to get the server up, but then one of your changes would make it crash, and you wouldn't know how to fix it. Start smaller and work your way up. You will appreciate it much more if you do that.
USA #55
I can only echo what Nick said. Clearly there is a little issue here, because ... "ccmake c:/software/winsmaug1.4a/src" ... is probably referring to a directory on your local machine, not your remote server!

Make sure you understand what a compiler is, what Unix is, how to navigate Unix, what a remote server is, how to move files back and forth easily; do everything Nick suggested with a 'hello world' program.

If you try to do even the slightest bit of work with SMAUG before understanding all of that, you will run into nothing but frustration and it will not be enjoyable for anybody, least of all yourself. Take our advice: learn to walk before trying to run. :-)
#56
Ah, its just to darn difficult. I started a website hosting. So, if you people ever need hosting; http://www.tiscana.com

Very cheap and great service. Check yourself
#57
So, I gave up.
USA #58
Don't give up. If you want to succeed, you need to learn. The best thing would be to go out and buy a nice thick book on programming in C. Read through it, and compile the examples. If you need information on compilers just go and search google. There are quite a few free ones (like mingw (and its GUI Dev-C++, which I use on my windows machine) and lcc-win32, gcc, etc...) and even more commercial ones (more notably, MS Visual and Borland).

Go through, run the examples. Then try adding snippets to SMAUG. See how much is relevant. You'll be suprised :) Then you can add more functionality to commands, and then make your own commands, and then you can more or less code your mud and just post your problems here.

It all starts with the book, the time, and one person who wants to learn.

I'm sure if you jump back into this forum, probably quite a ways in, you will find some of my first posts. Posts when I was new to coding as well. You can probably ask Nick and Ksilyan, because they probably remember when I asked all my newbie questions. Everyone has to step through that door and walk that path. Alot of us here that post frequently have old posts when we just started. You can probably see the difference between us back then and now. It just takes some time and effort :)
USA #59
In fact, thinking back, I remembered writing this:

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=3733

Take a look (note the subject).
USA #60
Indeed. If you give up, you won't get anywhere at all. I think the problem is that you started with a mountain, and not a plain or even a hill; coding a MUD really is non-trivial. You can still make it, though; Whiteknight's suggestions are good. Get a book, read it, learn. Practice by installing other people's snippets. Don't just install them blindly; try to see why they work. The most important thing to see is what they change. As you do this, you will learn how things fit together. If you try to tackle it all yourself, you will fail. Don't start big; start small and let things build up. That's the path to having a truly rewarding experience. :)