5E Product Walkthrough Playlist
  1. #1

    Adding Tab/Category Icons via Extension?

    I've read through both of these threads:
    https://www.fantasygrounds.com/forum...light=tab+icon
    https://www.fantasygrounds.com/forum...light=tab+icon

    And I can get it to work if I just edit the existing ruleset, but I'd rather have these new tab colors/icons as part of an extension.
    I already have the extension made up (it's just some graphical changes), but I can't seem to figure out how to add the XML for the icons. I believe it should be (shortened for readability):
    Code:
    <icon name="tab_base15" file="graphics/tabs/tab_base15.png" />
    <icon name="tab_base16" file="graphics/tabs/tab_base16.png" />
    <icon name="tab_base15s" file="graphics/tabs/tab_base15s.png" />
    <icon name="tab_base16s" file="graphics/tabs/tab_base16s.png" />
    <icon name="tab_icon19" file="graphics/tabs/tab_icon19.png" />
    <icon name="tab_icon20" file="graphics/tabs/tab_icon20.png" />
    But when I put that into the graphics_misc.xml in the extension, it doesn't add anything.
    I have the images in the right folder, and named correctly, but I am sure the code I am adding isn't correct...I just don't know HOW it's incorrect, LOL.

    Thank you all, as usual.

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,413
    There's a number of things you'll need to do:
    1. Make sure the extension itself uses the graphics_misc.xml file in the extension via an <includefile> entry in your extension.xml. This will register the base <icon> references, but won't do anything with them unless they're actually used within the ruleset.
    2. gameelements.xml in the CoreRPG ruleset has a <categoryselectionsettings> settings that lists the base and icon graphics for the tabs. you'll need to copy <categoryselectionsettings> into your extension.xml file and add your new definitions from step #1 above to this section.
    Last edited by Trenloe; February 8th, 2016 at 16:55.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  3. #3
    I do have the graphics_misc.xml included via <includefile> (I should have mentioned that in my oroginal post).

    I have gotten the icons to show successfully by just editing the CoreRPG ruleset, but if I change the gameelements.xml there, won't that interfere/be removed with ruleset updates?
    That's why I was hoping to make these changes via an extension.

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,413
    Sorry, I didn't specifically mention that you should copy the <categoryselectionsettings> into your extension.xml and make your changes there.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  5. #5
    Quote Originally Posted by Trenloe View Post
    Sorry, I didn't specifically mention that you should copy the <categoryselectionsettings> into your extension.xml and make your changes there.
    Okay, I get what you're saying now. I should have understood that from what you said, but I am still pretty new!
    I added this to my extension.xml (copied from the ruleset's gameelements.xml). I added it after the <properties> closing tag that includes the rulesets the extension applies to, mostly because I wasn't sure where to add it.
    Shortened for readability:
    Code:
    <categoryselectionsettings>
    		<iconposition normal="6,6" selected="6,4" />
    		<baseicon normal="tab_base1" selected="tab_base1s" />
    		<baseicon normal="tab_base2" selected="tab_base2s" />
    		<decalicon name="tab_icon1" />
    		<decalicon name="tab_icon2" />
    	</categoryselectionsettings>
    But they still don't seem to be showing up when I click through the category tab icons/backgrounds. Would it help if I attached my extension.xml and my graphics?misc. xml?

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,413
    Any changes to XML/includefiles/etc. need to be initiated within a <base> section (after <properties>) within extension.xml. Info on extensions here: https://www.fantasygrounds.com/modguide/extensions.xcp

    If that doesn't work, then post your extension.xml file here (use the CODE formatting available through the "Go Advanced" button below.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  7. #7
    Adding the <categoryselectionsettings> under the <base> section worked perfectly.

    Thank you so much. I am constantly impressed by how helpful people are on these forums (you personally have helped me on multiple occasions).

  8. #8
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,413
    Quote Originally Posted by shemantis View Post
    Adding the <categoryselectionsettings> under the <base> section worked perfectly.
    Cool. Glad you got it working.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  9. #9

  10. #10
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,413
    Quote Originally Posted by damned View Post
    @Trenloe - any ideas how to remove (some of) them instead of replacing them?
    https://www.fantasygrounds.com/forum...oup-Icons-Tabs
    Nope.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

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