DICE PACKS BUNDLE
Page 1 of 2 12 Last
  1. #1

    Suggestion for a CoreRPG extension

    A small extension that would look for two graphics files in the campaign directory (ie: desktop.png & chatwindow.png), and if they are found, they would be layered (centered) on top of the desktop and in the chat window.

    This extension would be especially useful to theme one-shot games like Pathfinder Society games.

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,402
    Nice idea. But... I don't know if this is possible in an extension. The desktop is defined in the <desktopframe> definition: https://www.fantasygrounds.com/refdoc/desktopframe.xcp which points to a framedef of the desktop. For example, CoreRPG has:
    Code:
    <!-- Desktop background -->
    <framedef name="desktop">
    	<bitmap file="graphics/frames/desktop.png" />
    	<top rect="0,1,324,151" />
    	<middle rect="1,154,200,200" />
    	<right rect="450,0,100,144" />
    	<bottomright rect="450,0,100,144" />
    	<bottom rect="219,437,567,132" />
    	<decal rect="830,0,510,510" />
    </framedef>
    This is pretty much a static graphics file whose components for the desktop are all composed in the same .png file with the above listed dimensions. https://www.fantasygrounds.com/refdoc/framedef.xcp

    Essentially, if you want a different decal in the middle of the desktop then you need to include a whole new desktop.png file - but just change the 830,0,510,510 dimensions of the file for the new decal. Of course, this makes it very difficult to just change the decal within a desktop theme.

    Similarly, the main section of the chat window is defined in a single file chatbox.png and the framedef is:
    Code:
    <framedef name="chatbox">
    	<bitmap file="graphics/frames/chatbox.png" />
    	<topleft rect="0,0,18,15" />
    	<top rect="18,0,487,15" />
    	<topright rect="505,0,18,15" />
    	<left rect="0,15,18,476" />
    	<middle rect="18,15,487,476" />
    	<right rect="505,15,18,476" />
    	<bottomleft rect="0,491,18,39" />
    	<bottom rect="18,491,487,39" />
    	<bottomright rect="505,491,18,39" />
    </framedef>
    So, you'd have to change the whole chatbox.png file, but only the middle rectangle coordinates: 18,15,487,476. The problem is that these wouldn't be centered if the user resized the chat window.

    These changes would have to be done to the .png file before being loaded in Fantasy Grounds, so you're essentially doing just what a theme does - provide a new .png file for the whole frame (desktop or chatbox) not layering on top an interchangeable image.
    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
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    So a theme is basically an extension... and you wouldnt do it for CoreRPG you would have to do it for the particular ruleset - but as you are doing it for Pathfinder that wouldnt be a big deal?
    I just tried a couple of things out - it would be a bit of fun to have these themes for Pathfinder and for FG Con <weg>

  4. #4
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    Ok - Here is a super quick and small FG Con theme that should work with most CoreRPG rulesets.
    You only have to edit the desktop.png file - changing only layers 1 and 2 and staying with those dimensions and teh name/description in the extension.xml file...

    FG Con Fantasy
    FG Con Numenera
    FG Con Cthulhu
    and one Easter Egg for you Resire - You will have to download it to see it

    Gimp File for Ease of Making New Images

    Sreenshot





  5. #5
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    Added a couple of extras... just desktop changes nothing else.

    back to lachancery's post...
    what order are things loaded?
    CoreRPG+CoreRPGRuleset+Extensions and THEN Campaign?
    If loaded in that order there is probably no way for an extension to get the Campaign folder path?

  6. #6
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    They aren't that hard to do... I did a bunch of theme ones for my FGCon games last time. It was pretty cool.. I just basically dropped the cover art in as a decal. The one I added a curtain for a theater feel (it was that kinda game).
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  7. #7
    RTFallen's Avatar
    Join Date
    Jun 2014
    Location
    Nebraska, USA
    Posts
    161
    Blog Entries
    5
    Little late seeing this, but thanks damned!

    Resire

    FG Con 5 – October 17-19th 2014 - register at www.fg-con.com for all the latest info.

    100
    My Projects

  8. #8
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,402
    Quote Originally Posted by damned View Post
    CoreRPG+CoreRPGRuleset+Extensions and THEN Campaign?
    If loaded in that order there is probably no way for an extension to get the Campaign folder path?
    The campaign doesn't contain code, it contains data in the campaign database (DB.XML file). The data from the database is available during Code initialisation and after.

    There are some things in the campaign folder that can't be accessed through FG code - e.g. Desktop graphics files that aren't stored as images.
    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
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,402
    Quote Originally Posted by damned View Post
    CoreRPG+CoreRPGRuleset+Extensions
    As far as I understand it, the following process occurs. Taking loading a 3.5E campaign with one or more extensions as an example:
    1. The 3.5E ruleset starts to load. base.xml is used as the main specificaion/declaration and load order of the ruleset XML and LUA code.
    2. The first action that happens in base.xml is: <importruleset source="CoreRPG" /> This pauses the load of the 3.5e ruleset at this point and starts to load up CoreRPG.
    3. The base.xml file in CoreRPG is used to load up the CoreRPG ruleset.
    4. Once the CoreRPG ruleset has been loaded (base.xml has been processed all the way through) then control will be passed back to the paused base.xml in the 3.5E ruleset (step 2 above).
    5. The 3.5E base.xml file is processed through, merging/replacing XML definitions and replacing LUA scripts as defined in the 3.5E ruleset.
    6. Once the 3.5E ruleset has been loaded, any extensions will be loaded. The load order of extensions is not guaranteed unless the extensions have a <loadorder> defined in extension.xml. Extensions usually overwrite underlying ruleset code - although they can merge XML if the merge tags are used.
    Last edited by Trenloe; August 17th, 2014 at 05:40.
    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!

  10. #10
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    Ive updated three of those theme extensions...



    SF Theme
    Fantasy Theme
    Fantasy Mage Theme

    Depending on your ruleset you may have to tweak the extension.xml if its not showing as available....

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