Xinaths / QuickArmorRebalance

A Skyrim SKSE utility to easily edit and distribute the contents of custom armor mods.
Other
3 stars 2 forks source link

Feature: <ALL> in Mod Selector #1

Open ech3lon42 opened 2 months ago

ech3lon42 commented 2 months ago

I hope it's okay to open a feature request like this.

QAR already provides the <Currently Worn Armor> selector in the Mod selection Dropdown.

Would it be possible to also add an <ALL> selector, which simply lists all found armor pieces (or weapons) and lets us use the awesome and already existing filter function to filter through the entire list of armors/weapons?

I've tried to add this myself and managed to build the sources, however I'm a bit lost when it comes to C++ to be honest.

Something like this is what I had in mind, but I'm not quite sure how/where to add the proper UI Elements:

auto dataHandler = RE::TESDataHandler::GetSingleton();
for (auto i : dataHandler->GetFormArray<RE::TESObjectARMO>()) {
    if (!IsValidItem(i)) continue;
    if (bFilterModified && (g_Data.modifiedItems.contains(i) || g_Data.modifiedItemsShared.contains(i)))
        continue;
    if (*itemFilter && !StringContainsI(i->GetFullName(), itemFilter)) continue;

    params.items.push_back(i);
}

The ability to filter by slot would also be amazing, e.g. by including checkboxes for the usual slotmasks.

feature

Xinaths commented 2 months ago

Adding it is fairly simple, but I feel it introduces a lot of potential problems from misuse:

All that said, I'm not super opposed to adding it as a "Use at your own risk" option.

As for filtering by slots, it is a good idea that I will add in the next version.

ech3lon42 commented 2 months ago

You are right about everything. Although the performance drop is not too bad for me, even with (probably) thousands of armor sets.

I think this has so much potential to serve as a replacement for AddItemMenu and Equipment Managers. I just couldn't ignore that. It's really cool to be able to filter for certain slots (or exclude items that match certain slots). It's a huge time saver to search through all mods quickly. AddItemMenu is very slow in comparison.

But I do understand if you wouldn't want to include it as part of this particular mod.

Anyway, my attempt to contribute something: https://github.com/Xinaths/QuickArmorRebalance/pull/2