Advertisement Create a free account

[Script] NormalizePageSize -- Snippet to scale tactical maps to 5ft scale.

1472334915
The Aaron
Forum Champion
API Scripter
I threw together this script to help with maps that are setup at a larger scale than desired. (say, the 1 square = 10 ft maps in Lost Mines of Phandelver ) Just load the script up and run: !nps I've tested this with Lost Mines of Phandelver and it works pretty well. Backup your maps before you do this, there's no going back with the script. &nbsp;=D Gist: <a href="https://gist.github.com/shdwjk/92f41797209be0be612" rel="nofollow">https://gist.github.com/shdwjk/92f41797209be0be612</a>...
Just wanted to say thanks for this! It has worked flawlessly for the game I'm currently running, resizing all 30+ maps that I've built so far. It seems to have kept dynamic lighting correct, and now tokens show up as the right size and I don't always have to manually (TokenMod macros FTW!) adjust them to fit the map scale, or spend crazy amounts of time trying to get the map right.
1472653646
The Aaron
Forum Champion
API Scripter
Sweet! &nbsp; Thanks for letting me know! &nbsp;I was starting to think I was the only person that had this problem. =D I've got some plans on how to expand it later (scaling graphics that don't represent characters, a mode for only adjusting the current page, setting the scale, etc). &nbsp;Let me know if you have any thoughts for enhancements!
wow... if this does what I think it does, it will be very handy!
1472655057
The Aaron
Forum Champion
API Scripter
It probably does. =D &nbsp; Makes all the pages that have a units of ft and a scale other than 5 scaled to the correct 1 unit = 5 ft scale.&nbsp;
1472655652
The Aaron
Forum Champion
API Scripter
Currently, it makes the following assumptions: Graphics on the Map layer need to be scaled. Graphics not on the Map layer need to be repositioned but retain their size. Drawings need to be scaled (technically, redrawn at a new size as scaling doesn't work for them on the DL. Text needs to be scaled. Page settings for scale and size need to be changed. All pages with ft and a scale other than 5 should be adjusted. These assumptions break in 2 places that I know of: Graphics that are on the GM layer or Token layer might need to be scaled instead of just repositioned. Might not want to do every page to be changed in one go.
The Aaron said: Might not want to do every page to be changed in one go. This would be a handy toggle. It didn't matter specifically in my case, as I used a duplicate of my game to test with before pulling the trigger, but I could see instances where a map might be set very specifically and not wanted to change. Also, going forward, as I make new maps, I'd love not to have to process everything again when I just want that single new map resized.
1472667312
The Aaron
Forum Champion
API Scripter
True enough. &nbsp;Currently, after it runs on a map it won't ever pick it up again as it changes the scale to 5ft. &nbsp;I'll try to get some of these changes added soon and do an official version.