Skip to content

Commit

Permalink
feat(content): specials placement rework (#3438)
Browse files Browse the repository at this point in the history
* Specials placement rework

* Generate new special during game start, if required one can't be found

* Subway connections of specials will connect to global stations network

* Obsolete non rotatabe stations
  • Loading branch information
Vollch authored Oct 23, 2023
1 parent 317c44e commit 2e869da
Show file tree
Hide file tree
Showing 14 changed files with 187 additions and 405 deletions.
4 changes: 3 additions & 1 deletion data/json/obsoletion/terrains.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"mine_entrance",
"mine_shaft",
"spiral",
"spiral_hub"
"spiral_hub",
"underground_sub_station",
"sewer_sub_station"
]
}
]
8 changes: 7 additions & 1 deletion data/json/overmap/multitile_city_buildings.json
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,13 @@
"locations": [ "land" ],
"overmaps": [
{ "point": [ 0, 0, 0 ], "overmap": "sub_station_north" },
{ "point": [ 0, 0, 1 ], "overmap": "sub_station_roof_north" }
{ "point": [ 0, 0, 1 ], "overmap": "sub_station_roof_north" },
{ "point": [ 0, 0, -1 ], "overmap": "sewer_sub_station_north" },
{ "point": [ 0, 0, -2 ], "overmap": "underground_sub_station_north" }
],
"connections": [
{ "point": [ 0, -1, -2 ], "connection": "subway_tunnel", "from": [ 0, 0, -2 ] },
{ "point": [ 0, 1, -2 ], "connection": "subway_tunnel", "from": [ 0, 0, -2 ] }
]
},
{
Expand Down
5 changes: 4 additions & 1 deletion data/json/overmap/overmap_connections.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"type": "overmap_connection",
"id": "subway_tunnel",
"default_terrain": "subway",
"subtypes": [ { "terrain": "subway", "locations": [ "subterranean_subway" ], "flags": [ "ORTHOGONAL" ] } ]
"subtypes": [
{ "terrain": "underground_sub_station", "locations": [ "underground_sub_station" ], "flags": [ "ORTHOGONAL" ] },
{ "terrain": "subway", "locations": [ "subterranean_subway" ], "flags": [ "ORTHOGONAL" ] }
]
},
{
"type": "overmap_connection",
Expand Down
21 changes: 7 additions & 14 deletions data/json/overmap/overmap_special/specials.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,7 @@
],
"locations": [ "forest" ],
"city_distance": [ 25, -1 ],
"occurrences": [ 50, 100 ],
"//": "Inflated chance, effective rate ~40%",
"occurrences": [ 40, 100 ],
"flags": [ "CLASSIC", "WILDERNESS", "UNIQUE", "ELECTRIC_GRID" ]
},
{
Expand Down Expand Up @@ -4758,8 +4757,7 @@
],
"city_distance": [ 5, 40 ],
"city_sizes": [ 6, -1 ],
"occurrences": [ 70, 100 ],
"//": "Inflated chance, effective rate ~40%",
"occurrences": [ 40, 100 ],
"flags": [ "CLASSIC", "UNIQUE", "ELECTRIC_GRID" ]
},
{
Expand Down Expand Up @@ -4857,8 +4855,7 @@
"locations": [ "wilderness" ],
"city_distance": [ 5, 20 ],
"city_sizes": [ 6, -1 ],
"occurrences": [ 40, 100 ],
"//": "Inflated chance, in effect 15%",
"occurrences": [ 15, 100 ],
"flags": [ "CLASSIC", "UNIQUE" ]
},
{
Expand Down Expand Up @@ -6464,8 +6461,7 @@
],
"locations": [ "land" ],
"city_distance": [ 5, -1 ],
"occurrences": [ 95, 100 ],
"//": "Inflated chance, effective rate ~ 30%",
"occurrences": [ 30, 100 ],
"flags": [ "CLASSIC", "FARM", "UNIQUE" ]
},
{
Expand Down Expand Up @@ -6654,8 +6650,7 @@
"connections": [ { "point": [ 2, -1, 0 ], "connection": "local_road", "from": [ 2, 0, 0 ] } ],
"city_distance": [ 5, 40 ],
"city_sizes": [ 4, -1 ],
"occurrences": [ 75, 100 ],
"//": "Inflated chance, effective rate ~55%",
"occurrences": [ 55, 100 ],
"flags": [ "CLASSIC", "UNIQUE", "ELECTRIC_GRID" ]
},
{
Expand Down Expand Up @@ -6743,8 +6738,7 @@
"locations": [ "wilderness" ],
"city_distance": [ 8, 40 ],
"city_sizes": [ 6, -1 ],
"occurrences": [ 50, 100 ],
"//": "Inflated chance, effective rate ~30%",
"occurrences": [ 30, 100 ],
"flags": [ "CLASSIC", "URBAN", "UNIQUE", "ELECTRIC_GRID" ]
},
{
Expand Down Expand Up @@ -7006,8 +7000,7 @@
"connections": [ { "point": [ 3, -2, 0 ], "from": [ 3, -1, 0 ], "connection": "local_road" } ],
"city_distance": [ 5, -1 ],
"city_sizes": [ 4, -1 ],
"occurrences": [ 45, 100 ],
"//": "Inflated chance, in effect ~10%",
"occurrences": [ 10, 100 ],
"flags": [ "MILITARY", "UNIQUE", "ELECTRIC_GRID" ]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
"color": "yellow",
"see_cost": 5,
"extras": "subway",
"flags": [ "KNOWN_UP", "KNOWN_DOWN", "NO_ROTATE" ]
"flags": [ "KNOWN_UP", "KNOWN_DOWN" ]
},
{
"type": "overmap_terrain",
Expand All @@ -289,7 +289,7 @@
"color": "yellow",
"see_cost": 5,
"extras": "subway",
"flags": [ "KNOWN_UP", "NO_ROTATE" ]
"flags": [ "KNOWN_UP" ]
},
{
"type": "overmap_terrain",
Expand Down
5 changes: 5 additions & 0 deletions data/json/overmap/special_locations.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,10 @@
"type": "overmap_location",
"id": "lake_shore",
"terrains": [ "lake_shore" ]
},
{
"type": "overmap_location",
"id": "underground_sub_station",
"terrains": [ "underground_sub_station" ]
}
]
5 changes: 5 additions & 0 deletions src/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2243,6 +2243,11 @@ void options_manager::add_options_world_default()
0, 8, 4
);

add( "SPECIALS_DENSITY", world_default, translate_marker( "Overmap specials density" ),
translate_marker( "A scaling factor that determines density of overmap specials." ),
0.0, 10.0, 1, 0.1
);

add( "SPAWN_DENSITY", world_default, translate_marker( "Spawn rate scaling factor" ),
translate_marker( "A scaling factor that determines density of monster spawns." ),
0.0, 50.0, 1.0, 0.1
Expand Down
Loading

0 comments on commit 2e869da

Please sign in to comment.