Biomes

A rather rough idea for biomes. Currently you get three types of terrain(rivers not withstanding), forest, field and swamp. My idea would be to replace the forest-chunk system with a biome.json system, in which people can easily add their own biomes in.

A rough biome.json is outlined below:

[(regional settings)
num_biome_chunks : 250 //replaces forest_chunks
]
biome.json
[
id: “b_forest”, //b_ should be before every biome name, like f_ for furunature and t_ for terrain.
type: “BIOME”, // new type of biome category
biome_size_min: 10,
biome_size_max : 40
biome_weight : 500 //chance of the biome appearing
ground_base : [[“t_dirt”, 100], [“t_grass”, 10]] weighted ground cover
terrain_overlay_coveage: 2 // as a 1 in x number in this case one in two overlayed on-top of the base ground
default_terrain: “t_tree”,
special_terrain_groups: [
[“t_tree”, 100],
[“t_tree_young”, 50],
[“t_tree_apple”, 10] etc
] //weighted list of what plants appear
weather : {
humidity : 0 // modifies the baseline humidity i.e, less humidity for deserts and dry plains
pressure : 0 // modifies the baseline pressure
temperature : 0 // modifies the base temperature, swamps would be cooler due to anti-greenhouse effects from the methane.
(2)special_weather : [“WEATHER_FLAG”] // any type of special weather unique to the biome for a later pr
}
(2) centre_special_terrain: “acid_portal” // special-prebuilt terrain using jsons-(ice portal for icy-type biomes, acid portals for acid biomes).
]
*(2) made available in a seperate pr.

There would probably need to be added a native_biome:true/false, so that biomes occurring outside of the New England area would be initialized through an option in the settings.

Initial pr would just be concerned with replicating forest/swamp spawning(the map in initialized as a field as default).

Questions I have would be where would I load the biome.json, because it would need to be utilized by both the overmap and mapgen. I’m not really good at explaining things so hopefully my insane rambling makes sense.

for this you’d need to rewrite significant parts of mapgen code i think.

@vache should be able to elaborate.

[quote=“jcd, post:2, topic:11027”]for this you’d need to rewrite significant parts of mapgen code i think.

@vache should be able to elaborate.[/quote]
not as much as changing other parts of the mapgen, the forest code is self-contained in place_forest();, and in mapgen_forest_general.

Still trying to determine what dat.fill(8); does in mapgen_forest_general, it’s not really well documented(original code from whales), except in places where someone has add some extra stuff on top of the mapgen code(like special trees). I’m assuming it allows forests to generally just fade out if it is at the edge.

I think the intent of the regional settings was to become a biome eventually, so I would recommend making “regional_settings” the biome definition, and not add another object for it. You could make certain parameters optional in the json, and add things like the climate parameters, size guidelines, and biome transition settings as well.

One issue that I’ve noticed is that json maps have hard coded ground fill as dirt/grass. Replacing this with sand for a desert or snow/frozen ground for a tundra would be difficult without some sort of per biome translation that would be hard to maintain and hard to get right for things like flowers and trees. We might need to require mapgens have a biome attached to them and just have overmap terrains select mapgens specific to a biome or generic mapgens that are appropriate in any biome.

Also I would not worry about things like portals and special weather at the moment, I have a couple ideas for that that I’m looking to bring back soon.

[quote=“vache, post:4, topic:11027”]I think the intent of the regional settings was to become a biome eventually, so I would recommend making “regional_settings” the biome definition, and not add another object for it. You could make certain parameters optional in the json, and add things like the climate parameters, size guidelines, and biome transition settings as well.

One issue that I’ve noticed is that json maps have hard coded ground fill as dirt/grass. Replacing this with sand for a desert or snow/frozen ground for a tundra would be difficult without some sort of per biome translation that would be hard to maintain and hard to get right for things like flowers and trees. We might need to require mapgens have a biome attached to them and just have overmap terrains select mapgens specific to a biome or generic mapgens that are appropriate in any biome.

Also I would not worry about things like portals and special weather at the moment, I have a couple ideas for that that I’m looking to bring back soon.[/quote]

The initial objective would be to just get the forest biome working. Json maps, I haven’t thought about yet.

I was going to post about how the biome is new england, but enh.

Id like to see a mapgen rewrite, honestly. Id love it if oceans made an appearance. Literally endless bodies of water that at some distance out spawned cthulu to keep you from actually trying to cross them (and even aeventually a second landmass if you did. Endless and all.)

Those would of course be east and south, and mountains would start north and west, but that would be a slower process.

I know the current idea is endless and sandbox freedom, but it would go to creating an actual map and a feeling of actually being somewhere in a world if they existed. Factions could use both mountain and ocean, new structures could exist in them, and new monsters in both.

They wouldnt hve to be in every game, or even most, but they could be options added or a percentage chance added.