Open Terrain Generator (OTG)

Open Terrain Generator (OTG)

10M Downloads

Feature: Modded Biome Support (1.16, replaceToBiomeName)

BiomeBundle opened this issue ยท 7 comments

commented

As per discord conversation, below is a basic design for how modded biome compatibility could work:

General Compatibility

1. Inserting modded biomes into biome groups automatically
Change the biome group syntax to allow a whitelist of forge biome dictionary tags and/or vanilla biome categories (mainly for datapacks/spigot) for allowing modded biomes with these tags to be inserted into the group - e.g.

BiomeGroup(BiomeGroupName, Size, Rarity, ModdedBiomeTagWhiteList, ModdedBiomeMinTemp, ModdedBiomeMaxTemp,

  • If one of the tags is present, the biome should be whitelisted (may want to add an AND operator later)
  • Tags and temperature range whitelist is ignored by any biome config names explicitly listed in the group

2. Assigning terrain templates to biome tags
Add a setting in each biome config that allows the user to specify the biome as the terrain template for a given biome tag, if multiple templates are specified, OTG could randomly choose between them - e.g.

TerrainTemplateFor: MOUNTAIN

  • This would override any modded biome's terrain (that contains the specified tag) with the terrain in the biome config (everything in the "Terrain height and volatility" section)

Specific Compatibility

Allow the preset developer to add a biome config to specifically support a modded biome and have more control (similar to BBOP in 1.12.2). This works quite well in 1.12 where the biome is a 'normal' OTG biome with the ID replaced to the modded biome ID - there are a few enhancements that could be made:

  • All the usual OTG biome settings apply, with two exceptions - biome ID needs to be the modded biome ID, and the resource queue needs to ensure the modded biome's population events are fired (some thought needed on how to order things, perhaps being able to control these on/off might be useful?)
  • Any modded biomes with a specific biome config listed in the biome groups would ignore the whitelist
commented

Implemented for 0.0.18:
WorldConfig BiomeGroups:
"Syntax: BiomeGroup(GroupName, GroupSize, GroupRarity, BiomeName or Tags/Categories[, AnotherName[, ...]])",
"BiomeName - Must match the name of a corresponding biome config. Case sensitive.",
"Tags/Categories - Instead of BiomeName, Forge Biome Dictionary id's and/or MC Biome Categories. ",
"OTG fetches all registered non-OTG biomes that match the specified category/tags and adds them to the biome group.",
"A BiomeConfig using TemplateForBiome that targets the biome must exist, or the biome is skipped.",
"Example: BiomeGroup(NormalBiomes, 1, 100, category.plains tag.overworld, tag.hot tag.dry)",
"Adds 2 entries; all plains biomes in the overworld, all hot+dry biomes. Biomes are never added twice.",
"- Use space as an AND operator, in the above example "category.plains tag.overworld" matches biomes with category plains AND tag overworld.",
"- "category." and "tag." exclude minecraft biomes, use "mccategory." or "mctag." to include them.",

WorldConfig BlackListedBiomes:
"When using biome dictionary tags and/or biome categories with biome groups, these (non-OTG) biomes are excluded. Example: minecraft:plains."

BiomeConfig TemplateForBiome:
"Can be used in 2 ways:",
"1. Enter the registry name of a non-OTG biome to use that biome for biome generation",
"and chunk decoration, instead of OTG registering its own biome for this BiomeConfig.",
"Example: minecraft:plains",
"2. Enter a list of biome dictionary tags and/or biome categories, OTG will look up all",
"registered biomes that match all tags and categories and link them to this biomeconfig.",
"For example: "category.plains, tag.hot" targets 2 separate tags.",
"Using space for OR: "category.plains tag.nether, category.plains tag.end" targets plains in the nether and end.",
"Minecraft biomes are excluded when using "category." or "tag.". To include mc biomes, use "mccategory." or "mctag.".",
""
"OTG generates the terrain for the biome as configured in this file and spawns resources, but also allows the biome to spawn ",
"its own resources and mobs and apply its settings. Because of this, the following OTG settings cannot be used:",
"- Colors, Mob spawning, particles, sounds, vanilla structures, wetness, temperature.",
"What can be configured: ",
" - Biome generator settings.",
" - Terrain settings.",
" - Resources. Non-OTG biome resources are currently spawned after all OTG resources in the resourcequeue.",
" - OTG settings not mentioned above that are handled by OTG and don't rely on MC logic."

commented

TODO:

  • Should make TemplateForBiome allow single biomes (registry names) to be listed along with tags/categories, don't think they mix atm.
  • BiomeGroup BiomeName should allow biome registry names as well, not just biome config names.
  • Temperature? * Fixed
  • Resource layering?
  • Mob spawning?
commented

For 0.0.18, added minTemperature/maxTemperature (double) to Biomegroups as the last 2 (optional) parameters: BiomeGroup(NormalBiomes, 1, 100, category.plains tag.overworld, tag.hot tag.dry, -1.0, 1.0)

*Also added BiomeConfig TemplateForBiomeMinTemp/TemplateForBiomeMaxTemp

commented

For 0.0.18:

Changed behaviours:

  • modtag. / modcategory. : Targets only modded biomes
  • mctag. / mccategory. : Targets only mc biomes
  • tag. / category. : Targets mc and modded biomes
  • mod. : Use with tags/categories to filter for a specific mod: mod.byg category.plains tag.overworld
    Fixes:
  • Non-otg biomes river-ocean fix
  • BiomeGroups/TemplateForBiome allow biome registry names
commented

TODO:

  • Resource layering?
  • Mob spawning?

We can look at these things later after we've worked with the new features. Resource layering is something we'll need to see if/how we want to implement it, mobs we could inject but should ideally be handled by other mods. Closing this for now, can create a new issue for resource layering / mob spawning.

commented

For 0.0.13, implemented TemplateForBiome for BiomeConfigs:

"Enter the registry name of a non-OTG biome to make OTG use that biome for biome generation",
"and chunk decoration, instead of OTG registering its own biome for this BiomeConfig.",
"OTG will generate the base terrain for the biome, configured via this file, ",
"but will not override any settings registered to the biome.",
"Because of this, the following OTG settings cannot be used:",
"- Colors (foliage, grass, water, fog etc), mob spawning, particles, sounds, vanilla structures, wetness, temperature.",
"What can be configured via this file: ",
" - Biome generator settings.",
" - Terrain settings.",
" - Resources. Non-OTG biome resources are currently spawned after all OTG resources in the resourcequeue.",
" - Any OTG settings not mentioned above that are internal to OTG and so don't rely on MC logic.",
"Example: minecraft:plains"

Will need to test this first, would like some feedback before continuing.

Next steps:

  • BiomeGroups v2, allow biomedict tags, temperature ranges etc. BiomeConfig TerrainTemplateFor: biomedicttag. Allows mass-placement/substitution of non-otg biomes based on tags/temperature.
  • Resource layering, allows OTG resources to mix with non-otg resources and spawn in a specific order.
  • Change the biomeconfig for TemplateForBiome biomes, don't write settings that can't be used.