8 [1001, 1002], # forest gras
9 [1005, 1006], # forest stones top
10 [1008, 1012], # forest stones left
11 [1009, 1013, 1014], # forest stones fill
12 [1011, 1015], # forest stones right
13 [1017, 1018], # forest stones bottom
14 [1861, 1862], # forest underground gras
15 [1865, 1866], # forest underground stones top
16 [1868, 1872], # forest underground stones left
17 [1869, 1873, 1874], # forest underground stones fill
18 [1871, 1875], # forest underground stones right
19 [1877, 1879], # forest underground stones bottom
20 [2058, 2060, 2061, 2065, 2066, 2070], # ice tiles
21 [2179, 2180, 2181, 2187, 2188, 2189, 2195, 2196, 2197] # snow bg
35 $TileMap->{$id} = $group;
51 $group = $TileMap->{$id};
52 $group_size = 0 + @$group;
54 return ($group->[int (rand ($group_size))]);
59 print STDERR "Usage: ./tile_randomizer.px <in_file >out_file\n";
70 if ($line =~ m/[^\s\d]/)
76 $line =~ s/\b([1-9][0-9]{0,3})\b/get_random ($1)/ge;