Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Guide] Adding NPC

Initiate Mage
Joined
Sep 24, 2009
Messages
75
Reaction score
19
This is very simple to do :)
If you are clever, Sorry If it made no sense :(
If you have any problems please leave a comment and I will
get back to you soon.

1] The first thing you would need to do is download the tile map editor:

2] Once you downloaded the Tiled Map Editor you would need to open it up and open up a map from your client "res/maps"
(In this tutorial I am going to be adding a fat guy in Kanto.)

3] After you selected your map file you would see your selected map on the screen.
(I selected map "3.1.tmx")

4] Go to your server files and locate "res/npc" and then open up the map you selected on tile map editor.
(I selected map "3.1.tmx" So that means I have to open up "3.1.txt")

5] Once you opened up the .txt file you will see codes that look a little something like this:

Preview:
Code:
[npc]
NULL
down
0
4
7
NULL
0
-1
0
false
false
false
[/npc]
[npc]
NULL
down
0
13
7
NULL
0
-1
1
false
false
false
[/npc]
[npc]
NULL
down
0
9
11
NULL
0
-1
2
false
false
false
[/npc]
[npc]
NULL
down
0
5
14
NULL
0
-1
3,4
false
false
false
[/npc]
[npc]
NULL
down
0
16
16
NULL
0
-1
5
false
false
false
[/npc]
[warp]
6
7
4
8
-48
-13
0
[/warp]
[warp]
15
7
4
8
-48
-15
0
[/warp]
[warp]
16
13
7
12
-48
-14
0
[/warp]

6] Use the code below and add it into the bottom of the .txt file.

(YOU MUST OVERWRITE THE WRITING IN RED WHEN EDITING IT)

Code:
[npc]
[COLOR="red"]Name Of NPC goes here[/COLOR]
down 
[COLOR="red"]NPC Sprite number goes here
Coordinate 1 goes here
Coordinate 2 goes here[/COLOR]
NULL
0
-1
[COLOR="red"]Number of the Line for strings go here[/COLOR]
false
false
false
[/npc]

7] Now go back to your tiled map editor and hover your mouse over to where you want your NPC to be.
After you chosen where you wanted it to be, There should be coordinates in the bottom left corner, You would have to keep note of that.

8] Go back to your .txt file that you opened from your server files and insert the first number of the coordinate to where it tells you to put it.
and then put in your second number of the coordinate to where it tells you to put it.
(Must read number 6 if you havn't already.)

9] Now you have to change the Name of the NPC so you can edit that by inserting the name of your choice where it tells you in the .txt file.

10] Now you want to edit what your NPC is going to say, So in your client folder locate "res/language/english/NPC" and then again open up the map you opened up on Tiled Map Editor.
(So I have to open up 3.1.txt because thats what I'm working on)

11] Add a line at the bottom of the text file to what ever you want your NPC to say.

12] Go back to the .txt file from your server files and where it says "Number of the Line for strings go here" replace that with the line number of your speech from the .txt file in the client files.
(So my string is on line 8 so I have to insert that number where "Number of the Line for strings go here" is.)

IF YOUR SPEECH USES UP TO LINES YOU HAVE TO PUT BOTH NUMBERS OF THE LINE IN SEPARATED BY A COMMA. Ex. "8,9"

----
NOW SAVE EVERYTHING YOU EDITED AND CLOSE EVERYTHING SO YOUR BACK TO YOUR DESKTOP.
----

[FINAL STEP] To change what your NPC will look like locate "res/characters" and then choose what character you want and then put the number where it says "NPC Sprite number goes here"



START UP YOUR SERVER AND THEN YOU SHOULD HAVE YOUR NEW NPC!!!

---------- Post added at 11:45 PM ---------- Previous post was at 11:38 PM ----------

Images of the NEW NPC I added to my client.

 
Joined
Aug 16, 2006
Messages
1,251
Reaction score
199
Code:
[npc]
Name Of NPC goes here
Direction the NPC is facing
NPC Sprite number goes here
X Coordinate
Y Coordinate
NULL or Pokemon Name, Pokemon Level if trainer.
Party size, 0 if no party (1-6)
Badge # (0-7) -1 is a normal trainer, (0 is brock for example)
The number that refers to the text that is displayed
false (heal)
false (box)
false (shop)
[/npc]
 
Back
Top