From The Mana World
(→‎mob_db: Fixed lack of VIT info)
m (Jesusalva moved page Dev:Monster Design to Legacy:Monster Design: Legacy namespace prevails)
(No difference)

Revision as of 23:33, 19 June 2020

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.


Construction-worker.png
This article is currently under construction.
Please note that this page is still under contruction. You can use it as reference, but note the red marked comments for unclear points.



This page shows how monsters are designed. Therefore two main points are relevant:

  • server-data which defines stats like HP and DEF, but also the behavior or walk and attack speed of the mob
  • and client-data which includes everything the client shows while playing like the graphic of a mob itself or sparkling particle effects and a file naming the authors of a graphic.


server-data

The required files in server-data list all kind of numbers that don't have anything to do with how a mob looks like (this is in client-data).

Only two files are relevant for this: the appropriate mob_db and mob_points.txt.

Additionally you can look at how other mobs are created as a reference.


mob_db

In this folder you will see the following files:

All information about stats like mob name, HP, DEF, but also walking and attack speed are listed in these mob_db.txt files. The numbers represent the level of the mobs listed in the files. So if you want to add a mob with level 75 you choose 60_79_mob_db.txt.


The mob_db.txt files have 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,
Drop2%, Drop3id, Drop3%, Drop4id, Drop4%, Drop5id, Drop5%, Drop6id, Drop6%, Drop7id, Drop7%, Drop8id, Drop8%,
Item1, Item2, MEXP, ExpPer, MVP1id, MVP1per, MVP2id, MVP2per, MVP3id, MVP3per, mutationcount, mutationstrength

Note: In this wiki page it shows four lines, while it's one single line in the mob_db itself.


The columns mean:

  • ID: ID of the mob. It's not sure if the maximum possible number of IDs is 1,000 or 10,000.
  • 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. It is added to DEX for "to hit" and to AGI for "flee".
  • HP: HP of the mob. Note that maximum is 65535 HP, if you enter more it starts from 0 again (e.g. 80000 HP will be 14464 HP then).
  • SP: SP of the mob, but currently unused (even though e.g. Luvia has 60 SP which have no effect). Please leave "0" here.
  • 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.
  • 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. It increases the minimum/maximum attack of the mob on a one-to-one basis.
  • AGI: Agility of the mob. This also defines the mob flee rate.
  • VIT: Vitality of the mob. 80% of this value is removed from damage taken after DEF is applied.
  • INT: Intelligence of the mob. This also defines its Magic Attack.
  • DEX: Dexterity of the mob. This also defines its hit rate.
  • LUK: Luck of the mob. This also defines its perfect dodge/lucky flee/perfect flee/lucky dodge rate (those are various combat chances shown in client as "miss" and "dodge").
  • Range2: Currently unused. It's said to be the maximum range for skills. Please leave "1" here.
  • Range3: 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. Please leave "1" here.
  • Scale: Currently unused. Please leave "1" here.
  • Race: Defines the mob's race, see below:
    • "0" = formless
    • "1" = undead
    • "2" = animal
    • "3" = plant
    • "4" = insect
    • "5" = fish
    • "6" = demon
    • "7" = demihuman
    • "8" = angel
    • "9" = dragon
  • Element: Defines the mob's element and the level of this element. The element number has 2 digits: xy, x = level of the element and y = element, see below:
    • x = "2" for element level 1
    • x = "4" for element level 2
    • x = "6" for element level 3
    • x = "8" for element level 4
    • y = "0" for neutral element
    • y = "1" for water element
    • y = "2" for earth element
    • y = "3" for fire element
    • y = "4" for wind element
    • y = "5" for poison element
    • y = "6" for holy element
    • y = "7" for shadow element
    • y = "8" for ghost element
    • y = "9" for undead element

-> e.g. for a level 3 fire mob grab the "6" for the element level 3 and the "3" for the fire element -> Element = 63.

  • Mode: This defines the mob's behavior, see below:
Those are the basic numbers:
canMove:        1
looter:         2 (picks up drops if not aggravated)
aggressive:     4
assist:         8 (helps another mob of its kind that got aggravated)
castsensor:    16 (currently without any effect)
Boss:          32 (effect unknown)
plant:         64 (effect unknown)
canAttack:    128
detector:     256 (currently without any effect)
changetarget: 512 (currently without any effect)

You add them up to make mob, e.g those:

Plant:                         64     64 for plant (can't attack (128) and can't move (1))                   Example: Mauve Plant, Cobalt Plant, etc.
Immobile, peaceful mob:       128    128 for canAttack (but not aggressive (4) and not able to move (1))     Example: Pink Flower
Standard, peaceful mob:       129    128 for canAttack + 1 for canMove                                       Example: Fluffy
Standard, aggressive mob:     133    128 for canAttack + 4 for aggressive + 1 for canMove                    Example: Snake
Peaceful, assisting mob:      137    128 for canAttack + 8 for assist + 1 for canMove                        Example: Moggun
Peaceful looter:              131    128 for canAttack + 2 for looter + 1 for canMove                        Example: Yellow Slime  
Aggressive looter:            135    128 for canAttack + 4 for aggressive + 2 for looter + 1 for canMove     Example: Red Slime
Boss mob:                     165    133 (128+4+1) for standard aggressive mob + 32 for Boss                 Example: Reaper
  • Speed: Walking speed of the mob. "1" is the fastest, "1000" is the lowest. "100" is the normal walking speed.
  • Adelay: Attack Delay, also known as ASPD. This defines how fast the mob hits. The lower the faster, but making it too low will cause lag when several mobs attack.
  • Amotion: Attack animation motion. Lower this value and the mob's attack will be displayed in higher fps (making it shorter, too).
  • 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".
  • Drop1id: The ID of an item the mob can drop.
  • Drop1per: The drop rate of Drop1ID. "10000" = 100%, "1000" = 10%, "100" = 1", "10" = 0.1%, "1" = 0.01%, etc.
  • Same counts for Drop2ID & Drop2per, Drop3ID & Drop3per, etc.
  • Item1: Currently unused. Please leave "0" here.
  • Item2: Currently unused. Please leave "0" here.
  • MEXP: Currently unused. Please leave "0" here.
  • ExpPer: Currently unused. Please leave "0" here.
  • MVP1id: Currently unused. Please leave "0" here.
  • MVP1per: Currently unused. Please leave "0" here.
  • Same counts for MVP2id & MVP2per and MVP3id & MVP3per.
  • mutationcount: Defines how many attributes can increase. Those attributes can be LV, HP, ATK1, ATK2, DEF, MDEF, STR, AGI, VIT, INT, DEX, LUK, Speed, Adelay, HP (double chance to modify hp, no chance to modify base EXP).
  • mutationstrength: Defines how much attributes can increase, e.g. "50" = 50%.

mob_points.txt


At the top ~120 lines (number will increase with each new mob) all mobs are listed that give monster points for Aidan And Ishi's Monster Points. Usually there is a line saying "// Add more here", showing that new entries should be added above. Please ignore the lower part in this file as it's used to define which mobs Sagatha considers as good or evil.


Note: Currently the array is full which means that no new mobs can be added here. Please better ask if you can add a mob here or if there is some other solution.


client-data

As mentioned at the top of this page client-data includes everything the client shows while playing and a file naming the authors and licenses of graphics.


This escpecially means graphics like monster sprites, XML files that define how the graphics are used (e.g. using a certain part of a graphic when a mob attacks but another part when it dies), accessories that can be put on a mob (e.g. a Reinboo is nothing else than a Mouboo with several accessories like Antlers), particle effects like the Demonic Mouboo's black smoke and the monster.xml that puts all those pieces together and defines the mob's name shown by the client.


Graphics (sprites) and license.txt


Please save finished graphics as .png with transparent background and name the license of them (dual licensing CC BY-SA 3.0 and GPLv2 are required - if you have questions please ask in our IRC development channel).


Note: This is the only point of monster design pure pixel artists have to take care of as they're "job" is only creating graphics, not making monster design. Everything else can be done by content developers or other contributors.


The content developer who creates a pull request for the mob will add the author and license(s) in license.txt.


XML files for the monster sprites

This is the same path as the graphics/sprites of mobs as they belong together.


These XML files define which part of a sprite is used for which movement of a mob.


(more information will follow)


Optional: accessories and particle effects

Both graphics and XML files of accessories or particle effects are saved under the appropriate path.


Sometimes accessories and/or particle effects are used for creating a new mob. For example the Demonics Mouboo uses Antlers as accessory and a black smoke particle effect.


(more information will follow)


monsters.xml

In monsters.xml all pieces of a mob are put together so the client knows which files it should use for which mob. This includes the monster sprite, sfx, accessories and particle effects. Also it defines the mob's ID which is a different one than in the mob_db in server-data. For examples, descriptions and further information please check and compare with other entries in the monsters.xml and visit the wiki page of Manaplus.