• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Resource System Graphic Support Filter (Maps)

Anything to do with the resource system. Bundles, resources, upload, search.

Remixer

Map Reviewer
Level 31
Joined
Feb 19, 2011
Messages
1,957
Update the Graphics support filter on map search. Currently ticking one of the fields makes the system include the maps that have only that mode enabled, while I would argue the logical function should be that if that selected graphics mode is supported, it will be included (thus maps that support both SD and HD would be visible if one of them is ticked). Currently leaving them both unticked is the same as ticking them both. Should users also be able to exclude maps of a selected graphics style somehow (in case both are supported)?
 
Last edited:

Remixer

Map Reviewer
Level 31
Joined
Feb 19, 2011
Messages
1,957
What exactly are you missing? Sorry if I’m being thick.
Imagine a user who doesn't have reforged, and instead can only play with classic graphics. He would like to see maps that are supporting SD graphics - it does not matter if the maps also have a support for HD mode.

Filtering for this should occur by ticking "SD" field, but now, what happens instead is that the Hive will display maps that are supported ONLY by SD graphics mode, hiding all the maps that support SD and HD mode.
 

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,101
I just had a look at the code:
PHP:
        // Graphics support
        $graphics = $this->getFilter($filters, 'graphics');
        if ($graphics) {
            $sd = !empty($graphics['sd']);
            $hd = !empty($graphics['hd']);
            $sum = $sd + $hd;
            // We ignore it if both are ticked
            if ($sum && $sum != 2) {
                $graphicsInt = [];
                if ($sd && $hd) {
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_SD_AND_HD;
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_NONE;
                } elseif ($sd) {
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_SD_ONLY;
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_NONE;
                } elseif ($hd) {
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_HD_ONLY;
                }
                $query->withMetadata('graphics_mode', $graphicsInt);
            }
        }

So what you want is probably to always include this line:
PHP:
$graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_SD_AND_HD;

So hybrid maps are never hidden.
 

Remixer

Map Reviewer
Level 31
Joined
Feb 19, 2011
Messages
1,957
So hybrid maps are never hidden.
I see the logic in the code, but it seems to be still lacking the option to achieve the filter so that it includes all maps that have support for SD.
If I tick no field, I will see all maps, regardless of graphics support.
If I tick SD, I will see maps that have support only for SD graphics.
If I tick HD, I will see maps that have support only for SD graphics.
If I tick both, I will see maps that have support fort both graphic styles.

But, what I want to see is SD+HD and SD, which seems impossible to filter for now. I hope I am explaining it correctly, not trying to be thick here either. 😅

I would imagine there are also people who want to play only with HD graphics so they would want to filter out maps that are SD only (so filter for SD+HD and HD.

Edit: (Perhaps what you meant by including SD+HD was exactly what I just explained above, so users could indeed tick SD+HD + SD)
 

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,101
If I tick HD, I will see maps that have support only for SD graphics.
I think this was an error.
Edit: (Perhaps what you meant by including SD+HD was exactly what I just explained above, so users could indeed tick SD+HD + SD)
That’s it exactly. I believe it’s how the flags in-game work. That’s what I’m working with here.

This would be the change:
PHP:
        // Graphics support
        $graphics = $this->getFilter($filters, 'graphics');
        if ($graphics) {
            $sd = !empty($graphics['sd']);
            $hd = !empty($graphics['hd']);
            $sum = $sd + $hd;
            // We ignore it if both are ticked
            if ($sum && $sum != 2) {
                $graphicsInt = [];
                if ($sd && $hd) {
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_SD_AND_HD;
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_NONE;
                } elseif ($sd) {
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_SD_AND_HD;
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_SD_ONLY;
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_NONE;
                } elseif ($hd) {
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_SD_AND_HD;
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_HD_ONLY;
                }
                $query->withMetadata('graphics_mode', $graphicsInt);
            }
        }

I'm still not sure about this one:
PHP:
if ($sd && $hd) {
Typically people expect more results by selecting all options, but this one reduces.
 
Last edited:

Remixer

Map Reviewer
Level 31
Joined
Feb 19, 2011
Messages
1,957
I think this was an error.
It was indeed.
This would be the change:
I guess that works, though it would not let people filter for HD+SD + HD maps. Optimally there could be third option HD+SD, so players could tick for hybrids and individual support - such Hybrid+SD support.
Typically people expect more results by selecting all options, but this one reduces.
At the same time it's redundant to have two same options (empty and both ticked).
 

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,101
I might need more feedback on this.
PHP:
        // Graphics support
        $graphics = $this->getFilter($filters, 'graphics');
        if ($graphics) {
            $sd = !empty($graphics['sd']);
            $hd = !empty($graphics['hd']);
            // We ignore it if both are ticked
            if ($sd || $hd) {
                $graphicsInt = [];
                if ($sd && $hd) {
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_SD_AND_HD;
                } elseif ($sd) {
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_SD_AND_HD;
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_SD_ONLY;
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_NONE;
                } elseif ($hd) {
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_SD_AND_HD;
                    $graphicsInt[] = Warcraft3Map::GRAPHICS_MODE_HD_ONLY;
                }
                $query->withMetadata('graphics_mode', $graphicsInt);
            }
        }

If you tick both SD and HD, you only get hybrid maps and no pre-Reforged maps (They are never HD).

If you tick SD, you get SD maps as well as hybrid maps and pre-Reforged maps.

If you tick HD, you get HD maps as well as hybrid maps, no pre-Reforged maps.
 

Remixer

Map Reviewer
Level 31
Joined
Feb 19, 2011
Messages
1,957
I would say that it is most common that people look for maps that are playable regardless of graphics mode.

And then, second most probable case is that they look for map types supported by specific graphics mode.

Only after those two people look exclusively SD or HD maps, but that's just my hunch.

I guess it is not possible to implement third tick field for including hybrids maps.

So
[ ✓ ] SD and HD
[ ✓ ] SD only
[ - ] HD only

Would display hybrid maps as well as SD-only maps.
 

Remixer

Map Reviewer
Level 31
Joined
Feb 19, 2011
Messages
1,957
I feel like the version I presented above makes the most sense.

Don't forget if you tick nothing, you find everything.
Yeah, the solution you mentioned above covers the current issue of being unable to see hybrid maps together with individual support, which I think is the main 'issue'.

Thanks for the attention on this topic.
 

Remixer

Map Reviewer
Level 31
Joined
Feb 19, 2011
Messages
1,957
I guess from functional perspective there is little difference between having them radio or checkbox.
The only difference I could think is:
No selected: All maps.
SD selected: Pre-Reforged, Hybrid, SD
HD selected: Hybrid, HD
SD and HD selected: Only hybrid

But I have to say that that iteration would not be any more clear for users, so ultimately I think they might as well be radio buttons.

I still emphasize that the biggest fix is to make the filter inclusive, rather than exclusive.
 
Top