5E Product Walkthrough Playlist
Page 2 of 2 First 12
  1. #11
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29
    Thank you Trenloe for elaborating. I obviously wasn’t expressing my point well enough. I truly needed an interpreter to help me out.

    And thank you dulux-oz for setting me straight. Your suite is large enough that I did not want to “tear right in” not knowing if the information I was delving for was in there.

    I’m ready to release two ruleset based versions tomorrow (3.5E/PF and 5E). I suspect I’ll never seek the single .ext solution. Certainly not until more users request that I support more rulesets than these two/three. And now that it appears Unity is finally imminent, my little extension will become moot before it ever has 100 users.

    Thanks again gentlemen.

  2. #12
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29
    @Grifron
    It appears to me as though you’re assuming full lua language availability in your code examples. This is not true in FG. The complete language is not available to us; only a finite subset of it.

  3. #13
    Sorry to bump an old thread, but I have a solution to this which is very poorly documented. I actually have not seen it covered anywhere.
    includefile has a parameter for this!
    Code:
    		<includefile ruleset="CoreRPG" source="campaign/record_char_inventory.xml" />
    		<includefile ruleset="5E" source="campaign/record_char_inventory5E.xml" />
    I haven't tried it with <script>, but it might work there also.

    If not, you can always use the approach Grifron posted:
    Quote Originally Posted by Grifron View Post
    Code:
    local rset = User.getRulesetName()
    	if rset = "5E" then
    		--set the merge here for 5E
    	elseif rset = "4E" then
    		--set the merge here for 4E
    	end
    Last edited by bmos; March 9th, 2022 at 13:41.

  4. #14
    Quote Originally Posted by bmos View Post
    Sorry to bump an old thread, but I have a solution to this which is very poorly documented. I actually have not seen it covered anywhere.
    includefile has a parameter for this!
    Code:
    		<includefile ruleset="CoreRPG" source="campaign/record_char_inventory.xml" />
    		<includefile ruleset="5E" source="campaign/record_char_inventory5E.xml" />
    Bumping an old thread yet again. :-)

    I have to ask, how the heck did you figure this out bmos? Very poorly documented, indeed! After seeing your post, I did a google search for 'fantasy grounds "includefile ruleset"' and this post is the only thing google returns, and that's searching the whole internet!

    Well, regardless, I'm quite happy you took the time to bump this old thread last year with your solution. It works very well and is exactly what I needed.

    Cheers,
    Brian

  5. #15
    Actually, any asset (icon/die/windowclass/template/etc) as well as includefile can be marked with the ruleset attribute in extensions. @bmos probably picked it up when I've mentioned it a few times here and there. It's a relatively new feature, so I only have told a few people about it because of timing as well as making sure it works like we want.

    Regards,
    JPG

  6. #16
    Quote Originally Posted by Moon Wizard View Post
    Actually, any asset (icon/die/windowclass/template/etc) as well as includefile can be marked with the ruleset attribute in extensions. @bmos probably picked it up when I've mentioned it a few times here and there. It's a relatively new feature, so I only have told a few people about it because of timing as well as making sure it works like we want.

    Regards,
    JPG
    So far my experience with it is very positive. Having a single EXT handle xml for multiple rulesets is a neat trick
    Very cool to know that I can use this on windowclasses and other assets!! This will let me prune down the code for some of my stuff quite a bit.
    It would be very cool to also have something like ruleset~="5E" to exclude specific rulesets from a general file.
    Last edited by bmos; March 9th, 2022 at 13:49.

  7. #17
    Quote Originally Posted by bmos View Post
    So far my experience with it is very positive. Having a single EXT handle xml for multiple rulesets is a neat trick
    Very cool to know that I can use this on windowclasses and other assets!! This will let me prune down the code for some of my stuff quite a bit.
    It would be very cool to also have something like ruleset~="5E" to exclude specific rulesets from a general file.
    This is indeed a very cool and helpful feature. Can “ruleset” be a list or does one need to apply only one ruleset per entry? Currently, when I need the same xml for multiple rulesets I just list the same line with a separate ruleset - easy enough, but a list of rulesets would be handy. Also handy would be the “not” operation bmos mentions.

    Thanks again for this feature Moon Wizard!

    Cheers,
    Brian

  8. #18
    You can use ruleset="5E|4E|3.5E|PFRPG" to specify an asset used with multiple rulesets.

    If you need ~=5E, then you can define a general one, and then override with a ruleset=5E one in the same file. It will just overwrite the general one.

    Regards,
    JPG

  9. #19
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29
    Thank you very much, bmos, MostTornBrain and Moon Wizard, for bumping and commenting on this old thread.

    Your posts were instrumental in setting me on the proper path so that I could avoid having to use multiple extension files because of the desperate code/script that was needed to support each ruleset.
    Current Projects:
    Always...
    Community Contributions:
    Extensions: Bardic Inspiration, Druid Wild Shapes, Local Dice Tower, Library Field Filters
    Tutorial Blog Series: "A Neophyte Tackles (coding) the FG Extension".

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in