PDA

View Full Version : Modules for extensions?



Moon Wizard
September 8th, 2009, 02:21
Can extensions or modules be customized so that only certain modules are loaded based on the extension loaded?

I'm looking to make my d20_JPG and 4E_JPG rulesets into a single ruleset, with an extension for each game definition. However, I wanted to understand what the ramifications are for modules. Will the modules for both d20 and 4E all be visible regardless of the extension loaded?

Thanks,
JPG

Moon Wizard
September 8th, 2009, 03:09
It turned out that it was pretty simple.

The extensions support the importinfo tags in the base section of the extension.xml file. That should make it a snap.

Cheers,
JPG

Foen
September 8th, 2009, 06:25
I found that out too - a neat feature.

Valarian
September 8th, 2009, 08:39
Not sure that I understand the way you've done this, but I'd love to learn the technique. As I'm generating character sheets based on the Foundation ruleset, I'd love to limit the modules to the extension selected.

Foen
September 8th, 2009, 18:08
In the extension.xml file, add the following:


<importinfo>
<acceptfrom>my ruleset</acceptfrom>
</importinfo>

This doesn't remove access to a ruleset (so anything built for Foundation will be visible) but does allow the extension to add support for a ruleset which won't be visible from vanilla Foundation.

Stuart

Moon Wizard
September 8th, 2009, 18:40
Valarian, here's how I'm thinking of using it.

Currently, I have 2 rulesets d20_JPG and 4E_JPG. They happen to share some code, so I thought it would be easier if I could make them extensions. However, all the modules out there are keyed to either d20 or 4E_JPG. If I put the importinfo tag into the shared ruleset, then all books for both game types would be visible no matter which game you were playing.

However, I could change the ruleset to "JPGCore" and make 2 extensions for 3.5E and 4E. In each extension, I could put an importinfo tag in the extension.xml file telling FG to allow each ruleset to load the correct books. For 3.5E, I would add importinfo tags for d20 and d20_JPG. For 4E, I would add importinfo tags for 4E_JPG. Then, only the books for the correct game type would be visible for each game.

Cheers,
JPG

Foen
September 8th, 2009, 18:43
Much more eloquently put!

Valarian
September 9th, 2009, 11:47
Useful, many thanks. I was wondering if the modules for other game rules could be excluded. Now I know :). I should now be able to exclude the 3.5e extension modules and only see those for the character sheet extension I'm going to be running.