API and Dye Channel Definitions — Guild Wars 2 Forums
Home API Development

API and Dye Channel Definitions

Looking at 3 pieces of gear on a single character, I see no decipherable way to figure out the dye channels.

Chest Skin 109
Character dyes
0 - 1638
1 - 1636
2 - null
3 - 1577

Skin Override (human female)
0
1
2 - Null
3

3 channels 1 across the top 2 on bottom

pattern suggest
02
13

Helmet Skin - 8365
Character Dyes
0 - 1638
1 - 1638
2 - 1155
3 - 1638

Overrides - none
default
0
1
2
3 - null

This one 2 has 3 channels 1 span on top 2 on bottom

03
12

Pants 110
0 - 1638
1 - 1636
2 - 1638
3 - 1577

override (human female)
4 channels

01
23

Is there something I am missing on how to determine which dye belongs to which dye channel?
It seems if the dyes could be 0/1 on top and 2/3 on bottom, using a null in the second or other spanned dye channels could easily help determine something to match in game.

Comments

  • Maybe this just seems like rambling so a more specific example:
    from the API call https://api.guildwars2.com/v2/skins/8365

    {
    "name": "Elegy Coronet",
    "type": "Armor",
    "flags": [
    "ShowInWardrobe"
    ],
    "restrictions": [],
    "rarity": "Basic",
    "id": 8365,
    "icon": "https://render.guildwars2.com/file/3E14010117E51ABE61BCCBD89440FC66EDD30CAF/2038914.png",
    "details": {
    "type": "Helm",
    "weight_class": "Light",
    "dye_slots": {
    "default": [
    {
    "color_id": 18,
    "material": "cloth"
    },
    {
    "color_id": 25,
    "material": "leather"
    },
    {
    "color_id": 315,
    "material": "leather"
    },
    null
    ],
    "overrides": {}
    }
    }
    }

    We can see there are 3 channels so 1 of the channels is spanned. How do we know if this is the top 2 or the bottom 2 channels? This particular one is the top 2.

    {
    "name": "Illustrious Doublet",
    "type": "Armor",
    "flags": [
    "ShowInWardrobe"
    ],
    "restrictions": [],
    "rarity": "Basic",
    "id": 109,
    "icon": "https://render.guildwars2.com/file/6E0C12721BAA5E343813DE9F2C7EFE064AECCE0A/699212.png",
    "details": {
    "type": "Coat",
    "weight_class": "Light",
    "dye_slots": {
    "default": [
    {
    "color_id": 1,
    "material": "cloth"
    },
    {
    "color_id": 1,
    "material": "cloth"
    },
    {
    "color_id": 1,
    "material": "cloth"
    },
    null
    ],
    "overrides": {
    "HumanFemale": [
    {
    "color_id": 1,
    "material": "cloth"
    },
    {
    "color_id": 1,
    "material": "leather"
    },
    null,
    {
    "color_id": 1,
    "material": "metal"
    }
    ],
    "NornFemale": [
    {
    "color_id": 1,
    "material": "cloth"
    },
    {
    "color_id": 1,
    "material": "leather"
    },
    null,
    {
    "color_id": 1,
    "material": "metal"
    }
    ],
    "SylvariFemale": [
    {
    "color_id": 1,
    "material": "cloth"
    },
    {
    "color_id": 1,
    "material": "leather"
    },
    null,
    {
    "color_id": 1,
    "material": "metal"
    }
    ]
    }
    }
    }
    }

    https://api.guildwars2.com/v2/characters/Nècrótic?access_token=[my_api_key]
    (edited to the important portions only)

    "equipment": [
    {
    "id": 48079,
    "slot": "Coat",
    "upgrades": [
    73399
    ],
    "skin": 109,
    "binding": "Account",
    "dyes": [
    1638,
    1636,
    null,
    1577
    ]
    },
    },
    {
    "id": 48081,
    "slot": "Helm",
    "upgrades": [
    73399
    ],
    "skin": 8365,
    "binding": "Account",
    "dyes": [
    1638,
    1638,
    1155,
    1638
    ]
    },

    Is there documentation somewhere, or a way to tell what dye goes where?

  • I continue to work on figuring this out.
    It seems using default unless override exist I get 95% working under the following assumption.
    3 dye channels: Dye order runs top left, bottom left, bottom right, then top right.
    4 dye channels: Dye order runs top left, top right, bottom left, then bottom right.
    Not sure why there different, but this catches most but not all all.

    Cultural armor seems to present a lot of issues. Overrides for races that can't wear the armor, the dyes being returned add in dyes, there are miss matches between number of dyes being returned and the default channels, and some random out of order issues, I haven't been able to pin down.

    Another issue is "Dye Remover" is returned as null instead of a dye which doesn't leave a way to distinguish a dye channel from not having a dye and a dye channel not existing.

    If a developer is going to look at this I can provide 30 - 40 pieces that don't follow a standard pattern out of 250+ sampled armor pieces. Otherwise I will just live with "As good as it gets" for this application I am tinkering with.