In my previous two installments of this series, I’ve looked at the basics of macros and how to use variables. Today, I’ll be rounding off this introductory series by having a look at program flow. The macros we have looked at so far have just been a row of instructions, which are executed one by one, but it is also possible to make branching logic and loops. For example, you can do different things based on what the user chooses, or you can run the same block of code multiple times. For example, if you’ve had a look at my Large Exports annual, it contains the code required for exporting a small section of the map, and then it just loops over the same code enough times to export the entire map as smaller chunks.
I’ve always loved some interactivity in my maps, especially the dungeon ones. It is fun adding secret doors that can be opened, rotating sections, and other surprises. If you watched my latest live stream, you saw me build a hedge maze with a rotating central section, where the inner region was only reachable if you rotated the it first using a clickable hotspot in the map. (You’ll find both a link to the recording as well as my map in this forum conversation.)
I thought I could show you a couple of more examples of nice easy macros you can assign to your hotspots to accomplish interesting results, and hopefully come away with an expanded understanding of macros at the same time.
Most of you have heard about macros. If you are an existing CC3+ user you’ve used them, knowingly or not, and you might even have written your own. For some people, the word macro may sound a little scary because it is associated with programming, but they’re really not that complicated.
Macros are used in a lot of places in the program. For example, when you start a new map or load an existing map, CC3+ uses a macro (stored in the OnNewMacro/OnOpenMacro map notes) to show you the appropriate toolbars and load the filters needed for the style of the map. A lot of the drawing tools uses macros to accomplish the more complex stuff, for example the forest drawing tools use a macro to call the commands to fill the area with trees, or the fields drawing tools in several styles use a macro to align the fields to the first edge of the polygon (These macros are stored with the drawing tools).
Lastly, CC3+ also has a macro file that contains named macros. These are often called from the toolbar buttons and menu elements in the program, so editing this file may change how the program behave.
And then we have script files….
A few weeks ago, I hosted a live stream taking a closer look at the drawing tools. Making this the perfect time to talk a bit more about the more advanced aspects of the drawing tools and how to utilize them properly and explaining a few things in more detail than appropriate for a stream.
Examples of advanced use of drawing tools is to draw aligned fills, drawing a path and have symbols placed along it or drawing a polygon and having it filled with randomly placed symbols. Basically, a lot of the things you can do using multiple steps with regular CC3+ commands can be automated and streamlined by making a drawing tool for it.
The Symbols in Area command was introduced in CC3+ long after most of the basic styles were created, meaning it is not used in those styles’ drawing tools. But since it is very useful for creating terrain features like scattered woodlands, why not set up some new tools to make use of it? In this little article I’ll take you through doing exactly that. As an example I’ll create a scattered deciduous woods for the Mike Schley overland style.
1. Setting up the Symbols In Area command
- First, load an existing or start a new Mike Schley overland and choose the Symbols in Area command from the Draw menu.
- Click Browse and load the Vegetation catalog from /Symbols/Maps/Mike Schley/
- Set the settings as shown in the screenshot on the right, then Save the setting under \System\Fillers\MS_WoodsDecid.symfill
If you want to test and possibly adjust the settings, draw a smooth polygon on the map and use the command on it after clicking OK in the Symbols in Area dialog.
2. Creating a new Drawing Tool
Now we need to set up the new drawing tool for this setting.
- Right-click the Terrain Drawing tools button and click the Advanced button.
- Select the tool Terrain Default, Forest Decid and click New.
- Name the new tool “Terrain Default, Woods Decid” and save it.
- Click Command to Execute and enter the following macro:
- Save the tool and you’re good to use it.
SYMFILLLOAD @system\fillers\MS_WoodsDecid.symfill
SELSAVE
SELBYP
SYMFILLM
SELREST
3. Creating a Drawing Tool Preview.
You’ll notice that the tool doesn’t have a preview at this point. That’s because a macro-using drawing tool needs a little FCW file (CC3+ map for the preview. Let’s create this as a bonus step – it’s not really necessary but useful.
- Load the foilowing FCW file in CC3+ from your Programdata folder (which might be different from the path show here): C:\ProgramData\Profanatsy\CC3Plus\System\Drawtools\Overland Mike Schley\Terrain Default, Forest Decid.FCW and save it in the same folder under the name Terrain Default, Woods Decid.FCW. This is the same file name as the drawing tool we created, only with a different file extension.
- Erase all trees from the file, but leave the gray background.
- Use the Symbols in Area command with the settings we’ve previously created, then Save the map.
And that’s all there is to creating a scattered woods drawing tool. You can do the same with pine or jungle trees, or any type of symbol you want. Here is an example created with the new drawing tool:
Many gamers use some kind of digital solution such as virtual table-top software to display maps on a projector or computer screen even when running a local game (as opposed to running a game over the internet, where such software is pretty much required). All of these software solutions have their advantages and disadvantages, but CC3+ itself may actually be a very good solution, depending on your needs. Now, just to start with the limitations, CC3+ don’t have any kind of remote viewing/projecting options, so this do require that you share the screen you are actually working on (This can be a secondary screen/projector that is set up to mirror yours, or it can be done through screen sharing software, which allow others to see your screen even over the internet).
So, why would you use CC3+ for this? What advantages does it have over other VTT software? Well, the main reason CC3+ is good for this is that this is where you made your map in the first place. This means that the map is fully interactive, and you have all your regular CC3+ tools available to you to manipulate the map during play. If you export the map from CC3+ to an image file for use in a VTT program, then everything becomes static. In CC3+ you can hide or show sheets and layers, you can move symbols and edit whatever you need to do.
Of course, CC3+ isn’t optimized for use during play, while a VTT program is made just for that purpose, so some things are probably a bit more complicated to do in CC3+, so it is up to you if the flexibility CC3+ offer with regards to what you can do with your map during game play is worth it. For this article, I’ll showcase a few features of CC3+ that helps you during play.
Usually we make a map in CC3+, and when done, we export it to an image or print it, turning it into a static thing. This is required when we wish to use the map outside of CC3+, but it also takes away many fun things we can do with the map.
CC3+ does allow us to make really dynamic maps however, maps that change based on triggers in the map. I’ve already talked about a simple version of this in the article on Showing and Hiding Map Features, but let us take this much further and make a map with a large selection of interactive elements.
Now, before reading any further, I strongly suggest that you download the example map and give it a good try before reading further (requires DD3). Another much simpler example shows moving lights (Works without DD3).
In CC3+, drawing tools are great timesavers. The basic functionality of a drawing tool is that it works as a preset that contains all the various settings required, such as line style, fill style, line width, color, sheet and layer so that when you draw using a drawing tool you don’t have to go around setting all of these manually like we did in the good old days. Drawing tools also have some built-in nice features like being able to draw two separate entities at once, being able to stay within the map border, and the option to easily edit an existing shape.
However, there is another very important feature that exists for drawing tools, and that is to attach macros to them. A drawing tool can contain an embedded macro which follow the tool and isn’t dependent on your main CC3+ macro file and can contain macros that work in tandem with what you draw using the tool, or even functionality that isn’t connected to drawing at all. Today, we’ll look at how to create these tools and have a brief look at how they can make things easier for us.
Drawing with Macros
If you have been making overland maps, you’ll probably familiar with the forest drawing tools. If you pay attention when you use them, you’ll note that they ask you to draw a smooth shape, and then fills this shape with trees after you are done drawing it. This is a macro drawing tool at work. What happens is that the tool itself is only set up to draw that forest background, but it also contain a macro that gets called when you are done drawing that calls the Fill With Symbols command to fill the area you just drew with trees. Let us make a similar macro that uses the Symbols in Area command instead. I won’t go into detail about Symbols in Area here, since this is about making a macro tool that uses the command, rather than explain the command itself, but if you need a refresher for the command, you can look at this article.