-
Notifications
You must be signed in to change notification settings - Fork 0
Creature_template_3x
Back to world database list of tables.
This table contains the description of creatures. Each spawned creature is an instance of a template present in this table, this means every creature MUST be defined in this table.
Field | Type | Null | Key | Default | Extra |
entry | mediumint(8) unsigned | NO | PRI | 0 | |
heroic_entry | mediumint(8) unsigned | NO | 0 | ||
modelid_A | mediumint(8) unsigned | NO | 0 | ||
modelid_H | 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 | ||
baseattacktime | int(10) unsigned | YES | 0 | ||
rangeattacktime | int(10) unsigned | YES | 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 | ||
class | tinyint(3) unsigned | YES | 0 | ||
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 | ||
RacialLeader | tinyint(3) 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 |
Creature’s unique id.
If not zero, this field refers to an entry of creature_template. If a creature spawned in an heroic instance has the template, it will get the template pointed by this field instead.
Graphical model that the client applies on this creature when it is on the Alliance side. This is a creature_model_info.entry
Graphical model that the client applies on this creature when it is on the Horde side. This is a creature_model_info.entry
Base name of the creature.
The subname of the creature that appears in <> below the creature’s name.
Script icon used by guards with directions menu.
The minimum level of the creature if the creature has a level range.
The maximum level of the creature if the creature has a level range. When added to world, a level in chosen in the specified level range.
The minimum health of the creature if the creature has variable health.
The maximum health of the creature if the creature has a variable health. When added to world, the health value is chosen in proportion to the level chosen.
The miminum mana of the creature if the creature has variable mana.
The maximum mana of the creature if the creature has variable mana. When added to world, the mana value is chosen in proportion to the level chosen.
The armor value of the creature. It controls how much damage reduction the creature gets from physical attacks.
The faction if the creature is on the alliance side. See FactionTemplate.dbc.. Just because more than one faction has the same name, the inter-faction relationships can be different.
Note: This field also controls the creature family assistance mechanic. Only creatures with the same faction will assist each other.
The faction if the creature is on the horde side. See FactionTemplate.dbc.. Just because more than one faction has the same name, the inter-faction relationships can be different.
Note: This field also controls the creature family assistance mechanic. Only creatures with the same faction will assist each other.
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.
Bit | Flag | Comment |
---|---|---|
1 | Gossip | If creature has more gossip options, add this flag to bring up a menu. |
2 | Quest Giver | Any creature giving or taking quests needs to have this flag. |
16 | Trainer | Allows the creature to have a trainer list to teach spells |
128 | Vendor | Any creature selling items needs to have this flag. |
4096 | Repairer | Creatures with this flag can repair items. |
8192 | Flight Master | Any creature serving as fly master has this. |
16384 | Spirit Healer | Makes the creature invisible to alive characters and has the resurrect function. |
32768 | Spirit Guide | |
65536 | Innkeeper | Creatures with this flag can set hearthstone locations. |
131072 | Banker | Creatures with this flag can show the bank |
262144 | Petitioner | |
524288 | Tabard Designer | Allows the designing of guild tabards. |
1048576 | Battlemaster | Creatures with this flag port players to battlegrounds. |
2097152 | Auctioneer | Allows creature to display auction list. |
4194304 | Stable Master | Has the option to stable pets for hunters. |
268435456 | Guard | Creatures with this flag act as guards in cities. |
So if you want an NPC that is a quest giver, a vendor, and can repair you just add the specific flags together: 1 + 2 + 128 + 4096 = 4227.
Controls how fast the creature can move.
If non-zero, this field defines the size of how the model of the creature appears ingame. If zero, it will use default model size taken from the DBC.
The rank of the creature:
Rank | Name | Comments |
---|---|---|
0 | Normal | |
1 | Elite | Higher damage, more health, better loot. |
2 | Rare Elite | A rare mob but with elite damage and health. |
3 | World Boss | Highest rank, best loot, longest respawn time. |
4 | Rare | Somewhat better loot, longer respawn time. |
Minimum damage the creature deals in melee. This field is combined with the attackpower field to calculate the damage. Look at attackpower to see the formula.
Maximum damage the creature deals in melee. This field is combined with the attackpower field to calculate the damage. Look at attackpower to see the formula.
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 |
The attack power for the creature’s melee attacks. This field along with mindmg and maxdmg dictate how much the creature will hit for. The formula in applying correct damages is as follows:
UPDATE `creature_template` SET
`mindmg` = <#1>,
`maxdmg` = <#2>,
`attackpower` = ROUND((`mindmg` + `maxdmg`) / 4 * 7),
`mindmg` = ROUND(`mindmg` - `attackpower` / 7),
`maxdmg` = ROUND(`maxdmg` - `attackpower` / 7)
WHERE `entry` = ...
In the query above, substitute ‘<#1>’ with the minimum damage you want the creature to deal and ‘<#2>’ with the maximum damage you want the creature to deal.
NOTE: You might also want to double check the values calculated after the query is run because if the difference between mindmg and maxdmg is too high, mindmg will end up being a negative value.
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_ATTACKABLE | (for all units, make unit attackable even it’s friendly in some cases…) |
16 | UNIT_FLAG_RENAME | |
32 | UNIT_FLAG_RESTING | |
64 | UNIT_FLAG_UNKNOWN9 | |
128 | UNIT_FLAG_UNKNOWN10 | |
256 | UNIT_FLAG_UNKNOWN2 | (2.0.8) |
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_UNKNOWN13 | |
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_UNKNOWN15 | (mounted? 2.1.3, probably used with 4 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 |
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 | |
32 | UNIT_DYNFLAG_DEAD | Makes the creature appear dead (this DOES NOT make the creatures name grey) |
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 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 |
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.
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
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
Minimum ranged damage the creature inflicts.
Maximum range damage the creature inflicts.
The type of the creature.
ID | Type |
---|---|
0 | None |
1 | Beast |
2 | Dragonkin |
3 | Demon |
4 | Elemental |
5 | Giant |
6 | Undead |
7 | Humanoid |
8 | Critter |
9 | Mechanical |
10 | Not specified |
11 | Totem |
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 |
The ID of the loot template ID that this creature should use to generate loots. See creature_loot_template.entry
The ID of the pickpocketing loot template that this creature should use to generate pickpocketing loots. See pickpocketing_loot_template.entry
The ID of the skinning loot template that this creature should use to generate skinning loots. See skinning_loot_template.entry
Holy resistance.
Fire resistance.
Nature resistance.
Frost resistance.
Shadow resistance.
Arcane resistance.
Spell ID that is available to the creature. At this time, this field isn’t used by the core.
Spell ID that is available to the creature. At this time, this field isn’t used by the core.
Spell ID that is available to the creature. At this time, this field isn’t used by the core.
Spell ID that is available to the creature. At this time, this field isn’t used by the core.
ID that displays what spells the pet has in the client.
Minimum money that the creature drops when killed, in copper.
Maximum money that the creature drops when killed, in copper.
The creature’s default movement type.
ID | Type |
---|---|
0 | Idle; stay in one place |
1 | Random movement inside the spawndist radius |
2 | Waypoint movement |
Controls where the creature can move and attack.
ID | Type |
---|---|
1 | Ground only |
2 | Water only |
3 | Both ground and water |
4 | Flying |
A flag indicating wheather the creature is a racial leader. Killing racial leaders grants 100 honor.
Boolean 1 or 0 controlling if the creature should regenerate its health or not.
The default ID of the equipment that this creature should display. See creature_equip_template.entry
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.
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 | |
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. |
The name of the script that this creature uses, if any. This ties a script from a scripting engine to this creature.