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

Retire procedurally generated houses and basements #36075

Merged

Conversation

ralreegorganon
Copy link
Contributor

@ralreegorganon ralreegorganon commented Dec 13, 2019

Summary

SUMMARY: Infrastructure "Retire procedurally generated houses and basements"

Purpose of change

We've got enough hand-crafted houses and basements, as well as the infrastructure to do json-powered variations with nested mapgen and multi-OMT city_buildings, that there is no need to keep the procedurally generated ones.

Fixes #11632
Fixes #21915

Describe the solution

  • Remove the json attributes that made houses generate with the procgen code
  • Remove the json attributes that made basements generate with the procgen code
  • Remove the house_base overmap terrain and migrate them to house--they had the same mapgen as house and were only used as part of the house_base city_building, where a house entry produces the same result
  • Delete all of the code that is consequently unused

Describe alternatives you've considered

I'd like to deprecate the city generation code that takes a house and randomly attaches a basement to it, in favor of utilizing the ability to define the different z-levels (roof, house levels, basement) in a city_building special and putting that special in the list of houses that can be placed in the city.

The problem with the current approach is that when we take a hand-crafted house and a hand-crafted basement that are pulled from random pools and smash them together, the stairs sometimes don't line up (or the ground level may not even have stairs). There is additional code that attempts to place stairs in houses, but it'll just plop them in non-sensical locations.

Hand in hand with removing the code that combines random floors and basements, I'd like to remove the code that places stairs in houses going down to basements because as mentioned before, it's nonsensical. Once we do that, we can also remove the game option that will force stairs to be placed even if the location is invalid.

Testing

Spawned a bunch of worlds and ran around in them, checking out the houses. Loaded some worlds prior to the change and also checked the migration of the house_base.

Additional context

Because this retires an entire class of mapgen that was quite common, it can shift the balance a fair amount terms of what sort of furniture, terrain, items, and monsters are present. I did not make any attempt to go through all of the house and basement mapgens and evaluate this.

I also did not attempt to adjust the weights of any of the "house" mapgen. The "builtin" versions would have had a defaulted weight of 1000, where as many of the hand-crafted ones range from 300 down to 50. As a result, all of those are now going to be more likely when placing the "house" mapgen. We'll probably want to consider reducing the weight of the "house" entry in the regional settings so that other variations are more prevalent.

@ralreegorganon ralreegorganon added [JSON] Changes (can be) made in JSON Map / Mapgen Overmap, Mapgen, Map extras, Map display [C++] Changes (can be) made in C++. Previously named `Code` labels Dec 13, 2019
@ifreund
Copy link
Contributor

ifreund commented Dec 13, 2019

Should close #11632, #21915, and #13008 I believe

@ralreegorganon
Copy link
Contributor Author

Should close #11632, #21915, and #13008 I believe

I'll add #11632, #21915.

This doesn't really fix #13008, since you can still have misaligned stairs (reasons described in my additional comments above re: combining unrelated house and basement entries), and if you turn on the setting to force stairs to spawn, it'll place them wherever (with it off, it looks for a location that is flagged as INDOORS, FLAT, and has no furniture).

@ralreegorganon ralreegorganon marked this pull request as ready for review December 15, 2019 23:45
@kevingranade kevingranade merged commit 936a155 into CleverRaven:master Dec 17, 2019
anothersimulacrum added a commit to anothersimulacrum/Cataclysm-DDA that referenced this pull request Dec 18, 2019
anothersimulacrum added a commit to anothersimulacrum/Cataclysm-DDA that referenced this pull request Dec 18, 2019
anothersimulacrum added a commit to anothersimulacrum/Cataclysm-DDA that referenced this pull request Dec 18, 2019
Also add alt map key to mod testing to prevent this.
Graphical overmap needs mod font support to be able to be run with CI.
ZhilkinSerg added a commit that referenced this pull request Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Map / Mapgen Overmap, Mapgen, Map extras, Map display
Projects
None yet
Development

Successfully merging this pull request may close these issues.

House generation bug, kitchen door behind Oven regulary house mapgen occasionally overlaps table and wall
3 participants