Editing
Template Editor
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Advanced Zone Placement == Controlling zones placement is one of the most difficult tasks when creating a template. By nature, zones are randomly laid out, based on template structure, and template format does not offer direct control over zone placement. However, several tricks can be used to control zone placement better, improving the playability of the map: * For any zone, you can specify whether it should be generated on the ground or underground. Unlike other placement options, this one always works. It is thus an efficient way to separate zones. * You can ask the generator to place zones side by side by using standard or fictive connections together with placement hints "Default", "Ground" or "Underground Gate". Note that zone placement will be much more strongly affected by placement hints "Ground" and "Underground gate" than "Default". Connections with placement hint "Ground" or "Underground gate" put strong placement constraints on the RMG, and should be used carefully: it should be always possible for RMG to fulfill these hints. Otherwise RMG may sacrifice other important layout constraints in order to meet those, which could lead to unreliable map generation. * Zone numbering is important. RMG creates zones one after another, in ascending zone number order. Each zone is placed as best as possible considering its relationship with zones already in place. After laying down all zones, RMG randomly mixes them, but only if it helps to implement connection settings better. Thus, in a number of cases, it is possible to mentally picture zone layout process, and choose zone numbers so that each zone ends up in a well-known position, clearly identified by the connections. * Zone locations are affected by [[#zone_sparseness|zone sparseness]] setting. If RMG finds several layouts that equally fulfill connection settings, the final layout is chosen either randomly (if there are few enough zones), or in such way that the largest zone dimension (height or width) is minimal. "Zone sparseness" setting affects the point from which zones will begin to be packed more tightly. If zone sparseness is small enough, the first two zones will always be placed diagonally from each other (since such configuration best fits into a square). * Zones can have the [[#zone_repulsion|zone repulsion]] option. The RMG will try to place them as far as possible from each other. This option has the lowest priority: when laying a the zone, the generator first selects, among all possible locations, the ones that implement connection settings best. Then, it selects, among these locations, the ones where the zone best fits into the reference square controlled by [[#zone_sparseness|zone sparseness]]. Then only comes zone repulsion: the final location is the one that, among the remaining locations, has the largest sum of (travel) distances to other zones that also have zone repulsion turned on. Let us illustrate some of these mechanisms by an example. Let us assume that we want to create a map without underground, where a central zone is surrounded by peripheral zones laid out in a predetermined order. A first obvious way to achieve this is to create fictive connections between the central zone and peripheral zones, and between adjacent peripheral zones. However, this will not work as expected unless proper zone numbering is set. For example, if the central zone has the largest number, then peripheral zones will be laid out first, and map configuration will unlikely be exactly a central zone surrounded by a ring of peripheral zones. With a small "zone sparseness" settings, zones will be packed tightly together without large gaps, so the central zone will not fit in the middle: it will be put on the side. During zone shuffling process, RMG may manage to fix the layout - and is actually likely to succeed for simple configurations - but in our case there are too many constraints to fulfill them with the simple shuffling. So the right approach is to give central zone the smallest number. But the numbering of other zone matters, too. Lets us assume that the next two zones (by numbers) are peripheral zones that are not adjacent in the connection circle. After laying out the first two zones (the center and one peripheral zone), the third one can be placed anywhere around the center, including near the second zone. In fact, with a small zone sparseness setting, third zone will always be next to the second zone. In such case, it becomes impossible for zone 2 and 3 to have two neighbors each, so RMG will have to tear off some zones from the center, which will disrupt zones layout. In order to avoid that, peripheral zones must be numbered so that adjacent zones have consecutive numbers. This way, RMG will always place peripheral zones correctly in its first attempt. Every peripheral zone will have a common boundary with the previous one, as well as free boundary available to welcome the next zone. There is one more difficulty with such circular zone layout: to ensure that all zones are placed in a circle around the center and there are no gaps between them, you need to choose appropriate zone dimensions. In practice, due to the random factor, it is almost impossible to avoid a gap between zones. Thus, with the numbering approach described above, one of the fictive connections will not be implemented properly. To avoid this, you must first select a pair of adjacent peripheral zones and remove their fictive connection (or put the recommended location to "Random", if the connection is not fictive). It will result in a gap between these two zones, and both will have an increased size, because they will spread over some of the cells of this gap. From this point, zone sizes can be adjusted in order to make the gap as small as possible, in such way that most cells from the gap are distributed to peripheral zones and not the center, without affecting the appearance of the map. But enough gap should be kept to eliminate the chance that peripheral zones will not fit around the central zone. This method works if there are at least 6 peripheral zones. If there are less, you have to make the central zone small enough, otherwise is will take the most of the cells of the gap between the peripheral zones. If you want to solve a similar problem for 4 peripheral zones around a central zone, you can use the option "Zone Repulsion". Zone numbering should then be as follows: the first zone is the central one, the second one is any of the peripheral zones, and the third one is on the opposite side of the second one. All zones except the center must use the option "Zone Repulsion". "Zone Sparseness" of the template must be large enough. Links between peripheral zones must either be removed or set to "Random" placement. Each peripheral zone must be connected to the center by a normal or fictive connection. With such zone numbering, RMG will first lay down the central zone and the first peripheral zone. Then, the second peripheral zone will be placed on the opposite side (due to zone repulsion option). The third peripheral zone will be put in between the first and second, and the fourth in the remaining spot. If you choose the appropriate zone dimensions and if you use a small enough [[#zone_sparseness|Zone Sparseness]], you can force peripheral zones to be located in the corners: the first peripheral zone will be placed diagonally from the center due to the small Zone Sparseness, and the second peripheral zone will be put in the adjacent corner, due to both Zone Sparseness and Zone Repulsion settings.
Summary:
Please note that all contributions to Heroes 3 wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information