Combined Loot + Highlight Filter

Completely WIP - currently not functional

You can access your filters either through the in-game lootfilter window or locally in your saves folder at %localappdata%/Hero_Siege/hs2saves they are named like lootfilter_<name>.txt. Base64 encoded.
Editing your filter in-game is decently fast and convenient enough that I probably won't be updating this any time soon. Below is an explanation of the format in case someone else wants to build a tool around it.
Your filter is a Base64 encoded JSON object, looking something like this:
Decoded it looks like this:
{
  "version": 2,
  "t0": {
    "tr4": {
      "hls": [
        75
      ]
    },
    "soc": 59,
    "tr1": {
      "hs": [
        75
      ]
    }
  },
  "wtc": 260959
}

Item Slot Keys

t0
Helmet
t1
Chest
t2
Boots
t3
Weapon
t4
Gloves
t5
Amulet
t6
Shield
t7
Ring
t8
Belt
t10
Charm
t11
Consumable
t12
Key
t13
Collectible
t14
Material
t15
Socketable
t18
Vial
wtc for currently enabled weapon types (see below for more info)
version is the filter version, currently 2

Tier Keys

tr0
Tier D
tr1
Tier C
tr2
Tier B
tr3
Tier A
tr4
Tier S
and a soc for socket count (see wtc below for more info)

Tier Modifier Arrays

Each tier can have the following arrays (list) with the IDs for specific stats/affixes:
hs
Disabled Modifier List
hsl
Highlighted Modifier List

Stat ID to Stat Map

The ID to Stat Map looked like this, it is possible that some shifts have occurred:

Weapon Type Number (wtc) & Sockets (soc)

Pos
Weapon Type
0
Item
1
Sword
2
Dagger
3
Mace
4
Axe
5
Claw
6
Polearm
7
Chainsaw
8
Staff
9
Cane
10
Wand
11
Book
12
Spellblade
13
Bow
14
Gun
15
Flask
16
Throwing
17
Novelty
Weapon Type Number is the numeric representation on what weapon types are currently enabled in the filter.
It is a bitfield where each bit represents a different weapon type.
Most numbers in the filter are represented in this way. Sockets soc are handled the same way, with the index representing the socket count (add one)

      wtc = 262015                        // example value
      wtc.toString(2).split('').reverse() // binary representation of the number
      => ['1', '1', '1', '1', '1', '1', '1', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1']
           0    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17  positions
      
Each position represents a weapon type (see table on the left), 1 = enabled, 0 = disabled