PDA

View Full Version : Module - condition the loading of data



Xarxus
February 16th, 2023, 08:28
I wonder if there is a way to filter the data that is loaded from a module. For example, I would like some skills
defined in module A to be loaded or visible in the relevant masterindex only if module B has been loaded.
I can't put them in module B because they don't belong on module B and they only make sense if both modules
are loaded.

One solution would be to load them anyway with module A and leave the task of removing them to the GM,
but if there was a way to handle it, it would be better.

Zacchaeus
February 16th, 2023, 08:51
You would need to write an extension to do that. I'm not sure that even then that's something that could be done via an extension.

Xarxus
February 16th, 2023, 08:58
So, it seems that the best way is to leave it to the GM
Ty Zach

damned
February 16th, 2023, 09:04
Maybe add another field to the data that you can filter on?

Xarxus
February 16th, 2023, 10:13
I can add a tag such as <modulerequired> and filter on it, but in this way the GM (and players) should still filter by their own.
Yes, is an accettable workaround, but my dream was to not to force GM/Players to do anything.

UrsaTeddy
February 18th, 2023, 00:11
Could you look at it a little different, instead of adding, subtracting?

Load All Of It
During the loading check for the existence of the required modules and delete/deactivate the content that is not available.

After you have loaded/added all the data in the Load All Of It section, you would then run a filter function that checks for the modules etc having been loaded and subtract from there.

Xarxus
February 18th, 2023, 14:13
Great idea, I'll try it

UrsaTeddy
February 18th, 2023, 21:59
One thing I forgot to mention, you might have to intercept the Module Load functionality in the ruleset with your own function then execute the traditional one if you load the module at a later time.