I'm sorry, but the in-game filter is a far cry from D2stats

Discuss Median XL!
User avatar
Fushuan
Destroyer
6 | 5
Common Supporter Badge
Donated 1 time
whist wrote:So let me get this straight, the in-game filter is a far cry from d2stats because you can't simply grab a config file from another tool that isn't maintained by us and drop it in as is? Also, the .json config isn't meant to be edited manually as text, as you've already found out it's gonna contain some codes that aren't easily human-readable, you're meant to use the in-game config UI.


Yeah, I'm planning to make a simple conversor that changes regex based hide rules into single item code based hide rules. It's gonna be long and not what the new one is intended for. The new UI allows for finer filtering and defined (but not publicly specified) group based filtering. The only way to convert from the old to the new is to take all the item codes and to throw the lines to see which items would be hidden, and to create singular hide rules for all of them to then paste at the end of the json array. Not pretty but usable so that people finally are able to transition I guess?

I agree that having shows for important items like rare jewelry and all TU/set/SSU/SSSU or quest items and then a blanket hide, or area/item level based progressive hides and then a blanket hide would fit 99.99% of demands, but some people are set on their ways of hiding stuff, so if I can make a simple conversor, if ugly, I think it would help them.

Also, I'm more of a fan of editing files than UIs but I agree that the file having item or class codes is better for maintainability. In any case, it's not gonna be pretty.
User avatar
Fushuan
Destroyer
6 | 5
Common Supporter Badge
Donated 1 time
So, I coded the abomination. It's kinda slow because it needs to write that many rules, with your "simple" rules it has to apply the regex and bruteforce a whopping +500 hide rules! I have not tested if it's 100% accurate even.

It's incomplete but I don't think that it's viable to expand it. You have filters for "normal superior magic sacred", but the new filter has separate normal, superior, magic and rare, with sacred being its own field. I assumed that you wanted to hide/show everything, but in theory it should create a hide rule per rarity, or a hide rule for all and a show rule for the ones that are lacking, depending on what's newer rules. Problem is that that's x4-5 the amount of rules, so from a 11 lines oif filter it becomes a monster of 2000-2500. You clearly don't want that.

In any case, I coded the thing so whatever.

I'm also not allowed to link links for spam protection so replace spaces with dots.

https://enpinzolas.github.io/d2stats2mxlconv/
Gelgsus
Prowler
18 | 0
Common Supporter Badge
Donated 1 time
Fushuan wrote:So, I coded the abomination. It's kinda slow because it needs to write that many rules, with your "simple" rules it has to apply the regex and bruteforce a whopping +500 hide rules! I have not tested if it's 100% accurate even.

It's incomplete but I don't think that it's viable to expand it. You have filters for "normal superior magic sacred", but the new filter has separate normal, superior, magic and rare, with sacred being its own field. I assumed that you wanted to hide/show everything, but in theory it should create a hide rule per rarity, or a hide rule for all and a show rule for the ones that are lacking, depending on what's newer rules. Problem is that that's x4-5 the amount of rules, so from a 11 lines oif filter it becomes a monster of 2000-2500. You clearly don't want that.

In any case, I coded the thing so whatever.

I'm also not allowed to link links for spam protection so replace spaces with dots.

https://enpinzolas.github.io/d2stats2mxlconv/

Muchas Gracias! This is awesome! Will test and report back.
Milkshake
Abomination
157 | 19
Common Popularity Badge
Has a thread with over 10.000 views
whist wrote:So let me get this straight, the in-game filter is a far cry from d2stats because you can't simply grab a config file from another tool that isn't maintained by us and drop it in as is? Also, the .json config isn't meant to be edited manually as text, as you've already found out it's gonna contain some codes that aren't easily human-readable, you're meant to use the in-game config UI.


Yes..? That's exactly why it's objectively worse, IMO. I personally didn't get the need for the in-game one when D2stats worked pretty well. I wouldn't even care if the patch that released it didn't break the filter on d2stats.

When it first happened, I kind of just sucked it up and accepted that filtering was going to be worse. Now, thanks to Azadi and his map, I'm going to work on a much easier way to generate a json filter.

TBH, I have less issue with the way to write show/hide rules, but more that the UI is kinda janky (scroll doesn't work, lots of clicks to add similar rules, etc).
Edited by Milkshake 17 hours.
Milkshake
Abomination
157 | 19
Common Popularity Badge
Has a thread with over 10.000 views
Fushuan wrote:So, I coded the abomination. It's kinda slow because it needs to write that many rules, with your "simple" rules it has to apply the regex and bruteforce a whopping +500 hide rules! I have not tested if it's 100% accurate even.

It's incomplete but I don't think that it's viable to expand it. You have filters for "normal superior magic sacred", but the new filter has separate normal, superior, magic and rare, with sacred being its own field. I assumed that you wanted to hide/show everything, but in theory it should create a hide rule per rarity, or a hide rule for all and a show rule for the ones that are lacking, depending on what's newer rules. Problem is that that's x4-5 the amount of rules, so from a 11 lines oif filter it becomes a monster of 2000-2500. You clearly don't want that.

In any case, I coded the thing so whatever.

I'm also not allowed to link links for spam protection so replace spaces with dots.

https://enpinzolas.github.io/d2stats2mxlconv/


Ah, you beat me to it!

Yeah, I was kinda anticipating those issues, and are exactly why I refused to create it manually (2000 lines are extremely difficult to maintain).

I'll check it out!

Edit: Looks pretty good! But yeah, I'm going to strip the non-sacred lines out and hide all non-sacred items using the GUI to make the json more manageable.

Code: Select all

# Read the JSON file
$json = Get-Content "d2filter.json" -Raw | ConvertFrom-Json

# Filter the rules array
$json.rules = $json.rules | Where-Object {
    $_.params.name -match "\(Sacred\)"
}

# Save the filtered JSON back to file
$json | ConvertTo-Json -Depth 100 | Set-Content "d2filter.json"
Milkshake
Abomination
157 | 19
Common Popularity Badge
Has a thread with over 10.000 views
whist wrote:So let me get this straight, the in-game filter is a far cry from d2stats because you can't simply grab a config file from another tool that isn't maintained by us and drop it in as is? Also, the .json config isn't meant to be edited manually as text, as you've already found out it's gonna contain some codes that aren't easily human-readable, you're meant to use the in-game config UI.


To give more context:

I created the following filter with Fushuan's help. I hid all sacred bases that I think are bad and I want to avoid using. I then also added hide magic sacred, hide magic jewelry, hide magic quivers, hide common runes (no idea which are considered 'common'), hide all t1/2/3/4, hide gold, hide gems, show flawless/perf max res gems.

https://pastebin.com/dfmpNGdz

I'm sure I'll still have more I want to hide (and then possibly override with shows) once I test the filter more, but this is a LOT to manage, especially if I want to make quick changes on the fly. The changes are difficult to do in the UI, and exporting to JSON is unreadable.

I get the desire to make a useful in-game filter, but it's so much more difficult to use than D2stats. And it killed the filtering of d2stats, so now we're stuck with the worse product. Not saying this to be hurtful, but to give helpful feedback.
Milkshake
Abomination
157 | 19
Common Popularity Badge
Has a thread with over 10.000 views
Uploaded the HideBadItems filter on the Filter Exchange (removed show resis gems) if anyone wants to use it as a base.

https://www.median-xl.com/filters/index ... w&id=12267