(first update) |
(another update...) |
||
Line 113: | Line 113: | ||
Now the mob is finished, almost. But where to put it? Either in two files, as I said before: mob_db.txt or mob_db2.txt | --------------------------- | ||
'''As far as I can see everything below (expand) doesn't count for TMW, does it? [[User:Cassy|Cassy]] ([[User talk:Cassy|talk]]) 11:03, 18 December 2013 (UTC)''' | |||
{| class="mw-collapsible mw-collapsed" | |||
|- | |||
! | |||
|- | |||
|Now the mob is finished, almost. But where to put it? Either in two files, as I said before: mob_db.txt or mob_db2.txt | |||
Now you start your server, go happy doing @spawn <ID> and BAM!! Gravity Handler Error! Oh no! But wait, it's because it doesn't have a sprite X_X! What now?To solve such issue, we could use a View ID... but wait, there's no field for View ID! So, what else? | Now you start your server, go happy doing @spawn <ID> and BAM!! Gravity Handler Error! Oh no! But wait, it's because it doesn't have a sprite X_X! What now?To solve such issue, we could use a View ID... but wait, there's no field for View ID! So, what else? | ||
Line 528: | Line 537: | ||
I never messed with this, but i think its ok =3! Also for those spaces other than the messages spaces, use TAB, not the Space Bar for it ._.! | I never messed with this, but i think its ok =3! Also for those spaces other than the messages spaces, use TAB, not the Space Bar for it ._.! | ||
|} | |||
Revision as of 11:03, 18 December 2013
This article is for reference purpose
The features described in this article are already implemented in the game. The article should describe how a certain aspect of the game currently works. You may of course edit this article to improve the description of the circumstances. Your opinions or improvement suggestions about the described aspects themself are of course appreciated, too. But please put these on the discussion page of this article to keep facts and fiction separated.
This page is outdated but still can be used as a reference. It is mainly copied from the [eathena.ws "Custom Mobs" wiki page]. Feel free to join our [IRC development channel] for further information❞
Server side
mob_db
You'll find the mob_db under following path: tmwa-server-data/world/map/db/mob_db.txt
The mob_db has following structure:
ID,Name,JName,LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale, Race,Element,Mode,Speed,ADelay,aMotion,dMotion,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per, Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per, DropCardid,DropCardper,MEXP,ExpPer,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per
Note: In this wiki page it shows four lines, while it's one single line in the mob_db itself.
- ID: ID of the mob. You can have up to 10,000 mob IDs. Note: Is up to 10,000 up to date? (under construction)
- Name: This first name is the DB name. When you use @spawn/@summon and you know the name of the mob, but not the ID, type this name instead. Try making the normal name the same as this so you wont get confused.
- JName: This is the name the server shows. Actually it's always the same as Name.
- LV: Level of the mob.
- HP: HP of the mob.
- SP: SP of the mob.
- EXP: EXP granted by the mob, but this is calculated automatically. There are a few exceptions though.
- JEXP: Job EXP granted by the mob. They are calculated by a tool. Note: Adding tool info (under construction).
- Range1: Range of the mob attack. If set to 1 or 2, it will melee. 3 or more than 3 will set it to ranged.
- ATK1: Minimum attack of the mob.
- ATK2: Maximum attack of the mob. If no maximum attack defined here, the minimum attack will count as the absolute attack.
- DEF: Defence of the mob in % against melee and ranged attacks.
- MDEF: Magic Defence of the mob in %.
- STR: Strength of the mob. Note: Difference to ATK1/2? (under construction).
- AGI: Agility of the mob. This also defines the mob flee rate.
(updated until here)
- VIT: Vitality of the mob.
- INT: Intelligence of the mob. This also defines its MATK.
- DEX: Dexterity of the mob. This also defines the mob hit rate.
- LUK: Luck of the mob. This also defines the mob perfect dodge/lucky flee/perfect flee/lucky dodge rate.
- Range 2: Currently unused. It's said to be the maximum range for skills.
- Range 3: Currently unused. It's said to be the sight limit for mobs. If set to 1000 or beyond, mobs will follow you all over the map.
- Scale: 0 if its Small, 1 if its Medium, 2 if its Large
- Race: 0=formless, 1=undead, 2=animal, 3=plant, 4=insect, 5=fish, 6=demon, 7=demihuman, 8=angel, 9=dragon.
- Element: This is the tricky part. The element number has 2 parts, let's call them:
xy x=level of the element, and y=element number
X=Being for lvl 1 = 2, for lvl 2 = 4, for lvl 3 = 6, for lvl 4 = 8. Y= being for neutral = 0, water = 1, earth = 2, fire = 3, wind = 4, poison = 5, holy = 6, shadow = 7, ghost = 8, undead = 9 And now, to make the element, just grab the number of the lvl you want it to be, and the number of the element you want it to be. Let's say we want a lvl 3 fire mob. We grab the 6 for the first number and the 3 for the second, being 6 = lvl 3 and 3 = fire. It will look like = 63
- Mode: This defines the mob behaves. The numbers are these:
canMove: 1 Boss:32 plant: 64 castsensor: 16 assist: 8 aggresive: 4 looter: 2 canAttack: 128 detector: 256 changetarget: 512 These are the basic modes. You add them up to make the ones below: 64: Plant 128: Immobile being, passive (ie: pupa) 129: normal 131: looter 132: Immobile being, attacker (ie: hydra) 133: aggressive 137: supportive (wolves) 139: supportive & looter (thief bugs) 141: aggressive & supportive 145: detectors (Giearth) 149: aggresive & detectors (Hunter Fly) 171: Boss type and looter (Golden Thief Bug) 181: Boss type
Thanks to Wallex for these modes.
- Speed: Walking speed of the mob. 1 is the fastest, 1000 is the lowest. 100 is the normal walking speed.
- ADelay: ADelay= Attack Delay, also known as ASPD. This one will change the aspd of the mob. The lower the faster, but don't make it too low or it will lag when mobbed by several of these.
- aMotion: Attack animation motion. Lower this value and the mob's attack will be displayed in higher fps (making it shorter, too) (Thanks to Wallex for this)
- dMotion: Damage animation motion, same as aMotion but used to display the "I am hit" animation. Coincidentally, this same value is used to determine how long it is before the mob/player can move again. Endure is dMotion = 0, obviously.(thanks to Wallex for this one)
From now on, the following fields are for drops and drops rate. Remember that these are in percentages, it means 100 = 100%
- Drop1ID: The Item ID of the drop goes here
- Drop1per: the rate of being dropped goes here
Same counts for Drop2ID & Drop2per, Drop3ID & Drop3per, etc.
As an add, there are a field for Drop Card:
DropCardid: ID of a card or item. You can make this mob drop another mob's card, even.
DropCardper: The chance of the card being dropped goes ere.
MVP exp: This exp is a percentage of the exp the monster gives.
MEXP: The MVP exp the mob gives when it is defeated (to the player who got the MVP reward)
ExpPer: I'm not sure bout this one, but I think it takes a certain percentage of the exp you earn from the kill and adds it to the MVP exp. Someone correct me if I'm wrong, please.
Now, these correspond to MVP drop rates. I'm not sure if the mode for these drops to work are 171 or 181; I haven't tested it. I think they have to be either 171 or 181 so the server will recognize them as MVPs:
MVP1id: The Item ID of the MVP drop goes here
MVP1per: The rate of being dropped goes here
Same counts for MVP2id & MVP2per and MVP3id & MVP3per.
As far as I can see everything below (expand) doesn't count for TMW, does it? Cassy (talk) 11:03, 18 December 2013 (UTC)
Now the mob is finished, almost. But where to put it? Either in two files, as I said before: mob_db.txt or mob_db2.txt
Now you start your server, go happy doing @spawn <ID> and BAM!! Gravity Handler Error! Oh no! But wait, it's because it doesn't have a sprite X_X! What now?To solve such issue, we could use a View ID... but wait, there's no field for View ID! So, what else? If you look closely to your db folder, you will find a file called mob_avail.txt. When you create a new mobs, it needs a sprite to be displayed, thus needing an avail from another mob, so it would look like it. There are 2 ways to use the mob avail: 1st A mob looking like another mob: To do so, you have to make a line like this pattern: mob_id,sprite_id,equip # The confusion comes here if you go alone, but its not hard at all.
So YaY! our mobs looks like another =D! But, did you also know there's a second way to avail a mob? to make it look like... like a player?! O_O!! Yes! its possible. You can make your mobs looks like normal players, with their own headgears and hair/clothes dyes *-* YaY!! 2nd A mob looking like a player: Lets look at the structure: MobID,SpriteID,Sex,Hair,Hair_Color,Weapon,Shield,Head_Top,Head_Middle,Head_Bottom,Option,Dye_Color
Job_Novice 0 Job_Swordman 1 Job_Mage 2 Job_Archer 3 Job_Acolyte 4 Job_Merchant 5 Job_Thief 6 Job_Knight 7 Job_Priest 8 Job_Wizard 9 Job_Blacksmith 10 Job_Hunter 11 Job_Assassin 12 Job_Knight2 13 Job_Crusader 14 Job_Monk 15 Job_Sage 16 Job_Rogue 17 Job_Alchem 18 Job_Bard 19 Job_Dancer 20 Job_Crusader2 21 Job_SuperNovice 23 Job_Novice_High 4001 Job_Swordman_High 4002 Job_Mage_High 4003 Job_Archer_High 4004 Job_Acolyte_High 4005 Job_Merchant_High 4006 Job_Thief_High 4007 Job_Lord_Knight 4008 Job_High_Priest 4009 Job_High_Wizard 4010 Job_Whitesmith 4011 Job_Sniper 4012 Job_Assassin_Cross 4013 Job_Lord_Knight2 4014 Job_Paladin 4015 Job_Champion 4016 Job_Professor 4017 Job_Stalker 4018 Job_Creator 4019 Job_Clown 4020 Job_Gypsy 4021 Job_Paladin2 4022 Job_Baby 4023 Job_Baby_Swordman 4024 Job_Baby_Mage 4025 Job_Baby_Archer 4026 Job_Baby_Acolyte 4027 Job_Baby_Merchant 4028 Job_Baby_Thief 4029 Job_Baby_Knight 4030 Job_Baby_Priest 4031 Job_Baby_Wizard 4032 Job_Baby_Blacksmith 4033 Job_Baby_Hunter 4034 Job_Baby_Assassin 4035 Job_Baby_Knight2 4036 Job_Baby_Crusader 4037 Job_Baby_Monk 4038 Job_Baby_Sage 4039 Job_Baby_Rogue 4040 Job_Baby_Alchem 4041 Job_Baby_Bard 4042 Job_Baby_Dancer 4043 Job_Baby_Crusader2 4044 Job_Super_Baby 4045 Job_Taekwon 4046 Job_Star_Gladiator 4047 Job_Star_Gladiator2 4048 Job_Soul_Linker 4049
1 Sight 32 Peco Peco riding 2048 Orc Head 2 Hide 64 GM Perfect Hide 4096 Wedding Sprites 4 Cloak 128 Level 2 Cart 8192 Ruwach 8 Level 1 Cart 256 Level 3 Cart 16 Falcon 512 Level 4 Cart 1024 Level 5 Cart
YAY =D Now our mob has a sprite, and is running around killing helpless noobs BWHAHAH (ok sorry for that =Pu) But, everytime we want to fight it, we need to use @spawn, and it gets pretty tedious sleep.gifu So, why not giving it a spawn point? =D! *WARNING* Using Advanced/Babies Class ID's might give you an error, cuz of missing the weapon sprite. To fix it, find the sprite name on your sprite folder, they're generally on data\sprite\Àΰ£Á•*WARNING* Lets look at the pattern of a mob spawn point: <map name>,<x1>,<y1>,<x2>,<y2>%TAB%monster%TAB% <monster name>%TAB%<mob id>,<amount>,<delay1>,<delay2>,<event> NOTE: I had to cut the mob spawn point structure so it could fit. It's a whole line, not 2 lines. Only the things between <> are changed. Do not remove or change monster after the coordinates, cuz that's what tells the server that this line is a monster spawn script.
zOMG, look where we are º-º! We've created a mob, given it a sprite, and even set a spawn point! Now we can play with around but.. the mob only melee... using his bow/dagger/sword/staff.... its pretty much boring eh?.... Wait, what if we give skills to the mob? =D! That would rox a lot X3!!! Lets make a few skills for our mobs ;3.... Go to your db folder and open the mob_skill_db.txt file. Lets look at the structure of a mob skill: MOB_ID, a unused dummy character sequence (for information only), STATE, SKILL_ID, SKILL_LV, rate (10000 = 100%), casttime, delay, cancelable, a target, a condition type, a condition value, a value 1, a value 2, a value 3, a value 4, a value 5, emotion
any, idle (in standby), walk (in movement), attack, dead (on killed), loot, chase (following target), counterattack. Extracted from the mob_skill_db.txt itself. It's at the very beginning.
2,0,0,0,0,0,10,0,no,0,0,0,weapon,0 //SM_SWORD#ΥCў# And the structure is: id,range,hit,inf,pl,nk,max,list_num,castcancel,cast_defence_rate,inf2,maxcount,skill_type,blow_count so, the ID of the SM_SWORD, which is the Swordman's Sword Mastery by the way, is 2: '''2''',0,0,0,0,0,10,0,no,0,0,0,weapon,0 //SM_SWORD#ΥCў#
target (you, basically), self (the mob itself), friend (a minion, aka the mobs that this mob have (if it has mob summoning skill)
1st Mob Condition: //conditions: (condition type) (value which specifies a condition value) // always unconditional // myhpltmaxrate when the mob's hp drops to a certain % // mystatuson If the mob has any abnormalities in status (condition value), // mystatusoff If the mob has ended any abnormalities in status (condition value), // friendhpltmaxrate when the mobs' friend's hp drops to a certain % // friendstatuson If the friend has any abnormalities in status (condition value), // friendstatusoff If the friend has ended any abnormalities in status (condition value), // attackpcgt Attack PC becomes more than the number of specification // attackpcge Attack PC becomes equal or more than the number of specification. // slavelt when the number of slaves is lower than the original number of specification. // slavele when the number of slaves is lower or equal than the original number of specification. // closedattacked when melee attacked (close range attack) // longrangeattacked when long ranged attacked (like bows and far range weapons) // skillused when a skill is used on the mob // casttargeted when a target is in cast range. // rudeattacked when a target is rude attacked // hiding when a target is hidden *not implemented yet*
// The character's state which can be specified to be a condition value // by the statuson/statusoff system // // anybad any type of state change // stone condition of being in stone state // freeze condition of being in frozen state // stan condition of being in stunned state // sleep condition of being in sleep state // poison condition of being in poisoned state // curse condition of being in cursed state // silence condition of being in silenced state // confusion condition of being in confusion state // blind condition of being in blind state // hiding condition of being in hidden state // sight condition of being in unhidden state You can use only ONE of these conditions.
80,60,40,20,10
e_gasp 0 e_what 1 e_ho 2 e_lv 3 e_swt 4 e_ic 5 e_an 6 e_ag 7 e_cash 8 e_dots 9 e_scissors 10 e_rock 11 e_paper 12 e_korea 13 e_lv2 14 e_thx 15 e_wah 16 e_sry 17 e_heh 18 e_swt2 19 e_hmm 20 e_no1 21 e_no 22 e_omg 23 e_oh 24 e_X 25 e_hlp 26 e_go 27 e_sob 28 e_gg 29 e_kis 30 e_kis2 31 e_pif 32 e_ok 33 e_bzz 36 e_rice 37 e_awsm 38 e_meh 39 e_shy 40 e_pat 41 e_mp 42 e_slur 43 e_com 44 e_yawn 45 e_grat 46 e_hp 47 e_philippines 48 e_usa 49 e_indonesia 50 e_brazil 51 For more info, go to your Template:Svn file. WoW We finally finished! Our mob has custom stats, its own sprite (from a player sprite or another mob sprite ;3), has a spawn point, uses skills and even do emoticons! *-* What else can we ask? Turn them into NPC?.... Yeah... It can be done too but.. I'll add it later ;3 For now, I think this is all you need to know to make your own customized mob =D! Ok, since i said i would show how to make your mob look like a npc, i'll write it now =3! First than anything, we need to set the Cygwin Bash Shell. How so? Well, we go to http://www.cygwin.com and download their setup.exe file. Once it's down. we will go to the following site: .:World of eAthena:. and read STEP BY STEP, then do it STEP BY STEP.*tip tip* Dont choose the FTP the guy says on the webpage, choose one below it or above, but not that one.*tip tip**WARNING*Beware 56kers. It's a lot of downloads..... and isnt resumeable, cuz it has to be installed at once.*WARNING*. Once you finish downloading all the things they say (dont uncheck anything that pops up being checked when you check one of the things. That means it comes with the files needed, thus that one is a file needed) try it out =3. Open it, a shortcut should be on your desktop. when you're there follow the steps that the site above has. Also their suggestions, such as placing your server folder on an easy location, such as C:\RO server.*tip tip*Always, before starting the compiling process, type make clean to erase the cygwin cache from the last compile process. Then either type make txt for TXT eAthena users or make sql for SQL eAthena users.*tip tip* Once it finish recompiling, you can tell it when it leaves ladmin folder, go to your cygwin\bin folder and COPY the cygwin1.dll and cygz.dll, do not cut them, then paste them on your Server folder, OVERWRITING the currents. Do this everytime you compile your eAthena =3! Ok, once we made that test, and got that Cygwin rolling fine ;o! We'll go to Lordalfa's Post, remember to leave a comment there ;3. Once you finish making all the source modifying stuff, recompile and add the new cygwin1.dll and cygz.dll files on your Server folder. Remember they're on the cygwin\bin folder. Now, to make them as a npc. We go to the header of a npc script: prontera.gat,100,200,4 script Test 90,{ See that bolded number? That's the NPC ID right? well, to make your mob as a npc, simply replace that ID with your mob ID. Example: Suppose our mob ID is 1800. All we do is : prontera.gat,100,200,4 script Test 90,{ v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v prontera.gat,100,200,4 script Test 1800,{ Then, our npc should look like that mob =3 Remember doing the mob spawn Script part of Lordalfa's guide to link them to this npc. Thanks to EvilPeri79 for this suggestion: Many people have asked me if there's a way to implement custom sprites, and i gave them a few choices: 1st: Hex your client and change the mob sprite name for those ID • -•u 2nd: Keep using mob avails =/! 3rd: Or, try this... Find an unused mob sprite (such as Mastering and the Magma Dungeon mobs, since no1 goes there ._.!), extract it on your data folder from your data.grf, using GRF Tool, and rename your mob sprite with one of those sprites. Example: Lets say your mob is named Kapha_mod.spr and Kapha_mod.act. And you have, lets say, explosion.act and explosion.spr. Simply exchange names: explosion.spr Kapha_mod.spr v v explosion.spr explosion1.spr v v Kapha_mod.spr explosion1.spr v v Kapha_mod.spr explosion.spr
explosion.act Kapha_mod.act v v explosion.act explosion1.act v v Kapha_mod.act explosion1.act v v Kapha_mod.act explosion.act
Another add, suggested by chronocrosser_x and Fenrir Soarblade: Well, i believe you have seen some mobs on your server talking when certain things happens. I never saw them again talking, dont know why but they used to talk. I believe they still do it. Ok, go to your Data folder. If you look in the files, you should find a file called monstertalktable. If there isnt, we will create one with Wordpad =3!. If there is, open it with Wordpad, not Notepad. Once there, we will copy and paste this: <?xml version="1.0" encoding="euc-kr" ?> <enemy_monster_talk_table> <mob_db_name_here> <discovery></discovery> <attack></attack> <hp50></hp50> <hp25></hp25> <kill></kill> <dead></dead> </mob_db_name_here> </enemy_monster_talk_table> Well, lets see step by step =3!:
I never messed with this, but i think its ok =3! Also for those spaces other than the messages spaces, use TAB, not the Space Bar for it ._.! |