Skip to content
lawremi edited this page Oct 7, 2013 · 26 revisions

This page contains notes and ideas related to the design of Custom Ore Generation.

Mystcraft integration

The original COG supported the original Mystcraft design, where symbols were added in some quantity to a book, and distributions were sensitive to the symbol count, through expressions. Now that Mystcraft books are written according to a grammar, with modifier symbols, etc, it has become more complicated.

Explicit approach

This approach defines new types of elements specific to Mystcraft that permit the definition of symbols for generating distributions and controlling their settings via modifiers. We would need the following:

  • A <MystcraftModifierSymbol> element with child <*Preset> elements that apply/modify settings, typically through expressions that transform the _default_ value,
  • A <MystcraftDistributionSymbol> element defining a symbol accepting any COG-defined modifier, with:
    • Distribution elements for distributions generated by the symbol
    • Attributes like instability (as before) and rarity

The modifier settings will override the defaults of the distribution generated by the distribution symbol. Distributions will also need to specify some dependence on the DenseOres symbol.

Implicit approach

An alternative is a mapping between COG and Mystcraft semantics. COG options would correspond to Mystcraft symbols that generate a corresponding modifier. There would be a symbol for every COG distribution and modifiers would be consumed as options, as they are already. One complication is handling existing Mystcraft symbols that are relevant to ore generation. Perhaps the only one is DenseOres. At a bare minimum, COG needs to listen to the DenseOres event and instantiate additional distributions in response.

The option mapping would work as follows:

  • Boolean: Modifier toggles the default.
  • Discrete: One modifier per value.
  • Continuous: Default value multiplied by a modifier (see the existing Length modifiers).

Adjacency-based Replacement

Extend <Replaces> to add the attributes above, below, north, south, west and east. They will be block descriptors that restrict on the type of block one space over in the given direction. This would allow things like placing a block on a surface (e.g., rock below, air above), or ensuring that an ore deposit is hidden in stone.

Block sets

Like the biome sets, except define a set of block descriptors. The <BlockSet> elements could be referenced from distributions using <ReplaceSet> and <OreBlockSet>.

Clone this wiki locally