Building configs have stuff like this:
Code:
name = BuildingWhite2;
color = stroke;
color_variance = 0.0 0.2 0.2;
# plain;
detail_texture = wall_atlas1.png;
detail_texture_atlas_cell = 2 1 4 4 0.015625 0.015625;
detail_texture_scale = 3 3;
1st_floor_1 = apartment1_1st_floor;
1st_floor_2 = apartment1_1st_floor;
1st_floor_3 = apartment1_1st_floor;
1st_floor_4 = apartment1_1st_floor;
other_floor_1 = apartment1;
other_floor_2 = apartment1;
other_floor_3 = apartment1;
other_floor_4 = apartment1;
roof_color = fill;
roof_color_variance = 0.01 0.1 0.1;
roof_texture = concrete_roof.png;
roof_scale = 8.0 8.0;
Those floor fields above point to building styles, which have stuff like this:
Code:
name = apartment1_1st_floor;
sequence = apartment1_1st_floor_door_wide1_l, apartment1_1st_floor_door_wide1_r;
sequence = apartment1_1st_floor_door_wide1_l, apartment1_1st_floor_door_wide1_r;
sequence = apartment1_1st_floor_window;
sequence = apartment1_1st_floor_window;
sequence = apartment1_1st_floor_window;
sequence = apartment1_1st_floor_empty;
sequence = apartment1_1st_floor_empty;
sequence = apartment1_1st_floor_window, apartment1_1st_floor_empty;
The building texture pattern generator takes these and comes up with patterns. If a sequence declares several pieces, those pieces are always included in a row in the pattern. The trick to declare sequences several times makes certain sequences have more weight to be chosen by the generator than others.
For total control, you could declare sequences that have lots of pieces in a row, and a sequence for every building side length you might need. If I'm not mistaken, the pattern generator always prefers to use as big sequences as possible first, and only after that try to assemble something from the set of smaller sequences.
Finally you have texture groups, basically they map a name used in building styles to xy-indices in a specific building atlas. The ones that declare many indices try to say all of the indices are usable for same purpose, free to be randomly picked by the pattern generator.
Code:
empty = 0,0;
shop1_l = 0,1 2,1 4,1;
shop1_r = 1,1 3,1 5,1;
shop1_door_l = 6,1;
shop1_door_r = 7,1;
apartment1_window = 1,0 2,0 3,0 4,0 5,0 6,0 7,0;
apartment1_window_wide1_l = 0,2 2,2;
apartment1_window_wide1_r = 1,2 3,2;
apartment1_window_wide2_l = 4,2 6,2;
apartment1_window_wide2_r = 5,2 7,2;
apartment1_small_window = 0,3;
apartment1_1st_floor_door = 1,3;
apartment1_1st_floor_door_wide1_l = 2,3;
apartment1_1st_floor_door_wide1_r = 3,3;
apartment1_1st_floor_window = 4,3;
apartment1_1st_floor_empty = 5,3;
apartment1_1st_floor_poster_wide1_l = 6,3;
apartment1_1st_floor_poster_wide1_r = 7,3;
house_window = 0,1 1,1 2,1 3,1 4,1 5,1 6,1 7,1;
house_empty = 0,0;
house_door = 2,0;
shop2_shutter_l = 0,2;
shop2_shutter_c = 1,2;
shop2_shutter_r = 2,2;
shop2_shutter2_l = 3,2;
shop2_shutter2_r = 4,2;