Advanced Guide to Map Copying
Introduction
Greetings my young apprentice. It is I, Darth Sarek, here to instruct you in the ways of the Sith Order, the Dark Side of the Force, superior lightsaber techniques, and… improved AoK map design.
This article, while primarily about the Map Copy tool, covers a wide range of content. It starts off very basic, but it quickly dives into a lot of information that even experienced designers should find useful. So let’s get started!
The Basics
This tool is found in the Terrain tab of the map editor. Under Brush Type, click the box next to Map Copy. Your bottom toolbar will now show these options:
In Copy Mode, click and drag to highlight the area of the map you want to copy. Then click Copy Selected Map Area. You will then be in Paint Mode.
In Paint Mode, your cursor is now a brush that will paste the copied area. You can change the orientation of the copied content with the four center buttons. This illustration shows how these buttons affect the orientation.
If you are copying units, you can change their ownership by clicking the No Change Player button. It will change to say Yes Change Player, and a new drop down menu will appear below it. Select the player you want to change to. All units, of any player (including Gaia) will change ownership to the selected player when pasted. This only applies to valid units; in other words, a Deer, Wolf, or any other exclusively Gaia unit will not be changed to players other than Gaia.
You can paste the copied area as many times as you want, even in different maps; the last copied selection is stored until you exit Paint Mode. There are three ways to exit Paint Mode. First, you can click Go to Copy Mode. Second, if you have toggled the Change Player option to Yes, and then toggle it back to No, it will go back to Copy Mode. Third, exiting the game completely and reopening will start you back in Copy Mode.
Everything in the selected area will be copied: terrains, elevations, units, buildings, objects, even cliffs (cliffs are a special case, and are discussed more later).
A Bit More in Depth
Conventions
Throughout the article I will refer to coordinates in the form (x, y) and dimensions in the form (X/Columns)x(Y/Rows). We’ll have to establish what convention we are using to avoid confusion. The convention I use is the same used in AoK Trigger Studio. That is, the left corner of the map is (0, 0). X increases as you move down and to the right. Y increases as you move up and to the right. In other words, imagine rotating the map 45 degrees counterclockwise, and you wind up with a standard XY-plane, with the origin (0, 0) at the bottom left.
Ok, now that we are clear on that, back to the good stuff!
Brush Sizes
You may have noticed that after selecting an area you want to copy, the Paint Brush is a different size than the area you copied. What happened? Your selection is in there somewhere, but where?
The reason this happens is that Terrain Brushes are quantized to always be a square with odd side lengths. The Terrain, Elevation, and Erase features all have standard brush sizes: Tiny, Small, Medium, Large, and Huge. These are sizes 1x1, 3x3, 5x5, 7x7, and 9x9 respectively (Cliffs are always Small (3x3) size). Likewise, the Map Copy Paint Brush follows the same quantization of odd side length squares. The difference however, is that you do not pick the size from a list, as you do for Terrain; this also means you are not limited to Huge (9x9), but can go to the entire size of the map.
Again, you can select any rectangular area you wish in Copy Mode, but when you go to Paint Mode the brush will suddenly appear as a square. It will be just big enough to fit your selection. For example, if you select an area of 2x3 tiles, the brush will be a 3x3. If you select a 2x4 area, the brush will bump up to a 5x5. So where in that brush are the tiles you copied?
Answer: When the copied area is smaller than the resulting Paint Brush, the area you copied will be centered in the brush if possible, and tend toward the left when not.
Totally confused? Admittedly it is hard to describe with words, so let’s look at some examples. Let’s say you copy a 1x2 area (two tiles). The corresponding Paint Brush will be a 3x3 (nine tiles). We’ll look at each dimension individually. Your area has one column, so it will be centered: in the center of the three columns of the brush. But it has two rows. Two cannot be centered in three, so it will tend to the left, with the extraneous row being on the (upper) right side of the brush. This same pattern is followed for any size area you select. See the image below for more examples.
Rotations and Frames
Now that you are getting the hang of Map Copy, you decide to go duplicate your favorite scene from that map you played last week. It’s a picturesque forest clearing, with a colorful variety of trees surrounding a local linen market, displaying a dazzling assortment of vibrant rugs. With a satisfied grin you highlight the entire scene, and click Copy. You then open your map, and paste. To your horror, you are confronted with this jarring image:
“That’s not what it looked like!” you cry, smashing your screen with clenched fists. Why did all of this happen? It has to do with two attributes called Rotation and Frame, and how they are affected by Map Copy. Now, this matter deserves an entire article by itself, but we’ll go over it quickly for our purposes here. Some useful information can be gleaned from
Units
First let’s go over the terms as they relate to Units and Heroes (basically anything that moves). Each unit has 8 directions they can face (except ships, which have 16 directions). The direction they are facing is determined by their Rotation value, which is measured in radians; it ranges from 0/4pi to 7/4pi in increments of 1/4pi.
Each unit has various animations, from standing, to walking, to attacking, to dying. These animations are made up of a series of images called Frames. The Frames are numbered, starting at zero. When the last Frame is reached, it loops back to zero and the animation repeats itself. The only set of Frames relevant to this discussion is standing, as that is the only possible position for a newly placed unit to be in.
When units are placed in the Map Editor, they are assigned random Rotation and random Frame values. Something of note is that when the units are first placed, their appearance will not reflect their actual Rotation value. Only when you test the game, save and reopen the editor, or manually rotate them using the Rotate button, will those units be facing the proper direction, after which they will not change again. Another important note is that these values can be viewed and changed for any unit by using Trigger Studio.
Now, back to our subject: Map Copy…
When a unit is copied, it retains its Rotation value but not its Frame value (a new random Frame value is generated for every new unit). So if you copy the same unit over and over, they would all be facing the same direction, but their motions would not all be in sync. This is nice if you want a realistic looking bustling rank of soldiers, not so nice if you wanted a harmonized dance team.
The Rotation value of the unit remains consistent with whatever rotation or flip you apply to the copied area. If you Rotate Right, any units in your selection will, in addition to moving clockwise within the area, likewise rotate 90 degrees clockwise, as you would expect.
Buildings/Objects
Buildings are really easy. With the exception of houses, they don’t rotate and only have one Frame. You can change the Rotation value if you click Rotate on a building, or rotate a map copied area, but it will have no effect on the building whatsoever.
I use the term ‘objects’ for all non-unit or non-building items available in the Other section of the Units tab: things like rocks, haystacks, flags, trees, etc. Many objects (and houses) have several different appearances. And everyone knows that you use the Rotate button to cycle through these appearances. This is where things get a bit hairy.
For these objects, there is a complicated relationship between Rotation and Frame. Neither behaves like they do for units. It seems that the object’s appearance corresponds to the Frame attribute. When the object is rotated with the Rotate button, its Rotation value and Frame value are both increased by one increment. But if the Rotation is changed in Trigger Studio it has no effect. Only changing the Frame value affects the appearance. However, trying to manipulate the values in Trigger Studio can be very unpredictable.
Now, we can FINALLY get back to the original question… why do all the trees look the same? The answer is that for all objects and houses, Map Copy causes both Rotation and Frame values to be zero when pasted. Again, this is only for objects and houses, NOT units and heroes, which were described above.
The Rotation and Frame values of copied objects will always be identical to every other, but they can be changed to something other than zero (resulting in a different appearance) if the copied area is rotated or flipped. For example, instead of having a bunch of red rugs, you could Rotate Right and have a bunch of yellow rugs instead.
Invisible Cliffs
Cliffs can also be copied, however they will become invisible when pasted, but will still remain an obstruction. An exception is the west facing, convex corner piece. For some reason, this remains partially visible after copying.
More Uses
Precision Deletion
So you’re working on a detailed portion of your map. You have carefully placed every tree, rock, flower bed, and stump. Everything is perfect, down to the last shrub… well except for that one plant there. That one little plant just doesn’t look quite right. You foolishly set your cursor to Delete. You carefully point directly at the plant, and click. POP. The tree to the left vanishes. “No problem, I can put it back,” you say. You click again. POP. The mountain on the right disappears. The plant remains, defiantly laughing at your demise. “I’ll get you yet!” you exclaim, furiously clicking on the plant. With every ill-fated click, another part of your once perfect scene ceases to exist, until all that remains is that one plant. You click one last time, and finally, the plant is gone, along with everything else. You stare at the screen, bittersweet.
I have been a victim to the unwieldy cursor/pointer many times. When multiple objects are overlapping, sometimes it is downright impossible to click on the one you want. To avoid this, you can use Map Copy as a precision deletion tool! Simply copy an empty tile (or anything else you want instead), and paste it over the object you want deleted. This is especially useful for deleting map revealers, since they are impossible to click on in the first place. Copying over them is the only way to remove them from your map (other than using Trigger Studio).
Overlapping Buildings
At last… we have come to the final and probably most useful aspect of the Map Copy feature.
A well-known trick among map designers is using Map Copy to overlap buildings. This allows you to create much more interesting and aesthetic structures. It doesn’t just apply to buildings, either. This is used to put trees and rocks on a mountainside, or anything else you can imagine. This technique has already been discussed at great length many times. In fact there is an
In this article we will look at what is happening under the hood, and hopefully help you use this trick more efficiently and effectively!
Tile Parameters
First we need to understand the distinction between tiles and points. Refer back to the Conventions section above to see the coordinates of each point within a given tile. Any (integer) point not on the edge of the map will be the corner to four adjacent tiles. Which one of these tiles is the point actually in? The answer is: the point belongs to the tile on the right. In other words, a tile is defined by its left corner point.
This is relevant when determining what tile a unit or building is in. Units will always be located in the center of a tile (0.5, 0.5) unless you move them with Trigger Studio (I am not accounting for off-grid placement allowed in Userpatch or HD). Some objects start centered, but others start on corners. Some buildings start centered, others on corners, and others on lines between corners. This is important information when determining what tiles you need to copy in order to include the units/buildings/objects you want.
Building Parameters
A building’s location is defined by the point directly at its center. The tile containing that point is what is referred to as the ‘Anchor Tile.’ This is the only tile that needs to be selected to copy the entire building.
That was easy! But sometimes it is still tricky to find exactly where the center is.
Let’s look at some examples. The following pictures of various sized buildings show a grid and the center point, and highlight the ‘Anchor Tile.’
These pictures are part of a utility I created, which includes every building of every architecture set, as well as most of the objects found in the Other menu. Sometimes it is difficult to select the ‘Anchor Tile’ because it is covered! This utility helps by showing exactly where the ‘Anchor Tile’ is for each building. Here are some more samples:
Now you know right where to click! Unfortunately, I can’t put every single image in this article, so head over to the Blacksmith, and download my utility to get the rest!
You can find my utility here:
Conclusion
Map Copy is an invaluable tool for any AoK map designer. It has useful features and annoying quirks, but it is up to you to figure out how to use both to your advantage! I look forward to your comments, questions, and most of all your new maps!
You have been well trained my young apprentice. Steam Workshop will be no match for you…
[This message has been edited by Leif Ericson (edited 07-04-2016 @ 06:10 PM).]