5E Character Create Playlist
  1. #1
    Spyke's Avatar
    Join Date
    Jun 2005
    Location
    Yorkshire, UK
    Posts
    886

    Using extensions to create skins

    The extension functionality does look very, very useful. I'm going to post a quick example here of one way to create a skin using an extension. What's the best way of doing this? What are the potential pitfalls? Is there a need for a common way of doing this to make it easier to share skins between rulesets?

    A simple skin

    This skin simply changes the look of the chatbox and the icon used for the story button, but the techniques can be extended to cover all frames, icons and fonts.

    1. Create a new folder in the extensions folder in your Fantasy Grounds application folder. I've called mine 'skin'.

    2. Create a file called extensions.xml in your skin folder containing the following code:

    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    
    <root version="2.0">
      <properties>
        <name>Skin</name>
        <version>1</version>
    	
        <author>Graham Brand</author>
        <description>A simple demonstration extension that changes the look of the default ruleset</description>
    
        <ruleset>
          <name>d20</name>
          <minrelease>12</minrelease>
        </ruleset>
      </properties>
    
      <base>
    
        <!-- Replace the chat box frame -->
        <framedef name="chatbox">
          <bitmap file="frames/chatbox.png" />
          <topleft rect="0,0,150,150" />
          <top rect="150,0,200,150" />
          <topright rect="350,0,179,150" />
          <left rect="0,150,150,200" />
          <middle rect="150,150,200,200" />
          <right rect="350,150,179,200" />
          <bottomleft rect="0,350,150,180" />
          <bottom rect="150,350,200,180" />
          <bottomright rect="350,350,179,180" />
        </framedef>
    
        <!-- Replace the story book icon -->
        <icon name="button_book" file="icons/button_book.png" />
        <icon name="button_book_down" file="icons/button_book_down.png" />
        
      </base>
    </root>
    3. Create folders called 'frames' and 'icons' under your skin folder, and put the new chatbox.png in the frames folder and the book button pngs in the icons folder.

    4. Start FG II with the d20 ruleset and tick to load the skin extension. Your d20 campaign should load with the new graphics.

    5. Once you're happy with your new look, create a zip file by selecting extensions.xml and the sub-folders. Rename it with the .ext extension and put it in the top-level extensions folder. This can then be distributed without the underlying folders.

    For more extensive changes, you would break the graphics out into separate include files. See the way base.xml and graphics.xml handle this in the default d20 ruleset.

    I've attached the sample files below.

    Spyke

  2. #2
    Good advice.

    Quote Originally Posted by Spyke
    The extension functionality does look very, very useful. I'm going to post a quick example here of one way to create a skin using an extension. What's the best way of doing this? What are the potential pitfalls? Is there a need for a common way of doing this to make it easier to share skins between rulesets?
    One thing that limits general ability to share skins between rulesets is the fact that many rulesets don't standardize the use of frames.

    One ruleset might have a frame called "bonus" that contains 3 pixels of space around the frame border in something like a drop shadow, glow or what have you. After that, you'd have a border 2 pixels wide with rounded corners of 7 pixels each. A minimum height for a bonus field in such a ruleset would be 20 pixels.

    Another ruleset might have a similarly named frame in similar use, but the ruleset designer has placed lots of fields in a smaller space. There is no drop shadow or such, and the border is just 1 pixel. The corners aren't rounded to save space. In theory, the minimum height of the field is 3 pixels.

    It would be hard to override both "bonus" frames with a common extension.

    This is one issue I'd like to see addressed in the potential foundation ruleset project.
    Tero Parvinen
    Fantasy Grounds Guru

  3. #3
    Spyke's Avatar
    Join Date
    Jun 2005
    Location
    Yorkshire, UK
    Posts
    886
    Quote Originally Posted by Goblin-King
    This is one issue I'd like to see addressed in the potential foundation ruleset project.
    Agreed.

    At present, though, there are probably a number of rulesets which use the default d20 graphics and are designed to work with the existing frames - my GURPS file is one of these - so that is a de facto standard, and we should be able to make skins that are shareable across these provided that the border sizes and active areas are adhered to. For GURPS, for example, I'd just need to add an additional extension to the skin to add the new tab descriptions and the logo.

  4. #4
    Foen's Avatar
    Join Date
    Jan 2007
    Location
    Suffolk, England
    Posts
    2,007
    I think re-skins are a great use of extensions, especially when targetted at a given ruleset. For example GMs may use d20 re-skins to give their campaigns a different look, or ruleset vendors may distribute re-skins for a particular gaming system to reflect plot points/settings (like Cthulhu Dark Ages).

    The potential issue is that the extensions are loaded into the campaign cache on clients, and hence increase the data transfer. For a richly-decorated ruleset, re-skinned equally richly, the cache data will potentially become very large.

    On the plus side, this is only downloaded once so shouldn't be a problem.

    Stuart

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
  •  
STAR TREK 2d20

Log in

Log in