LiteMount

LiteMount

2M Downloads

xmog: Conditional seems to be broken

Sherlockell opened this issue ยท 34 comments

commented

Following up here with a bug report as per our recent conversation on Reddit;

I'm configuring Litemount so that when I switch to a transmog gear set, Litemount will change the mount group with it. I looked in advanced and saw that I could do it with xmog:outfitname but when I'm switching gear set the rule that sits above the other takes precedence.

Heres a screenshot of how I have it set up (the rules in question being 7 and 8);
image

I want the black group to apply ONLY if i'm wearing the 'Blue Reaper' mog and the Gold group to be used ONLY if i'm wearing the 'Brushed Gold' mog. Currently Litemount only seems to mount the group of the highest rule, irrespective of what xmog I'm wearing.

Here is the bug export:
https://pastebin.com/YPfrH3VT

commented

According to the debug output it believes your main hand weapon does not match the xmog.

Edit: does it make any difference if you sheath/unsheath your weapon?

commented

Here's what I did to try to reproduce it, starting from default rules and no transmog sets.

  1. Create a transmog outfit 'Pink Reaper' which is just a the monk mythic tier (it's pink hence the name).
  2. Create a transmog outfit 'Gold Reaper' which is the monk heroic tier (a bit gold this is a stretch).
  3. Add a rule matching Transmog Pink Reaper action Random Mount Swift Pink Hawkstrider.
  4. Add a rule matching Transmog Gold Reaper action Random Mount Lightforged Warframe.
  5. Apply 'Gold Reaper' transmog.
  6. Activate litemount. Do it multiple times. Reload do it some more. Log out and in do it again.
  7. No matter what I do always activates Lightforged Warframe.
  8. Apply Pink Reaper outfit .
  9. Activate litemount a heap of times. Always summons the Swift Pink Hawkstrider.
  10. Switch back to Gold Reaper transmog. No reload or anything since (9).
  11. Activate LiteMount. Always summons the Lightforged Warframe.

image
image

Edit: change "set" to "outfit" for better accuracy.

commented

I can do some more testing, I just tried disabling all addons with only Litemount enabled as I suspected there may be an addon conflict but that didn't seem to help either. The behaviour is the same as I described.

I can stream to you on Discord perhaps if that is easier? or try record whats happening. Not sure how much help that'll be

commented

Could the fact I'm using 'Smart Priority Mount' potentially cause an issue? I noticed you're using Random Mount

commented

Not by the look of your debug output. I chose that because I'm sitting in Valdrakken and so it would only use Dragonriding mounts with Smart Priority Mount and I wanted the two that obviously matched the names.

From your second debug output it just looks like you aren't wearing that xmog any more the second time around. Does it still show as ticked in the outfits menu? Do you have some other addon that might be interfering? Or something that is changing your equipment around?

commented

Yeah well I run a fair amount of addons so my first step to troubleshoot was to disable them all, but the behaviour persists. it's very strange as I've even moved the rules to the top, like you and can't see what else I would be doing wrong.

These are with all my addons enabled;
image
image
Bug export: https://pastebin.com/EGxgG8Pv

And this is with all addons except Litemount disabled. Weirdly it works even less for me with everything else disabled, and wont even summon the mount the first time. Just random mounts every time;

image
Bug export: https://pastebin.com/nDSZDZyi

It's almost like it detects me initially wearing the correct mog, then something happens that makes Litemount think I'm no longer wearing it.

commented

I suspect there is still an issue that the fact that my gear is half what I'm xmogging to anyway is covering up somehow.

commented

Are you able to edit a text file? Can you try replacing the IsTransmogOutfitActive function in the file _retail_\Interface\AddOns\LiteMount\Conditions.lua with this one with extra debug (and one logic change that could be the fix):

local function IsTransmogOutfitActive(outfitID)
    LM.Debug('Looking for outfit ' .. tostring(outfitID))
    local outfitInfoList = C_TransmogCollection.GetOutfitItemTransmogInfoList(outfitID)
    if not outfitInfoList then return end

    LM.Debug('Found outfit pulling down current equipment xmog')
    local currentInfoList = LM.Environment:GetPlayerTransmogInfo()
    if not currentInfoList then return end

    LM.Debug('Comparing each slot in current equipment')
    for slotID, info in ipairs(currentInfoList) do
        if not info:IsEqual(outfitInfoList[slotID]) then
            if info.appearanceID ~= Constants.Transmog.NoTransmogID then
                LM.Debug(' - slot ' .. slotID .. ' NO MATCH RETURN FALSE')
                return false
            else
                LM.Debug(' - slot ' .. slotID .. ' is NoTransmogID')
            end
        else
            LM.Debug(' - slot ' .. slotID .. ' matches')
        end
    end
    return true
end
commented

This is a copy of the whole file with the change in it https://pastebin.com/TnaWcWzT

Edit: if you are able to do this please give the new debug output after causing the issue.

commented

Still the same issue sadly mate.

image
Outfit still equipped.

Bug report: https://pastebin.com/di99Qgj8

commented

Sure one moment

commented

Thanks for this I'll have a look into it as soon as I can.

commented

Edit: never mind this I found the bug.

I'm not sure what to make of this, it looks like it's working from your debug output:

Dispatching rule SmartMount [xmog:Blue Reaper,class:PALADIN] Black
 - filters: Black
 - filtered list contains 3 mounts
 - trying Flying Mount
 - found 2 mounts.
 - PriorityRandom n=2, t=0.667, c=0.385
 - setting action to mount Infinite Timereaver
 - found matching rule 7

Decoding this:

LiteMount correctly detected that you're a paladin and wearing the Blue Reaper xmog (rule 7 matched).
It attempted to mount something from the "Black" group which contains 3 usable mounts.

You're in a flying area so it restricted to flying mounts and found 2 such mounts, then randomly chose one, Infinite Timereaver.

Which part of this is the bug, what did you expect to happen differently?

commented

Perhaps it is not correct that you were in the Blue Reaper xmog at the time?

commented

xmog: condition is definitely broken and is always returning true for all player-made outfits.

I'll get a fix out as soon as I can do some testing.

commented

Hey mate, sounds like you've cracked it already.

I tested with multiple different mog sets/groups to be sure but Litemount would always select whatever rule was higher in priority. This logic would seem to make sense, now that you've confirmed any xmog conditional is returning true.

Thanks for looking at this so quickly! ;D

commented

Should be fixed in LiteMount 10.1.5-6 which is packaging itself up now.

commented

Awesome will test soon and report back!

commented

Hello again, so good news it seems to be working! Albeit partially. For whatever reason it seems to work once when i first login or on reload. Litemount correctly summons the correct gold mount, from the 'Gold' group while wearing the 'Brushed Gold' mog. However consecutive attempts to mount result in just mounting random mounts from my collection.

I also tried changing mog to the Blue Reaper which should then let me mount from my 'Black' group but it kept summoning random mounts. This then repeated the same behaviour after a reload, mounting the correct mount in the group before going back to summoning random mounts again.

My rules look like this;
image
image

This is my bug export; https://pastebin.com/HwyWEJxq
And another after i switched to 'Blue reaper' mog: https://pastebin.com/caxjfLq0

Thanks again!

commented

I don't think I can reproduce this one, as far as I can tell it's working consecutively for me.

commented

Ok so I think it's working now!!

After you said it believes the weapon doesn't match the xmog I decided to change the weapon mog, save the mog, then change it back and save it again. Now Litemount appears to be selecting the correct mogs from the correct groups!! :D

Still very odd how everything from my end and even default blizz UI was saying the mog was equipped, but apparently the equipped mog wasn't matching the outfit mog. Even though it was visually.

Shall I switch back to the old Conditions.lua? or am I good to keep this one? Other than that think you're good to mark this closed. Will be trying plenty mog/mount group combos over the coming days so will report back if any more issues.

Thanks again for your help and time

commented

That is very very strange. I can't say I'm fully happy about it though I'm glad you have something working.

The problem is that as far as I know I'm using exactly the same logic to detect whether the outfit is equipped that Blizzard is using for the check mark on the drop down. I essentially copied it straight from them. I really am at a loss to know how the two things could be different.

You may as well keep the updated Conditions.lua for now. I have another fix to release for transmog (blizzard) sets from other classes so I'll need to put out a new version soon anyway, which will overwrite it. I'll keep the logic change but I'll probably remove the debugging again.

I think you may well have more problems since I don't feel I've gotten to the bottom of this. I'll leave this open for now. Appreciate all your debugging help.

commented

Just thinking out loud here, but what if the explanation to this is due to saving outfits in other specs. Apparently for the Blizzard logic to show a check mark, you dont actually need to be in that spec. For example, everything was working great for me on ret after re-saving my outfits. Now I've changed to Holy and the check mark still shows, but Litemount doesn't recognise the xmog and my groups no longer work;

image
image
Bug report: https://pastebin.com/T1g0Pvrf

Perhaps you could disable the logic that looks for xmog in weapons/sword/shield/offhand and this would fix this issue? Probably easier said than done but I'd imagine this is what's caused it. Maybe I saved the original 'Brushed Gold' mog as Holy all that time ago, so when I was trying to use in in Litemount as Retribution it didn't work. In any case if you are able to disable the check on weapons etc, then I'd appreciate it since I would like to retain Litemount functionality while playing all my specs.

And of course more than happy to continue helping debug/troubleshoot. Although I'm about to sleep for a few hours.

Cheers!

commented

And switching back to Holy immediately after caused my Litemounts to start working again like before btw

commented

I think the Blizzard logic is just plain wrong :(

image

Changed spec and only half in the right gear but it's still checked.

commented

I don't think LiteMount is doing anything wrong. In the sense that it follows the Blizzard logic and checks that every item in your equipment matches the outfit appearances.

Blizzard has some problems.

They're definitely not updating the appearance check when you respec properly, so the box stays ticked even if you aren't wearing the outfit. I can see this easily myself (e.g., screenshot above) and also if I reselect the outfit from the menu it will apply a bunch of things -- clearly not already applied. In your case the weapon is part of the outfit and you weren't transmogged to it after respeccing, so despite the (buggy) checkbox you weren't wearing that outfit.

Perhaps you could disable the logic that looks for xmog in weapons/sword/shield/offhand and this would fix this issue?

That's not the problem. In fact that would make things much harder for people to understand, since they're part of the outfit.

I don't know why Blizzard lets you apply a transmog outfit with a weapon appearance that can't be applied. Or what it does with the "is this outfit applied or not" check if you do. Clearly if the outfit appearance is a staff you can't apply that to a 1h mace. They definitely don't exclude any slots in their check that I can see. I suspect it applies what it can but the check will never pass (even if the check box on the menu is buggy).

On the whole, I am leaning towards taking outfit support out. I'm not sure Blizzard have thought it through sufficiently for it to actually work. But I'll keep pondering maybe something will occur.

commented

Weirdly enough it is possible to create an outfit with no weapon it in by not having one equipped when you save the outfit. It's a shame there's no UI (at least that I can see) for excluding slots like there is with equipment sets.

Unfortunately the way the Blizzard logic is done that has no effect on whether the outfit "matches" what you're currently wearing or not, and looks like it will make the outfit only match if you also are not currently wearing a weapon. I can fix that in my code though if it turns out to helpful.

commented

Afternoon mate, wow it seems like you've done a fair bit of digging overnight.

So I tried editing my 'Brushed Gold' set by removing the weapon mog on the outfit and saving, so that the outfit had a weapon included but it wasn't mogged at all. I then switched to Holy spec and oddly enough the same behaviour came back. Where it would mount the correct mount once, then revert to summoning random mounts.

I then tried make a new mog set called 'Gold' with all weapons removed, but now for whatever reason, that outfit set isn't showing in Litemount to select from;
image
image
I tried reloading, logging in and out. But still it won't list the new, no weapon 'Gold' outfit, bug export: https://pastebin.com/VxwSxVdp

"Clearly if the outfit appearance is a staff you can't apply that to a 1h mace. They definitely don't exclude any slots in their check that I can see. "

This is true for normal weapons, but for Artifact appearances, I believe you can mog 1H's to things like staffs and vice versa

Like you said, It seems Blizzards logic for how they decide whether an outfit is equipped or not seems broken. However I would really like to retain this feature if possible, as it does work now, albeit partially, provided I don't change spec once the mog's equipped.

Is there anyway you can make Litemount ignore the weapon/shield mog check? And instead return true to the mog being equipped if all other slots are present? I think for most users it will only ever be the weapons that change when they change spec. Or they will change to a different mog entirely for the other spec and therefore can/will summon mounts from a different ruleset and group.

Around all day to be a test bitch if you need me to try anything, and thanks again :D

commented

Actually, it appears both the 2 new mog outfits I made are not appearing in the list of outfits in Litemount.

image
image

commented

Blizzard supports a maximum of 20 outfits. You can't create or store more than that. It's not surprising that your 21st and 22nd outfits don't show. Whatever other addons you are using are obviously enhancing the outfit interface somehow. I'm afraid whatever that is I can't support it.

image
Add outfit button is gone after 20 are created.

commented

Is there anyway you can make Litemount ignore the weapon/shield mog check? And instead return true to the mog being equipped if all other slots are present? I think for most users it will only ever be the weapons that change when they change spec. Or they will change to a different mog entirely for the other spec and therefore can/will summon mounts from a different ruleset and group.

I think this is probably a reasonable approach without any Blizzard support for excluding slots from outfits, since it mostly matches up with how people will think about the premade sets which don't include weapons or offhands.

I'm going to ponder this a bit, and facing the sad reality of having a job and a minimum semblance of a life I probably won't have anything new to report until the weekend.

This is my best untested guess at a replacement IsTransmogOutfitActive function that would exclude main/offhand:

-- This makes me want to kill myself instantly.
-- See WardrobeOutfitDropDownMixin:IsOutfitDressed()

local ExcludeOutfitSlot = {
    [INVSLOT_MAINHAND] = true, [INVSLOT_OFFHAND] = true, [INVSLOT_RANGED] = true,
}

local function IsTransmogOutfitActive(outfitID)
    local outfitInfoList = C_TransmogCollection.GetOutfitItemTransmogInfoList(outfitID)
    if not outfitInfoList then return end

    local currentInfoList = LM.Environment:GetPlayerTransmogInfo()
    if not currentInfoList then return end

    for slotID, info in ipairs(currentInfoList) do
        if not ExcludeOutfitSlot[slotID] and not info:IsEqual(outfitInfoList[slotID]) then
            if info.appearanceID ~= Constants.Transmog.NoTransmogID then
                return false
            end
        end
    end
    return true
end

Edit: minor fix sorry

commented

Hey mate apologies only just got around to testing.

You were correct, I think a transmog addon I had extends past the default 20 outfits. Needed to cut down on some of them anyway ;D

The change you made above seems to be working perfectly! Although it's not an ideal solution I appreciate you taking the time to ship a workaround. Suppose I shouldn't be surprised that Blizzards shoddy code made this such a headache, but hopefully, other users will be happy with this change/fix too.

Will report if I come across any issues but thanks again

commented

Thanks for checking. It doesn't seem to have caused any issues, but I'll let it run a bit longer and hopefully put out a release with it included on Friday or Saturday.

commented

Should be there in 10.5.1-8. Thanks again for your help.