API:2/traits

From Guild Wars 2 Wiki
Jump to navigationJump to search

/v2/traits

HTTP method
GET
Format
json
API version
version 2
Release date
2015-09-03
Scope
none
Optional
none

This resource returns information about specific traits which are contained within specializations.

Parameters

  • lang – Request localized information.

Response

If the root endpoint (/v2/traits) is accessed without specifying an id, a list of all ids is returned. When multiple ids are requested using the ids parameter, a list of response objects is returned.

For each requested item id, an object with the following properties is returned:

  • id (number) – The trait id.
  • name (string) – The trait name.
  • icon (string) – The trait's icon URL.
  • description (string) – The trait description.
  • specialization (number) – The id of the specialization this trait belongs to.
  • tier (number) – The trait's tier (Adept, Master, Grandmaster) as a value from 1-3. Elite specializations also contain a tier 0 minor trait, describing which weapon the elite specialization gains access to.
  • slot (string) – Either Major or Minor depending on the trait's slot. Minor traits are the ones given immediately when choosing a specialization.
  • facts (array, optional) – A list of tooltip facts associated with the trait itself. (See below.)
  • traited_facts (array, optional) – A list of additions or changes to tooltip facts where there is interplay between traits. (See below.)
  • skills (array, optional) – A list of skills which may be triggered by the trait. (See below.)

Skills

All objects returned within a skills array contain the following properties:

  • id (number) – The ID of the skill.
  • name (string) – The name of the skill.
  • description (string) – The description of the skill.
  • icon (string) – The URL for the icon of the skill.
  • facts (array, optional) – A list of tooltip facts associated with the skill. (See below.)
  • traited_facts (array, optional) – A list of additions or changes to tooltip facts where there is interplay between traits. (See below.)

Traited Facts

All objects returned within a traited_facts array contain the same properties as a facts object, but they additionally have the following properties:

  • requires_trait (number) – Specifies which trait has to be selected in order for this fact to take effect.
  • overrides (number, optional) – This specifies the array index of the facts object it will override, if the trait specified in requires_trait is selected. If this field is omitted, then the fact contained within this object is to be appended to the existing facts array.

Facts

All objects returned within a facts array contain the following properties:

  • text (string, optional) – An arbitrary localized string describing the fact. Not included with all facts.
  • icon (string, optional) – A URL to the icon shown with the fact. Not included with all facts.
  • type (string) – Defines what additional fields the object will contain, and what type of fact it is. Can be one of the following:
    • AttributeAdjust
    • Buff
    • BuffConversion
    • ComboField
    • ComboFinisher
    • Damage
    • Distance
    • NoData
    • Number
    • Percent
    • PrefixedBuff
    • Radius
    • Range
    • Recharge
    • Time
    • Unblockable

AttributeAdjust

{
  text: "Attribute Adjust",
  type: "AttributeAdjust",
  icon: "url",
  value: 150,
  target: "CritDamage"
}
  • value (number) – The amount target gets adjusted, based on a level 80 character at base stats.
  • target (string) – The attribute this fact adjusts. Note that a value of Healing indicates the fact is a heal, and Ferocity is encoded at CritDamage.

Buff

{
  text: "Apply Buff/Condition",
  type: "Buff",
  icon: "url",
  duration: 5,
  status: "Vulnerability",
  description: "Damage and condition damage taken are increased; stacks intensity.",
  apply_count: 1
}
  • status (string) – The boon, condition, or effect referred to by the fact.
  • description (string, optional) – The description of the status effect.
  • apply_count (number, optional) – The number of stacks applied.
  • duration (number, optional) – The duration of the effect in seconds. Note that some facts of this type are just used to display the buff icon with text; in this case, duration is usually 0, or omitted entirely.

BuffConversion

{
  text: "Attribute Conversion",
  type: "BuffConversion",
  icon: "url",
  percent: 10,
  source: "Toughness",
  target: "ConditionDamage"
}
  • source (string) – The attribute that is used to calculate the attribute gain.
  • percent (string) – How much of the source attribute is added to target.
  • target (string) – The attribute that gets added to.

ComboField

{
  text: "Combo Field",
  type: "ComboField",
  field_type: "Ethereal"
}
  • field_type (string) – The type of field. One of: Air, Dark, Fire, Ice, Light, Lightning, Poison, Smoke, Ethereal, Water.

ComboFinisher

{
  text: "Combo Finisher",
  type: "ComboFinisher",
  percent: 100,
  finisher_type: "Blast"
}
  • finisher_type (string) – The type of finisher. One of: Blast, Leap, Projectile, Whirl.
  • percent (number) – The percent chance that the finisher will trigger.

Damage

{
  text: "Damage",
  type: "Damage",
  icon: "url",
  hit_count: 1
}
  • hit_count (number) – The amount of times the damage hits.

Distance

{
  text: "Radius",
  type: "Distance",
  icon: "url",
  distance: 180
}
  • distance (number) – The distance value.

NoData

{
  text: "Combat Only",
  type: "NoData",
  icon: "url"
}

This fact is usually used to display the Combat Only fact, but it can be used elsewhere.

Number

{
  text: "Conditions Removed",
  type: "Number",
  icon: "url",
  value: 3
}
  • value (number) – The number value as referenced by text.

Percent

{
  text: "Health Threshold",
  type: "Percent",
  icon: "url",
  percent: 25
}
  • percent (number) – The percentage value as referenced by text.

PrefixedBuff

{
  text: "Apply Buff/Condition",
  type: "PrefixedBuff",
  icon: "url",
  duration: 20,
  status: "Might",
  description: "Increased outgoing damage; stacks intensity.",
  apply_count: 1,
  prefix: {
    text: "Apply Buff/Condition",
    icon: "url",
    status: "Fire Attunement",
    description: "Cast fire spells."
  }
}

This fact contains the same info as the buff fact, but includes an additional prefix object that describes the icon to show before the fact.

Radius

{
  text: "Radius",
  type: "Radius",
  icon: "url",
  distance: 180
}
  • distance (number) – The radius value.

Range

{
  text: "Range",
  type: "Range",
  value: 150
}
  • value (number) – The range of the trait/skill.

Recharge

{
  text: "Recharge",
  type: "Recharge",
  value: 40
}
  • value (number) – The recharge time in seconds.

Time

{
  text: "Duration Increase",
  type: "Time",
  icon: "url",
  duration: 2
}
  • duration (number) – The time value in seconds.

Unblockable

{
  text: "Unblockable",
  type: "Unblockable",
  value: true
}
  • value (boolean) – Always true.

Example

https://api.guildwars2.com/v2/traits/214

{
  "id": 214,
  "tier": 2,
  "order": 1,
  "name": "Raging Storm",
  "description": "Critically striking a foe grants fury. Gain ferocity while under the effects of fury.",
  "slot": "Major",
  "facts": [
    {
      "text": "Recharge",
      "type": "Recharge",
      "icon": "https://render.guildwars2.com/file/D767B963D120F077C3B163A05DC05A7317D7DB70/156651.png",
      "value": 3
    },
    {
      "type": "AttributeAdjust",
      "icon": "https://render.guildwars2.com/file/0658D833944E69E62E08EB18A0B5407F722125BC/2229320.png",
      "value": 180,
      "target": "CritDamage"
    },
    {
      "text": "Apply Buff/Condition",
      "type": "Buff",
      "icon": "https://render.guildwars2.com/file/96D90DF84CAFE008233DD1C2606A12C1A0E68048/102842.png",
      "duration": 2,
      "status": "Fury",
      "description": "Critical Chance increased by 20%; stacks duration.",
      "apply_count": 1
    }
  ],
  "specialization": 41,
  "icon": "https://render.guildwars2.com/file/74A414B378B54431EF183A37DA37CCFFFC0E04BD/2175040.png"
}

https://api.guildwars2.com/v2/traits/265

{
  "id": 265,
  "tier": 2,
  "order": 0,
  "name": "Arcane Resurrection",
  "description": "Cast Geyser when you begin reviving a downed ally. Geyser now partially revives downed allies. When you begin reviving an ally, you gain an aura based on your attunement.",
  "slot": "Major",
  "facts": [
    {
      "text": "Recharge",
      "type": "Recharge",
      "icon": "https://render.guildwars2.com/file/D767B963D120F077C3B163A05DC05A7317D7DB70/156651.png",
      "value": 20
    },
    {
      "text": "Apply Buff/Condition",
      "type": "PrefixedBuff",
      "icon": "https://render.guildwars2.com/file/2E7050E44690AFE0A396FA0DAD526699392743F3/2261521.png",
      "duration": 5,
      "status": "Fire Aura",
      "description": "Enveloped in a fiery shield that burns foes, grants might each time you are struck (1-second cooldown per attacker).",
      "apply_count": 1,
      "prefix": {
        "text": "Apply Buff/Condition",
        "icon": "https://render.guildwars2.com/file/1C91E9C799469ACC6EAF1ACD4B0AD8ACAB0C69A2/103035.png",
        "status": "Fire Attunement",
        "description": "Cast fire spells."
      }
    },
    {
      "text": "Apply Buff/Condition",
      "type": "PrefixedBuff",
      "icon": "https://render.guildwars2.com/file/719B80E35C276D68EF0AABB79126CF4CD42E3AF6/2261522.png",
      "duration": 5,
      "status": "Frost Aura",
      "description": "Chill foes that strike you (only once per second for each attacker); incoming damage is reduced by 10%.",
      "apply_count": 1,
      "prefix": {
        "text": "Apply Buff/Condition",
        "icon": "https://render.guildwars2.com/file/737E1B9F7855B9F5D3DE1C990CD42118EF3D1C92/102820.png",
        "status": "Water Attunement",
        "description": "Cast water spells."
      }
    },
    {
      "text": "Apply Buff/Condition",
      "type": "PrefixedBuff",
      "icon": "https://render.guildwars2.com/file/79F60BF40AB3F306E7367CF3479A4163F76F3944/2261527.png",
      "duration": 5,
      "status": "Shocking Aura",
      "description": "Stun nearby attacking foes with an electric shock (only once per 2 seconds for each attacker).",
      "apply_count": 1,
      "prefix": {
        "text": "Apply Buff/Condition",
        "icon": "https://render.guildwars2.com/file/4857F59020DE3B0950B9C91F3D234A1C1932984A/103048.png",
        "status": "Air Attunement",
        "description": "Cast air spells."
      }
    },
    {
      "text": "Apply Buff/Condition",
      "type": "PrefixedBuff",
      "icon": "https://render.guildwars2.com/file/33D27C7FE0017F70749DE84576F56F381DDF0C30/2261524.png",
      "duration": 5,
      "status": "Magnetic Aura",
      "description": "Reflect projectiles with magnetic energy.",
      "apply_count": 1,
      "prefix": {
        "text": "Apply Buff/Condition",
        "icon": "https://render.guildwars2.com/file/4B8056D9BD080DC8E74AE6A57B2B383A2D4265C9/102870.png",
        "status": "Earth Attunement",
        "description": "Cast earth spells."
      }
    }
  ],
  "traited_facts": [
    {
      "text": "Apply Buff/Condition",
      "type": "PrefixedBuff",
      "icon": "https://render.guildwars2.com/file/2E7050E44690AFE0A396FA0DAD526699392743F3/2261521.png",
      "duration": 7,
      "status": "Fire Aura",
      "description": "Enveloped in a fiery shield that burns foes, grants might each time you are struck (1-second cooldown per attacker).",
      "apply_count": 1,
      "requires_trait": 340,
      "prefix": {
        "text": "Apply Buff/Condition",
        "icon": "https://render.guildwars2.com/file/1C91E9C799469ACC6EAF1ACD4B0AD8ACAB0C69A2/103035.png",
        "status": "Fire Attunement",
        "description": "Cast fire spells."
      },
      "overrides": 1
    }
  ],
  "skills": [
    {
      "name": "Geyser",
      "facts": [
        {
          "text": "Range",
          "type": "Range",
          "icon": "https://render.guildwars2.com/file/0AAB34BEB1C9F4A25EC612DDBEACF3E20B2810FA/156666.png",
          "value": 1200
        },
        {
          "text": "Recharge",
          "type": "Recharge",
          "icon": "https://render.guildwars2.com/file/D767B963D120F077C3B163A05DC05A7317D7DB70/156651.png",
          "value": 20
        },
        {
          "text": "Healing",
          "type": "AttributeAdjust",
          "icon": "https://render.guildwars2.com/file/D4347C52157B040943051D7E09DEAD7AF63D4378/156662.png",
          "value": 552,
          "target": "Healing"
        },
        {
          "text": "Duration",
          "type": "Time",
          "icon": "https://render.guildwars2.com/file/7B2193ACCF77E56C13E608191B082D68AA0FAA71/156659.png",
          "duration": 4
        },
        {
          "text": "Interval",
          "type": "Time",
          "icon": "https://render.guildwars2.com/file/B75E91EB22E0DFCC1D08030204055946506D56F6/1770206.png",
          "duration": 1
        },
        {
          "text": "Revive Percentage",
          "type": "Percent",
          "icon": "https://render.guildwars2.com/file/9352ED3244417304995F26CB01AE76BB7E547052/156661.png",
          "percent": 7
        },
        {
          "text": "Revive Percentage",
          "type": "Percent",
          "icon": "https://render.guildwars2.com/file/9352ED3244417304995F26CB01AE76BB7E547052/156661.png",
          "percent": 1
        },
        {
          "text": "Number of Targets",
          "type": "Number",
          "icon": "https://render.guildwars2.com/file/BBE8191A494B0352259C10EADFDACCE177E6DA5B/1770208.png",
          "value": 5
        },
        {
          "text": "Combo Field",
          "type": "ComboField",
          "icon": "https://render.guildwars2.com/file/59E0DB6A699810641C959926ADFEF73E08CC255B/156655.png",
          "field_type": "Water"
        }
      ],
      "description": "Create a geyser to heal nearby allies.",
      "icon": "https://render.guildwars2.com/file/4CCE5E636B2FCD33495780FB1BCD02A3666DEEBC/103290.png",
      "flags": [],
      "id": 5782,
      "chat_link": "[&BpYWAAA=]"
    }
  ],
  "specialization": 37,
  "icon": "https://render.guildwars2.com/file/E9BCF655FA539C1B0A1FDDCB52947542A1C6704B/1012285.png"
}