Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Selector ReplacePassives doesn't work #107

Open
arnaudpourbaix opened this issue May 1, 2024 · 0 comments
Open

Remove Selector ReplacePassives doesn't work #107

arnaudpourbaix opened this issue May 1, 2024 · 0 comments

Comments

@arnaudpourbaix
Copy link

arnaudpourbaix commented May 1, 2024

I have trying to remove these 2 selectors:
ReplacePassives(7f7340a0-faf3-4122-bd3f-37a5434dd6cf,1,TotemWarriorPassiveReplace);SelectPassives(fb9ea4a2-a1ce-4242-a893-84a088ac1145,1,AspectOfTheBeast)

function removeSelector(target, type, uuid) 
    return {
        {
            modGuid = "",
            FileType = "Progression",
            TargetUUID = target,
            Function = type,
            ListUUID = uuid
        }
    }
end

    Mods.SubclassCompatibilityFramework.Api.RemoveSelectors(Mods.RAWaddon.removeSelector("8013e565-55a5-4847-8ebc-e2971e25151e", "ReplacePassives", "7f7340a0-faf3-4122-bd3f-37a5434dd6cf"))
    Mods.SubclassCompatibilityFramework.Api.RemoveSelectors(Mods.RAWaddon.removeSelector("8013e565-55a5-4847-8ebc-e2971e25151e", "SelectPassives", "fb9ea4a2-a1ce-4242-a893-84a088ac1145"))

RemovePassives produces this error:
Error while dispatching event StatsLoaded: [string "SubclassCompatibilityFramework/CompatibilityS..."]:101: Property does not exist: resource::Progression::ReplacePassives - property does not exist stack traceback: [C++ Code]: in metamethod '__index' SubclassCompatibilityFramework/CompatibilitySupport/Queue.lua:101: in field 'Commit_SelectorRemoval' SubclassCompatibilityFramework/CompatibilitySupport/Queue.lua:134: in field 'CommitFeatsAndProgressions' SubclassCompatibilityFramework/CompatibilitySupport/Queue.lua:4: in field 'Commit' SubclassCompatibilityFramework/Init/_InitDefaults.lua:4: in function <SubclassCompatibilityFramework/Init/_InitDefaults.lua:1> [C++ Code]: in function 'xpcall' builtin://Libs/Event.lua:129: in method 'Throw' builtin://Libs/Event.lua:184: in function <builtin://Libs/Event.lua:183>

It is rather strange because they both share the same syntax. I have added a lot of traces and it seems that ReplacePassives needs UUID instead of ListUUID. However, while it doesn't produce an error, removal is not effective but it produces a strange behavior in game.

With both lines commented:
image

ReplacePassives is Change Bestial Heart and SelectPassives is Animal Aspect.

With only removal of SelectPassives:
image

It has correctly removed Animal Aspect but Change Bestial Heart is now titled as Class Passives. So it works, but it doesn't seem very clean with these side effects.
If I comment SelectPassives and play only with RemovePassives paramters (UUID), I can eventually have an errorless code. But in game, I will still have my replace passive screen, but it will be titled as Class Passives.

It might be related to this issue: #102

Removal code seems to overlap with other selectors, although I don't fully understand what can produce this side effect.
And there is also this error about ReplacePassives.
I have also tried with JSON format, but same issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant