User:Wombat/eAthena Server
Making Changes to the Existing TMW eAthena Server
So you've downloaded the eAthena server for The Mana World. You should have just about everything the official server has, plus access to features that haven't been implemented in the game yet. This is a basics tutorial for server administrators who either want to learn how to make suggestions to the official game by experimenting with their own servers or who want to make their own server a little more unique.
For describing things, I'm going to treat the eathena directory (or folder) as the home directory. I'm using windows, so I'm navigating by opening folders, but I could also navigate with cygwin, which is like a Linux command prompt. Hopefully you have placed your directory in an easy to find spot and are comfortable locating it.
You will need to pay attention to the changes being made. If you have an eathena_data directory, you can use its unaltered texts to check your changes and fix any mistakes done to the eathena texts. Pay attention to the scripts so you will know how they are used. After testing this tutorial you should be able to craft your own basic NPCs with little problem.
Step 1: Monster Points
One of the first things I did was change the monster points around. It is easy to do and probably something that can be done to offer a first time player a feeling they aren't playing the official game. Perhaps also you'd like to suggest the monster points be changed to something that might be a little smoother for a beginning player. Whatever your reason, this is probably one of the simpler things you can do without any real knowledge of scripting.
1. Get into your eathena directory.
2. Goto /npc/001-1_Tulimshar/rewards_master.txt
3. Find: setarray @Items$,
4. After this is the item "Name"s of what is offered as monster points.
5. Open /db/item_db.txt
6. At the top of the text, there are several categories: #ID,Name,Label,Type,Price,Sell,Weight,ATK,DEF,Range,Mbonus,Slot,Gender,Loc,wLV,eLV,View,{UseScript},{EquipScript}
7. Find the "Name"s of the items you'd like to add as monster points. Example: 501,CactusDrink,Cactus Drink,0,50,25,25,,,,,,2,,,0,,{ itemheal 15,0; },{}
The "Name" is "CactusDrink"
8. Copy the "Name" and paste it onto the same line as "setarray @Items$,". Put quotations around the "Name" and follow it up with a comma. Example: "CactusDrink",
9. Repeat step 8 for each item you want to be given as monster point awards. Delete those items you no longer want to be used as monster points.
10. Save the text.
To test: start your character through the client, register for monster points if you haven't already, kill a handful of monsters to acquire monster points if you haven't already and talk to "Ishi" (or whatever the "rewardsmaster"'s name is) and collect your rewards. If you've done the steps correctly, you should be receive your items randomly from the list you have created. If you want certain items to be granted more often than others, repeat its "Name" more than once on the same line as "setarray @Items$," which will increase the chances of that item turning up as a monster points reward.
Step 2: Moving NPCs and Changing Awards
This next step is also very easy to do and it is good to experiment with. For the sake of this example, I am using the NPC "Vincent" who offers the "bug legs" quest and is probably the first quest a character will go on. In the official game, he is building an action figure and needs 30 bug legs. As a reward, he grants 1000 gold pieces. But there are a few problems (for the sake of this example). Vincent is in a far off corner of the map in Tulimshar and both the number of bug legs and the reward for gathering them are more effort than it is worth. To fix this problem, we will move Vincent closer to where the characters first spawn into the game, reduce the number of legs his quest calls for and give an enhanced award that would move a character more smoothly into mid-level but without throwing off game balance.
1. Open /npc/001-1_Tulimshar/vincent.txt
2. Open your server and your client. This is so you can find a new location for Vincent without guessing for a good spot to put him.
3. Move your character to an appropriate spot and hit "F10". This will open the Debug window. In the upper right hand corner of the window you will see coordinates. When you move your arrow around on the map using the mouse you will see these coordinates change based on where the arrow is placed.
4. Position your arrow at the spot you'd like to place Vincent. For the sake of this example I am using the coordinates 49, 45
5. Goto /npc/001-1_Tulimshar/vincent.txt 001-1.gat,135,42,0 script Vincent 113,{
6. Change the script to 001-1.gat,49,45,0 script Vincent 113,{
7. Change all mention of 30 in the text. For the sake of this example, we are changing his need of 30 bug legs to 10. There are several spots in the text where this change needs to be done. Because you aren't changing what items he needs, you don't have to alter more than this.
8. Change the award. For the sake of this example, he is giving a dagger and a leather shield as a reward. To change the award, delete: set zeny, zeny + 1000; and add: getitem "LeatherShield", 1; hit enter and on the following line add: getitem "Dagger", 1;
9. Change mention of the award. Change: mes "[1000 gold]"; to mes "[A Dagger and Leather Shield]";
10. Save the changes to /npc/001-1_Tulimshar/vincent.txt and restart your server.
To test your changes start your client, you should now see Vincent in his new location. If your character hasn't completed this quest, you will be able to give him the reduced number of bug legs needed for the quest and receive the items you felt Vincent should give for the quest. If you wanted him to give items different than the ones described in this tutorial, open /db/item_db.txt to find the "Name" of the items you want to give.
Step 3: Creating a New NPC and Quest (Leia's Acorn Cake Quest)
While the previous two steps were more about making small alterations to existing NPCs, this next step is about drafting a new quest, but still using existing NPC texts. It will also involve changing an existing item and how it is offered in the game, the desert shirt. I like the desert shirt, but I typically don't get it for my characters as I progress because by the time I am ready to get it, I can put more time and effort into acquiring more powerful items. While the official server may not implement this quest, if all goes well you should see an easy way to make NPC and quest suggestions to the game by doing and testing instead of asking. To revert the changes made by going through these steps, you will have to keep track of the altered texts and goto your eathena_data directory and use the unaltered texts in this directory to revert the ones in the eathena directory.
1. Open /npc/001-1_Tulimshar_vincent.txt
2. Open a web browser and goto http://updates.themanaworld.org/tmwdata/npcs.xml and Select an NPC by comparing the image to the description. Each NPC has an "npc id" number in the .xml.
3. Open your server and client. Hit "F10" and find a location on the map where you will place the NPC.
4. Once you think you have your NPC (In this case we are using "<npc id="140"> <sprite variant="40">npc.xml</sprite> </npc> ") and location (in this case 007-1.tmx 118.108) you will change /npc/001-1_Tulimshar_vincent.txt. From: 001-1.gat,49,45,0 script Vincent 113,{ to: 007-1.gat,118,108,0 script Leia 140,{
5. Open /db/item_db.txt. We are now changing what is required for this quest and what the NPC says in a significant way. While "Vincent" talked about needing bug legs for an action figure, "Leia" will talk about collecting acorns for a cake she is going to bake. While "Vincent" awards you with 1000 gold pieces (or a leather shield and dagger, if you went through step 2 of this tutorial), "Leia" will award the desert shirt. Fix delitem so it is deleting 50 acorns instead of 30 (or 10, if you went through step 2 of this tutorial) bug legs. Fix set zeny (or getitem, if you used went through step 2 of this tutorial) to getitem "DesertShirt", 1;
6. Change all "mes "[Vincent]";" references to "mes "[Leia]";".
7. Change all "BugLeg" references to "Acorn", change from needing "10 [Bug Leg]s" to needing "50 [Acorn]s" and all other references that would require 10 bug legs to needing 50 acorns.
8. Alter the story of what Vincent was saying about needing an action figure to something that makes more sense for needing an acorn cake. Example: "mes "\"This maggot action figure is awesome! I just need to attach 10 [Bug Leg]s.\"";" Changes to: mes "\"This cake I'm making is going to be tasty! I just need 50 more [Acorn]s.\"";
9. You should have everything changed so Leia is wanting acorns for the cake and awarding the desert shirt. Goto File "Save as" and save it on the map you have chosen. For this tutorial we are saving Leia as: /npc/007-1_Woodland/leia.txt
10. Open /npc/007-1_Woodland/_import.txt. Add: npc: npc/007-1_Woodland/leia.txt at the bottom and save.
11. This alteration is about changing how the desert shirt is offered in the game. There are two shops that sell the desert shirt and we want to make the desert shirt a quest only item, so you will remove this item from sell. Open /npc/021-1_Tulimshar/north_shops.txt and delete: :"-1,DesertShirt", save and open /npc/020-2_Nivalis/shops.txt, delete "546:10000," and save.
12. You should be able to close your text editor and open your server and your client. If everything went well, you should be able to see "Leia" where you placed her. Test the quest to make sure everything works well. You also should also not be able to buy the desert shirt anymore, making it an item you can only acquire through the "Leia's Acorn Cake" quest.