-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Forest mapgen via region_settings #25425
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
Forest mapgen via region_settings #25425
Conversation
Bug against github interface: only allows one 👍 |
This is big! Love it. Can see potential of going north (ice field regions), south (deserts), up (hills - replace trees with big boulders), or anywhere actually... |
I like the overall idea, but I'd like certain adjustments. Clearcut map extra should happen only at the edge of such a forest, people don't go deep into it to make those unless there's some innawoods settlement/house - in which case, assuring that there's a relatively rare, small wooden cabin map extra, with basic house loot would be nice (I believe such a cabin already exists, it's just being spawned pretty randomly). |
My primary goal here is getting the infrastructure into the game so that you can just adjust numbers in json for this sort of thing. I'm not opposed to adjusting the numbers for this--it's just a matter of modifying it for the relevant overmap terrains. The forest terrains currently have approximately a ~0.41 % chance of being clearcut, which means across the approximately 3750 to 10000 forests on an overmap, somewhere between 15 and 41 are clearcut. That being said, I'm inclined to wait until I (hopefully) hear more playtesting comments before making any sort of initial numbers pass.
No, I actually think there is plenty of it in deep forest without any sort of habitation-related reason, but then we go down the rabbit hole of things like logging roads and much larger contiguous swaths of clearcut terrain, which is out of scope for something like a map extra--they're limited to a single overmap terrain and really just for adding some flavor--it's where helicopter crashes, portals, minefields, supply drops and like come from.
Cabins (including the one you're thinking of) are more of an overmap special than a map extra. I am primarily focused on making this PR about the infrastructure which then opens up the possibilities for content down the road. |
fc54c20
to
069fb69
Compare
069fb69
to
cc98f83
Compare
I'm taking the [WIP] off this. One thing to note is that any mod which includes a |
Summary
SUMMARY: Infrastructure "Add forest composition attributes to region_settings and use in mapgen."
Purpose of change
Forests are currently a completely hardcoded mapgen, making it difficult to introduce new terrains and furnitures or adjust the overall parameters.
This change creates a new forest section in the region_settings which allows modification of these forest settings via json, either via
region_settings
orregion_overlay
entries, which means mods can also trivially add to or adjust the forest composition. These settings are then used in a new forest mapgen function.Describe the solution
See the new documentation for a description of the forest mapgen settings.
See the new section in the regional map settings for the new json.
See the additional map extras for a description of the map extras added.
Additional context
The new forests should be roughly equivalent to the old ones, though some of the additional tree and shrub species that were previously underrepresented (or not present at all) should be a bit more common, and I've added some additional ground clutter (e.g. dirt, tree trunks, boulders) to liven up the forests a bit.
The primary reason why I've initially flagged this PR as [WIP] is that I'd like to get some testing and feedback to ensure that I've not accidentally totally ruined access to some critical forest-based resource. I do have ideas for further changes to the forest compositions, both for balance and verisimilitude, but I'd prefer to keep that for follow-ups.
If you're on Windows and want to run applications downloaded from strangers on the internet, I've compiled a version of this for testing purposes, which you can download here.
It's important to note that the previous and new forest mapgen functions handle both forests and swamps (and actually differentiates between
forest
which are at the boundaries of forests andforest_thick
which are the inner forests).The forest in spring...

...and a swamp

It's fairly straightforward to adjust the composition, keeping in mind that with the way regional settings are currently applied, there is effectively only one region for the entire map. So, you could turn the swamp above into a berry bog...
...but EVERY swamp will now use that definition. Being able to have multiple regions is certainly an area of future work, as one could imagine differentiating between coastal swamps (e.g. a salt marsh) and interior swamps or other similar changes based on region.
Using
region_overlay
entries, it's quite trivial for a mod to significantly change the nature of a forest--for example, Whaley has been working with an early version of these changes to introduce new fauna (plants native to New England), groundcover (leafy forest floor), muddy water, and adjust the density of the forest and spawn rates to create something like this:Part of un-hardcoding the previous forest mapgen was moving some of its special events out to map extras--the spiderwebs, jabberwock, and Shia that were hardcoded in the forest are now map extras that are referenced by the forest map extras via the normal json configuration, though nothing precludes them now being referenced anywhere a map extra can be used.
I also added three new map extras to give a bit more life to the forest:
mx_grove
This map extra finds the first tree in the area, and then converts all trees, young trees, and shrubs in the area into that type of tree. Here we see a grove of fruit trees:
mx_shrubbery
Similar to a grove but for shrubs, this map extra finds the first shrub in the area, and then converts all trees, young trees, and shrubs in the area into that type of shrub.
mx_clearcut
This map extra converts all trees and young trees in the area to stumps.
Finally, some more closing images through the seasons, to follow the spring from above:
summer

fall

winter
