English (Developer) Chinese (Simplified)
Automapping 自动映射
What is Automapping? 什么是自动映射?
Automapping is an advanced tool to automatically search certain combinations of tiles across layers in a map and to replace these parts by other combination. This allows the user to draw structures with a minimum of time spent and the Automapping will be able to generate a rather complex scenario, which would need lots more time if manually crafted.
So the goal of Automapping is that you only need to draw within one layer and everything else is setup for you. This brings some advantages:
**Working speed** - you need less time to setup a map. **工作速度** - 你需要又快又好的设置地图.
**Less errors** - the main reason is to reduce the error rate. If you have setup the rules properly, there is no hidden error.
External Links 外部链接
`Automapping explained for Tiled 0.9 and later (YouTube) <http://www.youtube.com/watch?v=UUi0lD1pxyQ>`__
`Examples on Automapping <https://github.com/stefanbeller/tiled_examples>`__ `自动映射实例 <https://github.com/stefanbeller/tiled_examples>`__
`Tiled Map Editor Tutorial Part Three: AutoMap (YouTube) <https://youtu.be/A_A6rz7cvG4>`__ `Tiled 地图编辑器教程第三部分: 自动映射 (油管) <https://youtu.be/A_A6rz7cvG4>`__
Setting it Up 设置
The Automapping feature is looking for a text file called 'rules.txt' in the folder where the current map is located. Each line in this text file is either
a path to a **rulefile** **rulefile** 路径
or a path to another textfile which has the same syntax (i.e. in another directory)
or is a comment which is indicated by **#** or **//**
A **rulefile** is a standard map file, which can be read and written by tiled (\*.tmx). In one rulefile there can be defined multiple rules.
An automapping **rulefile** consists of 4 major parts:
The definition of regions describes which locations of the rulemap are actually used to create Automapping rules.
The definition of inputs describes which kind of pattern the working map will be searched for.
The definition of outputs describes how the working map is changed when an input pattern is found.