Copy Tokens with random pattern and Rotation.

These are tools and utilities that make it easier to run games. This includes Lib: macro tokens dropped into MapTool to manage the game, a conversion file for CharacterTool to allow use in MapTool, or just about anything else you can think of -- except graphics with macros and anything specific to a particular campaign framework. Those are already covered by the Tilesets subforum and the Links and External Resources forum.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Copy Tokens with random pattern and Rotation.

Post by Craig »

Here is a tool for copying a token or tokens several times and scattering them out over an area with random rotation. It requires B54+ to run.

Instructions for "installing"
  • Download this token
  • Drag and drop it from Explorer/Finder/Nautilus/whatever onto a map (any map).
  • Save the campaign and then reload it.
Using the tool
You can drag the scatter macro button from lib:Scatter to either global or campaign panels for easier access. Or you can use [scatter()] to call up the dialog.

Drag the token(s) that you want to copy and scatter onto the map, select them and then call up the dialog.
Scatter1.jpeg
Scatter1.jpeg (43.78 KiB) Viewed 8542 times
Scatter3.jpeg
Scatter3.jpeg (128.07 KiB) Viewed 8544 times
The values you can fill in are
  • Number of Copies -- The number of copies to create.
  • Distance North -- The number of squares/hexes to scatter the images over in the north direction (up the screen).
  • Distance East -- The number of squares/hexes to scatter the images over in the east direction.
  • Distance South -- The number of squares/hexes to scatter the images over in the south direction.
  • Distance West -- The number of squares/hexes to scatter the images over in the west direction.
  • Rotation
    • Free -- The image can be rotated to any facing.
    • Square (Edges) -- The image will be rotated to one of the four edges of the square.
    • Square -- The image will be rotated to one of the four edges of the square or one of the four corners.
    • Vertical Hex (Edges) -- The image will be rotated to one of the six edges of the hex.
    • Vertical Hex -- The image will be rotated to one of the six edges or 6 corners of the hex
    • Horizontal Hex (Edges) -- The image will be rotated to one of the six edges of the hex.
    • Horizontal Hex -- The image will be rotated to one of the six edges or 6 corners of the hex
  • Layer -- The layer (Token, Hidden, Object, or Background) to place all the images on.
  • Number of Copies -- Only appears when multiple tokens are selected, it determines how the first number of copies entry is interpreted.
    • of each -- Number of Copies of each token are created and scattered throughout the area.
    • randomly selected -- Number of Copies are created selecting randomly from the tokens.
An example of the output
Scatter4.jpeg
Scatter4.jpeg (283.74 KiB) Viewed 8538 times
Idea based on request originally raised in this thread http://forums.rptools.net/viewtopic.php?f=26&t=7931, and based on the macro that Palmer posted in that thread.

Any feedback or ideas for different scatter patterns are welcome,

User avatar
snikle
Great Wyrm
Posts: 1143
Joined: Tue Oct 24, 2006 11:45 pm
Location: Clarksville, TN
Contact:

Re: Copy Tokens with random pattern and Rotation.

Post by snikle »

Nice! Good work, will have to add this to my library, never know when the players will wandering into a overland adventure.
• snikle •
snikle.wordpress.com

User avatar
Natha
Dragon
Posts: 733
Joined: Sat Oct 11, 2008 3:37 am
Location: Limoges/Guéret, France
Contact:

Re: Copy Tokens with random pattern and Rotation.

Post by Natha »

Excellent !
Very usefull for more "natural" map ...
ImageImageImageImage

User avatar
lmarkus001
Great Wyrm
Posts: 1867
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Re: Copy Tokens with random pattern and Rotation.

Post by lmarkus001 »

Spiffy!!!

User avatar
Jshock
Dragon
Posts: 311
Joined: Sat Jan 26, 2008 8:55 pm
Location: West Warwick, RI
Contact:

Re: Copy Tokens with random pattern and Rotation.

Post by Jshock »

There aren't any macro options that let you set scale, are there? I think letting you set a varying scales would really make this killer.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Copy Tokens with random pattern and Rotation.

Post by Full Bleed »

Cool.

Any chance you could expand this so that we could:

1) Have an option to create some variation in the tree sizes too?
2) Have some kind of density option so that there could be overlapping clusters of trees, shrubs, rocks, etc?
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
Stitched
Dragon
Posts: 274
Joined: Fri Jul 11, 2008 5:56 am
Location: Uppsala, Sweden

Re: Copy Tokens with random pattern and Rotation.

Post by Stitched »

I always get errors, trying to run this in b54, when opening a campaign with this token saved in it and trying to use it.

Under Token/Selection Macros:

Clicking Help - I get Undefined function: scatter.help
Clicking scatter - same error

Clicking Init - Unknown JSON type in function json.get
ScatterImages - same error

Error - blank window popup
ScatterDialog - You do not have enough permissions to run the [token(...):...] roll command.

onCampaignLoad - You do no have permission to call the defineFunction function

doHelp - same as ScatterDialog
doScatter - same as ScatterDialog

If I impersonate, all of them error out except doScatter.

When I use the macro, I get the popup you posted, however if I select a tree to scatter, I get the same error as ScatterDialog.

Do I need to set ownership of the token to All or GM to use this ?

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: Copy Tokens with random pattern and Rotation.

Post by Craig »

The token can only be owned by the GM. Really though you are safest if no one owns it that way there is no issues if you change your login name

User avatar
Veggiesama
Dragon
Posts: 619
Joined: Wed Aug 29, 2007 1:18 am

Re: Copy Tokens with random pattern and Rotation.

Post by Veggiesama »

Very cool idea.
My D&D 4e Campaign FrameworkMy Shadowrun 4e Campaign Framework
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.

User avatar
Jector
Great Wyrm
Posts: 1164
Joined: Sun Aug 27, 2006 9:19 pm
Location: Atlanta

Re: Copy Tokens with random pattern and Rotation.

Post by Jector »

Very cool!
I cast firecube! ~4E

User avatar
heyes
Giant
Posts: 142
Joined: Thu Apr 23, 2009 7:22 am

Re: Copy Tokens with random pattern and Rotation.

Post by heyes »

This is an awesome tool! Thanks for making it!

User avatar
galneweinhaw
Dragon
Posts: 481
Joined: Tue Jan 02, 2007 3:03 pm

Re: Copy Tokens with random pattern and Rotation.

Post by galneweinhaw »

Craig, this is awesome! I'm trying to play around with it and have a acouple questions.

How to I get the lowe dialog in your post? When I select four items I only get the top one (only shows one, and doesn't have the "Number of Copies: Of each" option)

Also, how does it choose it's starting point to plop down the stamps?

And finally... is there a no rotation option?

-Thanks!

EDIT: One more question. There doesn't appear to be any overlapping stamps in your example image. Is that because you removed them or was it just by chance? WHen I try it I keep getting overlapping stamps =) Thank again!
galneweinhaw = galileo newton einstein hawking

Akodo Makama
Giant
Posts: 249
Joined: Mon Apr 20, 2009 9:31 pm

Re: Copy Tokens with random pattern and Rotation.

Post by Akodo Makama »

galneweinhaw wrote:EDIT: One more question. There doesn't appear to be any overlapping stamps in your example image. Is that because you removed them or was it just by chance? WHen I try it I keep getting overlapping stamps =) Thank again!
The macro only displaces the images by integer multiples of the map scale, so if your images are tokens that take up only one map square, no overlaps, unless they are in the same square. If the images are larger, overlaps can occur. I'm not positive, but some of the trees in the scattered image look to me to be two: one atop the other.

A request for Craig:

Saturated non-random placement. Just cover an area (nested for loops?) with random rotations (or possibly even no rotation) of a random pick from a set of images. Would be perfect for making tile floors, or even just a more realistic grass background.

User avatar
hyperactiveChipmunk
Cave Troll
Posts: 99
Joined: Wed Apr 15, 2009 8:19 pm

Re: Copy Tokens with random pattern and Rotation.

Post by hyperactiveChipmunk »

Gadzooks! That's beauty. I didn't even think of using macros for mapmaking tasks. Well done, sir! You have further broadened my MapTool horizons.

-hC

fencewebdesign
Cave Troll
Posts: 56
Joined: Fri May 15, 2009 4:47 pm

Re: Copy Tokens with random pattern and Rotation.

Post by fencewebdesign »

I downloaded this and seem to be having an issue. No matter what images I use/relative position to each other or any other variation I use, I can only get it to scatter one image all over, the rest get ignored...

Post Reply

Return to “Drop-In Macro Resources”