* SMAUG HOWTO by Nivek aka Kevin London (london@cs.utk.edu)
* HTML by Thargof aka Paul Peltz  (peltz@cs.utk.edu)
* HTML Revised by Tical aka Steve Cherry  (webmaster@game.org)
* This version covers 1.4a
* Doc date: 1/31/00
* The FAQ in section 11 is a large portion of Altrag's FAQ
* The section on gdb was written by Thoric.                                   
* This document resides at: http://www.cs.utk.edu/~london/smaug/

A printable text version of this page can be viewed here.

This doc is for SMAUG release 1.4a and higher. When later releases come out if there is a change to how something is done it will be noted like this:

***Version 1.4b update***

This document is an ongoing process so if you see anything you would like added, more clarification on a subject or I messed up something email me at the above address.


Index



Getting Started


So you need to get started do you? Will the first question is do you have a Windows box or a Unix box? Go to the appropriate section that applies to you.


UNIX


First thing you need to do is untar the distribution, this can be done in one of two ways depending on the tar version you are using. If you have GNU's version of tar it can be done like this:

tar -zxvf smaug.tar.gz     (Where smaug.tar.gz is the name of the distribution)

or if you don't have that version (Doesn't like the -z flag) you can do it in two steps like this:

gunzip smaug.tar.gz
tar -xvf smaug.tar     (Notice it removes the .gz ending

So now you should have several directories under a main dist directory. Next you need to go to the source directory to get there from the directory you untarred the distributions type:

cd dist/src

Here you need to make the directory. This is done through the make command. Simply type:

make all

If you have errors it could be a couple of reasons. First you may not have crypt linked in. Edit the makefile with your favorite editor, if you don't know how to use one, read the man pages on pico, joe, vi, emacs and I am sure there are more out there. To use man type:

man <subject>     --- Example: man vi

Then uncomment the line specified in the Makefile. Anyline with a # at the beginning is a comment remove the # to uncomment a line. Another error you might get is about sockets, if you are on a solaris box, then there are also lines you need to uncomment in the makefile for it to work. If you still have problems porting to a new architecture contact the smaug mailing list: smaug@game.org or myself london@cs.utk.edu for some help.
Now all you need to do is startup the mud, startup on the ports you need to by specifing it on the command line, or it defaults to port 4000 but it will also bind to that port +1, +10 and +20. So with the case of 4000 it will setup on port 4000, 4001, 4010, and 4020. To start it up in the src directory, type:

./startup 4000 &

If your mud stops when you logout try running it this way:

nohup ./startup 4000 &

The first time you login you should change waitforauth so you can log in. To do this type the following:

cd ../system	(Will be in dist/system)
vi sysdata.dat	(Switch vi for your favorite editor)
Change the 1 beside Waitforauth to 0

Then you can logon by telneting to the port you set it up on:

telnet localhost 4000

Make your char, save and quit out. Then you will need to edit your pfile. You will need to change your level to 65 by the following:

cd ../player

Then you will need to go to the directory with your name which is the lowercase first letter of your name. So for example Shaddai would be:

cd s

Then edit the pfile:

vi Shaddai
Change the 2 beside Level to 65 save it.
Now your ready to go. ENJOY.

Windows



How to setup a new Race


First you must setup the new race this is done online via: setrace The syntax to use is * setrace <new race name> create So for example to create a half-coder race you would type: setrace half-coder create This simply sets up the data and name to be set, it does not save the race. To do that you must use setrace save this will also write out the list of races to load at boot time. Once this is done you can start custimizing the race there are several options that you can set. But remember after you set your options you need to save them with the following command: setrace <race name> save


How to add a New Class


First you must setup the new class. This is done online via: setclass The syntax to use is * setclass <new class name> create * So for example to create a coder class you would type:

setclass coder create

This simply sets up the data and name to be set, it does not save the class. To do that you muse use * setclass save * this will also write out the list of classes to be loaded at boot time. *NOTE* If you don't want anyone to use this class yet, which you probably don't..... Use ban, to ban the class and this will prevent it from being choosen. Once this has been done you can start custimizing the class. There are several options that you can set, but remember to save your changes after you make them with the following command:

setclass <class name> save

setclass mage mtitle 2 the Apprentice.

To set these, use: * setclass <class name> <prime/second/deficient> <attribute>
The valid attributes are: <none, strength, dexterity, intelligence, wisdon, constitution, luck>
For example I could setup a mage like this:

setclass mage prime intelligence
setclass mage deficient strength

Then the mage would have a max of 25 in intelligence and a max of 16 in strength

<fire, cold, electricity, energy, blunt, pierce, slash, acid, poison, drain, sleep, charm, hold, nonmagic, magic, paralysis>

So for example to set mages resistant to charm and magic, the command would be:

setclass mage resist charm magic

To turn a resist off simply reset it for example:

setclass mage resist charm magic

Would set the mage class to not be resistant to those two again.

setclass mage affected truesight scrying

Once again to turn a affect off you just reset it by setting that affect again and it will toggle it off.

setclass mage expbase 1000

setclass mage hpmin 3
setclass mage hpmax 6

setclass vampire mana N

setclass warrior thac0 18
setclass warrior thac32 6


How to add a new Spell, Skill or Herb


The first thing you need to do to create a new skill/herb or ability is create a new one with the sset command.

sset create herb 'new herb'
sset create skill 'new skill'
sset create ability 'new ability'

If these give you a error message about MAX_HERB or MAX_SKILL needing to be upped you need to open up mud.h, up the appropriate variable a few places, make clean and then make. The difference between a skill and an ability is that an ability gets set to type SKILL_RACIAL. Which means only certain races can use that ability. Right now this is unsupported however. So to set up a new herb called sunflower and a new skill called coding, you would issue the following commands:

sset create herb 'sunflower'
sset create skill 'coding'

Once you do that you will be able to set various fields on each:

Example: sset 107 name sunflower

Example: sset 107 code spell_smaug

Example: sset 107 target offensive

Example: sset 107 minpos 10

For Example: sset 107 slot 1000

For Example: sset 107 mana 100

Example: sset 107 beats 12

Your fireball brushes Shaddai.
Example: sset 107 dammsg fireball

Example: sset 107 wearoff The torrents of cascading energy suddenly fade away.

For example: sset 107 guild 1

For example: sset 107 minlevel 25

Example: sset 107 type spell

Example: sset 107 damtype fire

For example: sset 107 classtype death

sset 107 powertype none

For example: sset 107 seffect absorb

For example: sset 107 flag noscribe

For example: sset 107 dice l/3 + 3

For example: sset 107 value 1000

For example: sset 107 difficulty 5

For example: sset 107 affect luck 4

For example: sset 107 rmaffect 1

You would use: sset 107 level 2 20

You would use: sset 107 adept 2 80

T### this checks for item of type ###
V##### this checks for item of vnum ####
Kword check for item with keyword 'word'
G#### check if player has ##### amount of gold
H#### check if player has #### amount of hitpoints

There are several operators that can be used....

! spells fails if player has this,
+ dont' consume this component,
@ decrease component's value[0], and extract it if it reaches 0
# decrease component's value[0], and extract it if it reaches 0
$ decrease component's value[2], and extract it if it reaches 0
% decrease component's value[3], and extract it if it reaches 0
^ decrease component's value[4], and extract it if it reaches 0
& decrease component's value[5], and extract it if it reaches 0

Here are a couple examples:

sset 107 components V@43 need item with vnum 43 to cast this spell, decrease it value[0] by one and use it up if it reaches 0.
sset 107 components T+01 would look for itemtype 01 to cast the spell but don't use it up.

sset 107 racelevel human 50

sset 107 raceadept human 70


How to add new Channels/Languages


To create a new language you need to find the lang_array in act_comm.c which in smaug 1.4a is around line 2970.

Here add LANG_(Your Lang Name) before LANG_UNKNOWN.

Then go to the lang_names which is just below lang_array and right before "" (and right after "gith", in SMAUG 1.4a)

Add "(your lang name)",

Example: Last line of lang_array would look like this:

LANG_CLAN, LANG_GITH, LANG_CODER, LANG_UNKNOWN };

Last line of lang_name would look like this:

"halfling", "clan", "gith", "coder", "" };

Then you need to open up mud.h
Then search for LANG_ after the last BV language add in the in yours.

For Example: #define LANG_GITH BV19 #define LANG_CODER BV20 <--------Added this line

Then in the VALID_LANGS add your language into that:

For Example:

| LANG_HALFLING | LANG_GITH )

becomes

| LANG_HALFLING | LANG_GITH | LANG_CODER )

Then make clean and recompile.
Then online you have to make that language......

sset create skill (language)
sset (lang) type tongue
sset (lang) guild -1
sset (lang) code spell_null
sset save skill table

Then you need to edit the levels at which the classes get that language by editing the class files or by sset level (classnum) (level)
Then sset adept (classnum (adept%)
You can also set it up as innate race ability for example:

setrace coder language (language)

Example:

sset create skill coder
sset coder type tongue
sset coder guild -1
sset coder code spell_null

Then to set it up by classes add:

sset coder level 0 1
sset coder adept 0 99

Or to make it an inate race ability:

setrace coder language order
sset save skill table

That should about do it for languages now on to channels.......


How to add new Clans/Guilds/Orders


First create a file in the clan directory with the name of the clan. For example dslay.clan and setup a very basic clan file like:

#CLAN
Name Dragonslayer~
Filename dslay.clan~
End
#END

Then add that to the name in the clan.lst For example in this case we would add the following:

dslay.clan

Then reboot the mud and you will be ready to start setting up the clan online with the setclan command. You can use the following options:

setclan dragonslayer deity Shaddai

setclan dragonslayer leader Nivek

setclan dragonslayer members 200

setclan dragonslayer board 1200

setclan dragonslayer recall 1200

setclan dragonslayer storage 1200

setclan dragonslayer guard1 1200

setclan dragonslayer guard2 1201

setclan dragonslayer memlimit 50

setclan dragonslayer leadrank Loser

setclan dragonslayer obj1 40

setclan dragonslayer filename manslayer.clan

For example:

setclan brujah motto Die in your boots, not on your knees.
This would show up something like this when using clans brujah Brujah, 'Die in your boots, not on your knees.'

setclan dragonslayer type 0

setclan dragonslayer class 2

setclan dragonslayer pkill1 0

setclan dragonslayer pdeath2 0


How to add new Boards


The first thing you need to do is:

makeboard <filename>

For example makeboard myboard.brd
This will create a new board file and setup defaults. The next thing you need to do is setup a board object, to do this create an object and setup the object just like you would do for any object and remember its vnum. Then you need to set up the defaults on the board using bset.

The arguments that can be used with bset are as follows:

Example: bset myboard.brd 1000

bset myboard.brd read 51

bset myboard.brd post 1

bset myboard.brd remove 58

bset myboard.brd maxpost 200

bset myboard.brd filename codecouncil.brd

bset myboard.brd type 0

For a mail board it would be:

bset myboard.brd type 1

bset myboard.brd read_group Newbie Council

bset myboard.brd post_group Newbie Council

bset myboard.brd extra_readers none

And then reset the ones you want as readers. For example to add Nivek and Shaddai as extra readers you would use:

bset myboard.brd extra_readers Nivek Shaddai

bset myboard.brd extra_removers Nivek Shaddai

bset myboard.brd oremove $n clears up some clutter.

bset myboard.brd otake $n takes a bounty note.

bset myboard.brd olist $n reads over the bounties.

bset myboard.brd ocopy $n makes a note of a bounty.

bset myboard.brd opost $n puts up a new bounty.

bset myboard.brd postmesg
You post a new bounty.

Then just make sure you add the board object into resets and you have a new board :)


How to add new Deities


The first thing you need to do is create the deity file. This is done using the makedeity command. So for example if you wanted a deity called Shaddai:

makedeity Shaddai

This creates the file and sets up some defaults and writes it to the list of deities to load during bootup. Then you use setdeity to setup the deity the way you would like it.

setdeity shaddai filename Shaddai.dty

setdeity shaddai name Nivek

setdeity shaddai description

This will drop you into an editor and then you can work on it just like you would a note or a room description.

setdeity shaddai alignment 0

setdeity shaddai npcfoe 4 OR setdeity shaddai npcfoe coder

setdeity shaddai susceptnum 500

setdeity shaddai race human

To clear this value set it to -1, like this:

setdeity shaddai race -1

setdeity shaddai race2 dwarf

Just like above to clear this flag set it to -1.

setdeity shaddai npcrace human


Adding Polymorphs


First you need to create the morph you do that with the morphcreate command. There are two different ways to use it, first if you just want to create a new morph, you use:

morphcreate <name>
For example: morphcreate 'Dire Wolf'

or if you want to copy a morph that already exists you would use:

morphcreate <vnum> copy

This will setup a new morph with a different vnum but with all the defaults setup for you.

Once you have a morph created, it is time to start changing it to how you would like it to be. This is done through setmorph. Remember also that when you change the morph you need to save it by:

setmorph <vnum/name> save

When you set it up there are several other commands to help you with your morphs, first there is morphstat that will take the name or vnum of the morph as an argument. And if you use:

morphstat <vnum/name> help

It will list the descriptions, shorts, etc......

Then there is immmorph and immunmorph which allows an immortal to morph/unmorph into anything themselves OR morph/unmorph any player into anything.

morphdestroy deletes a morph, this is safe to use even if a player is already morphed into that and even if they have logged off and log back in morphed as that.

The spell polymorph will allow players to morph into whatever they can according to what has been setup.

And finally mpmorph and mpunmorph for mob/room/obj progs to allow you to setup morphs that players can't morph into with a spell and/or morphs that don't have a timer so they have to find a "healer" or something to unmorph.

To use in conjuction with the mpmorph and mpunmorph there are a couple new ifchecks that progs can use:

if morph($n) == 1000

setmorph is very complicated and has several things you can set:

morphset 1000 ac -50

morphset 1000 affected sanctuary

morphset 1000 blood l/2 Also note that this adds to the persons blood level.

morphset 1000 bloodused 20

morphset 1000 cha 1

morphset 1000 class vampire

To disallow a class after you have set it, just set it again and it will untoggle the class.

morphset 1000 con -1

morphset 1000 damroll -l/2

morphset 1000 dayfrom 2

morphset 1000 deity Shaddai

morphset 1000 desc

This will drop you into a note editor and then you can edit the description just like you would with a note.

morphset 1000 defpos 6

morphset 1000 dex 2

morphset 1000 dodge 20

morphset 1000 favourused 500

morphset 1000 gloryused 100

morphset 1000 help

morphset 1000 hitroll l/2

morphset 1000 hp l/2

morphset 1000 hpused 100

morphset 1000 immune magic

morphset 1000 int -3

morphset 1000 str 3

morphset 1000 keyword bat

morphset 1000 lck -3

morphset 1000 level 25

morphset 1000 mana l/2

morphset 1000 manaused 50

morphset 1000 $n shrinks down into the form of a cute puppy.

morphset 1000 You shrink down into the form of a cute puppy.

morphset 1000 move -100

morphset 1000 moveused 100

morphset 1000 name puppy

morphset 1000 noaffected sanctuary

morphset 1000 nocast 1

morphset 1000 noimmune magic

morphset 1000 noresistant magic

morphset 1000 noskills bash

morphset 1000 nosusceptible magic

morphset 1000 obj1 1200

morphset 1000 objuse1 1201

morphset 1000 parry -50

morphset 1000 pkill pkill

morphset 1000 race pixie

Also to remove that race, simply reset it to toggle it off.

morphset 1000 resistant fire

To remove the resistant just set it again to toggle it off.

morphset 1000 sav1 -10