As the title says. I have something like this:
Component A
Component B1
Subcomponent B
Require_Predicate (Mod_Is_Installed ~theMod~ ~Component A~) ~necessary stuff~
Component B2
Subcomponent B
So my weidu.log might look like this:
The problem is when I try to uninstall. I run the mod installer, tell it to uninstall Component A, and then, because the predicate for both subcomponents of Component B is not met, it does not offer me the chance to interact with it. But, neither does it uninstall the subcomponent. So B2 remains installed - at least, as far as Weidu is concerned, anyway - even though the requirement for it to be installed is not met.
With normal mod components, if I uninstall the first component, it will uninstall all subsequent components. Then because the requirement is not met for the later component, it will be skipped and will not be installed. Which is as it should be. For some reason, subcomponents do not seem to behave this way.
The only way I can seem to uninstall them is this:
- Uninstall Component A - this leaves Component B2 installed. Close the Terminal.
-
Install Component A - now it is installed out of order, my weidu log looks like this:
That should be impossible, but there it is. Anyway now it allows me to:
- Uninstall Component B2, then uninstall Component A.
This is annoying enough to test mods, but my real fear is that it will wreak havoc with players who are less adept at managing their mods. Right now I am resorting to removing all predicates and using them to wrap the entire Component B1/B2 in an ACTION_IF condition so that nothing will happen if the requirement is not met. But this means players will see it even if they shouldn't. Not ideal.
Any suggestions? Or thoughts about improving this behavior to be consistent with non-SUB components with Require_Predicate?
EDIT - on searching, I see that
there has been some development in this area recently. Sounds like it is probably devilishly difficult and involves a lot of complex permutations. I guess the improvement that seems ideal here would be: when an earlier component is uninstalled, usually all later components get uninstalled too. Here, this subcomponent is somehow left installed when the earlier component gets uninstalled. If the subcomponent were uninstalled (not currently happening), then the predicate will prevent user interaction to reinstall it (this part is currently working) and all would be well. So maybe (?) it's an easy-ish fix.