diff options
| author | Hacki95 <62942638+Hacki95@users.noreply.github.com> | 2021-03-30 11:34:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-30 11:34:50 +0200 |
| commit | 3ba0b6a964c0b7b8b7292f6fb3ec6cb2ab85a5d1 (patch) | |
| tree | 318b05740347ff23a81a4c16400edf497cb40442 | |
| parent | 4b60a8689027ff4098f84d13d6a8f8acc6e7ea97 (diff) | |
| download | wiki-3ba0b6a964c0b7b8b7292f6fb3ec6cb2ab85a5d1.tar.gz wiki-3ba0b6a964c0b7b8b7292f6fb3ec6cb2ab85a5d1.tar.bz2 wiki-3ba0b6a964c0b7b8b7292f6fb3ec6cb2ab85a5d1.zip | |
chore(c_t/c_cls): update info (#420)
* creature_template update #1
* creature_template update #2
* creature_template update #3 & creature_classlevelstats
* Typo fix
* Fix Links
* Shorten more links.
* Missed
* Fix creature_classlevelstats aswell
* Fix last links
| -rw-r--r-- | docs/creature_classlevelstats.md | 18 | ||||
| -rw-r--r-- | docs/creature_template.md | 102 |
2 files changed, 57 insertions, 63 deletions
diff --git a/docs/creature_classlevelstats.md b/docs/creature_classlevelstats.md index 683adad..ff7022b 100644 --- a/docs/creature_classlevelstats.md +++ b/docs/creature_classlevelstats.md @@ -46,19 +46,19 @@ Class of the creature. This is a reference to the [unit\_class](creature_templat ### basehp0 -Base health for the creature if creature\_template.exp value is set to 0. This value is multiplied by [creature\_template.Health\_mod](creature_template#creature_template-Health_mod) to determine the creature's final health. +Base health for the creature if creature\_template.exp value is set to 0. This value is multiplied by [creature\_template.Health\_mod](creature_template#health_mod) to determine the creature's final health. ### basehp1 -Base health for the creature if creature\_template.exp value is set to 1. This value is multiplied by [creature\_template.Health\_mod](creature_template#creature_template-Health_mod) to determine the creature's final health. +Base health for the creature if creature\_template.exp value is set to 1. This value is multiplied by [creature\_template.Health\_mod](creature_template#health_mod) to determine the creature's final health. ### basehp2 -Base health for the creature if creature\_template.exp value is set to 2. This value is multiplied by [creature\_template.Health\_mod](creature_template#creature_template-Health_mod) to determine the creature's final health. +Base health for the creature if creature\_template.exp value is set to 2. This value is multiplied by [creature\_template.Health\_mod](creature_template#health_mod) to determine the creature's final health. ### basemana -Base mana for the creature. This value is multiplied by [creature\_template.Mana\_mod](creature_template#creature_template-Mana_mod) to determine the creature's final mana. +Base mana for the creature. This value is multiplied by [creature\_template.Mana\_mod](creature_template#mana_mod) to determine the creature's final mana. ### basearmor @@ -66,23 +66,23 @@ Base armor for the creature. This value is multiplied by creature\_template.Armo ### attackpower -Base attack power for the creature. This value is multiplied by [creature\_template.attackpower](creature_template#creature_template-attackpower) to determine the creature's final attack power. +Base attack power for the creature. ### rangedattackpower -Base ranged attack power for the creature. It is currently unknown what this value is multiplied by to determine the creature's final attack power. Maybe it works the same as attack power and multiplies by [creature\_template.attackpower](creature_template#creature_template-attackpower)? +Base ranged attack power for the creature. ### damage\_base -This field is used for unknown. (Might be the base dmg if exp1 and exp2 is set to 0). +Modifier used to calculate the damage output of a creature. This field is used if a creature's [exp](creature_template#exp) is set to 0. See [DamageModifier](creature_template#damagemodifier) for more information. ### damage\_exp1 -Min damage. This will increase/decrease by creature\_template.damagemodifier. +Modifier used to calculate the damage output of a creature. This field is used if a creature's [exp](creature_template#exp) is set to 1. See [DamageModifier](creature_template#damagemodifier) for more information. ### damage\_exp2 -Max damage This will increase/decrease by creature\_template.damagemodifier. +Modifier used to calculate the damage output of a creature. This field is used if a creature's [exp](creature_template#exp) is set to 2. See [DamageModifier](creature_template#damagemodifier) for more information. ### comment diff --git a/docs/creature_template.md b/docs/creature_template.md index 6e1a49a..7ace1bd 100644 --- a/docs/creature_template.md +++ b/docs/creature_template.md @@ -27,12 +27,11 @@ This table contains the description of creatures. Each spawned creature is an in | [speed_run](#speed_run) | float | NO | | 1.14286 | | Result of 8.0/7.0, most common value | | [scale](#scale) | float | NO | | 1 | | | | [rank](#rank) | tinyint(3) unsigned | NO | | 0 | | | -| [mindmg](#mindmg) | float | NO | | 0 | | | -| [maxdmg](#maxdmg) | float | NO | | 0 | | | | [dmgschool](#dmgschool) | tinyint(4) | NO | | 0 | | | -| [attackpower](#attackpower) | int(10) unsigned | NO | | 0 | | | | [BaseAttackTime](#baseattacktime) | int(10) unsigned | NO | | 0 | | | | [RangeAttackTime](#rangeattacktime) | int(10) unsigned | NO | | 0 | | | +| [BaseVariance](#basevariance) | float | NO | | 1 | | | +| [RangeVariance](#rangevariance) | float | NO | | 1 | | | | [unit_class](#unit_class) | tinyint(3) unsigned | NO | | 0 | | | | [unit_flags](#unit_flags) | int(10) unsigned | NO | | 0 | | | | [unit_flags2](#unit_flags2) | int(10) unsigned | NO | | 0 | | | @@ -42,9 +41,6 @@ This table contains the description of creatures. Each spawned creature is an in | [trainer_spell](#trainer_spell) | mediumint(8) unsigned | NO | | 0 | | | | [trainer_class](#trainer_class) | tinyint(3) unsigned | NO | | 0 | | | | [trainer_race](#trainer_race) | tinyint(3) unsigned | NO | | 0 | | | -| [minrangedmg](#minrangedmg) | float | NO | | 0 | | | -| [maxrangedmg](#maxrangedmg) | float | NO | | 0 | | | -| [rangedattackpower](#rangedattackpower) | smallint(5) | NO | | 0 | | | | [type](#type) | tinyint(3) unsigned | NO | | 0 | | | | [type_flags](#type_flags) | int(10) unsigned | NO | | 0 | | | | [lootid](#lootid) | mediumint(8) unsigned | NO | | 0 | | | @@ -104,15 +100,15 @@ If you look at the database you will notice a very characteristic pattern which #### KillCredit1 -If this is a kill credit template -- one that is a dummy template that is used when more than one creature can count as a kill in a quest, then this is a link to the first [entry](http://www.azerothcore.org/wiki/creature_template#entry) of the creature that could be killed to give quest credit. +If this is a kill credit template -- one that is a dummy template that is used when more than one creature can count as a kill in a quest, then this is a link to the first [entry](#entry) of the creature that could be killed to give quest credit. #### KillCredit2 -If this is a kill credit template -- one that is a dummy template that is used when more than one creature can count as a kill in a quest, then this is a link to the second [entry](http://www.azerothcore.org/wiki/creature_template#entry) of the creature that could be killed to give quest credit. If more than two creatures can be killed and count toward a single objective, an smart or C++ script will be required. +If this is a kill credit template -- one that is a dummy template that is used when more than one creature can count as a kill in a quest, then this is a link to the second [entry](#entry) of the creature that could be killed to give quest credit. If more than two creatures can be killed and count toward a single objective, an smart or C++ script will be required. #### modelidx -A random graphical model that the client applies on this creature. Of course if you specify only one modelid and the rest will be equal to 0, model you have set won't be chosen randomly. This is a [creature_model_info.modelid](creature_model_info) +A random graphical model that the client applies on this creature. Of course if you specify only one modelid and the rest will be equal to 0, model you have set won't be chosen randomly. This is a [creature_model_info.modelid](creature_model_info#modelid) #### name @@ -148,7 +144,7 @@ Used to tell the player what kind of NPC this creature is. #### gossip_menu_id -The gossip ID of this creature. This field is obtained from sniff (update fields). If you can not sniff this value, and need to make one up, it must be > 50000. This field is the link to [gossip_menu.entry](http://www.azerothcore.org/wiki/gossip_menu#entry). +The gossip ID of this creature. This field is obtained from sniff (update fields). If you can not sniff this value, and need to make one up, it must be > 50000. This field is the link to [gossip_menu.MenuID](gossip_menu#menu_id). #### minlevel @@ -233,19 +229,9 @@ The rank of the creature: **Note 1:** An NPC's rank is mostly visual (which also requires your Cache to be cleared to see changes). Changing this value will not change its health, damage, or loot. However, it will change the respawn time of the creature. -**Note 2:** Respawn times can be modified in two other places: [Creature.spawntimesecs](http://www.azerothcore.org/wiki/creature#spawntimesecs) (only for that single GUID of the creature) and in the worldserver.conf file under the "Corpse.Decay" settings (for ALL creatures of the same rank). The default \`spawntimesecs\` for all spawned creatures is 300 seconds (5 minutes). For example, using the ".npc add" command to spawn a "Normal" NPC will give it a default respawn time of 6 minutes (spawntimesecs + Corpse.Decay time). Also, the creature must decay first before it can respawn. For this reason, the Corpse Decay Time of the creature is also it's minimum respawn time, since setting the creature's Creature.spawntimesecs = 0 will remove the Default Respawn Time. In the example above, setting our Normal NPC's spawntimesecs = 0 will mean the creature's respawn time decreases from 6 minutes to 60 seconds. +**Note 2:** Respawn times can be modified in two other places: [Creature.spawntimesecs](creature#spawntimesecs) (only for that single GUID of the creature) and in the worldserver.conf file under the "Corpse.Decay" settings (for ALL creatures of the same rank). The default \`spawntimesecs\` for all spawned creatures is 300 seconds (5 minutes). For example, using the ".npc add" command to spawn a "Normal" NPC will give it a default respawn time of 6 minutes (spawntimesecs + Corpse.Decay time). Also, the creature must decay first before it can respawn. For this reason, the Corpse Decay Time of the creature is also it's minimum respawn time, since setting the creature's Creature.spawntimesecs = 0 will remove the Default Respawn Time. In the example above, setting our Normal NPC's spawntimesecs = 0 will mean the creature's respawn time decreases from 6 minutes to 60 seconds. -**Note 3:** If you want the creature to show a skull or "??" in the portrait (often with Bosses), set the [type_flags](http://www.azerothcore.org/wiki/creature_template#type_flags) to 4. - -#### mindmg - -This is the minimum melee damage. -Modified by DamageModifier. mindmg = mindmg * DamageModifier. - -#### maxdmg - -This is the maximum melee damage. -Modified by DamageModifier. maxdmg = maxdmg * DamageModifier. +**Note 3:** If you want the creature to show a skull or "??" in the portrait (often with Bosses), set the [type_flags](#type_flags) to 4. #### dmgschool @@ -261,10 +247,6 @@ Creature's melee damage school. | 5 | SPELL_SCHOOL_SHADOW | | 6 | SPELL_SCHOOL_ARCANE | -#### attackpower - -Melee attack power used for spells? - #### BaseAttackTime This is the base time that determines how long a creature must wait between melee attacks. This time is in milliseconds. @@ -273,9 +255,21 @@ This is the base time that determines how long a creature must wait between mele This is the base time that determines how long a creature must wait between ranged attacks. This time is in milliseconds. +#### BaseVariance + +Value to customize the creature's damage output. See [DamageModifier](#damagemodifier). + +Non-custom creatures should always leave this at 1. + +#### RangeVariance + +Value to customize the creature's damage output. See [DamageModifier](#damagemodifier). + +Non-custom creatures should always leave this at 1. + #### unit_class -This is the creature's class, and it dictates levels of health and mana. Also note that health and mana will change according to [exp](http://www.azerothcore.org/wiki/creature_template#exp), [HealthModifier](http://www.azerothcore.org/wiki/creature_template#HealthModifier), and [ManaModifier](http://www.azerothcore.org/wiki/creature_template#ManaModifier). Not setting this value will report a minor warning in the "DB_Errors.log". +This is the creature's class, and it dictates levels of health and mana. Also note that health and mana will change according to [exp](#exp), [HealthModifier](#healthmodifier), and [ManaModifier](#manamodifier). Not setting this value will report a minor warning in the "DB_Errors.log". | Value | Name | Power Shown | |-------|----------------|--------------------------------------------------------| @@ -401,36 +395,22 @@ If the NPC is a trainer (has the trainer flag), then this field controls what ki | ID | Type | Related Field | Comments | |----|----------------------------|---------------------------------------------------------------------------------------|---------------------| -| 0 | TRAINER_TYPE_CLASS | [trainer_class](http://www.azerothcore.org/wiki/creature_template#trainer_class) | Trains class spells | -| 1 | TRAINER_TYPE_MOUNTS | [trainer_race](http://www.azerothcore.org/wiki/creature_template#trainer_race) | Trains riding skill | -| 2 | TRAINER_TYPE_TRADESKILLS | [trainer_spell](http://www.azerothcore.org/wiki/creature_template#trainer_spell) | Trains professions | -| 3 | TRAINER_TYPE_PETS | [trainer_class](http://www.azerothcore.org/wiki/creature_template#trainer_class) | Trains pet skills | +| 0 | TRAINER_TYPE_CLASS | [trainer_class](#trainer_class) | Trains class spells | +| 1 | TRAINER_TYPE_MOUNTS | [trainer_race](#trainer_race) | Trains riding skill | +| 2 | TRAINER_TYPE_TRADESKILLS | [trainer_spell](#trainer_spell) | Trains professions | +| 3 | TRAINER_TYPE_PETS | [trainer_class](#trainer_class) | Trains pet skills | #### trainer_spell -If the NPC is a trainer that teaches professions ([trainer_type](http://www.azerothcore.org/wiki/creature_template#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 trainer that teaches professions ([trainer_type](#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](http://www.azerothcore.org/wiki/creature_template#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 [characters.class](http://archive.trinitycore.info/Characters_tc2#class "Characters tc2") +If the NPC is a class trainer or a pet trainer ([trainer_type](#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 [characters.class](characters#class) #### trainer_race -If the NPC is a mount trainer ([trainer_type](http://www.azerothcore.org/wiki/creature_template#trainer_type) = 1), then the player's race must be the same as the value specified here to talk to this trainer. See [characters.race](http://www.azerothcore.org/wiki/characters#race) - -#### minrangedmg - -This is the minimum ranged damage. -Modified by DamageModifier. minrangedmg = minrangedmg * DamageModifier. - -#### maxrangedmg - -This is the maximum ranged damage. -Modified by DamageModifier. maxrangedmg = maxrangedmg * DamageModifier. - -#### rangeattackpower - -Range attack power used for spells? +If the NPC is a mount trainer ([trainer_type](#trainer_type) = 1), then the player's race must be the same as the value specified here to talk to this trainer. See [characters.race](characters#race) #### type @@ -455,7 +435,7 @@ The type of the creature. #### type_flags -This field can control whether a mob is minable or herbable or lootable by engineer. If it is either of those three, then the loot given when it is skinned/mined will be stored in the [skinning_loot_template](http://www.azerothcore.org/wiki/loot_template) table. It also controls, whether this mob can be tamed by a hunter. Other fields have no special meaning on the serverside. The entire field will be send to the client in SMSG_CREATURE_QUERY_RESPONSE +This field can control whether a mob is minable or herbable or lootable by engineer. If it is either of those three, then the loot given when it is skinned/mined will be stored in the [skinning_loot_template](loot_template) table. It also controls, whether this mob can be tamed by a hunter. Other fields have no special meaning on the serverside. The entire field will be send to the client in SMSG_CREATURE_QUERY_RESPONSE | Flag | | Name | Comments | |-----------|------------|------------------------------------------------------|--------------------------------------------------------------------------------------------| @@ -487,15 +467,15 @@ This field can control whether a mob is minable or herbable or lootable by engin #### lootid -The ID of the loot template ID that this creature should use to generate loots. See [creature_loot_template.entry](http://www.azerothcore.org/wiki/loot_template#loot_template-Entry) +The ID of the loot template ID that this creature should use to generate loots. See [creature_loot_template.entry](loot_template#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](http://www.azerothcore.org/wiki/loot_template#loot_template-Entry) +The ID of the pickpocketing loot template that this creature should use to generate pickpocketing loots. See [pickpocketing_loot_template.entry](loot_template#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](http://www.azerothcore.org/wiki/loot_template#loot_template-Entry) +The ID of the skinning loot template that this creature should use to generate skinning loots. See [skinning_loot_template.entry](loot_template#loot_template-entry) #### PetSpellDataId @@ -557,7 +537,7 @@ Controls where the creature can move and attack. (This is a bitmask. You can add values together: 1+4=5 would make the creature walk on ground and fly.) -**Note:** If your vehicle is a flying vehicle then your accessory **MUST** have it's [InhabitType](http://www.azerothcore.org/wiki/creature_template#InhabitType) set to (4 - Flying). This being if you set it for both ground and flying it will spawn on the ground if the vehicle is initially spawned on the ground. +**Note:** If your vehicle is a flying vehicle then your accessory **MUST** have it's [InhabitType](#inhabittype) set to (4 - Flying). This being if you set it for both ground and flying it will spawn on the ground if the vehicle is initially spawned on the ground. #### HoverHeight @@ -577,7 +557,21 @@ Used to modify the base Level/Class armor of a creature. #### DamageModifier -TODO! +Used to modify the Minimum/Maximum damage of a creature. + +The formulas to calculate the damage output are: + +MINDAMAGE = ((([damage_base](creature_classlevelstats#damage_base) + ([attackpower](creature_classlevelstats#attackpower) / 14) * [BaseVariance](#basevariance)) * DamageModifier) * ([BaseAttackTime](#baseattacktime) / 1000)) +MAXDAMAGE = (((([damage_base](creature_classlevelstats#damage_base) * 1.5) + ([attackpower](creature_classlevelstats#attackpower) / 14) * [BaseVariance](creature_template#basevariance)) * DamageModifier) * ([BaseAttackTime](#baseattacktime) / 1000)) + +damage_base comes from the creature_classlevelstats table and takes its value either from [damage\_base](creature_classlevelstats#damage_base), [damage\_exp1](creature_classlevelstats#damage_exp1) or [damage\_exp2](creature_classlevelstats#damage_exp2) according to the creature's value in [exp](#exp) (0 = base_damage, 1 = damage_exp1, 2 = damage_exp2). + +BaseAttackTime is either [BaseAttackTime](#baseattacktime) or [RangeAttackTime](#rangeattacktime) depending on the type of attack. + +attackpower is either [attackpower](creature_classlevelstats#attackpower) or [rangedattackpower](creature_classlevelstats#rangedattackpower) depending on the type of attack. + +BaseVariance is either [BaseVariance](#basevariance) or [RangeVariance](#rangevariance) depending on the type of attack. + #### ExperienceModifier |
