Komegaki / Komegaki-Inventory-Tweaks

This is a mod (similar to "Aura's Inventory Tweaks") that overhauls the SkyUI Inventory visually and literally, through a variety of means like sorting, custom frameworks and thoughtfully made icons.
MIT License
6 stars 0 forks source link

Feature Request: Make Equipped Items and Restorative Potions on Top #1

Open LeavingUndad opened 2 months ago

LeavingUndad commented 2 months ago

Hello! I'd like to make the equipped items to be on top of the inventory lists by default. How should I edit the "interface/skyui/config.txt" file from the latest Pre-release version (V2_1.06_Beta) in order to achieve that? I use the "SkyUI Configs - KIT Sorting - White Text" option, if it matters.

LeavingUndad commented 2 months ago

In order to achieve that I've edited the config.txt file and changed lines 111-118 from

columns.itemIconColumn.state1.label.text = 'KIT'
columns.itemIconColumn.state1.sortAttributes = <itemSortingMaster>
columns.itemIconColumn.state1.sortOptions = {ASCENDING | CASEINSENSITIVE}

columns.itemIconColumn.state2.label.text = '$DispInfoEquippedShort'
columns.itemIconColumn.state2.sortAttributes = <isEquipped, equipState, itemSortingMaster>
columns.itemIconColumn.state2.sortOptions = <{DESCENDING | NUMERIC}, {DESCENDING | NUMERIC}, {ASCENDING | CASEINSENSITIVE}>
columns.itemIconColumn.state2.playerOnly = true

to

columns.itemIconColumn.state1.label.text = '$DispInfoEquippedShort'
columns.itemIconColumn.state1.sortAttributes = <isEquipped, equipState, itemSortingMaster>
columns.itemIconColumn.state1.sortOptions = <{DESCENDING | NUMERIC}, {DESCENDING | NUMERIC}, {ASCENDING | CASEINSENSITIVE}>

columns.itemIconColumn.state2.label.text = 'KIT'
columns.itemIconColumn.state2.sortAttributes = <itemSortingMaster>
columns.itemIconColumn.state2.sortOptions = {ASCENDING | CASEINSENSITIVE}
columns.itemIconColumn.state2.playerOnly = true

Have I done it correctly?

Komegaki commented 2 months ago

Hi! Sorry for the late~ish reply, I will see if I can try to explain how to do this.

So, "KIT Sorting" is what is called a "compound property", it is a bunch of sorting attributes/properties tied into one sorting attribute/property, I made KIT sorting a "compound property" to fix some technical problems with SkyUI (specifically to fix the "teleporting inventory" bug in SkyUI) but doing so also introduced some what I might call "technical limitations". image As you can see from this picture, the "itemSortingMaster" / "KIT Sorting" sorts by "Up" / "Ascending", where as the equipped column thing sorts firstly by "Down" / "Descending", so in this way, if you were to add the "isEquipped" property to KIT Sorting, every single equipped item would be at the bottom of your inventory (To clarify a little, SkyUI sorts equipped items in reverse). You technically could turn KIT Sorting back into multiple sorting properties, but it is probably more time and hassle than it is worth sadly.

Also, I will try to look at my GitHub more often so if you have any questions/feedback/bug reports/comments etc. let me know!

LeavingUndad commented 2 months ago

Hello! I'm not sure that I fully understand your explanation, but I've edited config.txt as I suggested above (basically swapped all values of state1 with the values of state2) and now all equipped weapon(s) and armor are always on top of the related menus by default in my game (inventory/container/barter menu, etc). Not at the bottom.

Honestly I don't like how KIT Sorting for potions places the best health and magicka potions on top and the rest, less effective and minor health and magicka potions somewhere in the middle of the section for potions in the related menus. I'd prefer to see them all grouped together on top, because I prefer to use weak potions first. Like it was in Aura's Inventory Tweaks (AIT), which potion sorting system I find more convenient and reasonable, to be honest.

Other than that I have nothing to report so far. Thanks for your attention and have no worries about the delayed replies. No rush needed, take your time!

GroundAura commented 2 months ago

I think the only difference between AIT's and KIT's potion sorting in that regard is that in KIT separates health/stamina/magicka potions into subsections (restore, fortify, and regen) before sorting by magnitude. It's easier to see with more potions. Try coc qasmoke or use AddItemMenu or something to take another look and see if you still prefer AIT's method.

LeavingUndad commented 2 months ago

@GroundAura Wow, the author of AIT commented here as well, thank you for the reply and for your mod, of course!

Now that I'm thinking more about it I have to admit that maybe the potion sorting mess that I can see when I use the default KIT Sorting mode (modified as I suggested here above) is because I also use the Alchemy Plus mod by Parapets, which renames the homemade potions to the equivalent vanilla potion names. Perhaps KIT separates homemade potions as well.

Anyway here are the screenshots of the Potions section in the inventory of my current character for example: (I've put the restorative health/magicka/stamina potions in blue rectangles to distinguish them easier, as well as the Stats increasing potions - in red rectangles and the regenerative potions - in green rectangles)

Screenshot 1 ![For_KIT_github_Potions_01](https://github.com/user-attachments/assets/38f43658-2ede-4041-a51f-cae67e6b1e9e)
Screenshot 2 ![For_KIT_github_Potions_02](https://github.com/user-attachments/assets/3afffe07-9424-4bb3-ac35-9938b96bd658)
Screenshot 3 ![For_KIT_github_Potions_03](https://github.com/user-attachments/assets/ed51e7c6-8d46-4f5b-9dab-d1858c8fd028)

In any case I can always manually sort the potions by type in order to group the restorative potions together. So it's not a big deal.

Komegaki commented 2 months ago

Hi! Sorry for the late~ish reply again. I reread the first question you had about "Equipped items on top" and I don't think I gave a very good explanation, so I will try to explain it better this time!

Basically, in SkyUI, you have what I call the "Default Sorting Method" and in KIT, you can either choose name sorting or KIT sorting by default. SkyUI has a problem where, if the "Defualt Sorting Method" has more than one "sorting property" attached to it, a problem happens that I call the "SkyUI teleporting inventory bug" more or less. To get around this, I had to turn KIT sorting into what is called a "compound property" which is basically a bunch of sorting properties turned into one sorting property (to get around the "teleporting inventory bug" that I just talked about). So my point being from my original first message, you swapping the "KIT Sorting" and "Equipped items on top" does indeed work, but in doing so, the "Default Sorting Method" has more than one sorting property, so now the "SkyUI teleporting inventory bug" will return. (In my first message I was just trying to explain how you can not "put" the "equipped items on top" stuff into KIT Sorting because SkyUI sorts the "equipped items on top" in reverse, but your method of doing it does work!)

As for the message you just posted, there is a inherent problem with KID (and probably Skyrim as well) where crafted potions do not "inherit" the keywords and data from the magic effect. This is why when you craft a potion, the magic effect on the potion has the correct keywords but it will not "give" those keywords to the potion. (It is a technical issue because KID does the keyword distribution when you start skyrim, and when you create a potion, you are creating the potion mid-game, I hope this makes sense!) I think GroundAura ha talked to po3 (the person who made Keyword Item Distributor) about this problem, but he has not done anything about it (yet) haha.

LeavingUndad commented 2 months ago

@Komegaki Thank you for the very detailed explanations! I think I fully understand now what did you say previously. So either we don't have the teleporting bug, but also can not have the equipped items on top, or we can edit the config.txt to make the equipped items to be on top of the related menus, but in that case we will definitely suffer from the teleporting bug again. I'm not sure what should I stick with in my game then and wish you could find a proper solution without any flaw.

So the crafted potions don't inherit the keywords from the magic effects upon being added to the inventory and it causes the potion sorting mess in the related menus with your mod installed. I see. But could you make the default potion sorting method to be like that in AIT or something like it, please? Because in AIT all restorative potions are always on top of the Potions section in the related menus by default, no matter crafted or not. I hope it will not cause the teleporting bug back again. Maybe it's not possible at all if your mod's potion sorting method totally depends on keywords.

Komegaki commented 2 months ago

About the first half of what you wrote regarding the "teleporting inventory bug", you are correct! Sadly its a "cant have your cake and eat it too" kind of scenario, you can either have the KIT Sorting as the default sorting method, or have the "Equipped items on top" as the default sorting method and have the "teleporting inventory bug" happen. (Also, I uploaded a short video to Youtube demonstrating the "teleporting inventory bug" if you want to watch it)

About the second half of what you wrote, It wont work for wheeler (because in wheeler, the keyword has to be on the actual potion), but did a little testing and I was able to make I4 use the keywords on the potions magic effect instead of the potion keyword on the actual potion its self. So I will see if I can make some of the basic and important potions use the magic effect keywords by the next update of the v2.0 Beta! :)

LeavingUndad commented 2 months ago

Good to know that I've understood you correctly about the teleporting bug and I'm glad to hear that you've found a possible solution to the issue with potion sorting system and are looking how to fix it in the next update!

However it must be said that not everyone uses the Wheeler mod, as you know (for example I don't use it anymore, because I'm tired of constantly refilling its slots and find it unnecessary for me anyway: I didn't use it too much), so the different files for the core mod (for use without the Wheeler mod) and the files made specifically for the Wheeler should be in separate installer folders for the separate options in the FOMOD, shouldn't they? Different files for potion sorting as well, right?

Komegaki commented 2 months ago

As for the first half of your text, I have good news, I got all of the potion framework (except for the stuff like "weakness" poisons because I'm too lazy to add that right now) to work with crafted potions! Will be in the next update, and I will try to publish the update to the GitHub today before I go to bed :)

As for the second half, I wanted the FOMOD to be as easy to install as possible for the end-user so the FOMOD uses a bunch of "flags and conditions" based on the options that you chose in the FOMOD, and then when you finish the FOMOD, it processes all the "flags and conditions" and installs the files based on that. So in other words, what this means is that when you select the "No, I don't use wheeler" option in the FOMOD, it does not install any wheeler files (= Less load time impact if you don't use wheeler)!

As for the very bottom (potion sorting) question, hypothetically I could make a "alternate potion sorting" method for potions and "tie" it to a different KID file, but its something that is not very high on my to-do list for KIT haha.

EDIT: I published the update just now, let me know how it works for you

LeavingUndad commented 2 months ago

Thanks for your efforts and the update, much appreciated, but unfortunately I can't install Kome.Inventory.Tweaks.KIT.zip with its FOMOD wizard because Wrye Bash gives me the same error again. I see in your notes for the release that

"FOMOD is missing some pictures (lol)."

I believe that's why WB fails to install the FOMOD. Could you fix this, please? Because I'm not gonna convert the archive into a BAIN-friendly format instead of FOMOD once again (because it's one hell of a tedious and stupid work and I'm too lazy to do it every time you update the mod). Could you also check if the FOMOD correctly works for you? There might be another error in its wizard besides the missing pictures.

Komegaki commented 2 months ago

By "FOMOD is missing some pictures (lol)." I just mean that some options that should have pictures don't have pictures yet because I have yet to take pictures for those options haha. I always test the FOMOD multiple times before I publish the updates to the GitHub (and nexus as well) and it is working for me just fine. FOMOD's are inherently kind of wacky so, my current guess is that this "Wrye Bash installer" thing does not like these kinds of complex FOMOD's. I have never gotten a single comment about the FOMOD installation having problems in the v2.0 Beta. So my suggestion would be just to install through MO2 even if it is just for this one mod.

LeavingUndad commented 2 months ago

Well, that's unfortunate, but still I don't trust MO2 and I'm not gonna use it just to install one mod while all other mods are installed with WB in the actual Skyrim intallation folder, not in a virtual one. I'm afraid of possible issues. Maybe I will try MO2 and your mod once again when I'll have to reinstall Skyrim and all its mods in the future.

Sorry, but for now I haven't other choice but to use AIT once again, its FOMOD works perfectly with WB.

LeavingUndad commented 2 months ago

You've really fixed the error in the FOMOD wizard in the new V2_1.071_Beta Pre-release and now it works fine with WB without any error! Thank you! I'll test it later today and report back ASAP...

Komegaki commented 2 months ago

image For some reason, my FOMOD creator generated these like, "empty blocks" of xml. MO2 must not care about these empty "blocks" in the XML (the empty blocks are harmless) but my guess is that probably Vortex and your Wyre Bash Installer thing must just cancel the installation when it saw the empty blocks. When they posted that on the nexus page I checked those lines in the FOMOD and was pretty easy to fix! image

LeavingUndad commented 2 months ago

Well, that was ridiculous indeed! Anyway thank you also for letting me know what was causing the error! It might be useful for a future reference if I encounter a similar issue with another mod's FOMOD.

Komegaki commented 2 months ago

Yeah it is quite strange that something as small as that would make installations fail with Vortex and the WB Installer. If you ever have this kind of issue with another mod's FOMOD, this "ModuleConfig.xml" file controls like 95% of the FOMOD (the "info.xml" is just for information like author name and FOMOD version etc.) image

LeavingUndad commented 2 months ago

Yeah, I know, but thanks anyway!

EDIT: When I convert a mod with not working FOMOD into a BAIN-friendly format I often consult the ModuleConfig.xml file in order to be sure to do it correctly.

Komegaki commented 2 months ago

Ahh I see! Not your first time working with a FOMOD xml then! Just wanted to make sure you knew where to look in case this kind of thing happens again for you haha!

LeavingUndad commented 2 months ago

Yeah, thanks again! If not you I'd never know that empty blocks in ModuleConfig.xml can fail the entire installation process in WB, what a joke!

It must be said though that converting FOMOD into a BAIN-friendly installer might not be always possible, because unlike FOMOD installers, BAIN-friendly installers don't support the complex folder structure for the installation options. Option folders in a BAIN-friendly installer must be always in the root of the archive and have an index number in their names as prefix. So FOMOD installers are definitely better and superior to BAIN-friendly installers and now I'm really considering to switch to MO2 when I reinstall Skyrim and all its mods in the future in order to be able to install FOMODs without any installation issue and never have the need to make such conversions.

Komegaki commented 2 months ago

Learning and using MO2 is much better for modding in the long term I think! Its worth it in my eyes :)

LeavingUndad commented 2 months ago

Well, I've tested a bit the latest Pre-release you've uploaded just a couple of hours ago (with a fix for Vortex) and can confirm that your new potion sorting system is significantly better and is more convenient for me. The health/stamina/magicka potions are grouped together and (kinda) on top of the related menus, but several other potions still precede them nevertheless. So far I can confirm that these potions win the "top" priority in the lists: Bittercup (from the CC's addition under the same name), Philter of the Phantom (from the well-known quest of a "haunted" Barrow near Ivarstead), Potion of Blood (where did I get 3 of them?), Potion of Night Eye (where did I get it?).

Also it seems that some icons are not colored at all in comparison to the icons of the same items with AIT, despite that the plugins of other I4 icon mods (including yours) are definitely loading after both BOOBIES_ImmersiveIcons.esp and KIT.esp almost near the very bottom in my load order according to the LOOT. For example the arrow icons are all white, although they appear colored with AIT.

EDIT: Sorry, my bad: only the icons of Fire, Frost and Lightning Arrows (from the CC's additions) are colored with AIT and white with KIT:

Icons of CC's Arrows with AIT ![For_KIT_github_Arrows_01](https://github.com/user-attachments/assets/bdd4512d-2753-47b2-88a4-19566db5b828)

Other icons are okay and colored (or not) the same as with AIT, it only seemed to me that they are left unchanged in comparison to AIT, but I was wrong, sorry again!

Komegaki commented 2 months ago

I'm glad you like the potion sorting haha! That is the way it was intended to work! The potions at the very top of the KIT sorting and have the subtype "Special" are just kind of weird or special potions, and I labeled them as such.

For the Bittercup, I actually have never checked it! So I will check on that tomorrow. For philter of the phantom, I think I labeled it as "special"? I will have to double check that as well tomorrow (as well as checking the night eye potion). As for the potion of blood, it took me a minute to figure out why it was receiving the "generic yellow" color but I finally figured it out haha, I will just make a restriction in the KID file so that things that are technically "health potions" cant receive the "drink" keyword in the next version. image

As for the elemental arrows not having special colors (or icons), I was going to add that, I just never got to it haha! I will put that in in the next version!

EDIT: Small clarification note, with KIT Sorting, the only potions that should be above the "Healing" potions are the ones that have the type/subtype "Special"

LeavingUndad commented 2 months ago

I see, thanks for the detailed explanations!

If I recall it correctly Bittercup, Philter of the Phantom and Potion of Blood have their type defined as "Special" indeed in SkyUI's Type column with KIT installed. But Potion of Night Eye is defined there simply as "Potion" for some reason. Btw, I've just discovered that Bittercup is also at the very top of the related menus with AIT installed and preceeds health, magicka and stamina potions as well (I didn't pay attention to it before).

I think that such "Special" potions should have a high "top" priority indeed, but still follow the health, magicka and stamina potions in the lists, because usually the restorative potions are used much more often than all other potions counted together.

Glad to hear that the colored icons for the elemental arrows are not omitted and you just haven't enough time to implement them! Sorry for being so impatient, I didn't want to make you haste!

EDIT: Now I remember how I got it: I brewed the Potion of Night Eye mixing two rare ingredients exclusive to the CC's additions.

Komegaki commented 1 month ago

Sorry for the late~ish reply again haha! I did not work on KIT very much this week, but I added and changed most of what you talked about in your last comment in the latest beta release :)

LeavingUndad commented 1 month ago

Hi! No need to be sorry again and again - I fully understand that the real life has priority, of course, and that sometimes your hobby of modding Skyrim needs to be delayed because of it.

Anyway thank you for the update in the newest pre-release version of the mod and for implementing all of my wishes, much appreciated! I've just tried it a bit and everything looks good and solid now, including potion sorting system and the colored icons for the elemental arrows. Well, my old Potion of Night Eye that I previously mentioned still goes before H/M/S potions and has a simple icon (with no custom symbol attached to it), but I think that nothing can be done about it because I had brewed it before I even started to use AIT and then your mod, so its icon and type can not be changed anymore, I guess. Perhaps I should sell and forget it.

I've noticed one more thing and it bothers me a little: the icon of my waterskins from the Sunhelm mod is not blue-colored anymore (as it is in SkyUI and in AIT for example), was it intended to be so? I see it's a different icon and honestly I can live without it to be colored in any case. I'm just asking to be sure.

Komegaki commented 1 month ago

The Potion of Night Eye is still a normal icon? I will try to craft one myself to see why that is happening haha!

As for the waterskins I have not thought about consumable stuff like waterskins yet (Only have added support for CC camping items more or less) so I will try to add more support for consumable items in the next update!

LeavingUndad commented 1 month ago

I think you shouldn't even bother about my Potion of Night Eye - I think it somehow bugged in my game upon creation, because I've examined it more closely and OMG it has 1205 secs. of duration! WTH?! What CC's ingredients can produce a potion with such a long duration? Well, I think that explains why its icon is simple and its type is "Potion" despite everything (it stays the same with AIT too).

Thanks for looking at adding more support for the consumables in the next update!