Atlas Macros & 1000 maps

During the last few months, we ran the celebratory competition for the 1000th map in the Community Atlas Project. The competition is now over, and Royal Scribe won the honor of getting the official 1000th map in the atlas, while Ricko Hasche took home the prize for best map by community vote. You can see all the winners, and check an image gallery containing all the maps.

I thought I could continue on with the topic of the atlas today, and give a little overview of the macros I use in the project, both in the maps themselves, and the ones I use when processing the maps. To avoid making this a 10-part series, this will just be a basic overview of them, to give people ideas how they can utilize macros in their own mapping.

Map Macros

Let us start with the macros I place in the maps themselves. These are usually connected to either areas in the map itself, or to text lines in the navigation bar to provide various features. All of these are made using the Make Hotspots command from the Tools -> Macros menu. This basically allow us to place a clickable hotspot anywhere than can run whatever macro commands we put in it.

Link to Map

~LOADM $mapfile.FCW;

The most basic and most used macro is the simple command to load another map. This is used for all the hotspots where you click to go to another map. The LOADM command is simple enough, all it takes as an argument is the name of the map to load.

There are a couple of things in this command that also appears in other commands, so let us handle them.

  • The ~ in the beginning doesn’t have anything to do with the LOADM command itself. It simply tells CC3+ that this is a transparent command that can be run at the same time as the other command, but shouldn’t interact with it or interrupt it. If this wasn’t present and you wer ein the middle of another command when clicking the hotspot, CC3+ would have taken LOADM as an input to that command instead of treating it as a new command.
  • The $-sign in front of the file name is a relative path identifier, and simply means “look for the new map in the same folder as the current map”. This is very helpful in the atlas, since the links will work no matter where the user puts the folder, since all links are relative.
  • The ; at the end takes the place of hitting enter at the end of the line to make a new line. It is just a convenient way when you make single-line macros like this to keep them completely on one line instead of ending up with that empty line below. You can use either, just make sure you don’t use both, since an empty line is actually an instruction to CC3+ to repeat the last command, you don’t want that happening with your macros.

Show Map Notes

In the atlas, I have links in the sidebar that brings up information that is stored in map notes inside the map (File -> Drawing Properties -> Map Notes). Doing this is pretty simple, just supply the command with the name of the note

OPENNOTE Description;

 Web Links

It is also easy to make a link to a web page. The STARTM command actually just hands the link over to Windows, and let Windows decide what to do with it, which in normal Windows installation would be to open it in your default browser.

STARTM https://atlas.monsen.cc;

Toggle Features

One of the interesting things I do to the maps is to toggle various features. All maps have a link that will turn hotspots on or off, and same with the grid if the map contains one, but if the map maker wants, I can add a link that toggles some features, for example toggles hidden DM-only features like traps on or off, or toggle the roofs of building so you can switch between seeing outside/inside views, maybe toggle on/off various information displays, and more.

Generally, I have two variants of this. The first one toggles a layer on/off thereby showing/hiding the contents of that layer, for example the map grid. This is pretty straight forward, and let people toggle various features on/off as they desire on a one by one basis. The command does the toggling for you, so you don’t need different commands to show or hide the layer (although those commands do exists if you need them), one command does both.

TOGL HEX/SQUARE GRID;

Sheets can be toggled too:

TOGLSHT GRID;

In some cases, I need a bit more complexity, for example, the map may have different views, where one view requires certain layers to be hidden, and certain others to be shown. You don’t want people to have to click things in the right order to accomplish that, so it is better to set up a macro that configures the entire view correctly, like this.

SHOWF UNDERSEA WATER COLUMN
HIDEF COAST/SEA
HIDEF UNDERSEA KEY

This example uses the filtered version of the SHOW and HIDE commands to not only show/hide single layers, but do it to all layers that starts with the provided string. This allow us to get away with using fewer commands if we name our layers in a planned and consistent manner. This little macro makes sure all the right layers are shows and hidden as appropriate, thus setting up the desired view for the map.

Administration Macros

In addition to macros that can be used in the map, I use several macros when I prepare the maps for the atlas, to help automate some repetitive tasks and ensure that all maps have the same processing applied to them. These are a bit more complicated than the in-map macros above. To make these macros easily accessible to me, I have associated then with drawing tools, and then made a custom symbol catalog that contains all of my atlas macro drawing tools for ease of access.

Setup

This is the first macro I ruin on every new atlas map:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

GETDISTFMT origDistFmt
DISTFMT 0
FFIX
GRIDOFF
ORTHOFF
SNAPOFF
ATCHOFF
TSPECA 0
LWIDTH 0
SHOWF GRID
HIDESHTF GRID
HIDEF TEMPLATE
THAWF *
FREEZEF TEMPLATE
FREEZEF HEX/SQUARE GRID
ZOOML MAP BORDER
ZOUT 1.2
EFFECTSON
GOSHEET MAP BORDER
GN sheetHeight 100
GETLAYERY sheetHeight MAP BORDER
GETSHEETY sheetHeight MAP BORDER
THAWF MAP LINKS
GOLAYER MAP LINKS
SELSAVE
SELBYP
POINT 0,0;
DEFSYM ATLAS;0,0
SYMBOL;ATLAS;sheetHeight;sheetHeight;0;
SELREST
PURGESYMM
AN
DISTFMT origDistFmt
LIGHTHIDE
RESMODE

Quite a bit more complex that one, so let us have a brief overview.

  • Lines 1-2 and 33 is about the distance format CC3+ uses. You may be aware that CC3+ can display both plain numeric formats, and a nicer formatted feet/inches or meters display. Well, that human readable format works poorly in macros, so I grab the original format, set it to plain numbers for the duration of the macro, and set it back to the original at the end.
  • Line 3 runs the FFIX command which takes absolute paths and turn them into relative paths, as well as fixing old CC3 style #-paths into CC3+ @-paths.
  • Lines 4-9 turns off all snapping and related, and sets line widths to 0 and text angle to 0 (I don’t want angled text in hotspots).
  • Lines 10-15 does some layer/sheet manipulation; shows the grid layer, hides the grid sheet, unfreezes all layers, except the template and grid ones.
  • Lines 16-17 sets up a proper zoom for working with the map.
  • Line 18 turns effects on.
  • Lines 19-30 tries to figure out the height of the map so that the navigation bar can be scaled to the right size automatically, as I always want it to be the same height of the map.
  • Line 31 purges symbols that are not in use from the map
  • Line 32 is a custom command I wrote myself which sets up the right map notes for use in atlas maps, and automatically populates the Required Products note.
  • Line 34 hides the light symbols (crosses) if the map uses dungeon lighting.
  • Line 35 shows the display speed dialog from where I can enable the setting that forces the map to have effects on when loaded (There is no macro command to set this directly). Normally, this dialog can’t be used in a macro, but any command can be used as the last line of the macro, so this is a good finish.

As you can see, this macro does a lot of steps for me during the setup, saving me both time and having to remember all of these steps.

Image Export

Another important macro for me is the export macro. This macro automatically sets all the settings required to export the map in a high resolution version, and also creates a standard size export by making a resized copy of the high-res version. Furthermore, it puts all the files in the right place automatically without me having to browse through folders in save as dialogs.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14

GETDWGNAME drawingName
ATLASEXPORTFILENAME exportName drawingName
EXPORTSETAA 25
EXPORTSETBORDER 0
EXPORTSETVIEWER 1
EXPORTSETCROP 1
EXPORTSETWIDTH 8192
EXPORTSETHEIGHT 8192
EXPORTSETMINBPX 5
EXPORTSETBPCT 10
EXPORTSETMPPP 50000000
WBSM exportName;^DFirst Corner:;^DSecond Corner:
ATLASRESIZE 1280 1280 exportName;exportNameLo
OPENDOC exportName

  • Lines 1 and 2 here gets the file name of the drawing, and converts it into the file name needed for the export. The command on the second line is a custom command I wrote myself.
  • Lines 3-11 simply sets the various export parameters, most of which you can also set in the standard export dialog
  • Line 12 is the macro export command. I have it set up to ask me to pick to opposite corners. I do it this way because not all maps can be determined automatically. Usually, I use the endpoint modifiers when I pick the corners, making it easy for me to precicely pick them even if doing that part manually, but this approach also lets me do it by eye when needed.
  • Line 13 is yet another custom command I wrote. It is responsible for taking the high res export and making the standard res shown on atlas pages from it.
  • Line 14 opens the exported file in my image viewer so I can visually inspect the result to make sure nothing went wrong.

Saving

I also like to make sure everything is set right when saving. For example, the MAP LINKS layer should be frozen, but that is one of the layers I work with when adding hyperlinks to the map during preparation, and I would never remember to always freeze it myself. So I have a simple macro for saving. What this does is purging unused symbol definitions from the map, switch to the BACKGROUND layer (I do this to make sure MAP LINKS is not active, since I want to freeze that one, and all maps have a BACKGROUND layer, so this is a safe one to make active by default), freezes the MAP LINKS layer, hides hotspots and the saves the file.

PURGESYMM
GOLAYER BACKGROUND
FREEZE MAP LINKS
ACTHIDE
SAVE

 

 

I do have a few more, but those are rather simple, just set up in a macro tool for my convenience so I can have all the command within easy reach, so I think I’ll end the tour here. As I wrote initially, this is just a brief overview, not a detailed line-by-line discussion of each macro. If you have any questions regarding any of these commands, I suggest you post a question over in the macro category of the forums, and I’ll do my best to answer you.

I hope this overview helped inspire you into using macros of your own for your maps and/or mapmaking effort.

 

If you have questions regarding the content of this article, please use the ProFantasy forums. It can take a long time before comments on the blog gets noticed, especially for older articles. The forums on the other hand, I frequent daily.

 

 

 

Leave a Reply