Creature template

Материал из YTDB DataBase

(Различия между версиями)
Перейти к: навигация, поиск
(resistance3)
(resistance4)
Строка 1078: Строка 1078:
====resistance4====
====resistance4====
-
Frost resistance.
+
Сопротивление морозу.
====resistance5====
====resistance5====

Версия 12:53, 5 февраля 2010

Содержание

Back to world database list of tables.


The `creature_template` table

Эта таблица содержит описание существ. Each spawned creature is an instance of a template present in this table, this means every creature MUST be defined in this table.


Structure

Field Type Null Key Default Extra
entry mediumint(8) unsigned NO PRI 0
difficulty_entry_1 mediumint(8) unsigned NO 0
difficulty_entry_2 mediumint(8) unsigned NO 0
difficulty_entry_3 mediumint(8) unsigned NO 0
KillCredit1 int(11) unsigned NO 0
KillCredit2 int(11) unsigned NO 0
modelid_A mediumint(8) unsigned NO 0
modelid_A2 mediumint(8) unsigned NO 0
modelid_H mediumint(8) unsigned NO 0
modelid_H2 mediumint(8) unsigned NO 0
name char(100) NO 0
subname char(100) YES None
IconName char(100) YES
minlevel tinyint(3) unsigned YES 1
maxlevel tinyint(3) unsigned YES 1
minhealth int(10) unsigned YES 0
maxhealth int(10) unsigned YES 0
minmana int(10) unsigned YES 0
maxmana int(10) unsigned YES 0
armor mediumint(8) unsigned NO 0
faction_A smallint(5) unsigned NO 0
faction_H smallint(5) unsigned NO 0
npcflag int(10) unsigned NO 0
speed float YES 1
scale float NO 0
rank tinyint(3) unsigned YES 0
mindmg float YES 0
maxdmg float YES 0
dmgschool tinyint(4) NO 0
attackpower int(10) unsigned NO 0
dmg_multiplier float NO 1
baseattacktime int(10) unsigned YES 0
rangeattacktime int(10) unsigned YES 0
unit_class tinyint(3) unsigned NO 0
unit_flags int(10) unsigned NO 0
dynamicflags int(10) unsigned NO 0
family tinyint(4) YES 0
trainer_type tinyint(4) YES 0
trainer_spell mediumint(8) unsigned YES 0
trainer_class tinyint(3) unsigned YES 0
trainer_race tinyint(3) unsigned YES 0
minrangedmg float NO 0
maxrangedmg float NO 0
rangedattackpower smallint(5) unsigned NO 0
type tinyint(3) unsigned NO 0
type_flags int(10) unsigned YES 0
lootid mediumint(8) unsigned NO 0
pickpocketloot mediumint(8) unsigned NO 0
skinloot mediumint(8) unsigned NO 0
resistance1 int(10) unsigned NO 0
resistance2 smallint(5) NO 0
resistance3 smallint(5) NO 0
resistance4 smallint(5) NO 0
resistance5 smallint(5) NO 0
resistance6 smallint(5) NO 0
spell1 mediumint(8) unsigned NO 0
spell2 mediumint(8) unsigned NO 0
spell3 mediumint(8) unsigned NO 0
spell4 mediumint(8) unsigned NO 0
PetSpellDataId mediumint(8) unsigned NO 0
mingold mediumint(8) unsigned NO 0
maxgold mediumint(8) unsigned NO 0
AIName char(64) NO
MovementType tinyint(3) unsigned NO 0
InhabitType tinyint(3) unsigned NO 3
unk16 float NO 1.0
unk17 float NO 1.0
RacialLeader tinyint(3) unsigned NO 0
questItem1 int(11) unsigned NO 0
questItem2 int(11) unsigned NO 0
questItem3 int(11) unsigned NO 0
questItem4 int(11) unsigned NO 0
movementId int(11) unsigned NO 0
RegenHealth tinyint(3) unsigned NO 1
equipment_id mediumint(8) unsigned NO 0
mechanic_immune_mask int(10) unsigned NO 0
flags_extra int(10) unsigned NO 0
ScriptName char(64) NO


Description of the fields

entry

Уникальный номер(ID) существа(NPC).

difficulty_entry

В этих полях указываются entry существ из таблици creature_template для использования их в разных режимах подземелья. `difficulty_entry_1` - для нормального режима рейдового подземелья на 25 человек или для героического режима подзмелья на 5 человек, `difficulty_entry_2` - для героического режима рейдового подземелья на 10 человек, `difficulty_entry_3` - для героического режима рейдового подземелья на 25 человек.

KillCredit1

Если поле заполнено, то при смерти засчитывается убийство того, чей номер записан

KillCredit2

Если поле заполнено, то при смерти засчитывается убийство того, чей номер записан

modelid_A

Содержит информацию о графической модели(DisplayID) существа когда оно на стороне Альянса. Значение берется из таблици creature_model_info.entry

modelid_A2 is just a second field to store 2 possibilities

modelid_H

Содержит информацию о графической модели(DisplayID) существа когда оно на стороне Орды. Значение берется из таблици creature_model_info.entry

modelid_H2 is just a second field to store 2 possibilities

name

Имя существа.

subname

Подимя существа, которое появляется в <> ниже имени существа.

IconName

Script icon used by guards with directions menu.

minlevel

Минимальный уровень существа.

maxlevel

Максимальный уровень существа. When added to world, a level in chosen in the specified level range.

minhealth

Минимальное значение жизней существа.

maxhealth

Максимальное значение жизней существа. When added to world, the health value is chosen in proportion to the level chosen.

minmana

Минимальное значение маны существа.

maxmana

Максимальное значение маны существа. When added to world, the mana value is chosen in proportion to the level chosen.

armor

Определяет колличество брони у существа. It controls how much damage reduction the creature gets from physical attacks.

faction_A

Определяет фракцию для существ на стороне Альянса. Значения хранятся в файле FactionTemplate.dbc. Just because more than one faction has the same name, the inter-faction relationships can be different.

Note: Это поле так же отвечает за то, что существо будет помогать существам с такой же фракцией.

faction_H

Определяет фракцию для существ на стороне Орды. Значения хранятся в файле FactionTemplate.dbc. Just because more than one faction has the same name, the inter-faction relationships can be different.

Note: Это поле так же отвечает за то, что существо будет помогать существам с такой же фракцией.

npcflag

A bitmask that represents what NPC flags the creature has. Each bit controls a different flag and to combine flags, you can add each flag that you want, in effect activating the respective bits.

Значение Название Описание
1 Gossip If creature has more gossip options, add this flag to bring up a menu.
2 Quest Giver Для существ, которые выдают или принимают квесты.
4 Not used
8 Not Used
16 Trainer Существо с таким флагом может обучать игрока различным заклинаниям.
32 Class Trainer Определяет существо как тренера класса
64 Profession Trainer Определяет существо как тренера профессии
128 Vendor Существо будет продавцом.
256 Vendor Не используется в MaNGOS. Продажа потронов. (не точно)
512 Vendor Не используется в MaNGOS. Продажа еды\напитков. (не точно)
1024 Vendor Не используется в MaNGOS. Продажа ядов. (не точно)
2048 Vendor Не используется в MaNGOS. Продажа реагентов. (не точно)
4096 Repairer Существо сможет починить поломонные вещи персонажа.
8192 Flight Master Существо с таким флагом становиться распорядителем полетов.
16384 Spirit Healer Делает существо не видимым для живых игроков и может воскрешать.
32768 Spirit Guide
65536 Innkeeper Creatures with this flag can set hearthstone locations.
131072 Banker Существа с таким флагом предоставляют доступ к банку игрока.
262144 Petitioner
524288 Tabard Designer Позволяет создавать табарды для гильдий.
1048576 Battlemaster Существо с таким флагом записывает на Поле Сражений.
2097152 Auctioneer Предоставляет доступ к аукциону.
4194304 Stable Master У существа с таким флагом можно будет оставлять петомцев охтника.
16777216 Instantloot Для существ которых можно обыскать без убийства. Подробнее тут - MaNGOS forum and at Npc_spellclick_spells table
268435456 Guard Существа с таким флагом являются охранниками в городах.

Пример: если вы хотите существо которое будет выдовать квесты, продовать товар и чинить вещи, то вам нужно добавить особый флаг: 1 + 2 + 128 + 4096 = 4227.

speed

Определяет как быстро существо может передвигаться.

scale

Определяет размер существа. Если в поле содержиться 0, то выставляется стандартный размер заданный графической моделью (DisplayID)

rank

Ранг существа:

Значение Название Описание
0 Normal
1 Elite Большой урон, много жизний и хорошая добыча.
2 Rare Elite Рарное существо, но с Elite уроном и жизнями.
3 World Boss Высший ранк, лучшая добыча, долгое время респауна.
4 Rare Лучшая добыча, долгое время респауна.

mindmg

Минимальный урон существа наносимый в ближнем бою.

maxdmg

Максимальный урон существа наносимый в ближнем бою.

dmgschool

Creature's melee damage school.

ID Name
0 SPELL_SCHOOL_NORMAL
1 SPELL_SCHOOL_HOLY
2 SPELL_SCHOOL_FIRE
3 SPELL_SCHOOL_NATURE
4 SPELL_SCHOOL_FROST
5 SPELL_SCHOOL_SHADOW
6 SPELL_SCHOOL_ARCANE

attackpower

The attack power for the creature's melee attacks. This field indicates how much dmg is possible to take off from mob, by using -ap or +ap effects.

dmg_multiplier

Used to multiply creatures damage.

baseattacktime

Creature's melee attack time in milliseconds.

rangeattacktime

Creature's ranged attack time in milliseconds.

unit_class

Класс существа. Только 4 класса доступны для существ.

КлассЗначение
CLASS_WARRIOR(Воин)1
CLASS_PALADIN(Паладин)2
CLASS_ROGUE(Вор)4
CLASS_MAGE(Маг)8

unit_flags

Allows the manual application of unit flags to creatures. Again this is a bitmask field and to apply more than one flag, just add the different numbers. Some possible flags are:

Flag Name Comments
1 UNIT_FLAG_UNKNOWN7
2 UNIT_FLAG_NON_ATTACKABLE
4 UNIT_FLAG_DISABLE_MOVE
8 UNIT_FLAG_PVP_ATTACKABLE (allow apply pvp rules to attackable state in addition to faction dependent state)
16 UNIT_FLAG_RENAME
32 UNIT_FLAG_RESTING
64 UNIT_FLAG_UNKNOWN9
128 UNIT_FLAG_NOT_ATTACKABLE_1 (??) ((UNIT_FLAG_PVP_ATTACKABLE + UNIT_FLAG_NOT_ATTACKABLE_1) is NON_PVP_ATTACKABLE)
256 UNIT_FLAG_UNKNOWN2 (2.0.8) (2.4.3, Seems to make the unit unattackable)
512 UNIT_FLAG_UNKNOWN11
1024 UNIT_FLAG_LOOTING (loot animation)
2048 UNIT_FLAG_PET_IN_COMBAT (in combat?, 2.0.8)
4096 UNIT_FLAG_PVP Allows item spells to be casted upon (?)
8192 UNIT_FLAG_SILENCED Can't cast spells
16384 UNIT_FLAG_UNKNOWN4 (2.0.8)
32768 UNIT_FLAG_UNK_15
65536 UNIT_FLAG_UNKNOWN14
131072 UNIT_FLAG_PACIFIED
262144 UNIT_FLAG_DISABLE_ROTATE (stunned, 2.1.1)
524288 UNIT_FLAG_IN_COMBAT
1048576 UNIT_FLAG_TAXI_FLIGHT (disable casting at client side spell not allowed by taxi flight (mounted?), probably used with 0x4 flag)
2097152 UNIT_FLAG_DISARMED (disable melee spells casting..., "Required melee weapon" added to melee spells tooltip.)
4194304 UNIT_FLAG_CONFUSED
8388608 UNIT_FLAG_FLEEING
16777216 UNIT_FLAG_UNKNOWN5 (used in spell Eyes of the Beast for pet...)
33554432 UNIT_FLAG_NOT_SELECTABLE Can't be selected by mouse
67108864 UNIT_FLAG_SKINNABLE
134217728 UNIT_FLAG_MOUNT (the client seems to handle it perfectly)
268435456 UNIT_FLAG_UNKNOWN17
536870912 UNIT_FLAG_UNKNOWN6 (used in Feing Death spell)
1073741824 UNIT_FLAG_SHEATHE

dynamicflags

Flags that control visual appearance of the creature.

A few known flags and their use are:

Flag Name Comments
1 UNIT_DYNFLAG_LOOTABLE
2 UNIT_DYNFLAG_TRACK_UNIT
4 UNIT_DYNFLAG_OTHER_TAGGER Makes creatures name appear grey (good for simulating dead creatures)
8 UNIT_DYNFLAG_ROOTED
16 UNIT_DYNFLAG_SPECIALINFO Shows creatures basic stats (Health, damage, resistances, tamable).
32 UNIT_DYNFLAG_DEAD Makes the creature appear dead (this DOES NOT make the creatures name grey)

family

The family this creature belongs to. Only used if type is 1 (Beast).

ID Family ID Family ID Family
1 Wolf 15 Doomguard 29 Nether Ray
2 Cat 16 Scorpid 30 Serpent
3 Spider 17 Turtle 31 Moth
4 Bear 18 Imp 32 Chimaera
5 Boar 19 Bat 33 Devilsaur
6 Crocolisk 20 Hyena 34 Ghoul
7 Carrion Bird 21 Bird of Prey 35 Silithid
8 Crab 22 Wind Serpent 36 Worm
9 Gorilla 23 Remote Control 37 Rhino
10 Raptor 24 Felguard 38 Wasp
11 Tallstrider 25 Dragonhawk 39 Core Hound
12 Felhunter 26 Ravager 40 Spirit Beast
13 Voidwalker 27 Warp Stalker
14 Succubus 28 Sporebat

If you want to select only the exotic pets, there is the list: 32, 33, 35, 36, 37, 39, 40 [exotic ones are highlighted in the table]

trainer_type

If the NPC is a trainer (has the trainer flag), then this field controls what kind of trainer it is. Both this field and the related field must be filled in for a trainer to work correctly.

ID Type Related Field Comments
0 TRAINER_TYPE_CLASS class Trains class spells
1 TRAINER_TYPE_MOUNTS race Trains riding skill
2 TRAINER_TYPE_TRADESKILLS trainer_spell Trains professions
3 TRAINER_TYPE_PETS class Trains pet skills

trainer_spell

If the NPC is a trainer that teaches professions (trainer_type == 2), then the player must already know the spell ID specified here to be able to talk to this NPC.

trainer_class

If the NPC is a class trainer or a pet trainer (trainer_type == 0 or 3), then the player's class must be the same as the value specified here to talk to this trainer. For pet trainers, this value must be 3 (hunter). See character.class

trainer_race

If the NPC is a mount trainer (trainer_type == 1), then the player's race must be the same as the value specified here to talk to this trainer. See character.race

minrangedmg

Minimum ranged damage the creature inflicts.

maxrangedmg

Maximum range damage the creature inflicts.

rangedattackpower

type

Тип существа.

ID Тип
0 None
1 Животное
2 Дракон
3 Демон
4 Элементаль
5 Гигант
6 Нежить
7 Гуманоид
8 Critter
9 Механический
10 Not specified
11 Тотем
12 Не боевой пет
13 Газовое облако

type_flags

This field can control whether a mob is minable or herbable. If it is either of those two, then the loot given when it is skinned/mined will be stored in the skinning_loot_template table. Aside from those two flags, field has no special meaning on the serverside. It will be send to the client in SMSG_CREATURE_QUERY_RESPONSE

Some values provided from the community:

Flag Name Comments
1 Makes the mob tameable (must also be a beast and have family set)
2 UNIT_FLAG_NOT_ATTACKABLE
8 UNIT_FLAG_ATTACKABLE
128 UNIT_FLAG_NOT_ATTACKABLE_1
136 UNIT_FLAG_NON_PVP_PLAYER
256 Makes mob herbable
512 Makes mob minable
1024 UNIT_FLAG_ANIMATION_FROZEN
4096 UNIT_FLAG_WAR_PLAYER

lootid

The ID of the loot template ID that this creature should use to generate loots. See creature_loot_template.entry

pickpocketloot

The ID of the pickpocketing loot template that this creature should use to generate pickpocketing loots. See pickpocketing_loot_template.entry

skinloot

The ID of the skinning loot template that this creature should use to generate skinning loots. See skinning_loot_template.entry

resistance1

Сопротивление святой магии.

resistance2

Сопротивление огню

resistance3

Сопротивление природе.

resistance4

Сопротивление морозу.

resistance5

Shadow resistance.

resistance6

Arcane resistance.

spell1-4

Spell ID that are available to the creature.

At this time, these fields are used by core only to populate pet spells if PetSpellDataId is 0

PetSpellDataId

ID linked to CreatureSpellData.dbc 1st column. This dbc contains pet spells (habilities).

mingold

Minimum money that the creature drops when killed, in copper.

maxgold

Maximum money that the creature drops when killed, in copper.

AIName

Overrides AI used for the creature.

Name Description
NullAI Empty AI, creature does nothing.
AggressorAI Creature attacks as soon as something is in aggro range.
ReactorAI Creature attacks only if aggroed by attack, spell etc.
GuardAI
PetAI Creature is a pet.
TotemAI Creature casts spell from field spell1, otherwise like NullAI.
EventAI Creature uses event based AI.

MovementType

The creature's default movement type.

ID Type
0 Idle; stay in one place
1 Random movement inside the spawndist radius
2 Waypoint movement

InhabitType

Controls where the creature can move and attack.

ID Type
1 Ground only
2 Water only
3 Both ground and water
4 Flying

unk16

Float values with unknown meaning. Values are from WDB Files.

unk17

Float values with unknown meaning. Values are from WDB Files.

RacialLeader

A flag indicating wheather the creature is a racial leader. Killing racial leaders grants 100 honor.

questItem1-4

Contains an item entry.

movementId

Movement ID from CreatureMovementInfo.dbc

RegenHealth

Boolean 1 or 0 controlling if the creature should regenerate its health or not.

equipment_id

The default ID of the equipment that this creature should display. See creature_equip_template.entry

mechanic_immune_mask

This makes the creature immune to specific spell natures. See Spell.dbc at row effect_X_mechanic_id.

Uses references from SpellMechanic.dbc.

Bit Type Bit Type
1 MECHANIC_CHARM 32768 MECHANIC_BANDAGE
2 MECHANIC_CONFUSED 65536 MECHANIC_POLYMORPH
4 MECHANIC_DISARM 131072 MECHANIC_BANISH
8 MECHANIC_DISTRACT 262144 MECHANIC_SHIELD
16 MECHANIC_FEAR 524288 MECHANIC_SHACKLE
32 MECHANIC_FUMBLE 1048576 MECHANIC_MOUNT
64 MECHANIC_ROOT 2097152 MECHANIC_PERSUADE
128 MECHANIC_PACIFY 4194304 MECHANIC_TURN
256 MECHANIC_SILENCE 8388608 MECHANIC_HORROR
512 MECHANIC_SLEEP 16777216 MECHANIC_INVULNERABILITY
1024 MECHANIC_SNARE 33554432 MECHANIC_INTERRUPT
2048 MECHANIC_STUN 67108864 MECHANIC_DAZE
4096 MECHANIC_FREEZE 134217728 MECHANIC_DISCOVERY
8192 MECHANIC_KNOCKOUT 268435456 MECHANIC_IMMUNE_SHIELD
16384 MECHANIC_BLEED 536870912 MECHANIC_SAPPED

To combine immunities just add values. Immune to everything corresponds to the value 1073741823.

flags_extra

These flags control certain creature specific attributes.

Bit Name Description
1 CREATURE_FLAG_EXTRA_INSTANCE_BIND Bounds killer's party to the instance they are in
2 CREATURE_FLAG_EXTRA_CIVILIAN Makes creature ignore aggro
4 CREATURE_FLAG_EXTRA_NO_PARRY Prohibits creature from parrying
8 CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN Creatures parries do not speed up its next attack
16 CREATURE_FLAG_EXTRA_NO_BLOCK Prohibits creature from blocking
32 CREATURE_FLAG_EXTRA_NO_CRUSH Prohibits creature from dealing crushing blows
64 CREATURE_FLAG_EXTRA_NO_XP_AT_KILL Makes creature reward no XP at kill
128 CREATURE_FLAG_EXTRA_INVISIBLE Makes creature invisible for player. Use this for triggers etc.
256 CREATURE_FLAG_EXTRA_NO_TAUNT Makes creature immune to taunt.
512 CREATURE_FLAG_EXTRA_GHOST Makes creature visible only for dead players.

ScriptName

The name of the script that this creature uses, if any. This ties a script from a scripting engine to this creature.


Quick Insert

The SQL insert request :

INSERT INTO creature_template(entry, heroic_entry, KillCredit1, KillCredit2, modelid_A, modelid_A2, modelid_H, modelid_H2, name, subname, IconName, minlevel, maxlevel, minhealth, maxhealth, minmana, maxmana, armor, faction_A, faction_H, npcflag, speed, scale, rank, mindmg, maxdmg, dmgschool, attackpower, dmg_multiplier, baseattacktime, rangeattacktime, unit_class, unit_flags, dynamicflags, family, trainer_type, trainer_spell, trainer_class, trainer_race, minrangedmg, maxrangedmg, rangedattackpower, type, type_flags, lootid, pickpocketloot, skinloot, resistance1, resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, PetSpellDataId, mingold, maxgold, AIName, MovementType, InhabitType, unk16, unk17, RacialLeader, questItem1, questItem2, questItem3, questItem4, movementId, RegenHealth, equipment_id, mechanic_immune_mask, flags_extra, ScriptName) VALUES ('0', '0', '0', '0', '0', '0', '0', '0', '0', 'None', '','1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '','0', '3', '1.0', '1.0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '');

Личные инструменты