Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

city_sizes restriction for city buildings #72815

Merged

Conversation

Procyonae
Copy link
Contributor

@Procyonae Procyonae commented Apr 3, 2024

Summary

Balance "City buildings are restricted to spawn in (more) appropriately sized cities"

Purpose of change

Addresses #72795 but that issue has interesting discussion on close future changes so I'd rather keep it open for now

Describe the solution

Allows city_sizes to be used with city_building specials

Adds usage to some existing buildings. Wants to be expanded on in future and the numbers used tweaked after more playtesting, currently the min sizes are very forgiving based on even the larger ingame "cities" at base urbanity being small in general. Weights of now restricted buildings might also want buffing. Some buildings could do with lower/higher density versions adding so city sizes that don't make sense for one kind still have good variety.

I were going to update documentation but can't even find any saying this field didn't work for city specials before

Describe alternatives you've considered

Doing this sooner
Originally I were going to include houses in this but I think they'd be better dealt with by splitting the houses "zone" into low/medium/high density and restricting their placement both on how central the placement is compared to the city centre and edge and the raw size. I'll add this in a follow up PR. This PR is better for specific building restrictions.
Not decided what to do with shops yet, I like the idea of districts discussed in #72795 but with how cities place currently that wouldn't be easy to add in a way that looks good, specialised streets could be quite doable tho.

Testing

Made mall spawn very frequently but only in size >= 12 cities.
Expected outcome.
The overmap coverage test might not like this, will run locally a bunch of times

Additional context

@github-actions github-actions bot added Map / Mapgen Overmap, Mapgen, Map extras, Map display [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) Game: Balance Balancing of (existing) in-game features. astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Apr 3, 2024
@RanikOrtega
Copy link
Contributor

Nice work Procyonae. What sort of tagging will be needed for the overmap locations themselves? Stadiums for example.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Apr 3, 2024
@Procyonae
Copy link
Contributor Author

The city_sizes field here will be added to the stadiums city_building entry below

{
"type": "city_building",
"id": "stadium",
"locations": [ "land" ],
"overmaps": [
{ "point": [ 0, 0, 0 ], "overmap": "stadium_0_0_north" },
{ "point": [ 1, 0, 0 ], "overmap": "stadium_1_0_north" },
{ "point": [ 2, 0, 0 ], "overmap": "stadium_2_0_north" },
{ "point": [ 3, 0, 0 ], "overmap": "stadium_3_0_north" },
{ "point": [ 0, 1, 0 ], "overmap": "stadium_0_1_north" },
{ "point": [ 1, 1, 0 ], "overmap": "stadium_1_1_north" },
{ "point": [ 2, 1, 0 ], "overmap": "stadium_2_1_north" },
{ "point": [ 3, 1, 0 ], "overmap": "stadium_3_1_north" },
{ "point": [ 0, 2, 0 ], "overmap": "stadium_0_2_north" },
{ "point": [ 1, 2, 0 ], "overmap": "stadium_1_2_north" },
{ "point": [ 2, 2, 0 ], "overmap": "stadium_2_2_north" },
{ "point": [ 3, 2, 0 ], "overmap": "stadium_3_2_north" },
{ "point": [ 0, 3, 0 ], "overmap": "stadium_0_3_north" },
{ "point": [ 1, 3, 0 ], "overmap": "stadium_1_3_north" },
{ "point": [ 2, 3, 0 ], "overmap": "stadium_2_3_north" },
{ "point": [ 3, 3, 0 ], "overmap": "stadium_3_3_north" },
{ "point": [ 0, 4, 0 ], "overmap": "stadium_0_4_north" },
{ "point": [ 1, 4, 0 ], "overmap": "stadium_1_4_north" },
{ "point": [ 2, 4, 0 ], "overmap": "stadium_2_4_north" },
{ "point": [ 3, 4, 0 ], "overmap": "stadium_3_4_north" },
{ "point": [ 0, 1, 1 ], "overmap": "stadium_0_1_1_north" },
{ "point": [ 1, 1, 1 ], "overmap": "stadium_1_1_1_north" },
{ "point": [ 2, 1, 1 ], "overmap": "stadium_2_1_1_north" },
{ "point": [ 3, 1, 1 ], "overmap": "stadium_3_1_1_north" },
{ "point": [ 0, 2, 1 ], "overmap": "stadium_0_2_1_north" },
{ "point": [ 1, 2, 1 ], "overmap": "stadium_1_2_1_north" },
{ "point": [ 2, 2, 1 ], "overmap": "stadium_2_2_1_north" },
{ "point": [ 3, 2, 1 ], "overmap": "stadium_3_2_1_north" },
{ "point": [ 0, 3, 1 ], "overmap": "stadium_0_3_1_north" },
{ "point": [ 1, 3, 1 ], "overmap": "stadium_1_3_1_north" },
{ "point": [ 2, 3, 1 ], "overmap": "stadium_2_3_1_north" },
{ "point": [ 3, 3, 1 ], "overmap": "stadium_3_3_1_north" },
{ "point": [ 0, 4, 1 ], "overmap": "stadium_0_4_1_north" },
{ "point": [ 1, 4, 1 ], "overmap": "stadium_1_4_1_north" },
{ "point": [ 2, 4, 1 ], "overmap": "stadium_2_4_1_north" },
{ "point": [ 3, 4, 1 ], "overmap": "stadium_3_4_1_north" },
{ "point": [ 0, 1, 2 ], "overmap": "stadium_0_1_2_north" },
{ "point": [ 1, 1, 2 ], "overmap": "stadium_1_1_2_north" },
{ "point": [ 2, 1, 2 ], "overmap": "stadium_2_1_2_north" },
{ "point": [ 3, 1, 2 ], "overmap": "stadium_3_1_2_north" },
{ "point": [ 0, 2, 2 ], "overmap": "stadium_0_2_2_north" },
{ "point": [ 1, 2, 2 ], "overmap": "stadium_1_2_2_north" },
{ "point": [ 2, 2, 2 ], "overmap": "stadium_2_2_2_north" },
{ "point": [ 3, 2, 2 ], "overmap": "stadium_3_2_2_north" },
{ "point": [ 0, 3, 2 ], "overmap": "stadium_0_3_2_north" },
{ "point": [ 1, 3, 2 ], "overmap": "stadium_1_3_2_north" },
{ "point": [ 2, 3, 2 ], "overmap": "stadium_2_3_2_north" },
{ "point": [ 3, 3, 2 ], "overmap": "stadium_3_3_2_north" },
{ "point": [ 0, 4, 2 ], "overmap": "stadium_0_4_2_north" },
{ "point": [ 1, 4, 2 ], "overmap": "stadium_1_4_2_north" },
{ "point": [ 2, 4, 2 ], "overmap": "stadium_2_4_2_north" },
{ "point": [ 3, 4, 2 ], "overmap": "stadium_3_4_2_north" },
{ "point": [ 1, 1, 3 ], "overmap": "stadium_1_1_3_north" },
{ "point": [ 2, 1, 3 ], "overmap": "stadium_2_1_3_north" },
{ "point": [ 0, 3, 3 ], "overmap": "stadium_0_3_3_north" }
]
},

@I-am-Erk
Copy link
Member

I-am-Erk commented Apr 4, 2024

ooh. I was going to do this but I'm quite okay that I don't have to.

@github-actions github-actions bot added the [JSON] Changes (can be) made in JSON label Apr 8, 2024
@Procyonae Procyonae marked this pull request as ready for review April 8, 2024 12:59
@Maleclypse Maleclypse merged commit cc2b057 into CleverRaven:master Apr 16, 2024
29 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Game: Balance Balancing of (existing) in-game features. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants