diff --git a/data/json/furniture_and_terrain/terrain-traps.json b/data/json/furniture_and_terrain/terrain-traps.json index 7aa3607e928c6..9bd1a436295ea 100644 --- a/data/json/furniture_and_terrain/terrain-traps.json +++ b/data/json/furniture_and_terrain/terrain-traps.json @@ -151,6 +151,30 @@ }, "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100, "bash_below": true } }, + { + "type": "terrain", + "id": "t_den_small", + "name": "small den", + "description": "A small den that burrowing animals such as groundhogs or hares call home.", + "symbol": "0", + "color": "yellow", + "looks_like": "t_den_large", + "move_cost": 3, + "flags": [ "TRANSPARENT", "DIGGABLE" ], + "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100, "bash_below": true } + }, + { + "type": "terrain", + "id": "t_den_large", + "name": "large den", + "description": "A large den that burrowing animals such as bears and foxes call home.", + "symbol": "0", + "color": "yellow", + "looks_like": "t_pit_shallow", + "move_cost": 6, + "flags": [ "TRANSPARENT", "DIGGABLE" ], + "bash": { "sound": "thump", "ter_set": "t_null", "str_min": 50, "str_max": 100, "str_min_supported": 100, "bash_below": true } + }, { "type": "terrain", "id": "t_slime", diff --git a/data/json/mapgen/farm_horse.json b/data/json/mapgen/farm_horse.json index eeb95c252fbfd..9797397835e62 100644 --- a/data/json/mapgen/farm_horse.json +++ b/data/json/mapgen/farm_horse.json @@ -1411,64 +1411,6 @@ "palettes": [ "farm_lots" ] } }, - { - "type": "mapgen", - "method": "json", - "om_terrain": "forest_trail_intersection", - "weight": 250, - "object": { - "predecessor_mapgen": "forest", - "rows": [ - "........................", - "........................", - ".........??????.........", - ".......??????????.......", - "......????////????......", - ".....???////////???.....", - "....???//////////???....", - "...???////////////???...", - "...??//////////////??...", - "..???//////////////???..", - "..??////////////////??..", - "..??////////////////??..", - "..??////////////////??..", - "..??////////////////??..", - "..???//////////////???..", - "...??//////////////??...", - "...???////////////???...", - "....???//////////???....", - ".....???////////???.....", - "......????////????......", - ".......??????????.......", - ".........??????.........", - "........................", - "........................" - ], - "palettes": [ "farm_lots" ], - "terrain": { "?": [ [ "t_region_grass", 6 ], [ "t_region_soil", 6 ], [ "t_grass_dead", 3 ] ] }, - "place_nested": [ - { "chunks": [ "14x14_forest_trail_intersection_north" ], "x": 5, "y": 0, "neighbors": { "north": "trail" } }, - { "chunks": [ "14x14_forest_trail_intersection_east" ], "x": 10, "y": 5, "neighbors": { "east": "trail" } }, - { "chunks": [ "14x14_forest_trail_intersection_south" ], "x": 5, "y": 10, "neighbors": { "south": "trail" } }, - { "chunks": [ "14x14_forest_trail_intersection_west" ], "x": 0, "y": 5, "neighbors": { "west": "trail" } }, - { - "chunks": [ "11x11_forest_trail_intersection_south_fire_lookout" ], - "x": 0, - "y": 13, - "neighbors": { "south": "ws_fire_lookout_tower_base" } - }, - { "chunks": [ [ "null", 25 ], [ "3x3_horseposts", 75 ] ], "x": 7, "y": 7 }, - { - "chunks": [ [ "null", 25 ], [ "3x3_firering", 25 ], [ "3x3_trunks", 50 ] ], - "x": [ 11, 12 ], - "y": [ 11, 12 ] - }, - { "chunks": [ [ "null", 50 ], [ "3x3_tree_benches", 50 ] ], "x": 16, "y": 7 }, - { "chunks": [ [ "null", 75 ], [ "3x3_shed_trail_supplies_N", 25 ] ], "x": 16, "y": 16 } - ], - "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ] - } - }, { "type": "mapgen", "method": "json", diff --git a/data/json/mapgen/nested/aux_nested.json b/data/json/mapgen/nested/aux_nested.json index 887a30d0ee850..f63f03342ba7d 100644 --- a/data/json/mapgen/nested/aux_nested.json +++ b/data/json/mapgen/nested/aux_nested.json @@ -337,6 +337,12 @@ "place_items": [ { "item": "loose_ammo", "x": [ 0, 0 ], "y": [ 0, 0 ], "chance": 50, "repeat": [ 1, 4 ] } ] } }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_trail_sign", + "object": { "mapgensize": [ 1, 1 ], "place_signs": [ { "snippet": "trailhead", "x": 0, "y": 0 } ] } + }, { "type": "mapgen", "method": "json", diff --git a/data/json/mapgen/nested/farm_nested.json b/data/json/mapgen/nested/farm_nested.json index f2c0bcc804945..2653bec03fc75 100644 --- a/data/json/mapgen/nested/farm_nested.json +++ b/data/json/mapgen/nested/farm_nested.json @@ -483,7 +483,7 @@ { "type": "mapgen", "method": "json", - "nested_mapgen_id": "3x3_trunks", + "nested_mapgen_id": "3x3_stumps", "object": { "mapgensize": [ 3, 3 ], "rows": [ @@ -1018,118 +1018,6 @@ "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ] } }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "14x14_forest_trail_intersection_north", - "object": { - "mapgensize": [ 14, 14 ], - "rotation": [ 0, 3 ], - "rows": [ - ".??////////??.", - "???////////???", - "??//////////??", - "??//////////??", - "?.///....///.?", - "../......../..", - "..............", - "..............", - "..............", - "..............", - "..............", - "..............", - "..............", - ".............." - ], - "palettes": [ "farm_lots" ], - "terrain": { "?": [ [ "t_region_grass", 6 ], [ "t_region_soil", 6 ], [ "t_grass_dead", 3 ] ] }, - "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ] - } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "14x14_forest_trail_intersection_east", - "object": { - "mapgensize": [ 14, 14 ], - "rotation": [ 0, 3 ], - "rows": [ - ".........????.", - "..........????", - "........////??", - "........./////", - "........./////", - "..........////", - "..........////", - "..........////", - "..........////", - "........./////", - "........./////", - "........////??", - "..........????", - ".........????." - ], - "palettes": [ "farm_lots" ], - "terrain": { "?": [ [ "t_region_grass", 6 ], [ "t_region_soil", 6 ], [ "t_grass_dead", 3 ] ] }, - "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ] - } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "14x14_forest_trail_intersection_south", - "object": { - "mapgensize": [ 14, 14 ], - "rotation": [ 0, 3 ], - "rows": [ - "..............", - "..............", - "..............", - "..............", - "..............", - "..............", - "..............", - "..............", - "../......../..", - "?.///....///.?", - "??//////////??", - "??//////////??", - "???////////???", - ".??////////??." - ], - "palettes": [ "farm_lots" ], - "terrain": { "?": [ [ "t_region_grass", 6 ], [ "t_region_soil", 6 ], [ "t_grass_dead", 3 ] ] }, - "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ] - } - }, - { - "type": "mapgen", - "method": "json", - "nested_mapgen_id": "14x14_forest_trail_intersection_west", - "object": { - "mapgensize": [ 14, 14 ], - "rotation": [ 0, 3 ], - "rows": [ - ".????.........", - "????..........", - "??////........", - "/////.........", - "/////.........", - "////..........", - "////..........", - "////..........", - "////..........", - "/////.........", - "/////.........", - "??////........", - "????..........", - ".????........." - ], - "palettes": [ "farm_lots" ], - "terrain": { "?": [ [ "t_region_grass", 6 ], [ "t_region_soil", 6 ], [ "t_grass_dead", 3 ] ] }, - "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ] - } - }, { "type": "mapgen", "method": "json", diff --git a/data/json/mapgen/nested/forest_trail_nested.json b/data/json/mapgen/nested/forest_trail_nested.json new file mode 100644 index 0000000000000..871c8e099d8b2 --- /dev/null +++ b/data/json/mapgen/nested/forest_trail_nested.json @@ -0,0 +1,345 @@ +[ + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_trail", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "rows": [ "." ], + "palettes": [ "trail_palette" ], + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_trail_clear", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "rows": [ "*" ], + "palettes": [ "trail_palette" ], + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_predecessor_groundcover", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "place_nested": [ + { "chunks": [ "1x1_t_region_groundcover_forest" ], "x": 0, "y": 0, "predecessors": [ "forest", "forest_thick" ] }, + { "chunks": [ "1x1_t_region_groundcover_swamp" ], "x": 0, "y": 0, "predecessors": [ "forest_water" ] } + ], + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_predecessor_shrub", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "place_nested": [ + { "chunks": [ "1x1_t_region_shrub_forest" ], "x": 0, "y": 0, "predecessors": [ "forest" ] }, + { "chunks": [ "1x1_t_region_shrub_forest_dense" ], "x": 0, "y": 0, "predecessors": [ "forest_thick" ] }, + { "chunks": [ "1x1_t_region_shrub_swamp" ], "x": 0, "y": 0, "predecessors": [ "forest_water" ] } + ], + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_predecessor_tree", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "place_nested": [ + { "chunks": [ "1x1_t_region_tree_forest" ], "x": 0, "y": 0, "predecessors": [ "forest", "forest_water" ] }, + { "chunks": [ "1x1_t_region_tree_forest_dense" ], "x": 0, "y": 0, "predecessors": [ "forest_thick" ] } + ], + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_t_region_groundcover_forest", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "rows": [ "." ], + "terrain": { ".": "t_region_groundcover_forest" }, + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_t_region_groundcover_swamp", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "rows": [ "." ], + "terrain": { ".": "t_region_groundcover_swamp" }, + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_t_region_shrub_forest", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "rows": [ "." ], + "terrain": { ".": "t_region_shrub_forest" }, + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_t_region_shrub_forest_dense", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "rows": [ "." ], + "terrain": { ".": "t_region_shrub_forest_dense" }, + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_t_region_shrub_swamp", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "rows": [ "." ], + "terrain": { ".": "t_region_shrub_swamp" }, + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_t_region_shrub_swamp", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "rows": [ "." ], + "terrain": { ".": "t_region_shrub_swamp" }, + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_t_region_tree_forest", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "rows": [ "." ], + "terrain": { ".": "t_region_tree_forest" }, + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_t_region_tree_forest_dense", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "rows": [ "." ], + "terrain": { ".": "t_region_tree_forest_dense" }, + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_t_railroad_rubble", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "rows": [ "." ], + "terrain": { ".": "t_railroad_rubble" }, + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_t_dirt", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "rows": [ "." ], + "terrain": { ".": "t_dirt" }, + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "1x1_t_mud", + "object": { + "mapgensize": [ 1, 1 ], + "rotation": [ 0 ], + "rows": [ "." ], + "terrain": { ".": "t_mud" }, + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_intersection", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " ", + " ", + " ", + " 4444444 ", + " 44333333344 ", + " 4332222222334 ", + " 432211111112234 ", + " 43211000000011234 ", + " 43210000000001234 ", + " 4321000000000001234 ", + " 4321000000000001234 ", + " 4321000000000001234 ", + " 4321000000000001234 ", + " 4321000000000001234 ", + " 4321000000000001234 ", + " 4321000000000001234 ", + " 43210000000001234 ", + " 43211000000011234 ", + " 432211111112234 ", + " 4332222222334 ", + " 44333333344 ", + " 4444444 ", + " ", + " " + ], + "palettes": [ "trail_palette" ], + "place_nested": [ + { "chunks": [ "9x9_forest_trail_intersection_north" ], "x": 8, "y": 0, "neighbors": { "north": "trail" } }, + { "chunks": [ "9x9_forest_trail_intersection_east" ], "x": 18, "y": 8, "neighbors": { "east": "trail" } }, + { "chunks": [ "9x9_forest_trail_intersection_south" ], "x": 8, "y": 18, "neighbors": { "south": "trail" } }, + { "chunks": [ "9x9_forest_trail_intersection_west" ], "x": 0, "y": 8, "neighbors": { "west": "trail" } }, + { + "chunks": [ "11x11_forest_trail_intersection_south_fire_lookout" ], + "x": 0, + "y": 13, + "neighbors": { "south": "ws_fire_lookout_tower_base" } + }, + { "chunks": [ [ "null", 25 ], [ "3x3_horseposts", 75 ] ], "x": 8, "y": 8 }, + { + "chunks": [ [ "null", 25 ], [ "3x3_firering", 25 ], [ "3x3_stumps", 50 ] ], + "x": [ 12, 13 ], + "y": [ 12, 13 ] + }, + { "chunks": [ [ "null", 50 ], [ "3x3_tree_benches", 50 ] ], "x": 17, "y": 8 }, + { "chunks": [ [ "null", 75 ], [ "3x3_shed_trail_supplies_N", 25 ] ], "x": 17, "y": 17 } + ], + "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "9x9_forest_trail_intersection_north", + "object": { + "mapgensize": [ 9, 9 ], + "rotation": [ 0, 3 ], + "rows": [ + "432101234", + "432101234", + "432101234", + "432101234", + "432101234", + " 21012 ", + " 10001 ", + " ", + " " + ], + "palettes": [ "trail_palette" ], + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "9x9_forest_trail_intersection_east", + "object": { + "mapgensize": [ 9, 9 ], + "rotation": [ 0, 3 ], + "rows": [ + " 444 ", + " 333 ", + "012222 ", + "001111 ", + "000000 ", + "001111 ", + "012222 ", + " 333 ", + " 444 " + ], + "palettes": [ "trail_palette" ], + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "9x9_forest_trail_intersection_south", + "object": { + "mapgensize": [ 9, 9 ], + "rotation": [ 0, 3 ], + "rows": [ + " 00000 ", + " 10001 ", + " 21012 ", + "432101234", + "432101234", + "432101234", + " ", + " ", + " " + ], + "palettes": [ "trail_palette" ], + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "9x9_forest_trail_intersection_west", + "object": { + "mapgensize": [ 9, 9 ], + "rotation": [ 0, 3 ], + "rows": [ + "4444 ", + "3333 ", + "2222210 ", + "1111100 ", + "0000000 ", + "1111100 ", + "2222210 ", + "3333 ", + "4444 " + ], + "palettes": [ "trail_palette" ], + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + } +] diff --git a/data/json/mapgen/trail.json b/data/json/mapgen/trail.json new file mode 100644 index 0000000000000..e0ce81b444902 --- /dev/null +++ b/data/json/mapgen/trail.json @@ -0,0 +1,802 @@ +[ + { + "type": "mapgen", + "method": "json", + "om_terrain": "forest_trail_end", + "object": { + "fallback_predecessor_mapgen": "forest_thick", + "place_nested": [ + { + "chunks": [ + [ "24x24_forest_trail_end_basic", 3 ], + [ "24x24_forest_trail_end_spread", 3 ], + [ "24x24_forest_trail_end_split", 3 ], + [ "24x24_forest_trail_intersection", 1 ] + ], + "x": 0, + "y": 0 + } + ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_end_basic", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " 444444444 ", + " 433333334 ", + " 432222234 ", + " 432111234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 " + ], + "palettes": [ "trail_palette" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_end_spread", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + "4321234 4 432134", + "32101234 434 4321013", + "432101234 43234 43210123", + " 43210123432123432101234", + " 43210123321012332101234", + " 432101232101232101234 ", + " 4321012210122101234 ", + " 43210121012101234 ", + " 432101101101234 ", + " 432101101101234 ", + " 4321010101234 ", + " 43210001234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 " + ], + "palettes": [ "trail_palette" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_end_split", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " ", + " ", + " 4444444 4444444 ", + " 4333333344 4433333334", + "432222222334 43322222223", + "321111111223432211111112", + "210000000112321100000001", + "321111111001210011111112", + "432222222110101122222223", + " 43333333210101233333334", + " 444444432101234444444 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 " + ], + "palettes": [ "trail_palette" ] + } + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": "forest_trail_straight", + "//": "Only includes field temporarily while horse farm spawned trail can spawn over field", + "object": { + "fallback_predecessor_mapgen": "forest_thick", + "place_nested": [ + { + "chunks": [ "24x24_forest_trail_straight_forest" ], + "x": 0, + "y": 0, + "predecessors": [ "forest", "forest_thick", "field" ] + }, + { "chunks": [ "24x24_forest_trail_straight_swamp" ], "x": 0, "y": 0, "predecessors": [ "forest_water" ] } + ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_straight_forest", + "object": { + "mapgensize": [ 24, 24 ], + "place_nested": [ + { + "chunks": [ + [ "24x24_forest_trail_straight_basic", 30 ], + [ "24x24_forest_trail_straight_meander", 80 ], + [ "24x24_forest_trail_straight_meander_1", 80 ], + [ "24x24_forest_trail_straight_fallen_tree", 4 ], + [ "24x24_forest_trail_straight_sett", 8 ], + [ "24x24_forest_trail_straight_steep", 10 ], + [ "24x24_forest_trail_straight_mud", 3 ], + [ "24x24_forest_trail_straight_mud_split", 3 ] + ], + "x": 0, + "y": 0 + } + ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_straight_swamp", + "object": { + "mapgensize": [ 24, 24 ], + "place_nested": [ + { + "chunks": [ + [ "24x24_forest_trail_straight_basic", 20 ], + [ "24x24_forest_trail_straight_meander", 80 ], + [ "24x24_forest_trail_straight_meander_1", 80 ], + [ "24x24_forest_trail_straight_fallen_tree", 1 ], + [ "24x24_forest_trail_straight_mud", 10 ], + [ "24x24_forest_trail_straight_mud_split", 10 ] + ], + "x": 0, + "y": 0 + } + ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_straight_basic", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 " + ], + "palettes": [ "trail_palette" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_straight_meander", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 " + ], + "palettes": [ "trail_palette" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_straight_meander_1", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 " + ], + "palettes": [ "trail_palette" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_straight_fallen_tree", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 4321012344 ", + " 43210123334 ", + " 432101222234 ", + " 4332011111234 ", + " 44330000001234 ", + " 44ntt11101234 ", + " tt101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 " + ], + "palettes": [ "trail_palette" ], + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_straight_sett", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " 432101234 ", + " 432101234 ", + " 432101234 ", + " S432101234 ", + " ****432101234 ", + " *m***432101234 ", + " **ad*S*432101234 ", + " ********432101234 ", + " ********S432101234 ", + " *********432101234 ", + " *****ad**S432101234 ", + " **A****m**432101234 ", + " **********432101234 ", + " ***adm****432101234 ", + " ******S*432101234 ", + " *****d**432101234 ", + " *****am*432101234 ", + " ****S*432101234 ", + " *****432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 " + ], + "parameters": { + "den_palette": { + "type": "palette_id", + "scope": "omt", + "default": { + "distribution": [ + [ "trail_small_den_empty_palette", 20 ], + [ "trail_small_den_groundhog_palette", 500 ], + [ "trail_small_den_hare_palette", 5 ], + [ "trail_large_den_empty_palette", 10 ], + [ "trail_large_den_fox_gray_palette", 2 ], + [ "trail_large_den_fox_red_palette", 2 ], + [ "trail_large_den_bear_palette", 200 ] + ] + } + } + }, + "palettes": [ "trail_palette", { "param": "den_palette" } ], + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_straight_steep", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " 4332101234 ", + " 4322101234 ", + " 4321101234 ", + " 43210012344 ", + " 43210112333344 ", + " 43210112222334 ", + " 43210011112234 ", + " __000011234 ", + " ____001234 ", + " __01234 ", + " 44332221101234 ", + " 443322111001234 ", + " 4332211000__ ", + " 43221100___ ", + " 4321100__ ", + " 43210011122222234 ", + " __000111111234 ", + " __00000001234 ", + " ______001234 ", + " __01234 ", + " 433211101234 ", + " 432210001234 ", + " 432110111234 ", + " 432100122234 " + ], + "palettes": [ "trail_palette" ], + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_straight_mud", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 422101234 ", + " 21100123 ", + " 21001012 ", + " 210111012 ", + " 210122~~~~~~~ ", + " 21012~~~~~~~~~ ", + " 21012~~~~~~~~~~ ", + " 21012~~~~~~~~~~ ", + " 2101~~~~~~~~~ ", + " 21012~~~~~~~ ", + " 210122~~~~~ ", + " 210121012 ", + " 210121012 ", + " 21021012 ", + " 2101012 ", + " 2101012 ", + " 42100123 ", + " 421001234 ", + " 432101234 ", + " 432101234 ", + " 432101234 " + ], + "palettes": [ "trail_palette" ], + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_straight_mud_split", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " ~~~~432101234 ", + " ~~~~~~410101234 ", + " ~~~~~~101101234 ", + " ~~~ 0432101234", + " ~~ 0~~32101234", + " ~~~~ 0~~~32101234", + " ~~~~~ 0~~~~~3210123", + " ~~~~~ 0~~~~~3210123", + " ~~~ 0 ~~432101234", + " 0 44322101234", + " 043321101234 ", + " 03221001234 ", + " 10111011234 ", + " 41010012234 ", + " 43210112334 " + ], + "palettes": [ "trail_palette" ], + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": "forest_trail_curved", + "object": { + "fallback_predecessor_mapgen": "forest_thick", + "place_nested": [ + { + "chunks": [ + [ "24x24_forest_trail_curved_basic", 1 ], + [ "24x24_forest_trail_curved_shrubs", 1 ], + [ "24x24_forest_trail_curved_diag", 2 ] + ], + "x": 0, + "y": 0 + } + ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_curved_basic", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " 444444444444444", + " 4433333333333333", + " 4332222222222222", + " 4322111111111111", + " 4321100000000000", + " 4321001111111111", + " 4321011222222222", + " 4321012233333333", + " 4321012334444444", + " 4321012344 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 " + ], + "palettes": [ "trail_palette" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_curved_shrubs", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " ", + " ", + " 44 ", + " 4443344 ", + " 433322334 ", + " 43222112234 ", + " 4321110011234 ", + " 4321000110012344 ", + " 43210111221101233444", + " 432101222332210122333", + " 432101233SS3321011222", + " 43210123SSSSS32100111", + " 43210123SSSSSSS3211000", + " 43210123SSSSSSSS322111", + " 43210123SSSSSSSS33222", + " 43210123SSSSSSSS 333", + " 43210123SSSSSS ", + " 43210123SSSS ", + " 43210123SS ", + " 43210123 ", + " 43210123 ", + " 43210123 ", + " 43210123 ", + " 43210123 " + ], + "palettes": [ "trail_palette" ], + "flags": [ "ERASE_FURNITURE_BEFORE_PLACING_TERRAIN", "ERASE_TRAP_BEFORE_PLACING_TERRAIN", "ALLOW_TERRAIN_UNDER_ITEMS" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_curved_diag", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " 4", + " 43", + " 432", + " 4321", + " 43210", + " 432101", + " 4321012", + " 43210123", + " 432101234", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 " + ], + "palettes": [ "trail_palette" ] + } + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": "forest_trail_tee", + "object": { + "fallback_predecessor_mapgen": "forest_thick", + "place_nested": [ + { + "chunks": [ + [ "24x24_forest_trail_tee_basic", 2 ], + [ "24x24_forest_trail_tee_split", 3 ], + [ "24x24_forest_trail_intersection", 1 ] + ], + "x": 0, + "y": 0 + } + ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_tee_basic", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "444444444444444444444444", + "333333333333333333333333", + "2222222222I222I222222222", + "111111111111111111111111", + "000000000000000000000000", + "111111111111011111111111", + "2222222222B101B222222222", + "333333333321012333333333", + "444444444321012344444444", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 " + ], + "palettes": [ "trail_palette" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_tee_split", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " ", + " ", + " ", + " ", + " ", + " 444444 ", + " 44333333444 ", + " 443322222233344 ", + "444332211111122233444444", + "333221100000011122333333", + "222110011111100011222222", + "111001122222211100111111", + "000111223333322211000000", + "111000112344433322111111", + "222111001234444433222222", + "3332221101234 44333333", + "44433322101234 444444", + " 444332101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 " + ], + "palettes": [ "trail_palette" ] + } + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": "forest_trail_four_way", + "object": { + "fallback_predecessor_mapgen": "forest_thick", + "place_nested": [ + { + "chunks": [ "24x24_forest_trail_four_way_basic", "24x24_forest_trail_four_way_high_low", "24x24_forest_trail_intersection" ], + "x": 0, + "y": 0 + } + ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_four_way_basic", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + "444444444321012344444444", + "333333333321012333333333", + "2222222222B101I222222222", + "111111111111011111111111", + "000000000000000000000000", + "111111111111011111111111", + "2222222222B101I222222222", + "333333333321012333333333", + "444444444321012344444444", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 " + ], + "palettes": [ "trail_palette" ] + } + }, + { + "type": "mapgen", + "method": "json", + "nested_mapgen_id": "24x24_forest_trail_four_way_high_low", + "object": { + "mapgensize": [ 24, 24 ], + "rows": [ + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 432101234 ", + " 4444444444321012344444 ", + "433333333333210123333334", + "322222222222210122222223", + "211111111111100011111112", + "100000000000000000000001", + "011111111111111111111110", + "100112222222222222222101", + "211001123333333333332101", + "322110012334444444321012", + "433221101223444433221012", + " 44332210112333322110123", + " 443321001222211001234", + " 443211011110011234 ", + " 432210000112234 ", + " 4321001122334 ", + " 432101223344 ", + " 4321012344 " + ], + "palettes": [ "trail_palette" ] + } + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": "forest_trail_intersection", + "//": "For placing the intersection as part of a special", + "object": { + "predecessor_mapgen": "forest_thick", + "place_nested": [ { "chunks": [ "24x24_forest_trail_intersection" ], "x": 0, "y": 0 } ] + } + } +] diff --git a/data/json/mapgen_palettes/trail.json b/data/json/mapgen_palettes/trail.json new file mode 100644 index 0000000000000..2def059b69142 --- /dev/null +++ b/data/json/mapgen_palettes/trail.json @@ -0,0 +1,107 @@ +[ + { + "type": "palette", + "id": "trail_palette", + "palettes": [ "trail_terrain_furniture_palette", "trail_width_palette", "trail_item_palette" ] + }, + { + "type": "palette", + "id": "trail_path_palette", + "terrain": { ".": "t_dirt" } + }, + { + "type": "palette", + "id": "trail_terrain_furniture_palette", + "palettes": [ "trail_path_palette" ], + "terrain": { + ".": "t_dirt", + "t": "t_trunk", + "n": "t_stump", + "m": "t_dirtmound", + "M": "t_moss", + ",": "t_forestfloor", + "u": "t_underbrush", + "f": "t_fungus_colony", + "F": "t_fern", + "G": [ [ "t_grass_long", 2 ], [ "t_grass_tall", 1 ] ], + "6": "t_region_tree_shade", + "7": [ "t_tree_dead", "t_tree_very_dead", "t_tree_dead_warped" ] + }, + "furniture": { "_": [ [ "f_null", 17 ], [ "f_boulder_small", 1 ], [ "f_boulder_medium", 1 ], [ "f_boulder_large", 1 ] ] }, + "nested": { + "B": { "chunks": [ [ "null", 3 ], [ "1x1_trailmap", 1 ] ] }, + "I": { "chunks": [ [ "null", 3 ], [ "1x1_trail_sign", 1 ] ] }, + "T": { "chunks": [ [ "1x1_predecessor_tree", 2 ], [ "1x1_predecessor_groundcover", 1 ] ] }, + "*": { "chunks": [ "1x1_predecessor_groundcover" ] }, + "s": { "chunks": [ "1x1_predecessor_shrub" ] }, + "S": { "chunks": [ [ "1x1_predecessor_groundcover", 2 ], [ "1x1_predecessor_shrub", 3 ] ] }, + "_": { "chunks": [ [ "1x1_t_railroad_rubble", 3 ], [ "1x1_t_dirt", 1 ], [ "1x1_predecessor_groundcover", 3 ] ] }, + "~": { "chunks": [ [ "1x1_t_mud", 6 ], [ "1x1_t_dirt", 1 ], [ "1x1_predecessor_groundcover", 1 ] ] } + } + }, + { + "type": "palette", + "id": "trail_width_palette", + "//": "Number indicates number of tiles from center", + "nested": { + "0": { "chunks": [ [ "1x1_trail", 1 ], [ "null", 0 ] ] }, + "1": { "chunks": [ [ "1x1_trail", 1 ], [ "null", 1 ] ] }, + "2": { "chunks": [ [ "1x1_trail", 1 ], [ "null", 3 ] ] }, + "3": { "chunks": [ [ "1x1_trail", 0 ], [ "null", 1 ] ] }, + "4": { "chunks": [ [ "1x1_trail", 0 ], [ "null", 1 ] ] } + } + }, + { + "type": "palette", + "id": "trail_item_palette", + "items": { + "0": { "item": "forest_trail", "chance": 1 }, + "1": { "item": "forest_trail", "chance": 1 }, + "2": { "item": "forest_trail", "chance": 1 }, + "3": { "item": "forest_trail", "chance": 1 }, + "4": { "item": "forest_trail", "chance": 1 } + } + }, + { + "type": "palette", + "id": "trail_small_den_empty_palette", + "monster": { "A": { "monster": "mon_null", "chance": 100 }, "a": { "monster": "mon_null", "chance": 100 } }, + "terrain": { "d": "t_den_small" } + }, + { + "type": "palette", + "id": "trail_large_den_empty_palette", + "monster": { "A": { "monster": "mon_null", "chance": 100 }, "a": { "monster": "mon_null", "chance": 100 } }, + "terrain": { "d": "t_den_large" } + }, + { + "type": "palette", + "id": "trail_small_den_groundhog_palette", + "monster": { "A": { "monster": "mon_groundhog", "chance": 100 }, "a": { "monster": "mon_groundhog", "chance": 10 } }, + "terrain": { "d": "t_den_small" } + }, + { + "type": "palette", + "id": "trail_small_den_hare_palette", + "monster": { "A": { "monster": "mon_hare", "chance": 100 }, "a": { "monster": "mon_hare", "chance": 25 } }, + "terrain": { "d": "t_den_small" } + }, + { + "type": "palette", + "id": "trail_large_den_fox_gray_palette", + "monster": { "A": { "monster": "mon_fox_gray", "chance": 100 }, "a": { "monster": "mon_fox_gray", "chance": 5 } }, + "terrain": { "d": "t_den_large" } + }, + { + "type": "palette", + "id": "trail_large_den_fox_red_palette", + "monster": { "A": { "monster": "mon_fox_red", "chance": 100 }, "a": { "monster": "mon_fox_red", "chance": 5 } }, + "terrain": { "d": "t_den_large" } + }, + { + "type": "palette", + "id": "trail_large_den_bear_palette", + "monster": { "A": { "monster": "mon_bear", "chance": 100 }, "a": { "monster": "mon_bear_cub", "chance": 5 } }, + "terrain": { "d": "t_den_large" } + } +] diff --git a/data/json/overmap/overmap_connections.json b/data/json/overmap/overmap_connections.json index 374b0b733bb24..6f24eabbd278e 100644 --- a/data/json/overmap/overmap_connections.json +++ b/data/json/overmap/overmap_connections.json @@ -30,9 +30,9 @@ "type": "overmap_connection", "id": "forest_trail", "subtypes": [ - { "terrain": "forest_trail", "locations": [ "forest_trail" ], "basic_cost": 0 }, + { "terrain": "forest_trail", "locations": [ "forest_trail" ], "basic_cost": 0, "flags": [ "ORTHOGONAL" ] }, + { "terrain": "forest_trail", "locations": [ "forest_center" ], "basic_cost": 5 }, { "terrain": "forest_trail", "locations": [ "forest_edge" ], "basic_cost": 100 }, - { "terrain": "forest_trail", "locations": [ "forest_center" ], "basic_cost": 0 }, { "terrain": "forest_trail", "locations": [ "swamp" ], "basic_cost": 40 } ] }, diff --git a/data/json/overmap/overmap_special/specials.json b/data/json/overmap/overmap_special/specials.json index f34856541ea8d..e34717213f497 100644 --- a/data/json/overmap/overmap_special/specials.json +++ b/data/json/overmap/overmap_special/specials.json @@ -378,6 +378,7 @@ { "point": [ 0, 0, 1 ], "overmap": "cabin_roof_1_north" }, { "point": [ 0, 0, -1 ], "overmap": "cabin_prepper_shelter_north" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "forest" ], "city_distance": [ 25, -1 ], "city_sizes": [ 0, 20 ], @@ -545,6 +546,7 @@ "type": "overmap_special", "id": "Cabin", "overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "cabin_north" }, { "point": [ 0, 0, 1 ], "overmap": "cabin_roof_north" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "forest" ], "city_distance": [ 25, -1 ], "city_sizes": [ 0, 20 ], @@ -555,6 +557,7 @@ "type": "overmap_special", "id": "Cabin_1", "overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "cabin_1_north" }, { "point": [ 0, 0, 1 ], "overmap": "cabin_roof_1_north" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "forest" ], "city_distance": [ 25, -1 ], "city_sizes": [ 0, 20 ], @@ -565,6 +568,7 @@ "type": "overmap_special", "id": "Cabin_2", "overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "cabin_2_north" }, { "point": [ 0, 0, 1 ], "overmap": "cabin_roof_2_north" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "forest" ], "city_distance": [ 25, -1 ], "city_sizes": [ 0, 20 ], @@ -575,6 +579,7 @@ "type": "overmap_special", "id": "Cabin_3", "overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "cabin_3_north" }, { "point": [ 0, 0, 1 ], "overmap": "cabin_roof_3_north" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "forest" ], "city_distance": [ 25, -1 ], "city_sizes": [ 0, 20 ], @@ -585,6 +590,7 @@ "type": "overmap_special", "id": "Cabin_4", "overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "cabin_4_north" }, { "point": [ 0, 0, 1 ], "overmap": "cabin_roof_4_north" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "forest" ], "city_distance": [ 25, -1 ], "city_sizes": [ 0, 20 ], @@ -595,6 +601,7 @@ "type": "overmap_special", "id": "Cabin_5", "overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "cabin_5_north" }, { "point": [ 0, 0, 1 ], "overmap": "cabin_roof_5_north" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "forest" ], "city_distance": [ 25, -1 ], "city_sizes": [ 0, 20 ], @@ -605,6 +612,7 @@ "type": "overmap_special", "id": "Cabin_6", "overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "cabin_6_north" }, { "point": [ 0, 0, 1 ], "overmap": "cabin_roof_6_north" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "forest" ], "city_distance": [ 25, -1 ], "city_sizes": [ 0, 20 ], @@ -615,6 +623,7 @@ "type": "overmap_special", "id": "Cabin_7", "overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "cabin_7_north" }, { "point": [ 0, 0, 1 ], "overmap": "cabin_roof_7_north" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "forest" ], "city_distance": [ 25, -1 ], "city_sizes": [ 0, 20 ], @@ -628,6 +637,7 @@ { "point": [ 0, 0, 0 ], "overmap": "cabin_lapin_north" }, { "point": [ 0, 0, 1 ], "overmap": "cabin_roof_lapin_north" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "forest" ], "city_distance": [ 25, -1 ], "occurrences": [ 50, 100 ], @@ -661,6 +671,7 @@ { "point": [ 0, 0, 1 ], "overmap": "cabin_strange_roof_north" }, { "point": [ 0, 0, -1 ], "overmap": "cabin_strange_b_north" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "forest" ], "city_distance": [ 25, -1 ], "occurrences": [ 20, 100 ], @@ -709,6 +720,7 @@ "type": "overmap_special", "id": "Standing stones", "overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "standing_stones" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "forest" ], "city_distance": [ 40, -1 ], "occurrences": [ 10, 100 ], @@ -1768,13 +1780,23 @@ "occurrences": [ 0, 1 ], "flags": [ "CLASSIC", "URBAN", "MAN_MADE" ] }, + { + "type": "overmap_special", + "id": "Cave w/ trail", + "overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "cave" }, { "point": [ 0, 0, -1 ], "overmap": "cave_underground" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], + "locations": [ "forest" ], + "city_distance": [ 8, -1 ], + "occurrences": [ 0, 5 ], + "flags": [ "CLASSIC", "WILDERNESS" ] + }, { "type": "overmap_special", "id": "Cave", "overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "cave" }, { "point": [ 0, 0, -1 ], "overmap": "cave_underground" } ], "locations": [ "forest" ], "city_distance": [ 8, -1 ], - "occurrences": [ 0, 10 ], + "occurrences": [ 0, 5 ], "flags": [ "CLASSIC", "WILDERNESS" ] }, { @@ -2342,6 +2364,7 @@ { "point": [ 0, 0, 0 ], "overmap": "bandit_cabin_north" }, { "point": [ 0, 0, 1 ], "overmap": "bandit_cabin_roof_north" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "forest" ], "city_distance": [ 20, -1 ], "city_sizes": [ 4, -1 ], @@ -2361,6 +2384,7 @@ { "point": [ 0, 1, 1 ], "overmap": "bandit_camp_3_roof_north" }, { "point": [ 1, 1, 1 ], "overmap": "bandit_camp_4_roof_north" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "wilderness" ], "city_distance": [ 20, -1 ], "city_sizes": [ 4, -1 ], @@ -2728,6 +2752,7 @@ { "point": [ 0, 0, 0 ], "overmap": "hunter_shack_north" }, { "point": [ 0, 0, 1 ], "overmap": "hunter_shack_roof_north" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "swamp" ], "city_distance": [ 10, -1 ], "occurrences": [ 0, 4 ], @@ -2740,6 +2765,7 @@ { "point": [ 0, 0, 0 ], "overmap": "hunter_shack_1_north" }, { "point": [ 0, 0, 1 ], "overmap": "hunter_shack_roof_1_north" } ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "locations": [ "swamp" ], "city_distance": [ 10, -1 ], "occurrences": [ 0, 4 ], @@ -2821,6 +2847,7 @@ "id": "Hunting Blind", "overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "hunting_blind_north" } ], "locations": [ "wilderness" ], + "connections": [ { "point": [ 0, -1, 0 ], "terrain": "forest_trail", "connection": "forest_trail" } ], "city_distance": [ 30, -1 ], "occurrences": [ 0, 5 ], "flags": [ "CLASSIC", "WILDERNESS", "MAN_MADE" ] @@ -4237,7 +4264,7 @@ "city_sizes": [ 1, -1 ], "//": "These actually get placed by some C++ trailhead placement code, so [0, 0] occurrences is deliberate.", "occurrences": [ 0, 0 ], - "locations": [ "field" ] + "locations": [ "wilderness" ] }, { "type": "overmap_special", @@ -4250,7 +4277,7 @@ "city_sizes": [ 1, -1 ], "//": "These actually get placed by some C++ trailhead placement code, so [0, 0] occurrences is deliberate.", "occurrences": [ 0, 0 ], - "locations": [ "field" ] + "locations": [ "wilderness" ] }, { "type": "overmap_special", @@ -4263,7 +4290,7 @@ "city_sizes": [ 1, -1 ], "//": "These actually get placed by some C++ trailhead placement code, so [0, 0] occurrences is deliberate.", "occurrences": [ 0, 0 ], - "locations": [ "field" ] + "locations": [ "wilderness" ] }, { "type": "overmap_special", diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_transportation.json b/data/json/overmap/overmap_terrain/overmap_terrain_transportation.json index 546e95ef1d8ad..eb24b7cbc2a0d 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_transportation.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_transportation.json @@ -111,13 +111,7 @@ "id": "forest_trail", "name": "forest trail", "color": "green", - "mapgen_straight": [ { "method": "builtin", "name": "forest_trail_straight" } ], - "mapgen_curved": [ { "method": "builtin", "name": "forest_trail_curved" } ], - "mapgen_end": [ { "method": "builtin", "name": "forest_trail_straight" } ], - "mapgen_tee": [ { "method": "builtin", "name": "forest_trail_tee" } ], - "mapgen_four_way": [ { "method": "builtin", "name": "forest_trail_four_way" } ], - "travel_cost_type": "trail", - "flags": [ "LINEAR" ], + "flags": [ "LINEAR", "REQUIRES_PREDECESSOR" ], "land_use_code": "forest" }, { diff --git a/data/json/regional_map_settings.json b/data/json/regional_map_settings.json index 06cba104c0706..9161373169e04 100644 --- a/data/json/regional_map_settings.json +++ b/data/json/regional_map_settings.json @@ -642,11 +642,6 @@ "random_point_size_scalar": 100, "trailhead_chance": 1, "trailhead_road_distance": 6, - "trail_center_variance": 3, - "trail_width_offset_min": 1, - "trail_width_offset_max": 3, - "clear_trail_terrain": false, - "trail_terrain": { "t_dirt": 1 }, "trailheads": { "trailhead_basic": 1, "trailhead_outhouse": 1, "trailhead_shack": 1 } }, "map_extras": { diff --git a/data/mods/Backrooms/regional_map_settings.json b/data/mods/Backrooms/regional_map_settings.json index a21488fb20aef..c50bc7bfd130c 100644 --- a/data/mods/Backrooms/regional_map_settings.json +++ b/data/mods/Backrooms/regional_map_settings.json @@ -131,11 +131,6 @@ "random_point_size_scalar": 100, "trailhead_chance": 1, "trailhead_road_distance": 6, - "trail_center_variance": 3, - "trail_width_offset_min": 1, - "trail_width_offset_max": 3, - "clear_trail_terrain": false, - "trail_terrain": { "t_dirt": 1 }, "trailheads": { "trailhead_basic": 1, "trailhead_outhouse": 1, "trailhead_shack": 1 } }, "map_extras": { diff --git a/data/mods/No_Hope/regional_map_settings.json b/data/mods/No_Hope/regional_map_settings.json index 360d85c15b947..7dfe399cce6b7 100644 --- a/data/mods/No_Hope/regional_map_settings.json +++ b/data/mods/No_Hope/regional_map_settings.json @@ -578,11 +578,6 @@ "random_point_size_scalar": 100, "trailhead_chance": 1, "trailhead_road_distance": 6, - "trail_center_variance": 3, - "trail_width_offset_min": 1, - "trail_width_offset_max": 3, - "clear_trail_terrain": false, - "trail_terrain": { "t_dirt": 1 }, "trailheads": { "trailhead_basic": 1, "trailhead_outhouse": 1, "trailhead_shack": 1 } }, "map_extras": { diff --git a/data/json/test_regions.json b/data/mods/TEST_DATA/regions.json similarity index 98% rename from data/json/test_regions.json rename to data/mods/TEST_DATA/regions.json index 56a947cd29e96..cc05e0c34c1d9 100644 --- a/data/json/test_regions.json +++ b/data/mods/TEST_DATA/regions.json @@ -122,11 +122,6 @@ "random_point_size_scalar": 100, "trailhead_chance": 1, "trailhead_road_distance": 6, - "trail_center_variance": 3, - "trail_width_offset_min": 1, - "trail_width_offset_max": 3, - "clear_trail_terrain": false, - "trail_terrain": { "t_dirt": 1 }, "trailheads": { "trailhead_basic": 1, "trailhead_outhouse": 1, "trailhead_shack": 1 } }, "city": { diff --git a/data/mods/TropiCataclysm/tropical_regional_map_settings.json b/data/mods/TropiCataclysm/tropical_regional_map_settings.json index 7fe48eb795dd6..7b9cf46b973fa 100644 --- a/data/mods/TropiCataclysm/tropical_regional_map_settings.json +++ b/data/mods/TropiCataclysm/tropical_regional_map_settings.json @@ -657,11 +657,6 @@ "random_point_size_scalar": 100, "trailhead_chance": 1, "trailhead_road_distance": 6, - "trail_center_variance": 3, - "trail_width_offset_min": 1, - "trail_width_offset_max": 3, - "clear_trail_terrain": false, - "trail_terrain": { "t_dirt": 1 }, "trailheads": { "trailhead_basic": 1, "trailhead_outhouse": 1, "trailhead_shack": 1 } }, "map_extras": { diff --git a/data/mods/aftershock_exoplanet/Map/mapgen/trail.json b/data/mods/aftershock_exoplanet/Map/mapgen/trail.json new file mode 100644 index 0000000000000..faf4a1f7e7113 --- /dev/null +++ b/data/mods/aftershock_exoplanet/Map/mapgen/trail.json @@ -0,0 +1,7 @@ +[ + { + "type": "palette", + "id": "trail_path_palette", + "terrain": { ".": "t_deaddirt" } + } +] diff --git a/data/mods/aftershock_exoplanet/region_settings.json b/data/mods/aftershock_exoplanet/region_settings.json index 051f32f665a2a..f28912b9db209 100644 --- a/data/mods/aftershock_exoplanet/region_settings.json +++ b/data/mods/aftershock_exoplanet/region_settings.json @@ -212,11 +212,6 @@ "random_point_size_scalar": 100, "trailhead_chance": 1, "trailhead_road_distance": 6, - "trail_center_variance": 3, - "trail_width_offset_min": 1, - "trail_width_offset_max": 3, - "clear_trail_terrain": false, - "trail_terrain": { "t_deaddirt": 1 }, "trailheads": { "trailhead_basic": 1, "trailhead_outhouse": 1, "trailhead_shack": 1 } }, "map_extras": { "road": { "chance": 75, "extras": { "mx_wraitheon_droneswarm": 10 } } } diff --git a/data/mods/classic_zombies/alberta_regional_map_settings.json b/data/mods/classic_zombies/alberta_regional_map_settings.json index c86703613be50..7b4926b56382f 100644 --- a/data/mods/classic_zombies/alberta_regional_map_settings.json +++ b/data/mods/classic_zombies/alberta_regional_map_settings.json @@ -561,11 +561,6 @@ "random_point_size_scalar": 100, "trailhead_chance": 1, "trailhead_road_distance": 6, - "trail_center_variance": 3, - "trail_width_offset_min": 1, - "trail_width_offset_max": 3, - "clear_trail_terrain": false, - "trail_terrain": { "t_dirt": 1 }, "trailheads": { "trailhead_basic": 1, "trailhead_outhouse": 1, "trailhead_shack": 1 } }, "map_extras": { diff --git a/data/mods/desert_region/desert_regional_map_settings.json b/data/mods/desert_region/desert_regional_map_settings.json index 8da94f9340179..6b6734d140aca 100644 --- a/data/mods/desert_region/desert_regional_map_settings.json +++ b/data/mods/desert_region/desert_regional_map_settings.json @@ -200,11 +200,6 @@ "random_point_size_scalar": 100, "trailhead_chance": 1, "trailhead_road_distance": 6, - "trail_center_variance": 0, - "trail_width_offset_min": 1, - "trail_width_offset_max": 2, - "clear_trail_terrain": false, - "trail_terrain": { "t_railroad_rubble": 1 }, "trailheads": { "trailhead_basic": 1, "trailhead_outhouse": 1, "trailhead_shack": 1 } }, "map_extras": { diff --git a/data/mods/desert_region/mapgen/earth.json b/data/mods/desert_region/mapgen/earth.json index 73c71e97cbc2b..06e76a11f759f 100644 --- a/data/mods/desert_region/mapgen/earth.json +++ b/data/mods/desert_region/mapgen/earth.json @@ -736,5 +736,22 @@ "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ], "terrain": { "#": "t_null", " ": "t_open_air" } } + }, + { + "type": "palette", + "id": "trail_width_palette", + "//": "Number indicates number of tiles from center", + "nested": { + "0": { "chunks": [ "1x1_trail" ] }, + "1": { "chunks": [ [ "1x1_trail", 1 ], [ "null", 1 ] ] }, + "2": { "chunks": [ [ "1x1_trail", 0 ], [ "null", 1 ] ] }, + "3": { "chunks": [ [ "1x1_trail", 0 ], [ "null", 1 ] ] }, + "4": { "chunks": [ [ "1x1_trail", 0 ], [ "null", 1 ] ] } + } + }, + { + "type": "palette", + "id": "trail_path_palette", + "terrain": { ".": "t_railroad_rubble" } } ] diff --git a/data/mods/rural_biome/rural_regional_map_settings.json b/data/mods/rural_biome/rural_regional_map_settings.json index cbbc8fdee94a1..245bed81199b7 100644 --- a/data/mods/rural_biome/rural_regional_map_settings.json +++ b/data/mods/rural_biome/rural_regional_map_settings.json @@ -397,11 +397,6 @@ "random_point_size_scalar": 100, "trailhead_chance": 1, "trailhead_road_distance": 6, - "trail_center_variance": 3, - "trail_width_offset_min": 1, - "trail_width_offset_max": 3, - "clear_trail_terrain": false, - "trail_terrain": { "t_dirt": 1 }, "trailheads": { "trailhead_basic": 1, "trailhead_outhouse": 1, "trailhead_shack": 1 } }, "map_extras": { diff --git a/doc/MAPGEN.md b/doc/MAPGEN.md index 86e8462418607..cc2f1feaf6c10 100644 --- a/doc/MAPGEN.md +++ b/doc/MAPGEN.md @@ -833,7 +833,7 @@ Example: ### Place signs with "signs" -Places a sign (furniture `f_sign`) with a message written on it. Either "signage" or "snippet" must be defined. The +Places a sign with a message written on it. Either "signage" or "snippet" must be defined. The message may include tags like ``, ``, and `` that will insert a randomly generated name, or `` that will insert the nearest city name. diff --git a/doc/REGION_SETTINGS.md b/doc/REGION_SETTINGS.md index 179e89a6cf9bc..618b38e098cd2 100644 --- a/doc/REGION_SETTINGS.md +++ b/doc/REGION_SETTINGS.md @@ -367,11 +367,6 @@ trailheads, and some general tuning of the actual trail width/position in mapgen | `random_point_size_scalar` | Forest size is divided by this and added to the minimum number of random points. | | `trailhead_chance` | One in X chance a trailhead will spawn at end of trail near field. | | `trailhead_road_distance` | Maximum distance trailhead can be from a road and still be created. | -| `trail_center_variance` | Center of the trail in mapgen is offset in X and Y by a random amount between +/- variance | -| `trail_width_offset_min` | Trail width in mapgen is offset by `rng(trail_width_offset_min, trail_width_offset_max)`. | -| `trail_width_offset_max` | Trail width is mapgen offset by `rng(trail_width_offset_min, trail_width_offset_max)`. | -| `clear_trail_terrain` | Clear all previously defined `trail_terrain`. | -| `trail_terrain` | Weighted list of terrain that will used for the trail. | | `trailheads` | Weighted list of overmap specials / city buildings that will be placed as trailheads. | ### Example @@ -387,13 +382,6 @@ trailheads, and some general tuning of the actual trail width/position in mapgen "random_point_size_scalar": 100, "trailhead_chance": 1, "trailhead_road_distance": 6, - "trail_center_variance": 3, - "trail_width_offset_min": 1, - "trail_width_offset_max": 3, - "clear_trail_terrain": false, - "trail_terrain": { - "t_dirt": 1 - }, "trailheads": { "trailhead_basic": 50 } diff --git a/src/mapgen_functions.cpp b/src/mapgen_functions.cpp index e7690fea880e6..2d2f518e791dc 100644 --- a/src/mapgen_functions.cpp +++ b/src/mapgen_functions.cpp @@ -38,18 +38,7 @@ #include "creature_tracker.h" static const item_group_id Item_spawn_data_field( "field" ); -static const item_group_id Item_spawn_data_forest_trail( "forest_trail" ); - -static const oter_str_id oter_forest_thick( "forest_thick" ); -static const oter_str_id oter_forest_trail_end_east( "forest_trail_end_east" ); -static const oter_str_id oter_forest_trail_end_west( "forest_trail_end_west" ); -static const oter_str_id oter_forest_trail_es( "forest_trail_es" ); -static const oter_str_id oter_forest_trail_esw( "forest_trail_esw" ); -static const oter_str_id oter_forest_trail_ew( "forest_trail_ew" ); -static const oter_str_id oter_forest_trail_new( "forest_trail_new" ); -static const oter_str_id oter_forest_trail_nsw( "forest_trail_nsw" ); -static const oter_str_id oter_forest_trail_sw( "forest_trail_sw" ); -static const oter_str_id oter_forest_trail_wn( "forest_trail_wn" ); + static const oter_str_id oter_hellmouth( "hellmouth" ); static const oter_str_id oter_rift( "rift" ); static const oter_str_id oter_river_c_not_nw( "river_c_not_nw" ); @@ -107,12 +96,6 @@ building_gen_pointer get_mapgen_cfunction( const std::string &ident ) { "null", &mapgen_null }, { "field", &mapgen_field }, { "forest", &mapgen_forest }, - { "forest_trail_straight", &mapgen_forest_trail_straight }, - { "forest_trail_curved", &mapgen_forest_trail_curved }, - // TODO: Add a dedicated dead-end function. For now it copies the straight section above. - { "forest_trail_end", &mapgen_forest_trail_straight }, - { "forest_trail_tee", &mapgen_forest_trail_tee }, - { "forest_trail_four_way", &mapgen_forest_trail_four_way }, { "field", &mapgen_field }, { "river_center", &mapgen_river_center }, { "river_curved_not", &mapgen_river_curved_not }, @@ -1367,163 +1350,6 @@ void mapgen_forest( mapgendata &dat ) } } -void mapgen_forest_trail_straight( mapgendata &dat ) -{ - map *const m = &dat.m; - mapgendata forest_mapgen_dat( dat, oter_forest_thick.id() ); - mapgen_forest( forest_mapgen_dat ); - - const auto center_offset = [&dat]() { - return rng( -dat.region.forest_trail.trail_center_variance, - dat.region.forest_trail.trail_center_variance ); - }; - - const auto width_offset = [&dat]() { - return rng( dat.region.forest_trail.trail_width_offset_min, - dat.region.forest_trail.trail_width_offset_max ); - }; - - point center( SEEX + center_offset(), SEEY + center_offset() ); - - for( int i = 0; i < SEEX * 2; i++ ) { - for( int j = 0; j < SEEY * 2; j++ ) { - if( i > center.x - width_offset() && i < center.x + width_offset() ) { - m->furn_set( point( i, j ), f_null ); - m->ter_set( point( i, j ), *dat.region.forest_trail.trail_terrain.pick() ); - } - } - } - - if( dat.terrain_type() == oter_forest_trail_ew - || dat.terrain_type() == oter_forest_trail_end_east - || dat.terrain_type() == oter_forest_trail_end_west ) { - m->rotate( 1 ); - } - - m->place_items( Item_spawn_data_forest_trail, 75, center + point( -2, -2 ), - center + point( 2, 2 ), true, dat.when() ); -} - -void mapgen_forest_trail_curved( mapgendata &dat ) -{ - map *const m = &dat.m; - mapgendata forest_mapgen_dat( dat, oter_forest_thick.id() ); - mapgen_forest( forest_mapgen_dat ); - - const auto center_offset = [&dat]() { - return rng( -dat.region.forest_trail.trail_center_variance, - dat.region.forest_trail.trail_center_variance ); - }; - - const auto width_offset = [&dat]() { - return rng( dat.region.forest_trail.trail_width_offset_min, - dat.region.forest_trail.trail_width_offset_max ); - }; - - point center( SEEX + center_offset(), SEEY + center_offset() ); - - for( int i = 0; i < SEEX * 2; i++ ) { - for( int j = 0; j < SEEY * 2; j++ ) { - if( ( i > center.x - width_offset() && i < center.x + width_offset() && - j < center.y + width_offset() ) || - ( j > center.y - width_offset() && j < center.y + width_offset() && - i > center.x - width_offset() ) ) { - m->furn_set( point( i, j ), f_null ); - m->ter_set( point( i, j ), *dat.region.forest_trail.trail_terrain.pick() ); - } - } - } - - if( dat.terrain_type() == oter_forest_trail_es ) { - m->rotate( 1 ); - } - if( dat.terrain_type() == oter_forest_trail_sw ) { - m->rotate( 2 ); - } - if( dat.terrain_type() == oter_forest_trail_wn ) { - m->rotate( 3 ); - } - - m->place_items( Item_spawn_data_forest_trail, 75, center + point( -2, -2 ), - center + point( 2, 2 ), true, dat.when() ); -} - -void mapgen_forest_trail_tee( mapgendata &dat ) -{ - map *const m = &dat.m; - mapgendata forest_mapgen_dat( dat, oter_forest_thick.id() ); - mapgen_forest( forest_mapgen_dat ); - - const auto center_offset = [&dat]() { - return rng( -dat.region.forest_trail.trail_center_variance, - dat.region.forest_trail.trail_center_variance ); - }; - - const auto width_offset = [&dat]() { - return rng( dat.region.forest_trail.trail_width_offset_min, - dat.region.forest_trail.trail_width_offset_max ); - }; - - point center( SEEX + center_offset(), SEEY + center_offset() ); - - for( int i = 0; i < SEEX * 2; i++ ) { - for( int j = 0; j < SEEY * 2; j++ ) { - if( ( i > center.x - width_offset() && i < center.x + width_offset() ) || - ( j > center.y - width_offset() && - j < center.y + width_offset() && i > center.x - width_offset() ) ) { - m->furn_set( point( i, j ), f_null ); - m->ter_set( point( i, j ), *dat.region.forest_trail.trail_terrain.pick() ); - } - } - } - - if( dat.terrain_type() == oter_forest_trail_esw ) { - m->rotate( 1 ); - } - if( dat.terrain_type() == oter_forest_trail_nsw ) { - m->rotate( 2 ); - } - if( dat.terrain_type() == oter_forest_trail_new ) { - m->rotate( 3 ); - } - - m->place_items( Item_spawn_data_forest_trail, 75, center + point( -2, -2 ), - center + point( 2, 2 ), true, dat.when() ); -} - -void mapgen_forest_trail_four_way( mapgendata &dat ) -{ - map *const m = &dat.m; - mapgendata forest_mapgen_dat( dat, oter_forest_thick.id() ); - mapgen_forest( forest_mapgen_dat ); - - const auto center_offset = [&dat]() { - return rng( -dat.region.forest_trail.trail_center_variance, - dat.region.forest_trail.trail_center_variance ); - }; - - const auto width_offset = [&dat]() { - return rng( dat.region.forest_trail.trail_width_offset_min, - dat.region.forest_trail.trail_width_offset_max ); - }; - - point center( SEEX + center_offset(), SEEY + center_offset() ); - - for( int i = 0; i < SEEX * 2; i++ ) { - for( int j = 0; j < SEEY * 2; j++ ) { - if( ( i > center.x - width_offset() && i < center.x + width_offset() ) || - ( j > center.y - width_offset() && - j < center.y + width_offset() ) ) { - m->furn_set( point( i, j ), f_null ); - m->ter_set( point( i, j ), *dat.region.forest_trail.trail_terrain.pick() ); - } - } - } - - m->place_items( Item_spawn_data_forest_trail, 75, center + point( -2, -2 ), - center + point( 2, 2 ), true, dat.when() ); -} - void mapgen_lake_shore( mapgendata &dat ) { map *const m = &dat.m; diff --git a/src/mapgen_functions.h b/src/mapgen_functions.h index 463d409275e01..0ce0d62d1d210 100644 --- a/src/mapgen_functions.h +++ b/src/mapgen_functions.h @@ -39,10 +39,6 @@ ter_id clay_or_sand(); void mapgen_null( mapgendata &dat ); void mapgen_field( mapgendata &dat ); void mapgen_forest( mapgendata &dat ); -void mapgen_forest_trail_straight( mapgendata &dat ); -void mapgen_forest_trail_curved( mapgendata &dat ); -void mapgen_forest_trail_tee( mapgendata &dat ); -void mapgen_forest_trail_four_way( mapgendata &dat ); void mapgen_river_center( mapgendata &dat ); //void mapgen_bridge( mapgendata &dat ); void mapgen_river_curved_not( mapgendata &dat ); diff --git a/src/overmap.cpp b/src/overmap.cpp index 94287278aa237..921f45bb88e46 100644 --- a/src/overmap.cpp +++ b/src/overmap.cpp @@ -4478,13 +4478,12 @@ void overmap::place_forest_trailheads() const auto try_place_trailhead_special = [&]( const tripoint_om_omt & trail_end, const om_direction::type & dir ) { - const tripoint_om_omt potential_trailhead = trail_end + om_direction::displace( dir, 1 ); overmap_special_id trailhead = settings->forest_trail.trailheads.pick(); if( one_in( settings->forest_trail.trailhead_chance ) && - trailhead_close_to_road( potential_trailhead ) && - can_place_special( *trailhead, potential_trailhead, dir, false ) ) { - const city &nearest_city = get_nearest_city( potential_trailhead ); - place_special( *trailhead, potential_trailhead, dir, nearest_city, false, false ); + trailhead_close_to_road( trail_end ) && + can_place_special( *trailhead, trail_end, dir, false ) ) { + const city &nearest_city = get_nearest_city( trail_end ); + place_special( *trailhead, trail_end, dir, nearest_city, false, false ); } }; @@ -4493,7 +4492,7 @@ void overmap::place_forest_trailheads() const tripoint_om_omt p( i, j, 0 ); oter_id oter = ter( p ); if( is_ot_match( "forest_trail_end", oter, ot_match_type::prefix ) ) { - try_place_trailhead_special( p, oter->get_dir() ); + try_place_trailhead_special( p, static_cast( oter->get_rotation() ) ); } } } diff --git a/src/regional_settings.cpp b/src/regional_settings.cpp index 027cacd08819d..b9c15361eb7ab 100644 --- a/src/regional_settings.cpp +++ b/src/regional_settings.cpp @@ -215,31 +215,6 @@ static void load_forest_trail_settings( const JsonObject &jo, forest_trail_settings.trailhead_chance, !overlay ); read_and_set_or_throw( forest_trail_settings_jo, "trailhead_road_distance", forest_trail_settings.trailhead_road_distance, !overlay ); - read_and_set_or_throw( forest_trail_settings_jo, "trail_center_variance", - forest_trail_settings.trail_center_variance, !overlay ); - read_and_set_or_throw( forest_trail_settings_jo, "trail_width_offset_min", - forest_trail_settings.trail_width_offset_min, !overlay ); - read_and_set_or_throw( forest_trail_settings_jo, "trail_width_offset_max", - forest_trail_settings.trail_width_offset_max, !overlay ); - read_and_set_or_throw( forest_trail_settings_jo, "clear_trail_terrain", - forest_trail_settings.clear_trail_terrain, !overlay ); - - if( forest_trail_settings.clear_trail_terrain ) { - forest_trail_settings.unfinalized_trail_terrain.clear(); - } - - if( !forest_trail_settings_jo.has_object( "trail_terrain" ) ) { - if( !overlay ) { - forest_trail_settings_jo.throw_error( "trail_terrain required" ); - } - } else { - for( const JsonMember member : forest_trail_settings_jo.get_object( "trail_terrain" ) ) { - if( member.is_comment() ) { - continue; - } - forest_trail_settings.unfinalized_trail_terrain[member.name()] = member.get_int(); - } - } if( !forest_trail_settings_jo.has_object( "trailheads" ) ) { if( !overlay ) { @@ -982,15 +957,6 @@ void forest_mapgen_settings::finalize() void forest_trail_settings::finalize() { - for( const std::pair &pr : unfinalized_trail_terrain ) { - const ter_str_id tid( pr.first ); - if( !tid.is_valid() ) { - debugmsg( "Tried to add invalid terrain %s to forest_trail_settings trail_terrain.", tid.c_str() ); - continue; - } - trail_terrain.add( tid.id(), pr.second ); - } - trailheads.finalize(); } diff --git a/src/regional_settings.h b/src/regional_settings.h index 96ff0edf6af1f..dfe28bf110f9b 100644 --- a/src/regional_settings.h +++ b/src/regional_settings.h @@ -167,12 +167,6 @@ struct forest_trail_settings { int random_point_size_scalar = 100; int trailhead_chance = 1; int trailhead_road_distance = 6; - int trail_center_variance = 3; - int trail_width_offset_min = 1; - int trail_width_offset_max = 3; - bool clear_trail_terrain = false; - std::map unfinalized_trail_terrain; - weighted_int_list trail_terrain; building_bin trailheads; void finalize(); diff --git a/tools/spell_checker/dictionary.txt b/tools/spell_checker/dictionary.txt index cf722bd9e1d30..c59d01044eebb 100644 --- a/tools/spell_checker/dictionary.txt +++ b/tools/spell_checker/dictionary.txt @@ -1283,6 +1283,7 @@ grnd grodd grommets groundcover +groundhogs groundnut groundsheet gryposaurus