Requires FVTT version 0.4.0 or higher
To install a module, follow these instructions:
- Download the zip file
- Extract the included folder to
public/modules
in your Foundry Virtual Tabletop installation folder. - Restart Foundry Virtual Tabletop.
Once the plugin is loaded a new wrench icon will appear below the main tool selection.
Click on this icon and you will be presented with Six more icons. (Imgur Album - https://imgur.com/a/1UZUjkT)
-
Reset Grid - This will set the grid to 100 pixel square with 0 X/Y offset. It also changes the grid color to pink to make it easier to see for setup. Now works with Hex Grids (Warning spastic GIFs below)
-
Auto Adjust Grid - ||Currently Disabled due to issues|| This will let you draw a square on the map then have the grid size and X/Y offsets set to match the drawn square.
-
Set GridSquare Size - This will let you draw a square on the map then have the grid size set to match the drawn square. No offset is applied with this and should be applied manually.
-
Adjust X - When this is selected it will let you move the grid along the X plane. Clicking the button then clicking on a vertical line in one of your grid squares will adjust the grid to line up with that point. Now works with hexes!!
-
Adjust Y - When this is selected it will let you move the grid along the Y plane. Clicking the button then clicking on a horizontal line in one of your grid squares will adjust the grid to line up with that point. Also now works with hexes!!
-
Set GridSquare with a 3x3 Square - Draw a 3x3 grid square on the map then have the grid size set to match the drawn square. No offset is applied with this and should be applied manually.
-
Set GridSquare with a Hexagon - Draw hexagon on the map then have the grid size set to match the hex. No offset is applied with this and should be applied manually. Flat/Horizontal Hexes should be drawn left -> right from the midpoint, while Pointed/Vertical Hexes should be drawn from the top down.
It may not be perfect but it will be close.
- Fix auto-grid - Need to figure out how to deal with the scenes size changing when grid sizes change as this throws off the original click location.
- Added the ability to scale the grid with Hexes and adjust the X/Y offsets using exsisting tools.
- Updated Readme to show new buttons/layout.
- Changed how the buttons are added to the screen. Now using the API provided by foundry. From here forward new updates WILL NOT WORK with older versions.
- Added a 3x3 button. This will allow users to select a 3x3 area of grid squares and have foundry calculate the grid size from that.
MIA - We dont talk about this version
- Removed auto-grid due to issues with click points changing when the scene gets updated and throwing off the calculations. Needs more calibration.
- Changed the Adjust X/Y buttons to work with both positive and negitive values so the map/grid does not end up in a far corner somewhere.
- Added a check for drawn grids being smaller than 50px. If smaller nothing happens, but if it is larger then a number shows up indicating grid square size.
- Updated plugin to work with foundry 2.8, now no longer on its own canvas. No Idea why I was doing it that way anyway.
- Setup the ability for users to draw a square and have the grid set to its size, then depening on tool selection either apply X/Y offsets or not.
- Removed the two click set grid square button and replaced its function with a drawn square with no offset applied.
- Disabled the complete auto button from the original code. Found that while it kinda worked, it also kinda did not. So I split the functions out into separate buttons until the full auto thing can be figured out.
- Added a new button structure under the existing controls menu.
- Broke apart the main getPosition function into three functions, getPostition for grid scaling - setXOff and setYOff to set the axis.
1.Clean up this mess, wow...
This is my first foray into working with Javascript/HTML/jQuery/CSS. So its rough but I hope to polish it up. Any suggestions on code/cleanup/what can be done better just message me on discord!