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

Nested mapgen structures #21900

Merged
merged 4 commits into from Oct 7, 2017

Conversation

Projects
None yet
3 participants
@Coolthulhu
Copy link
Contributor

commented Sep 15, 2017

Ability to nest mapgen works as follows:

  • A special subtype of json mapgen is defined
  • This nesteable mapgen json is named
  • A mapping or placement is defined on other mapgen to use this new nestable mapgen
  • When the mapping or placement is applied, a recursive mapgen call is performed as the last step of the mapgen structure with the mapping/placement

I added an example of this happening. The example is pretty rare in the wild, so during testing it would be a good idea to bump its weight.


Things that can be achieved with nested mapgen (not done in this PR):

  • Create a safe filled with stuff on one random tile in the house. Can't be done with non-nested mapgen as the tile for safe and contents is rolled separately
  • Spawn either a human corpse or a zombie, but not both nor neither
  • Generate a small structure (say, a doghouse) at random spot in the square instead of being predefined to always spawn at certain distance from the house
  • Spawn a corpse with a blood trail to it (like the drug dealers special, but entirely in json) on a random position
  • Add a themed set of features, like in the example in this PR (I won't spoil here, read the changes if curious)
  • 4 random rooms with a common "hub", like in the labs
@vache

This comment has been minimized.

Copy link
Contributor

commented Sep 15, 2017

I like it! Unrelated to the current PR, but on a similar note, I would like to see something similar for specials as well, like with a 5x5 lab structure, but there could potentially be multiple 2x2 "set pieces" that could spawn inside of the main structure.

Like:

LLLLL
LSSLL
LSSLL
LLLLL
LLLLL
SS
SS

could be a large storage area or a cafeteria, depending on how it rolled

@kevingranade kevingranade merged commit b6538dc into CleverRaven:master Oct 7, 2017

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.03%) to 22.277%
Details
gorgon-ghprb Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.