API:2/traits

From Guild Wars 2 Wiki
Jump to: navigation, 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,
  "name": "Aeromancer's Training",
  "description": "Gain precision while attuned to air. Reduces recharge on all air weapon skills.",
  "slot": "Major",
  "specialization": 41,
  "icon": "https://render.guildwars2.com/file/A747E59680760ACDDEAACBD053BF3C7F1A335919/1012274.png",
  "facts": [
    {
      "text": "Recharge Reduced",
      "type": "Percent",
      "icon": "https://render.guildwars2.com/file/9352ED3244417304995F26CB01AE76BB7E547052/156661.png",
      "percent": 33
    },
    {
      "text": "Precision Increase",
      "type": "AttributeAdjust",
      "icon": "https://render.guildwars2.com/file/E1E7C4D3A6E62F3D5C9F627CE8175BFB0C614CBE/156652.png",
      "value": 190,
      "target": "Precision"
    }
  ],
  "traited_facts": [
    {
      "text": "Ferocity Increase",
      "type": "AttributeAdjust",
      "icon": "https://render.guildwars2.com/file/E1E7C4D3A6E62F3D5C9F627CE8175BFB0C614CBE/156652.png",
      "value": 190,
      "requires_trait": 396,
      "target": "Precision"
    }
  ]
}