SmaugWizard/Backup/
SmaugWizard/Backup/L/
SmaugWizard/Boards/
SmaugWizard/Building/
SmaugWizard/Corpses/
SmaugWizard/Councils/
SmaugWizard/Deity/
SmaugWizard/Gods/
SmaugWizard/MudProgs/
SmaugWizard/Player/L/
SmaugWizard/Src/
SmaugWizard/Src/res/
Adding, Removing, or Changing Races and Classes for SmaugWizard Version 2.
                          (4/2/99 by Rustry)

This document is primarily to give you the inside information on the internals of the race and class files.  Races may also be viewed, created and edited online with the Setrace and Showrace commands.  See online help for those commands.  Also there is a more complete Race editing document available on the SmaugWizard home page at http://www.eticomm.net/~russk2/.

RACES:

1. To remove a race, edit the file SmaugServer\races\race.lst.  Either remove the filename of the race to be removed, or comment it out by placing the '*' character in position 1 of the line.

2. To add a race, edit the file SmaugServer\races\race.lst.  Add the name of the race file (name.race) to be added to the file.

3. The order of the races in race.lst determines the order the races will be displayed in the mud when choosing a race.

4. To create a new race, a new race file must be created.  Then follow the instructions for adding a race.  SmaugWiz has a race editor, but it does not currently have the ability to create new races.  The easiest way to create a new race is to copy an existing race file and then edit it.  Choose a race file that is as close as possible to the configuration you want for the new race.  Then Edit the race file with the SmaugWiz race edit commands (showrace, setrace), or use a text editor to edit the race file directly (windows notepad will work fine).


The following is a description of the data stored in the race files:

 Version     1000           SmaugWiz V2

 Name        Elf~        <-- Change the name but leave the '~'
 Affected    16        * <-- BitVector, see affects list below
 Str_Plus    0           <-- Amount of strength added to player stats
 Dex_Plus    2           <-- Amount of dexterity added to player stats
 Wis_Plus    0           <-- Amount of wisdom added to player stats
 Int_Plus    1           <-- Amount of intelligence added
 Con_Plus    -1          <-- Amount of constitution added
 Cha_Plus    1           <-- Amount of charm added to player stats
 Lck_Plus    0           <-- Amount of luck added to player stats
 Hit         -2          <-- Amount of hit points added
 Mana        10          <-- Amount of mana added to player stats
 Resist      0         * <-- BitVector, see Resist list below
 Suscept     0         * <-- BitVector, see Suscept list below
 Languages   elvish~     <-- String list, see language list (1)
 Align       0           <-- Initial Racial Alignment Modifier
 Min_Align   -1000       <-- Min alignment limit
 Max_Align   1000        <-- Max limit - See Align limits (2)
 AC_Plus     0           <-- Initial Armor value modifier
 Exp_Mult    110         <-- Experience Modifier - See Experience (3)
 Attacks     0         * <-- BitVector, see Attacks list below
 Defenses    0         * <-- BitVector, see Defenses list below
 Height      63          <-- Nominal height for race members
 Weight      110         <-- Nominal weight for race members
 Hunger_Mod  0           <-- Hunger modifier - See Hunger & Thirst (4)
 Thirst_mod  0           <-- Thirst modifier - See Hunger & Thirst (4)
 SavingPoisonDeath    ** <-- Saving modifiers for new characters
 SavingWand           ** <--          "
 SavingParaPetri      ** <--          "
 SavingBreath         ** <--          "
 SavingSpellstaff     ** <--          "
 WhereName            ** <-- Wear locations - See Wear Locations (6)
 ManaRegen            ** <-- See Hp and Mana Regeneration (5)
 HpRegen              ** <-- See Hp and Mana Regeneration (5)
 RaceRecall           ** <-- Vnum of room where race members will recall 
 ShoveDrag   -3          <-- Racial modifier to ease of being shoved
 End                     <-- Required

*  Bit vectors are shown at the end.
** These items will not be saved in file if they are zero or blank.

(1) Languages: The languages that a race knows is in the form of a list of strings.  All races know common, so it is not included.  The language names must match names in the language file that SmaugWiz loads at boot time.  If a language name is not found, it is ignored.

(2) Align limits: The Max and Min alignment limits specify the normal range of alignment which members of the race are expected to maintain.  If, by their actions, they stray from those limits they will receive periodic messages indicating so, and expressing their guilt.  There may be other punishments added.

(3) Experience: The experience modifier is a percentage, which allows race members to gain experience at a different rate than other races.

(4) Hunger & Thirst: These modifiers adjust the rate at which the members of the race get hungry and thirsty.

(5) Hp and Mana Regeneration: These modifiers adjust the rate at which members of the race regenerate mana.  A value of zero has no effect.  Positive values will cause mana or hp to regenerate faster, negative values slower.  Things like position, intelligence, hunger, thirst, poison, etc. will also affect regeneration speed.

(6) Wear Locations: This is an array of string values, which are used to specify the name of the location where equipment can be worn.  They can be blank, and if so will not be saved in the file.  There is also a set of where names that applies to all characters, but those will be overridden by these racial values.  The array must contains the names of the parts of the race members bodies which can wear items in the following places and order:

    <used as light>
    <worn on finger>
    <worn on finger>
    <worn around neck>
    <worn around neck>
    <worn on body>
    <worn on head>
    <worn on legs>
    <worn on feet>
    <worn on hands>
    <worn on arms>
    <worn as shield>
    <worn about body>
    <worn about waist>
    <worn around wrist>
    <worn around wrist>
    <wielded>
    <held>
    <dual wielded>
    <worn on ears>
    <worn on eyes>
    <missile wielded>



CLASSES:

1. To remove a class, edit the file SmaugServer\classes\class.lst.  Either remove the filename of the class to be removed, or comment it out by placing the '*' character in position 1 of the line.

2. To add a class, edit the file SmaugServer\classes\class.lst.  Add the name of the class file (name.class) to be added to the file.

3. The order of the classes in class.lst determines the order the classes will be displayed in the mud when choosing a class.

4. To create a new class, a new class file must be created.  Then follow the instructions for adding a class.  SmaugWiz has a class editor, but it does not currently have the ability to create new classes.  The easiest way to create a new class is to copy an existing class file and then edit it.  Choose a class file that is as close as possible to the configuration you want for the new class.  Then Edit the copied file with the SmaugWiz class edit commands (showclass, setclass), or use a text editor to edit the class file directly (windows notepad will work fine).


The following is a description of the data stored in the class files:

Version     1000           SmaugWiz V2

Name        Mage~		<-- Change the name, leave the '~'
Attrprime   3			<-- Prime Attribute of race (see apply types)
Weapon      10312		<-- vnum of Class Weapon (Not used)
Guild       3018		<-- vnum of Class Guild (Not used)
Skilladept  95			<-- Adept level for skills (*See Below)
Thac0       18			<-- To Hit AC 0 level
Thac32      10			<-- To Hit AC 32 level
Hpmin       6			<-- Minimum HP gain when advancing
Hpmax       8			<-- Maximum HP gain when advancing
Mana        1			<-- Boolean - Class gets mana gain when adv.
Expbase     1250		<-- Experience Base (*See below)
ShoveDrag   15			<-- Percent chance of sucessful shove/drag
Skill 'acid blast' 20 95	<-- Next follows the list of skills that
Skill 'acid breath' 43 95	<--   the class can learn.  The numbers after
Skill 'antimagic shell' 17 95	<--   each skill are the level where the
Skill 'aqua breath' 28 95	<--   skill is gotten, and the adept %.
Skill 'armor' 5 95		<--   Of course the skills here have to be
Skill 'astral walk' 30 95	<--   real skills available in skill.dat.
Skill 'blazebane' 30 95		<--   The rest of the skills for this class
Skill 'blazeward' 27 95		<--   are truncated for brevity.
Title				<-- Next follows the list of all the titles
Man~				<--   for each level for this class.  For
Woman~				<--   each possible level in the game, there
Title				<--   must be 3 lines here: 1) Title,
Apprentice of Magic~		<--   2) Male title for level,
Apprentice of Magic~		<--   3) Female title for level.
Title				<--   Note that the word 'Title' does not
Spell Student~			<--   use the tilde char '~' after it.
Spell Student~			<--   The rest of the titles for this class
Title				<--   are truncated for brevity.
Supreme Entity~			<-- Last two titles.
Supreme Entity~
End				<-- Required

Notes:

The field 'Skilladept' is used to determine when a skill has been learned well enough by practicing with a teacher.  When the players skill level exceeds 20% of Skilladept, the teacher will no longer teach that skill.

The field 'Expbase' is used to calculate the experience for this class for each level.  The formula is ((level-1)^3 * Expbase).


Affects Bits:
 Affect			Bit Number	Bit Value
 ---------------	----------	---------
 AFF_BLIND		Bit  0		1
 AFF_INVISIBLE		Bit  1		2
 AFF_DETECT_EVIL	Bit  2		4
 AFF_DETECT_INVIS	Bit  3		8
 AFF_DETECT_MAGIC	Bit  4		16
 AFF_DETECT_HIDDEN	Bit  5		32
 AFF_HOLD		Bit  6		64  	Unused
 AFF_SANCTUARY		Bit  7		128
 AFF_FAERIE_FIRE	Bit  8		256
 AFF_INFRARED		Bit  9		512
 AFF_CURSE		Bit 10		1024
 AFF_FLAMING		Bit 11		2048	Unused
 AFF_POISON		Bit 12		4096
 AFF_PROTECT		Bit 13		8192
 AFF_PARALYSIS		Bit 14		16384
 AFF_SNEAK		Bit 15		32768
 AFF_HIDE		Bit 16		65536
 AFF_SLEEP		Bit 17		131072
 AFF_CHARM		Bit 18		262144
 AFF_FLYING		Bit 19		524288
 AFF_PASS_DOOR		Bit 20		1048576
 AFF_FLOATING		Bit 21		2097152
 AFF_TRUESIGHT		Bit 22		4194304
 AFF_DETECTTRAPS	Bit 23		8388608
 AFF_SCRYING		Bit 24		16777216
 AFF_FIRESHIELD		Bit 25		33554432
 AFF_SHOCKSHIELD	Bit 26		67108864
 AFF_HAUS1		Bit 27		134217728
 AFF_ICESHIELD		Bit 28		268435456
 AFF_POSSESS		Bit 29		536870912
 AFF_BERSERK		Bit 30		1073741824
 AFF_AQUA_BREATH	Bit 31		2147483648
 AFF_RECURRINGSPELL     Bit 32          4294967296
 AFF_CONTAGIOUS         Bit 33          8589934592


To give an example, if you wanted a race that was blind, but was able to detect invisible, you would add the two bit values (1 + 8), and use 9 for affects.


Resist, Immune, and Susceptible Bits:
 Affect			Bit Number	Bit Value
 ---------------	----------	---------
 RIS_FIRE		Bit 00		1
 RIS_COLD		Bit 01		2
 RIS_ELECTRICITY	Bit 02		4
 RIS_ENERGY		Bit 03		8
 RIS_BLUNT		Bit 04		16
 RIS_PIERCE		Bit 05		32
 RIS_SLASH		Bit 06		64
 RIS_ACID		Bit 07		128
 RIS_POISON		Bit 08		256
 RIS_DRAIN		Bit 09		512
 RIS_SLEEP		Bit 10		1024
 RIS_CHARM		Bit 11		2048
 RIS_HOLD		Bit 12		4096
 RIS_NONMAGIC		Bit 13		8192
 RIS_PLUS1		Bit 14		16384
 RIS_PLUS2		Bit 15		32768
 RIS_PLUS3		Bit 16		65536
 RIS_PLUS4		Bit 17		131072
 RIS_PLUS5		Bit 18		262144
 RIS_PLUS6		Bit 19		524288
 RIS_MAGIC		Bit 20		1048576
 RIS_PARALYSIS		Bit 21		2097152


Apply Types for Prime Attributes:

 APPLY_NONE	0	None
 APPLY_STR	1	Strength
 APPLY_DEX	2	Dexterity
 APPLY_INT	3	Intelligence
 APPLY_WIS	4	Wisdom
 APPLY_CON	5	Constitution
 APPLY_CHA	6	Charisma
 APPLY_LCK	7	Luck


Attacks for Races;
 Attack			Bit Number	Bit Value
 ---------------	----------	---------
 ATCK_BITE		Bit  0		1
 ATCK_CLAWS		Bit  1		2
 ATCK_TAIL		Bit  2		4
 ATCK_STING		Bit  3		8
 ATCK_PUNCH		Bit  4		16
 ATCK_KICK		Bit  5		32
 ATCK_TRIP		Bit  6		64
 ATCK_BASH		Bit  7		128
 ATCK_STUN		Bit  8		256
 ATCK_GOUGE		Bit  9		512
 ATCK_BACKSTAB		Bit 10		1024
 ATCK_FEED		Bit 11		2048
 ATCK_DRAIN		Bit 12		4096
 ATCK_FIREBREATH	Bit 13		8192
 ATCK_FROSTBREATH	Bit 14		16384
 ATCK_ACIDBREATH	Bit 15		32768
 ATCK_LIGHTNBREATH	Bit 16		65536
 ATCK_GASBREATH		Bit 17		131072
 ATCK_POISON		Bit 18		262144
 ATCK_NASTYPOISON	Bit 19		524288
 ATCK_GAZE		Bit 20		1048576
 ATCK_BLINDNESS		Bit 21		2097152
 ATCK_CAUSESERIOUS	Bit 22		4194304
 ATCK_EARTHQUAKE	Bit 23		8388608
 ATCK_CAUSECRITICAL	Bit 24		16777216
 ATCK_CURSE		Bit 25		33554432
 ATCK_FLAMESTRIKE	Bit 26		67108864
 ATCK_HARM		Bit 27		134217728
 ATCK_FIREBALL		Bit 28		268435456
 ATCK_COLORSPRAY	Bit 29		536870912
 ATCK_WEAKEN		Bit 30		1073741824
 ATCK_SPIRALBLAST	Bit 31		2147483648


 Defenses for Races:
 Defense		Bit Number	Bit Value
 ---------------	----------	---------
 DFND_PARRY		Bit  0		1
 DFND_DODGE		Bit  1		2
 DFND_HEAL		Bit  2		4
 DFND_CURELIGHT		Bit  3		8
 DFND_CURESERIOUS	Bit  4		16
 DFND_CURECRITICAL	Bit  5		32
 DFND_DISPELMAGIC	Bit  6		64
 DFND_DISPELEVIL	Bit  7		128
 DFND_SANCTUARY		Bit  8		256
 DFND_FIRESHIELD	Bit  9		512
 DFND_SHOCKSHIELD	Bit 10		1024
 DFND_SHIELD		Bit 11		2048
 DFND_BLESS		Bit 12		4096
 DFND_STONESKIN		Bit 13		8192
 DFND_TELEPORT		Bit 14		16384
 DFND_MONSUM1		Bit 15		32768
 DFND_MONSUM2		Bit 16		65536
 DFND_MONSUM3		Bit 17		131072
 DFND_MONSUM4		Bit 18		262144
 DFND_DISARM		Bit 19		524288
 DFND_ICESHIELD		Bit 20		1048576
 DFND_GRIP		Bit 21		2097152
 DFND_TRUESIGHT		Bit 22		4194304

*eof*  Rustry