Page 1 of 10 123 ... Last
  1. #1
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    24,208

    Map resize to TV resolution - for Face-To-Face games

    After updating to FG v3.3.5 you must update this extension to v3.3.5

    From a discussion here: https://www.fantasygrounds.com/forum...p-scaling-maps and also me starting to run face-to-face games on FG with a TV laid flat on the table, I've put together an extension that auto sizes maps to match 1 grid square to 1 inch on the physical TV.

    This extension is for those among us who use a TV for their face-to-face games and use miniatures on the TV, requiring them to size any maps to match have 1 square on the map = 1 physical inch on the TV screen. It allows the GM to set the size and resolution of their TV (currently only 16:9 format TVs are supported) for their campaign, and then can use a right-click menu on the TV (player) view to auto size the image to match 1 grid square = 1 physical inch on the TV.

    v3.3.5 - April 21st, 2018: FG v3.3.5 compatibility update.

    Versions
    v3.3.0b - May 9th, 2017: Very minor update. Resize to grid functionality now caters for dynamic toolbars and different sized image window frames to display the full, resized, image.
    v3.3.0 - FG v3.3.0 compatibility.
    v3.2.2 - FG v3.2.2/3 compatibility.
    v0.2 - FG v3.2.0 compatibility.
    v0.1 - First release. Base functionality.

    Installation
    1. Download the attached extension file "Player Image Auto Size.ext" and save it to your <FG App Data>\extensions directory.
    2. Start up Fantasy Grounds and select campaign for a ruleset that is built on CoreRPG. Select the "Player Image Auto Size" extension and start your campaign.
    3. When your campaign loads, set the TV size and resolution via a chat command. Use: /tvsize <TV size in inches> <TV resolution in pixels (height/Y dimension)> An example is: /tvsize 43 1080 for a 43 inch (diagonal measurement) TV with 1080p resolution (full HD).

    Do not use this with the Enhanced Images (layers) Extension or the Image Label Extension. The Enhanced Images extension includes this code (from version 2.0.5a - April 2017).

    Please read the following two posts for gotchas, issues and development plans.

    Use
    The first time you load a campaign with this extension active you need to set the TV size and resolution via a chat command. Use: /tvsize <TV size in inches> <TV resolution in pixels (height/Y dimension)> An example is: /tvsize 43 1080 for a 43 inch (diagonal measurement) TV with 1080p resolution (full HD). If you're using a 4K (UHD) TV use the vertical resolution of 2160.

    You only need to do this once as it is stored in the campaign database. You can check the setting by typing /tvsize in the chat window.

    The resizing relies on the TV size and resolution stored in the database (using the /tvsize command) and the grid set on the map by the GM. The resizing will not work without a grid!

    The GM should set a grid on the map at the size they wish to be sized as 1 inch on the TV display. The GM should share the map to the player instance that is connected to the TV and then on the player (TV) instance the controlling user (probably the GM if the player instance is connected by localhost) should use the right-click menu as shown in the two images below: Resize (1st image) then the Resize to Grid square icon (2nd image):



    If you have any feedback, comments, questions, etc. please post in this thread. Constructive criticism is welcome, just please keep in mind that this is the first release and I plan to add more functionality pretty quickly - so let me know what works, what doesn't, what features you'd like to see (keep it reasonable and realistic please) and we'll see where this goes...

    If you have any ideas about the code please pass your feedback direct to me, please don't create your own version of this extension - we don't want confusion and multiple extension versions all over the place! Thanks!

    Previous downloads: 36
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Trenloe; July 13th, 2019 at 22:21.
    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    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!

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    24,208
    The following three photos show this in action.

    1) The player map has been shared by the GM. The dimensions are too small to fit the minis to the grid. This is the standard FG view, before the viewing size has been changed by this extension.



    2) The user has used the right-click menu to auto resize the map (based off the campaign TV info set using the /tvsize chat command). The map also gets located in the top left of the desktop.



    3) As the resized map was slightly larger than the TV, the User quickly moved the map (left-click and drag) so that the best view is available on the TV.

    Attached Images Attached Images
    Last edited by Trenloe; July 13th, 2019 at 21:42.
    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    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
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    24,208
    Gotchas!
    • Only works with a square grid (for now).
    • Clashes with other extensions that modify the image functionality (for now), these include the enhanced images (layers) and image label extensions.
    • Auto calculations are done based off a 16:9 format TV with a horizontal distance (TV size) in inches. If your TV size is expressed in cm then divide the size in cm by 2.54 to give you the TV size in inches.
    • If you're not using a 16:9 format TV you will need to measure your TV vertical height and do a quick calculation to find the TV size you should use in the extension: measure your TV vertical distance in inches then use a TV size of: vertical inches / 0.49 to allow proper calculations of pixel/inch ratio for your TV.


    Useage
    • The image can be resized massively off screen if there are a lot of squares set. You can simply left-click and drag to move the image, the grid size will stay the same.
    • You don't need to match up the grid exactly if you don't intend to use a FG grid in play. Just match up the size roughly, share the map, auto resize on the player side and then remove the grid. As long as you don't try to resize again the auto size will have matched the dimensions of the grid before it was removed.
    • If you find the grid squares just a little too small (i.e exactly 1 inch) then you can increase the size of them by using the /tvsize chat command. Reducing the TV size setting will increase the size of the squares on the screen - e.g going from 43 inches to 40 inches will result in slightly more than 1 inch squares. You'll need to resize the image again if you ever change the /tvsize setting. Likewise, increasing the /tvsize setting will give you grid sizes less than 1 inch.


    Issues
    1. /tvsize won't accept decimals - e.g. 15.6 for a 15.6 inch monitor. Fix to come. Work around: use the closest integer number - e.g. 16 in this case, or if the grid is a little tight round down to 15.


    Future Development
    1. Add option for metric (cm) TV sizes.
    2. Add option to hide the FG dice on the player view. See post #17.
    Last edited by Trenloe; August 29th, 2017 at 17:17.
    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    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!

  4. #4
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    19,074
    Blog Entries
    1
    very clever Trenloe!

    MoreCore - Generic Ruleset
    --- Projects ---
    Extensions | Tutorials | MoreCore | MoreCore Themes | Call of Cthulhu | Maelstrom | FG Con

  5. #5
    Awesomee! Just what i needed for my sessions!

    Testing extension now...
    ___________________

    whiteTiki: Adventurers League Player
    Experience: 10 years; DM and Player
    Games: D&D, Pathfinder, World of Darkness

  6. #6
    I can confirm its working perfectly.

    I just tried it in a 64'' and in a 42'' and meassure it with ruller. Everything fine.
    I found a little prob when trying it on my laptop though. It happens to be 15.6'' and the /tvsize wont accept decimals as far as I can tell. I tried to input 15.6 and it stored the value as if I had a 6'' monitor and not a 15.6''
    Of course I just solved it entering 16'' instead of 15.6'' and everything worked just fine, just a tiny bit smaller.

    Thanks anyway!
    ___________________

    whiteTiki: Adventurers League Player
    Experience: 10 years; DM and Player
    Games: D&D, Pathfinder, World of Darkness

  7. #7
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    24,208
    Quote Originally Posted by whiteTiki View Post
    I found a little prob when trying it on my laptop though. It happens to be 15.6'' and the /tvsize wont accept decimals as far as I can tell. I tried to input 15.6 and it stored the value as if I had a 6'' monitor and not a 15.6''
    Oh right, I'm not checking for decimals. I'll log it as an issue and see about a fix. Thanks for testing.
    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    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!

  8. #8
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    GMT -7
    Posts
    8,453
    Blog Entries
    9
    Awesome work. I like how you can easily move the image around.

    Two ideas/questions;
    - Do non-US TV's use metric sizes?
    - I assume this assumes a 16:9 aspect ratio? Any ability (or need?) to use a different one?

    Current Projects: Ultimate Undermountain (NYDUM)
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets
    DMsGuild Content: Balance Disturbed (Adventure), Dungeon Room Descriptions
    FG Product Reviews: Virtual Scribe Reviews

  9. #9
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    24,208
    Quote Originally Posted by LordEntrails View Post
    - Do non-US TV's use metric sizes?
    A lot do, yes, but most RPGs use 1 inch for battlemap grids. A quick cm/2.54 calculation will give you a good enough conversion from cm to inches.
    Quote Originally Posted by LordEntrails View Post
    - I assume this assumes a 16:9 aspect ratio? Any ability (or need?) to use a different one?
    Yep, 16:9 only support (mentioned in post #1). I'll cross that bridge if different formats are needed. Vertical inches in the extension are calculated as diagonal inches x 0.49. So, if someone with a non 16:9 ratio TV measures their TV vertical distance in inches they would enter a TV size of: vertical inches / 0.49 to allow proper calculations of pixel/inch ratio for their TV.
    FG Con 15 Fantasy Grounds Online RPG Convention - Nov. 8-10, 2019
    Register at www.fg-con.com for all the latest info.

    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
    19,074
    Blog Entries
    1
    Australia uses both inches and cm's for TVs and mostly just inches for Monitors. Almost everything else is strictly metric.

    MoreCore - Generic Ruleset
    --- Projects ---
    Extensions | Tutorials | MoreCore | MoreCore Themes | Call of Cthulhu | Maelstrom | FG Con

Thread Information

Users Browsing this Thread

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

Posting Permissions

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

Log in

Log in