Skip to content

Instantly share code, notes, and snippets.

@fnuecke
Created May 1, 2026 17:02
Show Gist options
  • Select an option

  • Save fnuecke/93c2979279057b61fc0f5d54a3723ab5 to your computer and use it in GitHub Desktop.

Select an option

Save fnuecke/93c2979279057b61fc0f5d54a3723ab5 to your computer and use it in GitHub Desktop.
Diablo 4 Season 13 Loot Filter Protobuf Format
// Protobuf format for Diablo 4 Loot Filters added in Season 13.
syntax = "proto3";
package diablo4;
// Top level message for loot filter codes.
message Filter {
// The name of the rule as shown in the in-game UI.
string name = 2;
// The list of rules in the filter.
repeated Rule rules = 1;
// Unknown fields, maybe a version?
int32 unknown1 = 3; // always 3
int32 unknown2 = 4; // always 3
}
enum Visibility {
VISIBILITY_SHOW = 0;
VISIBILITY_HIDE_TEXT_LABEL = 1;
VISIBILITY_RECOLOR = 2;
VISIBILITY_HIDE_ALL = 3;
}
message Rule {
// The display name of the rule as shown in the in-game ui.
string name = 1;
// Whether the rule is enabled or not.
bool enabled = 5;
// The visibility type of this rule.
Visibility visibility = 2;
// Color as ARGB, highest byte is always FF.
optional fixed32 color = 3;
// The list of conditions in the rule, if any.
// Note that the in-game ui does not allow creating rules with duplicate
// condition types, even though the message format technically allows this.
repeated Condition conditions = 4;
}
enum ConditionType {
CONDITION_TYPE_ITEM_POWER_RANGE = 0;
CONDITION_TYPE_ITEM_RARITY_MATCH = 1;
CONDITION_TYPE_ITEM_PROPERTIES = 2;
CONDITION_TYPE_CODEX_UPGRADE_CHECK = 3;
CONDITION_TYPE_GREATER_AFFIX_CHECK = 4;
CONDITION_TYPE_ITEM_TYPE_MATCH = 5;
CONDITION_TYPE_HAS_REQUIRED_AFFIXES = 6;
CONDITION_TYPE_HAS_OPTIONAL_AFFIXES = 7;
CONDITION_TYPE_IS_SPECIFIC_UNIQUE = 8;
CONDITION_TYPE_TALISMAN_SET_BONUS = 9;
}
message Condition {
// The type of the condition.
// This informs the interpretation of the remaining fields in the message.
// Someone apparently didn't appreciate the oneof feature in protobuf...
ConditionType type = 1;
// Item Power Range:
// value1 := min
// value2 := max
// Item Rarity Match
// value1 := rarity mask {
// Common = 1,
// Magic = 2,
// Rare = 4,
// Legendary = 8,
// Unique = 16,
// Mythic = 32,
// TalismanSet = 64,
// }
// Item Properties
// value1 := property mask {
// None = 1,
// Ancestral = 4,
// }
// Codex Upgrade Check
// value3 := enabled
// Greater Affix Check
// value1 := required number
// value3 := unknown, always 1
// Item Type Match
// params1 := [item type id]
// E.g. Axe = 446801, Bow = 446823, Crossbow = 446825
// Has Required Affixes
// params1 := [affix id]
// E.g. Weapon Damage = 2620563
// params2 := [(greater affix id, greater affix id)]
// value1 := required number
// Has Optional Affixes
// Same as Has Required Affixes
// Is Specific Unique
// params1 := [item id]
// Talisman Set Bonus
// params1 := [set id]
// params2 := [(set id, item id)]
repeated fixed32 params1 = 2;
repeated ConditionParameter params2 = 3;
optional int32 value1 = 4;
optional int32 value2 = 5;
optional int32 value3 = 6;
}
message ConditionParameter {
fixed32 value1 = 1;
fixed32 value2 = 2;
}
@fnuecke
Copy link
Copy Markdown
Author

fnuecke commented May 1, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment