summaryrefslogtreecommitdiff
path: root/testing_data/tiled_examples/sewer_automap/rules.txt
blob: 8d9377550db600990797a6cd12a11287234ca0d1 (plain) (blame)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# rules.txt
# Copyright 2011, Stefan Beller <stefanbeller@googlemail.com>
#
# This file is part of the sewers example for automapping for Tiled.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.


# lines starting with # or // are comments
# all other lines will be parsed and treated as filenames.

# Feel free to comment out certain rules, to see if and how they are working.
# So have fun experimenting with this bunch of rules :)

# First apply only one tile rules to fill the regions
#
# We mark the place, where rules are defined, with the RuleRegion layer.
# So whereever there are tiles at the ruleRegion layer, it will be used as a rule.
# In the RuleSet layer we can define, which combination of tiles must occur
# to trigger the specific rule.
# The layers Rule_Ground, Rule_Over and Rule_Over2 define the output of the rules.
#
# Which tiles should I use in the regions layer?
# Actually there can be any tiles, but it should be the same tiles for one rule.
# So use whatever you want, maybe a colorful tile so you can see easily that these
# tiles are used for defining the rule region.
#
# In the very first rulefile used for Automapping it might be useful to define
# some map properties:
# "DeleteTiles" = "true", "false" - This property determines if all tiles in the
#                                   whole region where Automapping takes place
#                                   are deleted.
#                                   That is useful, when not all layers are covered
#                                   at all places. (Check the Over and Over2 layer!)
# "AutoMappingRadius" = 0,1,2...  - This property determines which regions are
#                                   automatically remapped at live Automapping.
#                                   When you draw directly into the map,
#                                   not the whole map is remapped, but only a little
#                                   place around. Here you can specify how many
#                                   tiles at least should be remapped.

./rule_001.tmx




# Setup the right transition tiles at the border of light blue stone tiles
#
# Basically it is the same as the first rule, we are just using bigger rules.
# Whenever there is a light blue tile beside a grey tile, one of these rules
# will apply.

./rule_002.tmx




# Now put straight walls
#
# Note: Compare the regions and the set layer!
# Not at all places where a rule is defined, there is a tile in the input_set layer.
# This means that there can be any tiles except those used by the rule.
# So there are no black tiles allowed, when there are no tiles in the input_set
# layer.

./rule_003.tmx




# Now we add inner corners for walls
#
# (No new features introduced)

./rule_004.tmx




# Now we add the corners for walls
#
# (No new features introduced)

./rule_005.tmx




# Correct the error we got in the two previous rulefiles (overwrite it once more)
#
# Here we can see the use of input_set and input_NotSet
# With the input_NotSet we can define which tiles must not be used at certain places
# Important sideeffect: the empty regions in ruleSet can be anything now, including
# black tiles as used here!
#
# So when you use both input_Set and input_NotSet, you need to specify exactly what
# is allowed at which places.

./rule_006.tmx




# Setup the corner stones for light blue stone tiles
#
# Hey, there are multiple layers called input_NotSet!
# Yes, when you need to specify multiple allowed or disallowed tiles per
# position, you can use multiple layers of input_Set and input_NotSet

./rule_007.tmx





# Setup objects now
# The objects '1' will be placed. They will be placed based on the
# Over layer, which was created by previous rules.
# The placement of objects is done in south-east corners.

./rule_008.tmx




# Setup another object.
# This object is based on input from the Ground layer.
# It will put objects to borderstones which are near an end of that borderline.
#

./rule_009.tmx