From 0daa113f7ff0f7194a72d29f456aa05698885aa6 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Tue, 22 Jul 2025 03:35:56 +0300
Subject: [PATCH 65/65] Support animated Road extras

See RM #1623

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/tilespec.c                 |  46 +++----
 data/alio/burrowtubes.spec        | 128 +++++++++----------
 data/alio/roads.spec              |  36 +++---
 data/alio/tunnels.spec            | 142 ++++++++++-----------
 data/amplio/maglev.spec           |  18 +--
 data/amplio/terrain1.spec         |  36 +++---
 data/amplio2/maglev.spec          |  18 +--
 data/amplio2/terrain1.spec        |  36 +++---
 data/hex2t/highways.spec          |  20 +--
 data/hex2t/tiles.spec             |  54 ++++----
 data/hexemplio/roads-maglevs.spec | 128 +++++++++----------
 data/hexemplio/roads-rails.spec   | 128 +++++++++----------
 data/hexemplio/roads.spec         |  18 +--
 data/isophex/terrain1.spec        |  64 +++++-----
 data/isotrident/terrain1.spec     |  61 +++++----
 data/trident/highways.spec        |  72 +++++------
 data/trident/roads.spec           | 202 +++++++++++++++---------------
 17 files changed, 605 insertions(+), 602 deletions(-)

diff --git a/client/tilespec.c b/client/tilespec.c
index 31ca01002e..ea1ff2b102 100644
--- a/client/tilespec.c
+++ b/client/tilespec.c
@@ -375,21 +375,21 @@ struct named_sprites {
           *background;
       } bmf;
       struct {
-        struct sprite
+        struct anim
         /* For extrastyles ESTYLE_ROAD_ALL_SEPARATE and ESTYLE_ROAD_PARITY_COMBINED */
           *isolated,
           *corner[8]; /* Indexed by direction; only non-cardinal dirs used. */
         union {
           /* For ESTYLE_ROAD_ALL_SEPARATE */
-          struct sprite *dir[8];     /* All entries used */
+          struct anim *dir[8];     /* All entries used */
           /* ESTYLE_ROAD_PARITY_COMBINED */
           struct {
-            struct sprite
+            struct anim
               *even[MAX_INDEX_HALF],    /* First unused */
               *odd[MAX_INDEX_HALF];     /* First unused */
           } combo;
           /* ESTYLE_ALL_SEPARATE */
-          struct sprite *total[MAX_INDEX_VALID];
+          struct anim *total[MAX_INDEX_VALID];
           struct river_sprites rivers;
         } ru;
       } road;
@@ -2981,7 +2981,7 @@ static bool sprite_exists(const struct tileset *t, const char *tag_name)
     }                                                                       \
   } while (FALSE)
 
-/* Sets sprites.field to tag, or NULL if not available */
+/* Sets sprites.field to tag, or nullptr if not available */
 #define SET_SPRITE_OPT(field, tag) \
   t->sprites.field = load_sprite(t, tag, TRUE, TRUE, FALSE)
 
@@ -2995,12 +2995,16 @@ static bool sprite_exists(const struct tileset *t, const char *tag_name)
 #define SET_ANIM(field, tag)                                      \
   do {                                                            \
     t->sprites.field = anim_load(t, tag, 0);                      \
-    if (t->sprites.field == NULL) {                               \
+    if (t->sprites.field == nullptr) {                            \
       tileset_error(LOG_FATAL, tileset_name_get(t),               \
                     _("Animation for tag '%s' missing."), tag);   \
     }                                                             \
   } while (FALSE)
 
+/* Sets sprites.field to tag, or nullptr if not available */
+#define SET_ANIM_OPT(field, tag) \
+  t->sprites.field = anim_load(t, tag, 0)
+
 /************************************************************************//**
   Load an animation
 
@@ -4207,7 +4211,7 @@ static void tileset_setup_road(struct tileset *t,
     fc_snprintf(full_tag_name, sizeof(full_tag_name),
                 "%s_isolated", tag);
 
-    SET_SPRITE(extras[id].u.road.isolated, full_tag_name);
+    SET_ANIM(extras[id].u.road.isolated, full_tag_name);
   }
 
   if (extrastyle == ESTYLE_ROAD_ALL_SEPARATE) {
@@ -4220,7 +4224,7 @@ static void tileset_setup_road(struct tileset *t,
       fc_snprintf(full_tag_name, sizeof(full_tag_name),
                   "%s_%s", tag, dir_name);
 
-      SET_SPRITE(extras[id].u.road.ru.dir[i], full_tag_name);
+      SET_ANIM(extras[id].u.road.ru.dir[i], full_tag_name);
     }
   } else if (extrastyle == ESTYLE_ROAD_PARITY_COMBINED) {
     int num_index = 1 << (t->num_valid_tileset_dirs / 2), j;
@@ -4248,12 +4252,12 @@ static void tileset_setup_road(struct tileset *t,
       fc_snprintf(full_tag_name, sizeof(full_tag_name),
                   "%s_c_%s", tag, c);
 
-      SET_SPRITE(extras[id].u.road.ru.combo.even[i], full_tag_name);
+      SET_ANIM(extras[id].u.road.ru.combo.even[i], full_tag_name);
 
       fc_snprintf(full_tag_name, sizeof(full_tag_name),
                   "%s_d_%s", tag, d);
 
-      SET_SPRITE(extras[id].u.road.ru.combo.odd[i], full_tag_name);
+      SET_ANIM(extras[id].u.road.ru.combo.odd[i], full_tag_name);
     }
   } else if (extrastyle == ESTYLE_ROAD_ALL_COMBINED) {
     /* ESTYLE_ROAD_ALL_COMBINED includes 256 sprites, one for every possibility.
@@ -4264,7 +4268,7 @@ static void tileset_setup_road(struct tileset *t,
       fc_snprintf(full_tag_name, sizeof(full_tag_name),
                   "%s_%s", tag, idx_str);
 
-      SET_SPRITE(extras[id].u.road.ru.total[i], full_tag_name);
+      SET_ANIM(extras[id].u.road.ru.total[i], full_tag_name);
     }
   } else if (extrastyle == ESTYLE_RIVER) {
     if (!load_river_sprites(t, &t->sprites.extras[id].u.road.ru.rivers, tag)) {
@@ -4290,7 +4294,7 @@ static void tileset_setup_road(struct tileset *t,
         fc_snprintf(full_tag_name, sizeof(full_tag_name),
                     "%s_c_%s", pextra->graphic_str, dtn);
 
-        SET_SPRITE_OPT(extras[id].u.road.corner[dir], full_tag_name);
+        SET_ANIM_OPT(extras[id].u.road.corner[dir], full_tag_name);
       }
     }
   }
@@ -4986,7 +4990,7 @@ static int fill_road_corner_sprites(const struct tileset *t,
           && (road_near[cwdir] && road_near[ccwdir]
               && !(hider_near[cwdir] && hider_near[ccwdir]))
           && !(road && road_near[dir] && !(hider && hider_near[dir]))) {
-        ADD_SPRITE_SIMPLE(t->sprites.extras[extra_idx].u.road.corner[dir]);
+        ADD_ANIM_SPRITE_SIMPLE(t->sprites.extras[extra_idx].u.road.corner[dir]);
       }
     }
   }
@@ -5128,7 +5132,7 @@ static int fill_road_sprite_array(const struct tileset *t,
     if (road) {
       for (i = 0; i < t->num_valid_tileset_dirs; i++) {
         if (draw_road[t->valid_tileset_dirs[i]]) {
-          ADD_SPRITE_SIMPLE(t->sprites.extras[extra_idx].u.road.ru.dir[i]);
+          ADD_ANIM_SPRITE_SIMPLE(t->sprites.extras[extra_idx].u.road.ru.dir[i]);
         }
       }
     }
@@ -5157,10 +5161,10 @@ static int fill_road_sprite_array(const struct tileset *t,
 
       /* Draw the cardinal/even roads first. */
       if (road_even_tileno != 0) {
-        ADD_SPRITE_SIMPLE(t->sprites.extras[extra_idx].u.road.ru.combo.even[road_even_tileno]);
+        ADD_ANIM_SPRITE_SIMPLE(t->sprites.extras[extra_idx].u.road.ru.combo.even[road_even_tileno]);
       }
       if (road_odd_tileno != 0) {
-        ADD_SPRITE_SIMPLE(t->sprites.extras[extra_idx].u.road.ru.combo.odd[road_odd_tileno]);
+        ADD_ANIM_SPRITE_SIMPLE(t->sprites.extras[extra_idx].u.road.ru.combo.odd[road_odd_tileno]);
       }
     }
   } else if (extrastyle == ESTYLE_ROAD_ALL_COMBINED) {
@@ -5181,7 +5185,7 @@ static int fill_road_sprite_array(const struct tileset *t,
       }
 
       if (road_tileno != 0 || draw_single_road) {
-        ADD_SPRITE_SIMPLE(t->sprites.extras[extra_idx].u.road.ru.total[road_tileno]);
+        ADD_ANIM_SPRITE_SIMPLE(t->sprites.extras[extra_idx].u.road.ru.total[road_tileno]);
       }
     }
   } else {
@@ -5193,7 +5197,7 @@ static int fill_road_sprite_array(const struct tileset *t,
   if (extrastyle == ESTYLE_ROAD_ALL_SEPARATE
       || extrastyle == ESTYLE_ROAD_PARITY_COMBINED) {
     if (draw_single_road) {
-      ADD_SPRITE_SIMPLE(t->sprites.extras[extra_idx].u.road.isolated);
+      ADD_ANIM_SPRITE_SIMPLE(t->sprites.extras[extra_idx].u.road.isolated);
     }
   }
 
@@ -7509,13 +7513,13 @@ int fill_basic_road_sprite_array(const struct tileset *t,
         continue;
       }
       if (extrastyle == ESTYLE_ROAD_ALL_SEPARATE) {
-        ADD_SPRITE_SIMPLE(t->sprites.extras[idx].u.road.ru.dir[i]);
+        ADD_FRAME0_SIMPLE(t->sprites.extras[idx].u.road.ru.dir[i]);
       } else if (extrastyle == ESTYLE_ROAD_PARITY_COMBINED) {
         if ((i % 2) == 0) {
-          ADD_SPRITE_SIMPLE(t->sprites.extras[idx].u.road.ru.combo.even[1 << (i / 2)]);
+          ADD_FRAME0_SIMPLE(t->sprites.extras[idx].u.road.ru.combo.even[1 << (i / 2)]);
         }
       } else if (extrastyle == ESTYLE_ROAD_ALL_COMBINED) {
-        ADD_SPRITE_SIMPLE(t->sprites.extras[idx].u.road.ru.total[1 << i]);
+        ADD_FRAME0_SIMPLE(t->sprites.extras[idx].u.road.ru.total[1 << i]);
       }
     }
   }
diff --git a/data/alio/burrowtubes.spec b/data/alio/burrowtubes.spec
index ef57238638..f0b998b384 100644
--- a/data/alio/burrowtubes.spec
+++ b/data/alio/burrowtubes.spec
@@ -24,72 +24,72 @@ pixel_border = 1
 tiles = { "row", "column","tag"
 ; Burrow Tubes
 
- 0,  0, "road.burrow_tube_n0e0se0s0w0nw0"
- 0,  1, "road.burrow_tube_n1e0se0s0w0nw0"
- 0,  2, "road.burrow_tube_n0e1se0s0w0nw0"
- 0,  3, "road.burrow_tube_n1e1se0s0w0nw0"
- 0,  4, "road.burrow_tube_n0e0se0s1w0nw0"
- 0,  5, "road.burrow_tube_n1e0se0s1w0nw0"
- 0,  6, "road.burrow_tube_n0e1se0s1w0nw0"
- 0,  7, "road.burrow_tube_n1e1se0s1w0nw0"
- 1,  0, "road.burrow_tube_n0e0se0s0w1nw0"
- 1,  1, "road.burrow_tube_n1e0se0s0w1nw0"
- 1,  2, "road.burrow_tube_n0e1se0s0w1nw0"
- 1,  3, "road.burrow_tube_n1e1se0s0w1nw0"
- 1,  4, "road.burrow_tube_n0e0se0s1w1nw0"
- 1,  5, "road.burrow_tube_n1e0se0s1w1nw0"
- 1,  6, "road.burrow_tube_n0e1se0s1w1nw0"
- 1,  7, "road.burrow_tube_n1e1se0s1w1nw0"
+ 0,  0, "road.burrow_tube_n0e0se0s0w0nw0:0"
+ 0,  1, "road.burrow_tube_n1e0se0s0w0nw0:0"
+ 0,  2, "road.burrow_tube_n0e1se0s0w0nw0:0"
+ 0,  3, "road.burrow_tube_n1e1se0s0w0nw0:0"
+ 0,  4, "road.burrow_tube_n0e0se0s1w0nw0:0"
+ 0,  5, "road.burrow_tube_n1e0se0s1w0nw0:0"
+ 0,  6, "road.burrow_tube_n0e1se0s1w0nw0:0"
+ 0,  7, "road.burrow_tube_n1e1se0s1w0nw0:0"
+ 1,  0, "road.burrow_tube_n0e0se0s0w1nw0:0"
+ 1,  1, "road.burrow_tube_n1e0se0s0w1nw0:0"
+ 1,  2, "road.burrow_tube_n0e1se0s0w1nw0:0"
+ 1,  3, "road.burrow_tube_n1e1se0s0w1nw0:0"
+ 1,  4, "road.burrow_tube_n0e0se0s1w1nw0:0"
+ 1,  5, "road.burrow_tube_n1e0se0s1w1nw0:0"
+ 1,  6, "road.burrow_tube_n0e1se0s1w1nw0:0"
+ 1,  7, "road.burrow_tube_n1e1se0s1w1nw0:0"
 
- 2,  0, "road.burrow_tube_n0e0se1s0w0nw0"
- 2,  1, "road.burrow_tube_n1e0se1s0w0nw0"
- 2,  2, "road.burrow_tube_n0e1se1s0w0nw0"
- 2,  3, "road.burrow_tube_n1e1se1s0w0nw0"
- 2,  4, "road.burrow_tube_n0e0se1s1w0nw0"
- 2,  5, "road.burrow_tube_n1e0se1s1w0nw0"
- 2,  6, "road.burrow_tube_n0e1se1s1w0nw0"
- 2,  7, "road.burrow_tube_n1e1se1s1w0nw0"
- 3,  0, "road.burrow_tube_n0e0se1s0w1nw0"
- 3,  1, "road.burrow_tube_n1e0se1s0w1nw0"
- 3,  2, "road.burrow_tube_n0e1se1s0w1nw0"
- 3,  3, "road.burrow_tube_n1e1se1s0w1nw0"
- 3,  4, "road.burrow_tube_n0e0se1s1w1nw0"
- 3,  5, "road.burrow_tube_n1e0se1s1w1nw0"
- 3,  6, "road.burrow_tube_n0e1se1s1w1nw0"
- 3,  7, "road.burrow_tube_n1e1se1s1w1nw0"
+ 2,  0, "road.burrow_tube_n0e0se1s0w0nw0:0"
+ 2,  1, "road.burrow_tube_n1e0se1s0w0nw0:0"
+ 2,  2, "road.burrow_tube_n0e1se1s0w0nw0:0"
+ 2,  3, "road.burrow_tube_n1e1se1s0w0nw0:0"
+ 2,  4, "road.burrow_tube_n0e0se1s1w0nw0:0"
+ 2,  5, "road.burrow_tube_n1e0se1s1w0nw0:0"
+ 2,  6, "road.burrow_tube_n0e1se1s1w0nw0:0"
+ 2,  7, "road.burrow_tube_n1e1se1s1w0nw0:0"
+ 3,  0, "road.burrow_tube_n0e0se1s0w1nw0:0"
+ 3,  1, "road.burrow_tube_n1e0se1s0w1nw0:0"
+ 3,  2, "road.burrow_tube_n0e1se1s0w1nw0:0"
+ 3,  3, "road.burrow_tube_n1e1se1s0w1nw0:0"
+ 3,  4, "road.burrow_tube_n0e0se1s1w1nw0:0"
+ 3,  5, "road.burrow_tube_n1e0se1s1w1nw0:0"
+ 3,  6, "road.burrow_tube_n0e1se1s1w1nw0:0"
+ 3,  7, "road.burrow_tube_n1e1se1s1w1nw0:0"
 
- 4,  0, "road.burrow_tube_n0e0se0s0w0nw1"
- 4,  1, "road.burrow_tube_n1e0se0s0w0nw1"
- 4,  2, "road.burrow_tube_n0e1se0s0w0nw1"
- 4,  3, "road.burrow_tube_n1e1se0s0w0nw1"
- 4,  4, "road.burrow_tube_n0e0se0s1w0nw1"
- 4,  5, "road.burrow_tube_n1e0se0s1w0nw1"
- 4,  6, "road.burrow_tube_n0e1se0s1w0nw1"
- 4,  7, "road.burrow_tube_n1e1se0s1w0nw1"
- 5,  0, "road.burrow_tube_n0e0se0s0w1nw1"
- 5,  1, "road.burrow_tube_n1e0se0s0w1nw1"
- 5,  2, "road.burrow_tube_n0e1se0s0w1nw1"
- 5,  3, "road.burrow_tube_n1e1se0s0w1nw1"
- 5,  4, "road.burrow_tube_n0e0se0s1w1nw1"
- 5,  5, "road.burrow_tube_n1e0se0s1w1nw1"
- 5,  6, "road.burrow_tube_n0e1se0s1w1nw1"
- 5,  7, "road.burrow_tube_n1e1se0s1w1nw1"
+ 4,  0, "road.burrow_tube_n0e0se0s0w0nw1:0"
+ 4,  1, "road.burrow_tube_n1e0se0s0w0nw1:0"
+ 4,  2, "road.burrow_tube_n0e1se0s0w0nw1:0"
+ 4,  3, "road.burrow_tube_n1e1se0s0w0nw1:0"
+ 4,  4, "road.burrow_tube_n0e0se0s1w0nw1:0"
+ 4,  5, "road.burrow_tube_n1e0se0s1w0nw1:0"
+ 4,  6, "road.burrow_tube_n0e1se0s1w0nw1:0"
+ 4,  7, "road.burrow_tube_n1e1se0s1w0nw1:0"
+ 5,  0, "road.burrow_tube_n0e0se0s0w1nw1:0"
+ 5,  1, "road.burrow_tube_n1e0se0s0w1nw1:0"
+ 5,  2, "road.burrow_tube_n0e1se0s0w1nw1:0"
+ 5,  3, "road.burrow_tube_n1e1se0s0w1nw1:0"
+ 5,  4, "road.burrow_tube_n0e0se0s1w1nw1:0"
+ 5,  5, "road.burrow_tube_n1e0se0s1w1nw1:0"
+ 5,  6, "road.burrow_tube_n0e1se0s1w1nw1:0"
+ 5,  7, "road.burrow_tube_n1e1se0s1w1nw1:0"
 
- 6,  0, "road.burrow_tube_n0e0se1s0w0nw1"
- 6,  1, "road.burrow_tube_n1e0se1s0w0nw1"
- 6,  2, "road.burrow_tube_n0e1se1s0w0nw1"
- 6,  3, "road.burrow_tube_n1e1se1s0w0nw1"
- 6,  4, "road.burrow_tube_n0e0se1s1w0nw1"
- 6,  5, "road.burrow_tube_n1e0se1s1w0nw1"
- 6,  6, "road.burrow_tube_n0e1se1s1w0nw1"
- 6,  7, "road.burrow_tube_n1e1se1s1w0nw1"
- 7,  0, "road.burrow_tube_n0e0se1s0w1nw1"
- 7,  1, "road.burrow_tube_n1e0se1s0w1nw1"
- 7,  2, "road.burrow_tube_n0e1se1s0w1nw1"
- 7,  3, "road.burrow_tube_n1e1se1s0w1nw1"
- 7,  4, "road.burrow_tube_n0e0se1s1w1nw1"
- 7,  5, "road.burrow_tube_n1e0se1s1w1nw1"
- 7,  6, "road.burrow_tube_n0e1se1s1w1nw1"
- 7,  7, "road.burrow_tube_n1e1se1s1w1nw1"
+ 6,  0, "road.burrow_tube_n0e0se1s0w0nw1:0"
+ 6,  1, "road.burrow_tube_n1e0se1s0w0nw1:0"
+ 6,  2, "road.burrow_tube_n0e1se1s0w0nw1:0"
+ 6,  3, "road.burrow_tube_n1e1se1s0w0nw1:0"
+ 6,  4, "road.burrow_tube_n0e0se1s1w0nw1:0"
+ 6,  5, "road.burrow_tube_n1e0se1s1w0nw1:0"
+ 6,  6, "road.burrow_tube_n0e1se1s1w0nw1:0"
+ 6,  7, "road.burrow_tube_n1e1se1s1w0nw1:0"
+ 7,  0, "road.burrow_tube_n0e0se1s0w1nw1:0"
+ 7,  1, "road.burrow_tube_n1e0se1s0w1nw1:0"
+ 7,  2, "road.burrow_tube_n0e1se1s0w1nw1:0"
+ 7,  3, "road.burrow_tube_n1e1se1s0w1nw1:0"
+ 7,  4, "road.burrow_tube_n0e0se1s1w1nw1:0"
+ 7,  5, "road.burrow_tube_n1e0se1s1w1nw1:0"
+ 7,  6, "road.burrow_tube_n0e1se1s1w1nw1:0"
+ 7,  7, "road.burrow_tube_n1e1se1s1w1nw1:0"
 
 }
diff --git a/data/alio/roads.spec b/data/alio/roads.spec
index 4a33177e13..dbaf5bf968 100644
--- a/data/alio/roads.spec
+++ b/data/alio/roads.spec
@@ -22,22 +22,22 @@ dy = 64
 pixel_border = 1
 
 tiles = { "row", "column","tag"
- 0,  0, "road.road_isolated"
- 0,  1, "road.road_n"
- 0,  2, "road.road_e"
- 0,  3, "road.road_se"
- 0,  4, "road.road_s"
- 0,  5, "road.road_w"
- 0,  6, "road.road_nw"
- 0,  7, "road.road_ne"
- 0,  7, "road.road_sw"
- 1,  0, "road.highway_isolated"
- 1,  1, "road.highway_n"
- 1,  2, "road.highway_e"
- 1,  3, "road.highway_se"
- 1,  4, "road.highway_s"
- 1,  5, "road.highway_w"
- 1,  6, "road.highway_nw"
- 1,  7, "road.highway_ne"
- 1,  7, "road.highway_sw"
+ 0,  0, "road.road_isolated:0"
+ 0,  1, "road.road_n:0"
+ 0,  2, "road.road_e:0"
+ 0,  3, "road.road_se:0"
+ 0,  4, "road.road_s:0"
+ 0,  5, "road.road_w:0"
+ 0,  6, "road.road_nw:0"
+ 0,  7, "road.road_ne:0"
+ 0,  7, "road.road_sw:0"
+ 1,  0, "road.highway_isolated:0"
+ 1,  1, "road.highway_n:0"
+ 1,  2, "road.highway_e:0"
+ 1,  3, "road.highway_se:0"
+ 1,  4, "road.highway_s:0"
+ 1,  5, "road.highway_w:0"
+ 1,  6, "road.highway_nw:0"
+ 1,  7, "road.highway_ne:0"
+ 1,  7, "road.highway_sw:0"
 }
diff --git a/data/alio/tunnels.spec b/data/alio/tunnels.spec
index 4a09e73f96..16e04370eb 100644
--- a/data/alio/tunnels.spec
+++ b/data/alio/tunnels.spec
@@ -24,76 +24,76 @@ pixel_border = 1
 tiles = { "row", "column","tag"
 ; Tunnels (as special type), and whether north, south, east, west
 
- 2,  0, "road.tunnel_n0e0se0s0w0nw0"
- 2,  1, "road.tunnel_n1e0se0s0w0nw0"
- 2,  2, "road.tunnel_n0e1se0s0w0nw0"
- 2,  3, "road.tunnel_n1e1se0s0w0nw0"
- 2,  4, "road.tunnel_n0e0se0s1w0nw0"
- 2,  5, "road.tunnel_n1e0se0s1w0nw0"
- 2,  6, "road.tunnel_n0e1se0s1w0nw0"
- 2,  7, "road.tunnel_n1e1se0s1w0nw0"
-
- 3,  0, "road.tunnel_n0e0se0s0w1nw0"
- 3,  1, "road.tunnel_n1e0se0s0w1nw0"
- 3,  2, "road.tunnel_n0e1se0s0w1nw0"
- 3,  3, "road.tunnel_n1e1se0s0w1nw0"
- 3,  4, "road.tunnel_n0e0se0s1w1nw0"
- 3,  5, "road.tunnel_n1e0se0s1w1nw0"
- 3,  6, "road.tunnel_n0e1se0s1w1nw0"
- 3,  7, "road.tunnel_n1e1se0s1w1nw0"
-
- 4,  0, "road.tunnel_n0e0se1s0w0nw0"
- 4,  1, "road.tunnel_n1e0se1s0w0nw0"
- 4,  2, "road.tunnel_n0e1se1s0w0nw0"
- 4,  3, "road.tunnel_n1e1se1s0w0nw0"
- 4,  4, "road.tunnel_n0e0se1s1w0nw0"
- 4,  5, "road.tunnel_n1e0se1s1w0nw0"
- 4,  6, "road.tunnel_n0e1se1s1w0nw0"
- 4,  7, "road.tunnel_n1e1se1s1w0nw0"
-
- 5,  0, "road.tunnel_n0e0se1s0w1nw0"
- 5,  1, "road.tunnel_n1e0se1s0w1nw0"
- 5,  2, "road.tunnel_n0e1se1s0w1nw0"
- 5,  3, "road.tunnel_n1e1se1s0w1nw0"
- 5,  4, "road.tunnel_n0e0se1s1w1nw0"
- 5,  5, "road.tunnel_n1e0se1s1w1nw0"
- 5,  6, "road.tunnel_n0e1se1s1w1nw0"
- 5,  7, "road.tunnel_n1e1se1s1w1nw0"
-
- 6,  0, "road.tunnel_n0e0se0s0w0nw1"
- 6,  1, "road.tunnel_n1e0se0s0w0nw1"
- 6,  2, "road.tunnel_n0e1se0s0w0nw1"
- 6,  3, "road.tunnel_n1e1se0s0w0nw1"
- 6,  4, "road.tunnel_n0e0se0s1w0nw1"
- 6,  5, "road.tunnel_n1e0se0s1w0nw1"
- 6,  6, "road.tunnel_n0e1se0s1w0nw1"
- 6,  7, "road.tunnel_n1e1se0s1w0nw1"
-
- 7,  0, "road.tunnel_n0e0se0s0w1nw1"
- 7,  1, "road.tunnel_n1e0se0s0w1nw1"
- 7,  2, "road.tunnel_n0e1se0s0w1nw1"
- 7,  3, "road.tunnel_n1e1se0s0w1nw1"
- 7,  4, "road.tunnel_n0e0se0s1w1nw1"
- 7,  5, "road.tunnel_n1e0se0s1w1nw1"
- 7,  6, "road.tunnel_n0e1se0s1w1nw1"
- 7,  7, "road.tunnel_n1e1se0s1w1nw1"
-
- 8,  0, "road.tunnel_n0e0se1s0w0nw1"
- 8,  1, "road.tunnel_n1e0se1s0w0nw1"
- 8,  2, "road.tunnel_n0e1se1s0w0nw1"
- 8,  3, "road.tunnel_n1e1se1s0w0nw1"
- 8,  4, "road.tunnel_n0e0se1s1w0nw1"
- 8,  5, "road.tunnel_n1e0se1s1w0nw1"
- 8,  6, "road.tunnel_n0e1se1s1w0nw1"
- 8,  7, "road.tunnel_n1e1se1s1w0nw1"
-
- 9,  0, "road.tunnel_n0e0se1s0w1nw1"
- 9,  1, "road.tunnel_n1e0se1s0w1nw1"
- 9,  2, "road.tunnel_n0e1se1s0w1nw1"
- 9,  3, "road.tunnel_n1e1se1s0w1nw1"
- 9,  4, "road.tunnel_n0e0se1s1w1nw1"
- 9,  5, "road.tunnel_n1e0se1s1w1nw1"
- 9,  6, "road.tunnel_n0e1se1s1w1nw1"
- 9,  7, "road.tunnel_n1e1se1s1w1nw1"
+ 2,  0, "road.tunnel_n0e0se0s0w0nw0:0"
+ 2,  1, "road.tunnel_n1e0se0s0w0nw0:0"
+ 2,  2, "road.tunnel_n0e1se0s0w0nw0:0"
+ 2,  3, "road.tunnel_n1e1se0s0w0nw0:0"
+ 2,  4, "road.tunnel_n0e0se0s1w0nw0:0"
+ 2,  5, "road.tunnel_n1e0se0s1w0nw0:0"
+ 2,  6, "road.tunnel_n0e1se0s1w0nw0:0"
+ 2,  7, "road.tunnel_n1e1se0s1w0nw0:0"
+
+ 3,  0, "road.tunnel_n0e0se0s0w1nw0:0"
+ 3,  1, "road.tunnel_n1e0se0s0w1nw0:0"
+ 3,  2, "road.tunnel_n0e1se0s0w1nw0:0"
+ 3,  3, "road.tunnel_n1e1se0s0w1nw0:0"
+ 3,  4, "road.tunnel_n0e0se0s1w1nw0:0"
+ 3,  5, "road.tunnel_n1e0se0s1w1nw0:0"
+ 3,  6, "road.tunnel_n0e1se0s1w1nw0:0"
+ 3,  7, "road.tunnel_n1e1se0s1w1nw0:0"
+
+ 4,  0, "road.tunnel_n0e0se1s0w0nw0:0"
+ 4,  1, "road.tunnel_n1e0se1s0w0nw0:0"
+ 4,  2, "road.tunnel_n0e1se1s0w0nw0:0"
+ 4,  3, "road.tunnel_n1e1se1s0w0nw0:0"
+ 4,  4, "road.tunnel_n0e0se1s1w0nw0:0"
+ 4,  5, "road.tunnel_n1e0se1s1w0nw0:0"
+ 4,  6, "road.tunnel_n0e1se1s1w0nw0:0"
+ 4,  7, "road.tunnel_n1e1se1s1w0nw0:0"
+
+ 5,  0, "road.tunnel_n0e0se1s0w1nw0:0"
+ 5,  1, "road.tunnel_n1e0se1s0w1nw0:0"
+ 5,  2, "road.tunnel_n0e1se1s0w1nw0:0"
+ 5,  3, "road.tunnel_n1e1se1s0w1nw0:0"
+ 5,  4, "road.tunnel_n0e0se1s1w1nw0:0"
+ 5,  5, "road.tunnel_n1e0se1s1w1nw0:0"
+ 5,  6, "road.tunnel_n0e1se1s1w1nw0:0"
+ 5,  7, "road.tunnel_n1e1se1s1w1nw0:0"
+
+ 6,  0, "road.tunnel_n0e0se0s0w0nw1:0"
+ 6,  1, "road.tunnel_n1e0se0s0w0nw1:0"
+ 6,  2, "road.tunnel_n0e1se0s0w0nw1:0"
+ 6,  3, "road.tunnel_n1e1se0s0w0nw1:0"
+ 6,  4, "road.tunnel_n0e0se0s1w0nw1:0"
+ 6,  5, "road.tunnel_n1e0se0s1w0nw1:0"
+ 6,  6, "road.tunnel_n0e1se0s1w0nw1:0"
+ 6,  7, "road.tunnel_n1e1se0s1w0nw1:0"
+
+ 7,  0, "road.tunnel_n0e0se0s0w1nw1:0"
+ 7,  1, "road.tunnel_n1e0se0s0w1nw1:0"
+ 7,  2, "road.tunnel_n0e1se0s0w1nw1:0"
+ 7,  3, "road.tunnel_n1e1se0s0w1nw1:0"
+ 7,  4, "road.tunnel_n0e0se0s1w1nw1:0"
+ 7,  5, "road.tunnel_n1e0se0s1w1nw1:0"
+ 7,  6, "road.tunnel_n0e1se0s1w1nw1:0"
+ 7,  7, "road.tunnel_n1e1se0s1w1nw1:0"
+
+ 8,  0, "road.tunnel_n0e0se1s0w0nw1:0"
+ 8,  1, "road.tunnel_n1e0se1s0w0nw1:0"
+ 8,  2, "road.tunnel_n0e1se1s0w0nw1:0"
+ 8,  3, "road.tunnel_n1e1se1s0w0nw1:0"
+ 8,  4, "road.tunnel_n0e0se1s1w0nw1:0"
+ 8,  5, "road.tunnel_n1e0se1s1w0nw1:0"
+ 8,  6, "road.tunnel_n0e1se1s1w0nw1:0"
+ 8,  7, "road.tunnel_n1e1se1s1w0nw1:0"
+
+ 9,  0, "road.tunnel_n0e0se1s0w1nw1:0"
+ 9,  1, "road.tunnel_n1e0se1s0w1nw1:0"
+ 9,  2, "road.tunnel_n0e1se1s0w1nw1:0"
+ 9,  3, "road.tunnel_n1e1se1s0w1nw1:0"
+ 9,  4, "road.tunnel_n0e0se1s1w1nw1:0"
+ 9,  5, "road.tunnel_n1e0se1s1w1nw1:0"
+ 9,  6, "road.tunnel_n0e1se1s1w1nw1:0"
+ 9,  7, "road.tunnel_n1e1se1s1w1nw1:0"
 
 }
diff --git a/data/amplio/maglev.spec b/data/amplio/maglev.spec
index daf155d914..0359b1103c 100644
--- a/data/amplio/maglev.spec
+++ b/data/amplio/maglev.spec
@@ -22,13 +22,13 @@ dy = 48
 pixel_border = 1
 
 tiles = { "row", "column", "tag"
- 0, 0, "road.maglev_isolated"
- 0, 1, "road.maglev_n"
- 0, 2, "road.maglev_ne"
- 0, 3, "road.maglev_e"
- 0, 4, "road.maglev_se"
- 0, 5, "road.maglev_s"
- 0, 6, "road.maglev_sw"
- 0, 7, "road.maglev_w"
- 0, 8, "road.maglev_nw"
+ 0, 0, "road.maglev_isolated:0"
+ 0, 1, "road.maglev_n:0"
+ 0, 2, "road.maglev_ne:0"
+ 0, 3, "road.maglev_e:0"
+ 0, 4, "road.maglev_se:0"
+ 0, 5, "road.maglev_s:0"
+ 0, 6, "road.maglev_sw:0"
+ 0, 7, "road.maglev_w:0"
+ 0, 8, "road.maglev_nw:0"
 }
diff --git a/data/amplio/terrain1.spec b/data/amplio/terrain1.spec
index 0ea1312986..55297fa20d 100644
--- a/data/amplio/terrain1.spec
+++ b/data/amplio/terrain1.spec
@@ -90,26 +90,26 @@ tiles = { "row", "column", "tag"
  11, 4, "ts.grassland_resources:0", "ts.river_resources:0"
 
 ; Roads
- 12, 0, "road.road_isolated"
- 12, 1, "road.road_n"
- 12, 2, "road.road_ne"
- 12, 3, "road.road_e"
- 12, 4, "road.road_se"
- 12, 5, "road.road_s"
- 12, 6, "road.road_sw"
- 12, 7, "road.road_w"
- 12, 8, "road.road_nw"
+ 12, 0, "road.road_isolated:0"
+ 12, 1, "road.road_n:0"
+ 12, 2, "road.road_ne:0"
+ 12, 3, "road.road_e:0"
+ 12, 4, "road.road_se:0"
+ 12, 5, "road.road_s:0"
+ 12, 6, "road.road_sw:0"
+ 12, 7, "road.road_w:0"
+ 12, 8, "road.road_nw:0"
 
 ; Rails
- 13, 0, "road.rail_isolated"
- 13, 1, "road.rail_n"
- 13, 2, "road.rail_ne"
- 13, 3, "road.rail_e"
- 13, 4, "road.rail_se"
- 13, 5, "road.rail_s"
- 13, 6, "road.rail_sw"
- 13, 7, "road.rail_w"
- 13, 8, "road.rail_nw"
+ 13, 0, "road.rail_isolated:0"
+ 13, 1, "road.rail_n:0"
+ 13, 2, "road.rail_ne:0"
+ 13, 3, "road.rail_e:0"
+ 13, 4, "road.rail_se:0"
+ 13, 5, "road.rail_s:0"
+ 13, 6, "road.rail_sw:0"
+ 13, 7, "road.rail_w:0"
+ 13, 8, "road.rail_nw:0"
 
 ; Other extras
  0,  6, "tx.oil_mine:0"
diff --git a/data/amplio2/maglev.spec b/data/amplio2/maglev.spec
index 05448ac54e..3fbaeee446 100644
--- a/data/amplio2/maglev.spec
+++ b/data/amplio2/maglev.spec
@@ -22,13 +22,13 @@ dy = 48
 pixel_border = 1
 
 tiles = { "row", "column", "tag"
- 0, 0, "road.maglev_isolated"
- 0, 1, "road.maglev_n"
- 0, 2, "road.maglev_ne"
- 0, 3, "road.maglev_e"
- 0, 4, "road.maglev_se"
- 0, 5, "road.maglev_s"
- 0, 6, "road.maglev_sw"
- 0, 7, "road.maglev_w"
- 0, 8, "road.maglev_nw"
+ 0, 0, "road.maglev_isolated:0"
+ 0, 1, "road.maglev_n:0"
+ 0, 2, "road.maglev_ne:0"
+ 0, 3, "road.maglev_e:0"
+ 0, 4, "road.maglev_se:0"
+ 0, 5, "road.maglev_s:0"
+ 0, 6, "road.maglev_sw:0"
+ 0, 7, "road.maglev_w:0"
+ 0, 8, "road.maglev_nw:0"
 }
diff --git a/data/amplio2/terrain1.spec b/data/amplio2/terrain1.spec
index 83669ce4c3..ef2ee50d1e 100644
--- a/data/amplio2/terrain1.spec
+++ b/data/amplio2/terrain1.spec
@@ -92,26 +92,26 @@ tiles = { "row", "column", "tag"
  11, 4, "ts.grassland_resources:0", "ts.river_resources:0"
 
 ; Roads
- 12, 0, "road.road_isolated"
- 12, 1, "road.road_n"
- 12, 2, "road.road_ne"
- 12, 3, "road.road_e"
- 12, 4, "road.road_se"
- 12, 5, "road.road_s"
- 12, 6, "road.road_sw"
- 12, 7, "road.road_w"
- 12, 8, "road.road_nw"
+ 12, 0, "road.road_isolated:0"
+ 12, 1, "road.road_n:0"
+ 12, 2, "road.road_ne:0"
+ 12, 3, "road.road_e:0"
+ 12, 4, "road.road_se:0"
+ 12, 5, "road.road_s:0"
+ 12, 6, "road.road_sw:0"
+ 12, 7, "road.road_w:0"
+ 12, 8, "road.road_nw:0"
 
 ; Rails
- 13, 0, "road.rail_isolated"
- 13, 1, "road.rail_n"
- 13, 2, "road.rail_ne"
- 13, 3, "road.rail_e"
- 13, 4, "road.rail_se"
- 13, 5, "road.rail_s"
- 13, 6, "road.rail_sw"
- 13, 7, "road.rail_w"
- 13, 8, "road.rail_nw"
+ 13, 0, "road.rail_isolated:0"
+ 13, 1, "road.rail_n:0"
+ 13, 2, "road.rail_ne:0"
+ 13, 3, "road.rail_e:0"
+ 13, 4, "road.rail_se:0"
+ 13, 5, "road.rail_s:0"
+ 13, 6, "road.rail_sw:0"
+ 13, 7, "road.rail_w:0"
+ 13, 8, "road.rail_nw:0"
 
 ; Add-ons
  0,  6, "tx.oil_mine:0"
diff --git a/data/hex2t/highways.spec b/data/hex2t/highways.spec
index 28e43eac22..e34598c253 100644
--- a/data/hex2t/highways.spec
+++ b/data/hex2t/highways.spec
@@ -25,14 +25,14 @@ tiles = { "row", "column","tag"
 
 ; Roads, Highways
 
- 0, 0, "road.highway_n"
- 0, 1, "road.highway_ne"
- 0, 2, "road.highway_e"
- 0, 7, "road.highway_se"
- 0, 3, "road.highway_s"
- 0, 4, "road.highway_sw"
- 0, 5, "road.highway_w"
- 0, 6, "road.highway_nw"
-
- 0, 8, "road.highway_isolated"
+ 0, 0, "road.highway_n:0"
+ 0, 1, "road.highway_ne:0"
+ 0, 2, "road.highway_e:0"
+ 0, 7, "road.highway_se:0"
+ 0, 3, "road.highway_s:0"
+ 0, 4, "road.highway_sw:0"
+ 0, 5, "road.highway_w:0"
+ 0, 6, "road.highway_nw:0"
+
+ 0, 8, "road.highway_isolated:0"
 }
diff --git a/data/hex2t/tiles.spec b/data/hex2t/tiles.spec
index c408bd4c5d..824dc6bfc1 100644
--- a/data/hex2t/tiles.spec
+++ b/data/hex2t/tiles.spec
@@ -29,43 +29,43 @@ tiles = { "row", "column","tag"
 
 ; Roads
 
- 0, 0, "road.road_n"
- 0, 1, "road.road_ne"
- 0, 2, "road.road_e"
- 0, 7, "road.road_se"
- 0, 3, "road.road_s"
- 0, 4, "road.road_sw"
- 0, 5, "road.road_w"
- 0, 6, "road.road_nw"
+ 0, 0, "road.road_n:0"
+ 0, 1, "road.road_ne:0"
+ 0, 2, "road.road_e:0"
+ 0, 7, "road.road_se:0"
+ 0, 3, "road.road_s:0"
+ 0, 4, "road.road_sw:0"
+ 0, 5, "road.road_w:0"
+ 0, 6, "road.road_nw:0"
 
- 0, 8, "road.road_isolated"
+ 0, 8, "road.road_isolated:0"
 
 ; Rails
 
- 1, 0, "road.rail_n"
- 1, 1, "road.rail_ne"
- 1, 2, "road.rail_e"
- 1, 7, "road.rail_se"
- 1, 3, "road.rail_s"
- 1, 4, "road.rail_sw"
- 1, 5, "road.rail_w"
- 1, 6, "road.rail_nw"
+ 1, 0, "road.rail_n:0"
+ 1, 1, "road.rail_ne:0"
+ 1, 2, "road.rail_e:0"
+ 1, 7, "road.rail_se:0"
+ 1, 3, "road.rail_s:0"
+ 1, 4, "road.rail_sw:0"
+ 1, 5, "road.rail_w:0"
+ 1, 6, "road.rail_nw:0"
 
- 1, 8, "road.rail_isolated"
+ 1, 8, "road.rail_isolated:0"
 
 
 ; Maglevs
 
- 2, 0, "road.maglev_n"
- 2, 1, "road.maglev_ne"
- 2, 2, "road.maglev_e"
- 2, 7, "road.maglev_se"
- 2, 3, "road.maglev_s"
- 2, 4, "road.maglev_sw"
- 2, 5, "road.maglev_w"
- 2, 6, "road.maglev_nw"
+ 2, 0, "road.maglev_n:0"
+ 2, 1, "road.maglev_ne:0"
+ 2, 2, "road.maglev_e:0"
+ 2, 7, "road.maglev_se:0"
+ 2, 3, "road.maglev_s:0"
+ 2, 4, "road.maglev_sw:0"
+ 2, 5, "road.maglev_w:0"
+ 2, 6, "road.maglev_nw:0"
 
- 2, 8, "road.maglev_isolated"
+ 2, 8, "road.maglev_isolated:0"
 
 ; terrain : if more t.whateverN are given it picks one randomly for each tile.
 ;  for example with t.desert1 and t.desert2.
diff --git a/data/hexemplio/roads-maglevs.spec b/data/hexemplio/roads-maglevs.spec
index 6c4f68b05d..6ad5bf51d3 100644
--- a/data/hexemplio/roads-maglevs.spec
+++ b/data/hexemplio/roads-maglevs.spec
@@ -24,72 +24,72 @@ pixel_border = 1
 tiles = { "row", "column","tag"
 ; Magnetic Levitation Rails
 
- 0,  0, "road.maglev_n0e0se0s0w0nw0"
- 0,  1, "road.maglev_n1e0se0s0w0nw0"
- 0,  2, "road.maglev_n0e1se0s0w0nw0"
- 0,  3, "road.maglev_n1e1se0s0w0nw0"
- 0,  4, "road.maglev_n0e0se0s1w0nw0"
- 0,  5, "road.maglev_n1e0se0s1w0nw0"
- 0,  6, "road.maglev_n0e1se0s1w0nw0"
- 0,  7, "road.maglev_n1e1se0s1w0nw0"
- 1,  0, "road.maglev_n0e0se0s0w1nw0"
- 1,  1, "road.maglev_n1e0se0s0w1nw0"
- 1,  2, "road.maglev_n0e1se0s0w1nw0"
- 1,  3, "road.maglev_n1e1se0s0w1nw0"
- 1,  4, "road.maglev_n0e0se0s1w1nw0"
- 1,  5, "road.maglev_n1e0se0s1w1nw0"
- 1,  6, "road.maglev_n0e1se0s1w1nw0"
- 1,  7, "road.maglev_n1e1se0s1w1nw0"
+ 0,  0, "road.maglev_n0e0se0s0w0nw0:0"
+ 0,  1, "road.maglev_n1e0se0s0w0nw0:0"
+ 0,  2, "road.maglev_n0e1se0s0w0nw0:0"
+ 0,  3, "road.maglev_n1e1se0s0w0nw0:0"
+ 0,  4, "road.maglev_n0e0se0s1w0nw0:0"
+ 0,  5, "road.maglev_n1e0se0s1w0nw0:0"
+ 0,  6, "road.maglev_n0e1se0s1w0nw0:0"
+ 0,  7, "road.maglev_n1e1se0s1w0nw0:0"
+ 1,  0, "road.maglev_n0e0se0s0w1nw0:0"
+ 1,  1, "road.maglev_n1e0se0s0w1nw0:0"
+ 1,  2, "road.maglev_n0e1se0s0w1nw0:0"
+ 1,  3, "road.maglev_n1e1se0s0w1nw0:0"
+ 1,  4, "road.maglev_n0e0se0s1w1nw0:0"
+ 1,  5, "road.maglev_n1e0se0s1w1nw0:0"
+ 1,  6, "road.maglev_n0e1se0s1w1nw0:0"
+ 1,  7, "road.maglev_n1e1se0s1w1nw0:0"
 
- 2,  0, "road.maglev_n0e0se1s0w0nw0"
- 2,  1, "road.maglev_n1e0se1s0w0nw0"
- 2,  2, "road.maglev_n0e1se1s0w0nw0"
- 2,  3, "road.maglev_n1e1se1s0w0nw0"
- 2,  4, "road.maglev_n0e0se1s1w0nw0"
- 2,  5, "road.maglev_n1e0se1s1w0nw0"
- 2,  6, "road.maglev_n0e1se1s1w0nw0"
- 2,  7, "road.maglev_n1e1se1s1w0nw0"
- 3,  0, "road.maglev_n0e0se1s0w1nw0"
- 3,  1, "road.maglev_n1e0se1s0w1nw0"
- 3,  2, "road.maglev_n0e1se1s0w1nw0"
- 3,  3, "road.maglev_n1e1se1s0w1nw0"
- 3,  4, "road.maglev_n0e0se1s1w1nw0"
- 3,  5, "road.maglev_n1e0se1s1w1nw0"
- 3,  6, "road.maglev_n0e1se1s1w1nw0"
- 3,  7, "road.maglev_n1e1se1s1w1nw0"
+ 2,  0, "road.maglev_n0e0se1s0w0nw0:0"
+ 2,  1, "road.maglev_n1e0se1s0w0nw0:0"
+ 2,  2, "road.maglev_n0e1se1s0w0nw0:0"
+ 2,  3, "road.maglev_n1e1se1s0w0nw0:0"
+ 2,  4, "road.maglev_n0e0se1s1w0nw0:0"
+ 2,  5, "road.maglev_n1e0se1s1w0nw0:0"
+ 2,  6, "road.maglev_n0e1se1s1w0nw0:0"
+ 2,  7, "road.maglev_n1e1se1s1w0nw0:0"
+ 3,  0, "road.maglev_n0e0se1s0w1nw0:0"
+ 3,  1, "road.maglev_n1e0se1s0w1nw0:0"
+ 3,  2, "road.maglev_n0e1se1s0w1nw0:0"
+ 3,  3, "road.maglev_n1e1se1s0w1nw0:0"
+ 3,  4, "road.maglev_n0e0se1s1w1nw0:0"
+ 3,  5, "road.maglev_n1e0se1s1w1nw0:0"
+ 3,  6, "road.maglev_n0e1se1s1w1nw0:0"
+ 3,  7, "road.maglev_n1e1se1s1w1nw0:0"
 
- 4,  0, "road.maglev_n0e0se0s0w0nw1"
- 4,  1, "road.maglev_n1e0se0s0w0nw1"
- 4,  2, "road.maglev_n0e1se0s0w0nw1"
- 4,  3, "road.maglev_n1e1se0s0w0nw1"
- 4,  4, "road.maglev_n0e0se0s1w0nw1"
- 4,  5, "road.maglev_n1e0se0s1w0nw1"
- 4,  6, "road.maglev_n0e1se0s1w0nw1"
- 4,  7, "road.maglev_n1e1se0s1w0nw1"
- 5,  0, "road.maglev_n0e0se0s0w1nw1"
- 5,  1, "road.maglev_n1e0se0s0w1nw1"
- 5,  2, "road.maglev_n0e1se0s0w1nw1"
- 5,  3, "road.maglev_n1e1se0s0w1nw1"
- 5,  4, "road.maglev_n0e0se0s1w1nw1"
- 5,  5, "road.maglev_n1e0se0s1w1nw1"
- 5,  6, "road.maglev_n0e1se0s1w1nw1"
- 5,  7, "road.maglev_n1e1se0s1w1nw1"
+ 4,  0, "road.maglev_n0e0se0s0w0nw1:0"
+ 4,  1, "road.maglev_n1e0se0s0w0nw1:0"
+ 4,  2, "road.maglev_n0e1se0s0w0nw1:0"
+ 4,  3, "road.maglev_n1e1se0s0w0nw1:0"
+ 4,  4, "road.maglev_n0e0se0s1w0nw1:0"
+ 4,  5, "road.maglev_n1e0se0s1w0nw1:0"
+ 4,  6, "road.maglev_n0e1se0s1w0nw1:0"
+ 4,  7, "road.maglev_n1e1se0s1w0nw1:0"
+ 5,  0, "road.maglev_n0e0se0s0w1nw1:0"
+ 5,  1, "road.maglev_n1e0se0s0w1nw1:0"
+ 5,  2, "road.maglev_n0e1se0s0w1nw1:0"
+ 5,  3, "road.maglev_n1e1se0s0w1nw1:0"
+ 5,  4, "road.maglev_n0e0se0s1w1nw1:0"
+ 5,  5, "road.maglev_n1e0se0s1w1nw1:0"
+ 5,  6, "road.maglev_n0e1se0s1w1nw1:0"
+ 5,  7, "road.maglev_n1e1se0s1w1nw1:0"
 
- 6,  0, "road.maglev_n0e0se1s0w0nw1"
- 6,  1, "road.maglev_n1e0se1s0w0nw1"
- 6,  2, "road.maglev_n0e1se1s0w0nw1"
- 6,  3, "road.maglev_n1e1se1s0w0nw1"
- 6,  4, "road.maglev_n0e0se1s1w0nw1"
- 6,  5, "road.maglev_n1e0se1s1w0nw1"
- 6,  6, "road.maglev_n0e1se1s1w0nw1"
- 6,  7, "road.maglev_n1e1se1s1w0nw1"
- 7,  0, "road.maglev_n0e0se1s0w1nw1"
- 7,  1, "road.maglev_n1e0se1s0w1nw1"
- 7,  2, "road.maglev_n0e1se1s0w1nw1"
- 7,  3, "road.maglev_n1e1se1s0w1nw1"
- 7,  4, "road.maglev_n0e0se1s1w1nw1"
- 7,  5, "road.maglev_n1e0se1s1w1nw1"
- 7,  6, "road.maglev_n0e1se1s1w1nw1"
- 7,  7, "road.maglev_n1e1se1s1w1nw1"
+ 6,  0, "road.maglev_n0e0se1s0w0nw1:0"
+ 6,  1, "road.maglev_n1e0se1s0w0nw1:0"
+ 6,  2, "road.maglev_n0e1se1s0w0nw1:0"
+ 6,  3, "road.maglev_n1e1se1s0w0nw1:0"
+ 6,  4, "road.maglev_n0e0se1s1w0nw1:0"
+ 6,  5, "road.maglev_n1e0se1s1w0nw1:0"
+ 6,  6, "road.maglev_n0e1se1s1w0nw1:0"
+ 6,  7, "road.maglev_n1e1se1s1w0nw1:0"
+ 7,  0, "road.maglev_n0e0se1s0w1nw1:0"
+ 7,  1, "road.maglev_n1e0se1s0w1nw1:0"
+ 7,  2, "road.maglev_n0e1se1s0w1nw1:0"
+ 7,  3, "road.maglev_n1e1se1s0w1nw1:0"
+ 7,  4, "road.maglev_n0e0se1s1w1nw1:0"
+ 7,  5, "road.maglev_n1e0se1s1w1nw1:0"
+ 7,  6, "road.maglev_n0e1se1s1w1nw1:0"
+ 7,  7, "road.maglev_n1e1se1s1w1nw1:0"
 
 }
diff --git a/data/hexemplio/roads-rails.spec b/data/hexemplio/roads-rails.spec
index 2d471b927b..01b371940e 100644
--- a/data/hexemplio/roads-rails.spec
+++ b/data/hexemplio/roads-rails.spec
@@ -24,72 +24,72 @@ pixel_border = 1
 tiles = { "row", "column","tag"
 ; Railroads
 
- 0,  0, "road.rail_n0e0se0s0w0nw0"
- 0,  1, "road.rail_n1e0se0s0w0nw0"
- 0,  2, "road.rail_n0e1se0s0w0nw0"
- 0,  3, "road.rail_n1e1se0s0w0nw0"
- 0,  4, "road.rail_n0e0se0s1w0nw0"
- 0,  5, "road.rail_n1e0se0s1w0nw0"
- 0,  6, "road.rail_n0e1se0s1w0nw0"
- 0,  7, "road.rail_n1e1se0s1w0nw0"
- 1,  0, "road.rail_n0e0se0s0w1nw0"
- 1,  1, "road.rail_n1e0se0s0w1nw0"
- 1,  2, "road.rail_n0e1se0s0w1nw0"
- 1,  3, "road.rail_n1e1se0s0w1nw0"
- 1,  4, "road.rail_n0e0se0s1w1nw0"
- 1,  5, "road.rail_n1e0se0s1w1nw0"
- 1,  6, "road.rail_n0e1se0s1w1nw0"
- 1,  7, "road.rail_n1e1se0s1w1nw0"
+ 0,  0, "road.rail_n0e0se0s0w0nw0:0"
+ 0,  1, "road.rail_n1e0se0s0w0nw0:0"
+ 0,  2, "road.rail_n0e1se0s0w0nw0:0"
+ 0,  3, "road.rail_n1e1se0s0w0nw0:0"
+ 0,  4, "road.rail_n0e0se0s1w0nw0:0"
+ 0,  5, "road.rail_n1e0se0s1w0nw0:0"
+ 0,  6, "road.rail_n0e1se0s1w0nw0:0"
+ 0,  7, "road.rail_n1e1se0s1w0nw0:0"
+ 1,  0, "road.rail_n0e0se0s0w1nw0:0"
+ 1,  1, "road.rail_n1e0se0s0w1nw0:0"
+ 1,  2, "road.rail_n0e1se0s0w1nw0:0"
+ 1,  3, "road.rail_n1e1se0s0w1nw0:0"
+ 1,  4, "road.rail_n0e0se0s1w1nw0:0"
+ 1,  5, "road.rail_n1e0se0s1w1nw0:0"
+ 1,  6, "road.rail_n0e1se0s1w1nw0:0"
+ 1,  7, "road.rail_n1e1se0s1w1nw0:0"
 
- 2,  0, "road.rail_n0e0se1s0w0nw0"
- 2,  1, "road.rail_n1e0se1s0w0nw0"
- 2,  2, "road.rail_n0e1se1s0w0nw0"
- 2,  3, "road.rail_n1e1se1s0w0nw0"
- 2,  4, "road.rail_n0e0se1s1w0nw0"
- 2,  5, "road.rail_n1e0se1s1w0nw0"
- 2,  6, "road.rail_n0e1se1s1w0nw0"
- 2,  7, "road.rail_n1e1se1s1w0nw0"
- 3,  0, "road.rail_n0e0se1s0w1nw0"
- 3,  1, "road.rail_n1e0se1s0w1nw0"
- 3,  2, "road.rail_n0e1se1s0w1nw0"
- 3,  3, "road.rail_n1e1se1s0w1nw0"
- 3,  4, "road.rail_n0e0se1s1w1nw0"
- 3,  5, "road.rail_n1e0se1s1w1nw0"
- 3,  6, "road.rail_n0e1se1s1w1nw0"
- 3,  7, "road.rail_n1e1se1s1w1nw0"
+ 2,  0, "road.rail_n0e0se1s0w0nw0:0"
+ 2,  1, "road.rail_n1e0se1s0w0nw0:0"
+ 2,  2, "road.rail_n0e1se1s0w0nw0:0"
+ 2,  3, "road.rail_n1e1se1s0w0nw0:0"
+ 2,  4, "road.rail_n0e0se1s1w0nw0:0"
+ 2,  5, "road.rail_n1e0se1s1w0nw0:0"
+ 2,  6, "road.rail_n0e1se1s1w0nw0:0"
+ 2,  7, "road.rail_n1e1se1s1w0nw0:0"
+ 3,  0, "road.rail_n0e0se1s0w1nw0:0"
+ 3,  1, "road.rail_n1e0se1s0w1nw0:0"
+ 3,  2, "road.rail_n0e1se1s0w1nw0:0"
+ 3,  3, "road.rail_n1e1se1s0w1nw0:0"
+ 3,  4, "road.rail_n0e0se1s1w1nw0:0"
+ 3,  5, "road.rail_n1e0se1s1w1nw0:0"
+ 3,  6, "road.rail_n0e1se1s1w1nw0:0"
+ 3,  7, "road.rail_n1e1se1s1w1nw0:0"
 
- 4,  0, "road.rail_n0e0se0s0w0nw1"
- 4,  1, "road.rail_n1e0se0s0w0nw1"
- 4,  2, "road.rail_n0e1se0s0w0nw1"
- 4,  3, "road.rail_n1e1se0s0w0nw1"
- 4,  4, "road.rail_n0e0se0s1w0nw1"
- 4,  5, "road.rail_n1e0se0s1w0nw1"
- 4,  6, "road.rail_n0e1se0s1w0nw1"
- 4,  7, "road.rail_n1e1se0s1w0nw1"
- 5,  0, "road.rail_n0e0se0s0w1nw1"
- 5,  1, "road.rail_n1e0se0s0w1nw1"
- 5,  2, "road.rail_n0e1se0s0w1nw1"
- 5,  3, "road.rail_n1e1se0s0w1nw1"
- 5,  4, "road.rail_n0e0se0s1w1nw1"
- 5,  5, "road.rail_n1e0se0s1w1nw1"
- 5,  6, "road.rail_n0e1se0s1w1nw1"
- 5,  7, "road.rail_n1e1se0s1w1nw1"
+ 4,  0, "road.rail_n0e0se0s0w0nw1:0"
+ 4,  1, "road.rail_n1e0se0s0w0nw1:0"
+ 4,  2, "road.rail_n0e1se0s0w0nw1:0"
+ 4,  3, "road.rail_n1e1se0s0w0nw1:0"
+ 4,  4, "road.rail_n0e0se0s1w0nw1:0"
+ 4,  5, "road.rail_n1e0se0s1w0nw1:0"
+ 4,  6, "road.rail_n0e1se0s1w0nw1:0"
+ 4,  7, "road.rail_n1e1se0s1w0nw1:0"
+ 5,  0, "road.rail_n0e0se0s0w1nw1:0"
+ 5,  1, "road.rail_n1e0se0s0w1nw1:0"
+ 5,  2, "road.rail_n0e1se0s0w1nw1:0"
+ 5,  3, "road.rail_n1e1se0s0w1nw1:0"
+ 5,  4, "road.rail_n0e0se0s1w1nw1:0"
+ 5,  5, "road.rail_n1e0se0s1w1nw1:0"
+ 5,  6, "road.rail_n0e1se0s1w1nw1:0"
+ 5,  7, "road.rail_n1e1se0s1w1nw1:0"
 
- 6,  0, "road.rail_n0e0se1s0w0nw1"
- 6,  1, "road.rail_n1e0se1s0w0nw1"
- 6,  2, "road.rail_n0e1se1s0w0nw1"
- 6,  3, "road.rail_n1e1se1s0w0nw1"
- 6,  4, "road.rail_n0e0se1s1w0nw1"
- 6,  5, "road.rail_n1e0se1s1w0nw1"
- 6,  6, "road.rail_n0e1se1s1w0nw1"
- 6,  7, "road.rail_n1e1se1s1w0nw1"
- 7,  0, "road.rail_n0e0se1s0w1nw1"
- 7,  1, "road.rail_n1e0se1s0w1nw1"
- 7,  2, "road.rail_n0e1se1s0w1nw1"
- 7,  3, "road.rail_n1e1se1s0w1nw1"
- 7,  4, "road.rail_n0e0se1s1w1nw1"
- 7,  5, "road.rail_n1e0se1s1w1nw1"
- 7,  6, "road.rail_n0e1se1s1w1nw1"
- 7,  7, "road.rail_n1e1se1s1w1nw1"
+ 6,  0, "road.rail_n0e0se1s0w0nw1:0"
+ 6,  1, "road.rail_n1e0se1s0w0nw1:0"
+ 6,  2, "road.rail_n0e1se1s0w0nw1:0"
+ 6,  3, "road.rail_n1e1se1s0w0nw1:0"
+ 6,  4, "road.rail_n0e0se1s1w0nw1:0"
+ 6,  5, "road.rail_n1e0se1s1w0nw1:0"
+ 6,  6, "road.rail_n0e1se1s1w0nw1:0"
+ 6,  7, "road.rail_n1e1se1s1w0nw1:0"
+ 7,  0, "road.rail_n0e0se1s0w1nw1:0"
+ 7,  1, "road.rail_n1e0se1s0w1nw1:0"
+ 7,  2, "road.rail_n0e1se1s0w1nw1:0"
+ 7,  3, "road.rail_n1e1se1s0w1nw1:0"
+ 7,  4, "road.rail_n0e0se1s1w1nw1:0"
+ 7,  5, "road.rail_n1e0se1s1w1nw1:0"
+ 7,  6, "road.rail_n0e1se1s1w1nw1:0"
+ 7,  7, "road.rail_n1e1se1s1w1nw1:0"
 
 }
diff --git a/data/hexemplio/roads.spec b/data/hexemplio/roads.spec
index 6061076a88..eecab27ffc 100644
--- a/data/hexemplio/roads.spec
+++ b/data/hexemplio/roads.spec
@@ -22,13 +22,13 @@ dy = 64
 pixel_border = 1
 
 tiles = { "row", "column","tag"
- 0,  0, "road.road_isolated"
- 0,  1, "road.road_n"
- 0,  2, "road.road_e"
- 0,  3, "road.road_se"
- 0,  4, "road.road_s"
- 0,  5, "road.road_w"
- 0,  6, "road.road_nw"
- 0,  7, "road.road_ne"
- 0,  7, "road.road_sw"
+ 0,  0, "road.road_isolated:0"
+ 0,  1, "road.road_n:0"
+ 0,  2, "road.road_e:0"
+ 0,  3, "road.road_se:0"
+ 0,  4, "road.road_s:0"
+ 0,  5, "road.road_w:0"
+ 0,  6, "road.road_nw:0"
+ 0,  7, "road.road_ne:0"
+ 0,  7, "road.road_sw:0"
 }
diff --git a/data/isophex/terrain1.spec b/data/isophex/terrain1.spec
index 2b34a94936..023ea8d362 100644
--- a/data/isophex/terrain1.spec
+++ b/data/isophex/terrain1.spec
@@ -80,41 +80,41 @@ tiles = { "row", "column","tag"
 
 ; Roads
 
-  6,    0, "road.road_isolated"
-  6,    1, "road.road_n"
-  6,    2, "road.road_ne"
-  6,    3, "road.road_e"
-  6,    4, "road.road_se"
-  6,    5, "road.road_s"
-  6,    6, "road.road_sw"
-  6,    7, "road.road_w"
-  6,    8, "road.road_nw"
+  6,    0, "road.road_isolated:0"
+  6,    1, "road.road_n:0"
+  6,    2, "road.road_ne:0"
+  6,    3, "road.road_e:0"
+  6,    4, "road.road_se:0"
+  6,    5, "road.road_s:0"
+  6,    6, "road.road_sw:0"
+  6,    7, "road.road_w:0"
+  6,    8, "road.road_nw:0"
 
 ; Rails
 
-  7,    0, "road.rail_isolated"
-  7,    1, "road.rail_n"
-  7,    2, "road.rail_ne"
-  7,    3, "road.rail_e"
-  7,    4, "road.rail_se"
-  7,    5, "road.rail_s"
-  7,    6, "road.rail_sw"
-  7,    7, "road.rail_w"
-  7,    8, "road.rail_nw"
+  7,    0, "road.rail_isolated:0"
+  7,    1, "road.rail_n:0"
+  7,    2, "road.rail_ne:0"
+  7,    3, "road.rail_e:0"
+  7,    4, "road.rail_se:0"
+  7,    5, "road.rail_s:0"
+  7,    6, "road.rail_sw:0"
+  7,    7, "road.rail_w:0"
+  7,    8, "road.rail_nw:0"
 
 ; Maglevs
 
-  8,    0, "road.maglev_isolated"
-  8,    1, "road.maglev_n"
-  8,    2, "road.maglev_ne"
-  8,    3, "road.maglev_e"
-  8,    4, "road.maglev_se"
-  8,    5, "road.maglev_s"
-  8,    6, "road.maglev_sw"
-  8,    7, "road.maglev_w"
-  8,    8, "road.maglev_nw"
+  8,    0, "road.maglev_isolated:0"
+  8,    1, "road.maglev_n:0"
+  8,    2, "road.maglev_ne:0"
+  8,    3, "road.maglev_e:0"
+  8,    4, "road.maglev_se:0"
+  8,    5, "road.maglev_s:0"
+  8,    6, "road.maglev_sw:0"
+  8,    7, "road.maglev_w:0"
+  8,    8, "road.maglev_nw:0"
 
-;add-ons
+; Add-ons
 
   4,    0, "tx.oil_mine:0"
   4,    1, "tx.oil_rig:0"
@@ -126,7 +126,7 @@ tiles = { "row", "column","tag"
   4,    7, "tx.village:0"
   4,    8, "tx.nets:0"
 
-; misc
+; Misc
 
   5,    0, "t.coast_color"
   5,    0, "t.blend.lake"
@@ -141,9 +141,9 @@ tiles = { "row", "column","tag"
 
 ; goto-path
 
-  5,    7, "path.step"            ; turn boundary within path
-  5,    8, "path.exhausted_mp"    ; tip of path, no MP left
-  5,    9, "path.normal"          ; tip of path with MP remaining
+  5,    7, "path.step"            ; Turn boundary within path
+  5,    8, "path.exhausted_mp"    ; Tip of path, no MP left
+  5,    9, "path.normal"          ; Tip of path with MP remaining
   5,   10, "path.waypoint"
 
 }
diff --git a/data/isotrident/terrain1.spec b/data/isotrident/terrain1.spec
index 1339529596..dd9a495943 100644
--- a/data/isotrident/terrain1.spec
+++ b/data/isotrident/terrain1.spec
@@ -92,34 +92,34 @@ tiles = { "row", "column","tag"
 
 
 ; Maglevs
- 10, 1, "road.maglev_n"
- 10, 2, "road.maglev_ne"
- 10, 3, "road.maglev_e"
- 10, 4, "road.maglev_se"
- 10, 5, "road.maglev_s"
- 10, 6, "road.maglev_sw"
- 10, 7, "road.maglev_w"
- 10, 8, "road.maglev_nw"
+ 10, 1, "road.maglev_n:0"
+ 10, 2, "road.maglev_ne:0"
+ 10, 3, "road.maglev_e:0"
+ 10, 4, "road.maglev_se:0"
+ 10, 5, "road.maglev_s:0"
+ 10, 6, "road.maglev_sw:0"
+ 10, 7, "road.maglev_w:0"
+ 10, 8, "road.maglev_nw:0"
 
 ; Roads
- 11, 1, "road.road_n"
- 11, 2, "road.road_ne"
- 11, 3, "road.road_e"
- 11, 4, "road.road_se"
- 11, 5, "road.road_s"
- 11, 6, "road.road_sw"
- 11, 7, "road.road_w"
- 11, 8, "road.road_nw"
+ 11, 1, "road.road_n:0"
+ 11, 2, "road.road_ne:0"
+ 11, 3, "road.road_e:0"
+ 11, 4, "road.road_se:0"
+ 11, 5, "road.road_s:0"
+ 11, 6, "road.road_sw:0"
+ 11, 7, "road.road_w:0"
+ 11, 8, "road.road_nw:0"
 
 ; Rails
- 12, 1, "road.rail_n"
- 12, 2, "road.rail_ne"
- 12, 3, "road.rail_e"
- 12, 4, "road.rail_se"
- 12, 5, "road.rail_s"
- 12, 6, "road.rail_sw"
- 12, 7, "road.rail_w"
- 12, 8, "road.rail_nw"
+ 12, 1, "road.rail_n:0"
+ 12, 2, "road.rail_ne:0"
+ 12, 3, "road.rail_e:0"
+ 12, 4, "road.rail_se:0"
+ 12, 5, "road.rail_s:0"
+ 12, 6, "road.rail_sw:0"
+ 12, 7, "road.rail_w:0"
+ 12, 8, "road.rail_nw:0"
 
 ; Add-ons
  2, 7, "tx.oil_mine:0"
@@ -152,9 +152,9 @@ tiles = { "row", "column","tag"
   0, 4, "user.attention", "user.infratile"
   0, 5, "tx.fog"
 
-  1, 0, "path.step"            ; turn boundary within path
-  1, 1, "path.exhausted_mp"    ; tip of path, no MP left
-  1, 2, "path.normal"          ; tip of path with MP remaining
+  1, 0, "path.step"            ; Turn boundary within path
+  1, 1, "path.exhausted_mp"    ; Tip of path, no MP left
+  1, 2, "path.normal"          ; Tip of path with MP remaining
   1, 3, "path.waypoint"
 }
 
@@ -168,8 +168,7 @@ dy = 32
 pixel_border = 1
 
 tiles = { "row", "column","tag"
-  0, 0, "road.road_isolated"
-  1, 0, "road.rail_isolated"
-  2, 0, "road.maglev_isolated"
+  0, 0, "road.road_isolated:0"
+  1, 0, "road.rail_isolated:0"
+  2, 0, "road.maglev_isolated:0"
 }
-
diff --git a/data/trident/highways.spec b/data/trident/highways.spec
index 65dc86510d..9664aac1bf 100644
--- a/data/trident/highways.spec
+++ b/data/trident/highways.spec
@@ -22,48 +22,48 @@ dy = 30
 
 tiles = { "row", "column", "tag"
 
-  0,  0, "road.highway_isolated"
+  0,  0, "road.highway_isolated:0"
 
 ; Cardinal highways, connections north, south, east, west:
 
-  0,  1, "road.highway_c_n1e0s0w0"
-  0,  2, "road.highway_c_n0e1s0w0"
-  0,  3, "road.highway_c_n1e1s0w0"
-  0,  4, "road.highway_c_n0e0s1w0"
-  0,  5, "road.highway_c_n1e0s1w0"
-  0,  6, "road.highway_c_n0e1s1w0"
-  0,  7, "road.highway_c_n1e1s1w0"
-  0,  8, "road.highway_c_n0e0s0w1"
-  0,  9, "road.highway_c_n1e0s0w1"
-  0, 10, "road.highway_c_n0e1s0w1"
-  0, 11, "road.highway_c_n1e1s0w1"
-  0, 12, "road.highway_c_n0e0s1w1"
-  0, 13, "road.highway_c_n1e0s1w1"
-  0, 14, "road.highway_c_n0e1s1w1"
-  0, 15, "road.highway_c_n1e1s1w1"
+  0,  1, "road.highway_c_n1e0s0w0:0"
+  0,  2, "road.highway_c_n0e1s0w0:0"
+  0,  3, "road.highway_c_n1e1s0w0:0"
+  0,  4, "road.highway_c_n0e0s1w0:0"
+  0,  5, "road.highway_c_n1e0s1w0:0"
+  0,  6, "road.highway_c_n0e1s1w0:0"
+  0,  7, "road.highway_c_n1e1s1w0:0"
+  0,  8, "road.highway_c_n0e0s0w1:0"
+  0,  9, "road.highway_c_n1e0s0w1:0"
+  0, 10, "road.highway_c_n0e1s0w1:0"
+  0, 11, "road.highway_c_n1e1s0w1:0"
+  0, 12, "road.highway_c_n0e0s1w1:0"
+  0, 13, "road.highway_c_n1e0s1w1:0"
+  0, 14, "road.highway_c_n0e1s1w1:0"
+  0, 15, "road.highway_c_n1e1s1w1:0"
 
 ; Diagonal highways, connections same, rotated 45 degrees clockwise:
 
-  1,  1, "road.highway_d_ne1se0sw0nw0"
-  1,  2, "road.highway_d_ne0se1sw0nw0"
-  1,  3, "road.highway_d_ne1se1sw0nw0"
-  1,  4, "road.highway_d_ne0se0sw1nw0"
-  1,  5, "road.highway_d_ne1se0sw1nw0"
-  1,  6, "road.highway_d_ne0se1sw1nw0"
-  1,  7, "road.highway_d_ne1se1sw1nw0"
-  1,  8, "road.highway_d_ne0se0sw0nw1"
-  1,  9, "road.highway_d_ne1se0sw0nw1"
-  1, 10, "road.highway_d_ne0se1sw0nw1"
-  1, 11, "road.highway_d_ne1se1sw0nw1"
-  1, 12, "road.highway_d_ne0se0sw1nw1"
-  1, 13, "road.highway_d_ne1se0sw1nw1"
-  1, 14, "road.highway_d_ne0se1sw1nw1"
-  1, 15, "road.highway_d_ne1se1sw1nw1"
+  1,  1, "road.highway_d_ne1se0sw0nw0:0"
+  1,  2, "road.highway_d_ne0se1sw0nw0:0"
+  1,  3, "road.highway_d_ne1se1sw0nw0:0"
+  1,  4, "road.highway_d_ne0se0sw1nw0:0"
+  1,  5, "road.highway_d_ne1se0sw1nw0:0"
+  1,  6, "road.highway_d_ne0se1sw1nw0:0"
+  1,  7, "road.highway_d_ne1se1sw1nw0:0"
+  1,  8, "road.highway_d_ne0se0sw0nw1:0"
+  1,  9, "road.highway_d_ne1se0sw0nw1:0"
+  1, 10, "road.highway_d_ne0se1sw0nw1:0"
+  1, 11, "road.highway_d_ne1se1sw0nw1:0"
+  1, 12, "road.highway_d_ne0se0sw1nw1:0"
+  1, 13, "road.highway_d_ne1se0sw1nw1:0"
+  1, 14, "road.highway_d_ne0se1sw1nw1:0"
+  1, 15, "road.highway_d_ne1se1sw1nw1:0"
 
-; highway corners
+; Highway corners
 
-  0, 16, "road.highway_c_nw"
-  0, 17, "road.highway_c_ne"
-  1, 16, "road.highway_c_sw"
-  1, 17, "road.highway_c_se"
+  0, 16, "road.highway_c_nw:0"
+  0, 17, "road.highway_c_ne:0"
+  1, 16, "road.highway_c_sw:0"
+  1, 17, "road.highway_c_se:0"
 }
diff --git a/data/trident/roads.spec b/data/trident/roads.spec
index 24d2ec89f1..ecaf00509c 100644
--- a/data/trident/roads.spec
+++ b/data/trident/roads.spec
@@ -23,43 +23,43 @@ dy = 30
 
 tiles = { "row", "column", "tag"
 
-  0,  0, "road.road_isolated"
+  0,  0, "road.road_isolated:0"
 
 ; Cardinal roads, connections north, south, east, west:
 
-  0,  1, "road.road_c_n1e0s0w0"
-  0,  2, "road.road_c_n0e1s0w0"
-  0,  3, "road.road_c_n1e1s0w0"
-  0,  4, "road.road_c_n0e0s1w0"
-  0,  5, "road.road_c_n1e0s1w0"
-  0,  6, "road.road_c_n0e1s1w0"
-  0,  7, "road.road_c_n1e1s1w0"
-  0,  8, "road.road_c_n0e0s0w1"
-  0,  9, "road.road_c_n1e0s0w1"
-  0, 10, "road.road_c_n0e1s0w1"
-  0, 11, "road.road_c_n1e1s0w1"
-  0, 12, "road.road_c_n0e0s1w1"
-  0, 13, "road.road_c_n1e0s1w1"
-  0, 14, "road.road_c_n0e1s1w1"
-  0, 15, "road.road_c_n1e1s1w1"
+  0,  1, "road.road_c_n1e0s0w0:0"
+  0,  2, "road.road_c_n0e1s0w0:0"
+  0,  3, "road.road_c_n1e1s0w0:0"
+  0,  4, "road.road_c_n0e0s1w0:0"
+  0,  5, "road.road_c_n1e0s1w0:0"
+  0,  6, "road.road_c_n0e1s1w0:0"
+  0,  7, "road.road_c_n1e1s1w0:0"
+  0,  8, "road.road_c_n0e0s0w1:0"
+  0,  9, "road.road_c_n1e0s0w1:0"
+  0, 10, "road.road_c_n0e1s0w1:0"
+  0, 11, "road.road_c_n1e1s0w1:0"
+  0, 12, "road.road_c_n0e0s1w1:0"
+  0, 13, "road.road_c_n1e0s1w1:0"
+  0, 14, "road.road_c_n0e1s1w1:0"
+  0, 15, "road.road_c_n1e1s1w1:0"
 
 ; Diagonal roads, connections same, rotated 45 degrees clockwise:
 
-  1,  1, "road.road_d_ne1se0sw0nw0"
-  1,  2, "road.road_d_ne0se1sw0nw0"
-  1,  3, "road.road_d_ne1se1sw0nw0"
-  1,  4, "road.road_d_ne0se0sw1nw0"
-  1,  5, "road.road_d_ne1se0sw1nw0"
-  1,  6, "road.road_d_ne0se1sw1nw0"
-  1,  7, "road.road_d_ne1se1sw1nw0"
-  1,  8, "road.road_d_ne0se0sw0nw1"
-  1,  9, "road.road_d_ne1se0sw0nw1"
-  1, 10, "road.road_d_ne0se1sw0nw1"
-  1, 11, "road.road_d_ne1se1sw0nw1"
-  1, 12, "road.road_d_ne0se0sw1nw1"
-  1, 13, "road.road_d_ne1se0sw1nw1"
-  1, 14, "road.road_d_ne0se1sw1nw1"
-  1, 15, "road.road_d_ne1se1sw1nw1"
+  1,  1, "road.road_d_ne1se0sw0nw0:0"
+  1,  2, "road.road_d_ne0se1sw0nw0:0"
+  1,  3, "road.road_d_ne1se1sw0nw0:0"
+  1,  4, "road.road_d_ne0se0sw1nw0:0"
+  1,  5, "road.road_d_ne1se0sw1nw0:0"
+  1,  6, "road.road_d_ne0se1sw1nw0:0"
+  1,  7, "road.road_d_ne1se1sw1nw0:0"
+  1,  8, "road.road_d_ne0se0sw0nw1:0"
+  1,  9, "road.road_d_ne1se0sw0nw1:0"
+  1, 10, "road.road_d_ne0se1sw0nw1:0"
+  1, 11, "road.road_d_ne1se1sw0nw1:0"
+  1, 12, "road.road_d_ne0se0sw1nw1:0"
+  1, 13, "road.road_d_ne1se0sw1nw1:0"
+  1, 14, "road.road_d_ne0se1sw1nw1:0"
+  1, 15, "road.road_d_ne1se1sw1nw1:0"
 }
 
 [grid_rails]
@@ -71,50 +71,50 @@ dy = 30
 
 tiles = { "row", "column", "tag"
 
-  2,  0, "road.rail_isolated"
+  2,  0, "road.rail_isolated:0"
 
 ; Cardinal rails, connections north, south, east, west:
 
-  2,  1, "road.rail_c_n1e0s0w0"
-  2,  2, "road.rail_c_n0e1s0w0"
-  2,  3, "road.rail_c_n1e1s0w0"
-  2,  4, "road.rail_c_n0e0s1w0"
-  2,  5, "road.rail_c_n1e0s1w0"
-  2,  6, "road.rail_c_n0e1s1w0"
-  2,  7, "road.rail_c_n1e1s1w0"
-  2,  8, "road.rail_c_n0e0s0w1"
-  2,  9, "road.rail_c_n1e0s0w1"
-  2, 10, "road.rail_c_n0e1s0w1"
-  2, 11, "road.rail_c_n1e1s0w1"
-  2, 12, "road.rail_c_n0e0s1w1"
-  2, 13, "road.rail_c_n1e0s1w1"
-  2, 14, "road.rail_c_n0e1s1w1"
-  2, 15, "road.rail_c_n1e1s1w1"
+  2,  1, "road.rail_c_n1e0s0w0:0"
+  2,  2, "road.rail_c_n0e1s0w0:0"
+  2,  3, "road.rail_c_n1e1s0w0:0"
+  2,  4, "road.rail_c_n0e0s1w0:0"
+  2,  5, "road.rail_c_n1e0s1w0:0"
+  2,  6, "road.rail_c_n0e1s1w0:0"
+  2,  7, "road.rail_c_n1e1s1w0:0"
+  2,  8, "road.rail_c_n0e0s0w1:0"
+  2,  9, "road.rail_c_n1e0s0w1:0"
+  2, 10, "road.rail_c_n0e1s0w1:0"
+  2, 11, "road.rail_c_n1e1s0w1:0"
+  2, 12, "road.rail_c_n0e0s1w1:0"
+  2, 13, "road.rail_c_n1e0s1w1:0"
+  2, 14, "road.rail_c_n0e1s1w1:0"
+  2, 15, "road.rail_c_n1e1s1w1:0"
 
 ; Diagonal rails, connections same, rotated 45 degrees clockwise:
 
-  3,  1, "road.rail_d_ne1se0sw0nw0"
-  3,  2, "road.rail_d_ne0se1sw0nw0"
-  3,  3, "road.rail_d_ne1se1sw0nw0"
-  3,  4, "road.rail_d_ne0se0sw1nw0"
-  3,  5, "road.rail_d_ne1se0sw1nw0"
-  3,  6, "road.rail_d_ne0se1sw1nw0"
-  3,  7, "road.rail_d_ne1se1sw1nw0"
-  3,  8, "road.rail_d_ne0se0sw0nw1"
-  3,  9, "road.rail_d_ne1se0sw0nw1"
-  3, 10, "road.rail_d_ne0se1sw0nw1"
-  3, 11, "road.rail_d_ne1se1sw0nw1"
-  3, 12, "road.rail_d_ne0se0sw1nw1"
-  3, 13, "road.rail_d_ne1se0sw1nw1"
-  3, 14, "road.rail_d_ne0se1sw1nw1"
-  3, 15, "road.rail_d_ne1se1sw1nw1"
+  3,  1, "road.rail_d_ne1se0sw0nw0:0"
+  3,  2, "road.rail_d_ne0se1sw0nw0:0"
+  3,  3, "road.rail_d_ne1se1sw0nw0:0"
+  3,  4, "road.rail_d_ne0se0sw1nw0:0"
+  3,  5, "road.rail_d_ne1se0sw1nw0:0"
+  3,  6, "road.rail_d_ne0se1sw1nw0:0"
+  3,  7, "road.rail_d_ne1se1sw1nw0:0"
+  3,  8, "road.rail_d_ne0se0sw0nw1:0"
+  3,  9, "road.rail_d_ne1se0sw0nw1:0"
+  3, 10, "road.rail_d_ne0se1sw0nw1:0"
+  3, 11, "road.rail_d_ne1se1sw0nw1:0"
+  3, 12, "road.rail_d_ne0se0sw1nw1:0"
+  3, 13, "road.rail_d_ne1se0sw1nw1:0"
+  3, 14, "road.rail_d_ne0se1sw1nw1:0"
+  3, 15, "road.rail_d_ne1se1sw1nw1:0"
 
 ; Rail corners
 
-  2, 16, "road.rail_c_nw"
-  2, 17, "road.rail_c_ne"
-  3, 16, "road.rail_c_sw"
-  3, 17, "road.rail_c_se"
+  2, 16, "road.rail_c_nw:0"
+  2, 17, "road.rail_c_ne:0"
+  3, 16, "road.rail_c_sw:0"
+  3, 17, "road.rail_c_se:0"
 
 }
 
@@ -127,49 +127,49 @@ dy = 30
 
 tiles = { "row", "column", "tag"
 
-  0,  0, "road.maglev_isolated"
+  0,  0, "road.maglev_isolated:0"
 
 ; Cardinal maglevs, connections north, south, east, west:
 
-  0,  1, "road.maglev_c_n1e0s0w0"
-  0,  2, "road.maglev_c_n0e1s0w0"
-  0,  3, "road.maglev_c_n1e1s0w0"
-  0,  4, "road.maglev_c_n0e0s1w0"
-  0,  5, "road.maglev_c_n1e0s1w0"
-  0,  6, "road.maglev_c_n0e1s1w0"
-  0,  7, "road.maglev_c_n1e1s1w0"
-  0,  8, "road.maglev_c_n0e0s0w1"
-  0,  9, "road.maglev_c_n1e0s0w1"
-  0, 10, "road.maglev_c_n0e1s0w1"
-  0, 11, "road.maglev_c_n1e1s0w1"
-  0, 12, "road.maglev_c_n0e0s1w1"
-  0, 13, "road.maglev_c_n1e0s1w1"
-  0, 14, "road.maglev_c_n0e1s1w1"
-  0, 15, "road.maglev_c_n1e1s1w1"
+  0,  1, "road.maglev_c_n1e0s0w0:0"
+  0,  2, "road.maglev_c_n0e1s0w0:0"
+  0,  3, "road.maglev_c_n1e1s0w0:0"
+  0,  4, "road.maglev_c_n0e0s1w0:0"
+  0,  5, "road.maglev_c_n1e0s1w0:0"
+  0,  6, "road.maglev_c_n0e1s1w0:0"
+  0,  7, "road.maglev_c_n1e1s1w0:0"
+  0,  8, "road.maglev_c_n0e0s0w1:0"
+  0,  9, "road.maglev_c_n1e0s0w1:0"
+  0, 10, "road.maglev_c_n0e1s0w1:0"
+  0, 11, "road.maglev_c_n1e1s0w1:0"
+  0, 12, "road.maglev_c_n0e0s1w1:0"
+  0, 13, "road.maglev_c_n1e0s1w1:0"
+  0, 14, "road.maglev_c_n0e1s1w1:0"
+  0, 15, "road.maglev_c_n1e1s1w1:0"
 
 ; Diagonal maglevs, connections same, rotated 45 degrees clockwise:
 
-  1,  1, "road.maglev_d_ne1se0sw0nw0"
-  1,  2, "road.maglev_d_ne0se1sw0nw0"
-  1,  3, "road.maglev_d_ne1se1sw0nw0"
-  1,  4, "road.maglev_d_ne0se0sw1nw0"
-  1,  5, "road.maglev_d_ne1se0sw1nw0"
-  1,  6, "road.maglev_d_ne0se1sw1nw0"
-  1,  7, "road.maglev_d_ne1se1sw1nw0"
-  1,  8, "road.maglev_d_ne0se0sw0nw1"
-  1,  9, "road.maglev_d_ne1se0sw0nw1"
-  1, 10, "road.maglev_d_ne0se1sw0nw1"
-  1, 11, "road.maglev_d_ne1se1sw0nw1"
-  1, 12, "road.maglev_d_ne0se0sw1nw1"
-  1, 13, "road.maglev_d_ne1se0sw1nw1"
-  1, 14, "road.maglev_d_ne0se1sw1nw1"
-  1, 15, "road.maglev_d_ne1se1sw1nw1"
+  1,  1, "road.maglev_d_ne1se0sw0nw0:0"
+  1,  2, "road.maglev_d_ne0se1sw0nw0:0"
+  1,  3, "road.maglev_d_ne1se1sw0nw0:0"
+  1,  4, "road.maglev_d_ne0se0sw1nw0:0"
+  1,  5, "road.maglev_d_ne1se0sw1nw0:0"
+  1,  6, "road.maglev_d_ne0se1sw1nw0:0"
+  1,  7, "road.maglev_d_ne1se1sw1nw0:0"
+  1,  8, "road.maglev_d_ne0se0sw0nw1:0"
+  1,  9, "road.maglev_d_ne1se0sw0nw1:0"
+  1, 10, "road.maglev_d_ne0se1sw0nw1:0"
+  1, 11, "road.maglev_d_ne1se1sw0nw1:0"
+  1, 12, "road.maglev_d_ne0se0sw1nw1:0"
+  1, 13, "road.maglev_d_ne1se0sw1nw1:0"
+  1, 14, "road.maglev_d_ne0se1sw1nw1:0"
+  1, 15, "road.maglev_d_ne1se1sw1nw1:0"
 
 ; maglev corners
 
-  0, 16, "road.maglev_c_nw"
-  0, 17, "road.maglev_c_ne"
-  1, 16, "road.maglev_c_sw"
-  1, 17, "road.maglev_c_se"
+  0, 16, "road.maglev_c_nw:0"
+  0, 17, "road.maglev_c_ne:0"
+  1, 16, "road.maglev_c_sw:0"
+  1, 17, "road.maglev_c_se:0"
 
 }
-- 
2.47.2

