tsunamods-codes / 7th-Heaven

The Ultimate Mod Manager for Final Fantasy VII PC
https://7thheaven.rocks/
Microsoft Public License
129 stars 25 forks source link

[Feature Request] Possibility to CHECK if mod is active and/or DISABLE mod if some option is active. #97

Open LaZar00 opened 2 years ago

LaZar00 commented 2 years ago

I was asking if It could be possible to CHECK if a mod is active in Compatibilty section, and then Forbid or Request some features of the own mod to be active or inactive.

Let's say I want to Check if Ninostyle Chibis .IRO is installed and active. If it is not active, I would like to have active mandatory the Kaldarasha models mod, for example.

<Compatibility> 
<Setting>
<CheckActive ModID="05d57b82-b506-4097-aeb6-cca0062f2a43">Chibi Ninostyle</CheckActiveModID>
<MyID>modelsKaldarasha</MyId>
<Forbid>1</Forbid>  (or <Request>0</Request>
</Setting>
</Compatibility> 

With this, we could enable/disable options in our mod knowing if other mod is active or not.

We could do something similar by DISABLING a mod if some of the options of our mod is enabled or something:

<Compatibility>
    <Setting>
      <MyID>MySettingVariable</MyID>
      <MyValue>1</MyValue>
      <Disable ModID>fae201ee-9fa5-4163-ab56-2b478111449d</ModID>
    </Setting>
</Compatibility>

But these are only suggestions.

I'm asking this because if one of the compatibility checks of our mod means that another mod needs to have an option with a precise value, BUT, that mod is not installed, the check is not performed and it is not useful.

julianxhokaxhiu commented 2 years ago

Did you check if anything already implemented for Compatibility fits your needs? I think what you're asking is exactly <Forbid> and <Require>. LMK

LaZar00 commented 2 years ago

I checked the <Forbid> and <Require>, and AFAIK they can not help to activate/deactivate all the mod by a specific option. You can use <Forbid> and <Require> for activate/deactivate another option of the mod, but not ALL the mod itself.

A sample of situations I found doing my mods that I don't know how to solve:

Even more, we can use <Forbid> and <Require> but if the mod we are making the condition it is not installed or it is inactive, the condition has not effect. I expected to do the first situation with this but it is not possible.

I hope I explained well with my poor english.

Right now the solution I found for doing this is to add sections to my mod and leave the user activate or deactivate them without checking anything.

wturner859 commented 2 years ago

I've thought about this same thing before because it currently makes it impossible for new mods to properly set compatibilities. It falls to the older mod to do...

What you're basically saying is: right now you can require and forbid settings in someone else's mod based on your mod's settings, but you can't require and forbid your own settings based on someone else's mod's settings...

The problem that could arise if it's enabled both ways is that you could end up in a deadlock between authors...

If you set one of your settings to turn off if my mod is enabled, what happens if I set your option to turn on when my mod is enabled?

I believe if anything, it should be completely reversed, not exchangeable... You should be able to require or forbid your own options based on other mods, instead the other way around (the way it currently is)

julianxhokaxhiu commented 2 years ago

Seems like more and more mods (and modders) require this. Priority raised to P2.

chrcoluk commented 1 year ago

I think Bonez suggestion is the way to go on this. But with communication given to mod developers prior, as there will need to be changes in mods to accommodate the changes.