CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.62k stars 4.17k forks source link

Allow map gen tile "bundles" to be defined and used with palettes #53615

Closed PatrikLundell closed 1 year ago

PatrikLundell commented 2 years ago

Is your feature request related to a problem? Please describe.

The current farms are generated with furrowed earth with a separate logic assigning plants to most of those furrows, causing mapgen harvested plants to leave behind furrowed earth ready for replanting, while player planting removes the furrows.

Solution you would like.

Allow you to define "tiles" that consist of the usual set of components, i.e. terrain, furniture, items, monsters (and whatever I've not mentioned) and then assign these "tile" entities to palette characters with weights. These "tile" entities ought to be possible to use directly as well (i.e. in point, line, square designations).

Describe alternatives you have considered.

Some other way to let the RNG value in one section of a palette description be inherited by other sections associated with the same character when desired. The ways I've been able to envision it are error prone in that they would require that the sections line up to form sets.

Additional context

Example of a possible syntax and usage: { "type": "tile", "id": "furrow", "terrain": "t_dirtmound" }, { "type": "tile", "id": "crop", "terrain": "t_dirt", "sealed_item": {"item": {"item": "seed_corn"}, {"furniture": "f_plant_seedling"}} }, { "type": "tile", "id": "weed", "terrain": "t_dirt", "sealed_item": {"item": {"item": "seed_weed"}, {"furniture": "f_plant_seedling"}} } where "seed_weed" would be an abstract item that's resolved into any of a set of weeds. This is a side issue to illustrate a possible use of the logic, not part of the request itself.

and in the palette we'd have: { "type": "palette", "id": "farm", "tile": { "D": { {"id": "furrow", "chance": 25}, {"id": "crop", "chance": 70}, {"id": "weed", "chance": 5} } } "terrain": { : : } : : }

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not \'bump\' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

Night-Pryanik commented 1 year ago

Closing as stale, since stalebot can't do it by itself.