<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3AZone_Manual%2FThe_NPC_Section%2FBuilding_your_first_NPC</id>
	<title>Manual:Zone Manual/The NPC Section/Building your first NPC - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3AZone_Manual%2FThe_NPC_Section%2FBuilding_your_first_NPC"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:Zone_Manual/The_NPC_Section/Building_your_first_NPC&amp;action=history"/>
	<updated>2026-10-28T17:18:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.dikumud.com/index.php?title=Manual:Zone_Manual/The_NPC_Section/Building_your_first_NPC&amp;diff=200&amp;oldid=prev</id>
		<title>Nove at 11:31, 26 May 2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:Zone_Manual/The_NPC_Section/Building_your_first_NPC&amp;diff=200&amp;oldid=prev"/>
		<updated>2020-05-26T11:31:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 11:31, 26 May 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l212&quot; &gt;Line 212:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 212:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	sure to practice debugging your errors the more compiling you do the&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	sure to practice debugging your errors the more compiling you do the&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	better you will get.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	better you will get.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;div style='padding-top: 30px; padding-bottom: 20px; text-align: left;float:left;width:50%;'&amp;gt;[[Manual:Zone_Manual/The_NPC_Section/NPC_macros|Previous: NPC macros]]&amp;lt;/div&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;div style='padding-top: 30px; padding-bottom: 20px; text-align: right;float:right;width:50%;'&amp;gt;[[Manual:Zone_Manual/The_NPC_Section/Compiling_and_debugging_your_first_NPC|Next: Compiling and debugging your first NPC]]&amp;lt;/div&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nove</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.dikumud.com/index.php?title=Manual:Zone_Manual/The_NPC_Section/Building_your_first_NPC&amp;diff=117&amp;oldid=prev</id>
		<title>Nove: Created page with &quot;=== Building your first NPC ===  	Now that you have built your first zone with rooms its time to 	populate it with Non playing characters for your players to hunt, kill, 	and...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:Zone_Manual/The_NPC_Section/Building_your_first_NPC&amp;diff=117&amp;oldid=prev"/>
		<updated>2020-05-25T14:19:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=== Building your first NPC ===  	Now that you have built your first zone with rooms its time to 	populate it with Non playing characters for your players to hunt, kill, 	and...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== Building your first NPC ===&lt;br /&gt;
&lt;br /&gt;
	Now that you have built your first zone with rooms its time to&lt;br /&gt;
	populate it with Non playing characters for your players to hunt, kill,&lt;br /&gt;
	and or interact with.  In the last couple of sections you have looked&lt;br /&gt;
	through the fields.  In this section we are going to make a nice easy&lt;br /&gt;
	NPC and then show how to use the ''composed.h'' to make&lt;br /&gt;
	your NPC building easier.  As I have previously stated in the section on&lt;br /&gt;
	room building I like dragons so the first NPC your going to learn to&lt;br /&gt;
	build is a big bad ugly dragon.  Don't worry if you hate dragons or you&lt;br /&gt;
	just want to build a normal world you will learn plenty from my dragon&lt;br /&gt;
	example to be able to adjust it to whatever you want.&lt;br /&gt;
&lt;br /&gt;
	When making NPCs you create the zone source file first as shown&lt;br /&gt;
	in (Link to ch-02).  If you only have NPCS you do not need the&lt;br /&gt;
	%reset, %objects, and %rooms fields.  For the examples in this chapter we&lt;br /&gt;
	will use the zone we created in (Link to ch-04) and add the&lt;br /&gt;
	%mobiles section where we will put all the NPC definitions.  At the end&lt;br /&gt;
	of this chapter, in (Link to roomnpczone), we will bring it all together with the rooms we have&lt;br /&gt;
	already defined and our NPCs.&lt;br /&gt;
&lt;br /&gt;
	The first part of all NPC definitions is the symbolic name it is good&lt;br /&gt;
	to always pick a name that will match the name of the NPC so it&lt;br /&gt;
	will be easy to load the NPC.&lt;br /&gt;
	The reason the symbolic and name should match is when you use the&lt;br /&gt;
	command '''wstat''' it will only show you a&lt;br /&gt;
	list of the NPCs by symbolic name for example if you type '''&lt;br /&gt;
	wstat zone dragon mobiles ''' You will get the following:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
	List of mobiles in zone Dragon:&lt;br /&gt;
	dragon clerk trashman&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
If you didn't make it clear what the NPC was by the symbolic name&lt;br /&gt;
	it might look like this:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
	List of mobiles in zone Dragon:&lt;br /&gt;
	npc1 npc2 npc3&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
While this might be great when you first start imagine trying to&lt;br /&gt;
	remember each NPC if you have over 30 of them.&lt;br /&gt;
&lt;br /&gt;
	Now lets get started with our dragon.  As with the rooms all that is required to make a NPC is the symbolic and end fields.  That of course will make a NPC with all defaults.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
	bldragon&lt;br /&gt;
	end&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Thats it for that dragon right?  Nope not quite that makes a NPC&lt;br /&gt;
	with all defaults.  That means this will probably be a very wimpy human&lt;br /&gt;
	with a symbolic name of dragon and no description, in short it will be a&lt;br /&gt;
	blank when you load it.  Now lets start putting the Dragon&lt;br /&gt;
	together.&lt;br /&gt;
&lt;br /&gt;
	The first three things we need are the dragons title, description&lt;br /&gt;
	and names.  The description should be what you see when you do a 'look'&lt;br /&gt;
	in the room.  The title should be what you see when the NPC is talking&lt;br /&gt;
	or fighting.  Finally the names should cover everything in the title and&lt;br /&gt;
	description fields so if you wanted to kill them you can easily&lt;br /&gt;
	know what to type.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
	bldragon&lt;br /&gt;
&lt;br /&gt;
	title &amp;quot;a black dragon&amp;quot;&lt;br /&gt;
	descr &amp;quot;A big ugly black dragon is clawing the ground here.&amp;quot;&lt;br /&gt;
	names {&amp;quot;big ugly black dragon&amp;quot;,&amp;quot;ugly black dragon&amp;quot;,&amp;quot;big black dragon&amp;quot;,&lt;br /&gt;
	&amp;quot;black dragon&amp;quot;,&amp;quot;dragon&amp;quot;}&lt;br /&gt;
	...&lt;br /&gt;
	end&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The names, title and description shouldn't be to hard so I don't&lt;br /&gt;
	think its necessary to go into any more description on the subject.&lt;br /&gt;
	Lets move on.  Now we have to take care of what a player sees when he or&lt;br /&gt;
	she looks at a NPC.  to make the main description of an NPC you place an&lt;br /&gt;
	extra on the NPC with no names in the list.  The blank extra is a&lt;br /&gt;
	special extra that will be shown every time you look at anything in the&lt;br /&gt;
	names list of the NPC.  So a description of a NPC would look something&lt;br /&gt;
	like this.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
	extra {}&lt;br /&gt;
	&amp;quot;The black dragons scales glitter like black granite that has been&lt;br /&gt;
	polished for years by water.  He has a large neck and huge bat like&lt;br /&gt;
	wings.  his eyes watch you as you stand before him.  One claw seems to be&lt;br /&gt;
	tapping slightly on the ground as if the dragon is waiting for&lt;br /&gt;
	something.&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Now that you have a main description for the NPC you need to make&lt;br /&gt;
	any smaller descriptions that you want the player to be able to look at.&lt;br /&gt;
	In this case the dragon eyes and claw would be good things to describe&lt;br /&gt;
	and maybe a few other things just for humor.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
	extra {&amp;quot;eyes&amp;quot;,&amp;quot;eye&amp;quot;}&lt;br /&gt;
	&amp;quot;The dragons eyes seem to follow you no matter where you go in the room&lt;br /&gt;
	nothing seems to escape the dragons attention.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	extra {&amp;quot;claws&amp;quot;,&amp;quot;claw&amp;quot;}&lt;br /&gt;
	&amp;quot;The claw is big black and it looks very deadly.  It seems like the&lt;br /&gt;
	dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which&lt;br /&gt;
	to say means the claws are about the size of short swords and long&lt;br /&gt;
	swords.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	extra {&amp;quot;scales&amp;quot;,&amp;quot;scale&amp;quot;}&lt;br /&gt;
	&amp;quot;Its a scale!  Haven't you ever seen a dragon before!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	extra {&amp;quot;bat wings&amp;quot;,&amp;quot;wings&amp;quot;}&lt;br /&gt;
	&amp;quot;The dragon sees you looking and flaps his wings creating one heck of a&lt;br /&gt;
	wind blast.&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Now that we have the NPC all described we should start setting&lt;br /&gt;
	     things like race, gender, level, height, weight, defense, offense,&lt;br /&gt;
	     alignment, abilities, and finally skills and spells.  First we will pick a race.  Normally the&lt;br /&gt;
	     list of races are in your ''values.h''.  We have&lt;br /&gt;
	     the list in (Link to app-c) and I have searched for dragon&lt;br /&gt;
	     and found the race I want it is as follows.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
		race RACE_DRAGON_BLACK&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
If you don't think there is any difference in dragons you can&lt;br /&gt;
		 set them all to one race like you could define a race called&lt;br /&gt;
		 'RACE_DRAGON' or something like that.&lt;br /&gt;
&lt;br /&gt;
		 Now we should chose the gender of our dragon.  Make sure your&lt;br /&gt;
	descriptions match what you pick.  It would be pretty weird to have a&lt;br /&gt;
	female dragon and have the descriptions say 'he, him, or his'&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
		    sex SEX_MALE&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Now lets set the height and weight.  Remember you set the height&lt;br /&gt;
	in centimeters and the weight in pounds.  In the future the VME will&lt;br /&gt;
	standardize to one or the other but for now we have to play the&lt;br /&gt;
	conversion game.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
	//20 feet  (1 inch = 2.54 cm&lt;br /&gt;
	height 625&lt;br /&gt;
&lt;br /&gt;
	//566 KG (1 lb. = .45359 kg)&lt;br /&gt;
		 weight 1250&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Now that we have the size of the dragon we can pick a level.&lt;br /&gt;
		 My dragon is only 20 feet tall and 1250 pounds so I think maybe he&lt;br /&gt;
		 is a bit young and will make his level around 70.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
		 level 70&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The dragon may not wear armour but by default a dragon should&lt;br /&gt;
		 have an armour equal to someone wearing plate mail.  Not only that&lt;br /&gt;
		 but my dragon doesn't like to use his mouth as his natural attack&lt;br /&gt;
		 and he sure can't punch with those big claws so we need to set his&lt;br /&gt;
		 attack type to claw.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
		 NATURAL_DEF(WPN_CLAW, ARM_PLATE)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Not many black dragons are good so I will pick almost totally&lt;br /&gt;
	evil, since totally evil is -1000 I will set it as follows.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
		 alignment -900&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Finally we get to the hard part.  Many people have trouble&lt;br /&gt;
	setting the NPC abilities, weapons, and spells.  There really is nothing&lt;br /&gt;
	to it if you have read (Link to npcmacroability) and (Link to npcmacroweapspl).  The only thing you have to remember is the&lt;br /&gt;
	numbers you are putting are not the actual amount but a percentage of&lt;br /&gt;
	the skill points you want the game to use on your NPC when having your&lt;br /&gt;
	NPC practice as it loads and all amounts of abilities must add up to&lt;br /&gt;
	100% as well as all weapons and spells must add up to 100%.  For the&lt;br /&gt;
	dragon the following would be what the abilities, weapons, and spells&lt;br /&gt;
	would look like.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
	//big strong and magical most ability points on str and mag&lt;br /&gt;
	MSET_ABILITY(20,12,12,12,12,12,20,0)&lt;br /&gt;
&lt;br /&gt;
	//Set natural attack highest of weapons because he fights with claws&lt;br /&gt;
	MSET_WEAPON(10,10,10,5,30,5)&lt;br /&gt;
&lt;br /&gt;
	//black dragons have natural defense from acid set it highest&lt;br /&gt;
	MSET_SPELL(0,0,0,0,0,0,0,0,0,0,30)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
That is all you need to make a basic dragon.  True this dragon&lt;br /&gt;
	will not do anything but claw you to death if you attack it but in (Link to npccomplex) we will give the dragon some more abilities with&lt;br /&gt;
	some special DIL functions.  For now lets take a look at our finished&lt;br /&gt;
	product.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
	bldragon&lt;br /&gt;
&lt;br /&gt;
	title &amp;quot;a black dragon&amp;quot;&lt;br /&gt;
	descr &amp;quot;A big ugly black dragon is clawing the ground here.&amp;quot;&lt;br /&gt;
	names {&amp;quot;big ugly black dragon&amp;quot;,&amp;quot;ugly black dragon&amp;quot;,&amp;quot;big black dragon&amp;quot;,&lt;br /&gt;
	&amp;quot;black dragon&amp;quot;,&amp;quot;dragon&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
	extra {}&lt;br /&gt;
	&amp;quot;The black dragons scales glitter like black granite that has been&lt;br /&gt;
	polished for years by water.  He has a large neck and huge bat like&lt;br /&gt;
	wings.  his eyes watch you as you stand before him.  One claw seems to be&lt;br /&gt;
	tapping slightly on the ground as if the dragon is waiting for&lt;br /&gt;
	something.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	extra {&amp;quot;eyes&amp;quot;,&amp;quot;eye&amp;quot;}&lt;br /&gt;
	&amp;quot;The dragons eyes seem to follow you no matter where you go in the room&lt;br /&gt;
	nothing seems to escape the dragons attention.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	extra {&amp;quot;claws&amp;quot;,&amp;quot;claw&amp;quot;}&lt;br /&gt;
	&amp;quot;The claw is big black and it looks very deadly.  It seems like the&lt;br /&gt;
	dragon has two sets of 4 large claws and 2 sets of 4 smaller claws which&lt;br /&gt;
	to say means the claws are about the size of short swords and long&lt;br /&gt;
	swords.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	extra {&amp;quot;scales&amp;quot;,&amp;quot;scale&amp;quot;}&lt;br /&gt;
	&amp;quot;Its a scale!  Haven't you ever seen a dragon before!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	extra {&amp;quot;bat wings&amp;quot;,&amp;quot;wings&amp;quot;}&lt;br /&gt;
	&amp;quot;The dragon sees you looking and flaps his wings creating one heck of a&lt;br /&gt;
	wind blast.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
		race RACE_DRAGON_BLACK&lt;br /&gt;
		sex SEX_MALE&lt;br /&gt;
		height 625&lt;br /&gt;
		weight 1250&lt;br /&gt;
		level 70&lt;br /&gt;
		 NATURAL_DEF(WPN_CLAW, ARM_PLATE)&lt;br /&gt;
		alignment -900&lt;br /&gt;
	MSET_ABILITY(20,12,12,12,12,12,20,0)&lt;br /&gt;
	MSET_WEAPON(10,10,10,5,30,5)&lt;br /&gt;
	MSET_SPELL(0,0,0,0,0,0,0,0,0,0,30)&lt;br /&gt;
&lt;br /&gt;
	end&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
As you can see there is a bit more to building an NPC than a room&lt;br /&gt;
	but its really not that much harder.  Try changing some stuff and make&lt;br /&gt;
	sure to practice debugging your errors the more compiling you do the&lt;br /&gt;
	better you will get.&lt;/div&gt;</summary>
		<author><name>Nove</name></author>
		
	</entry>
</feed>