Skip to content
lawremi edited this page Jul 28, 2015 · 26 revisions

This page contains notes and ideas related to the design of Custom Ore Generation. These are FUTURE features and are NOT yet implemented.

Mystcraft integration

Simple

There are two simple and important integration points:

  • Disabling COG-based generation when DenseOres is active.
  • Incorporating COG-based generation into the instability calculation.

Complex

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.

We need a mapping between COG and Mystcraft semantics. Certain (marked) distributions (usually a preset) will be manifested as noun symbols, supporting these modifiers:

  • Ore block (repeat to increase relative weight)
  • Biome (repeat to increase relative weight)
  • Option (including frequency and size)

Modifying a distribution would be equivalent to extending it in a config file: everything is inherited and then overridden by symbols.

A distribution (preset) is represented by a symbol if it has a child <MystcraftSymbol>. The old name and displayName attributes should probably be taken from the distribution (which does yet support displayName). The new <MystcraftSymbol> element will have these attributes/children:

  • rarity: a value in [0,1], indicating how common a symbol is in treasure and trading,
  • tradeable: indicates whether villagers will trade with the item,
  • firstTradeItem: name/id of first trade item; if not specified, Mystcraft chooses,
  • secondTradeItem: name/id of second trade item; only allowed if firstTradeItem is specified.
  • suffix: the last word of the symbol; all distribution symbols will start with the words Control and Ore, with the third word depending on the type of distribution (Substitute: Change, Cluster: Tradition, Veins: Flow, Cloud: Entropy).

Marked COG options would be represented as a symbol, with the effect depending on the type:

  • Boolean: Modifier toggles the default.
  • Discrete: One modifier per value.
  • Continuous: Default value multiplied/divided by repeating the modifier.

If an option symbol is given as a modifier of a distribution symbol, the option is only changed in the scope of that distribution. An option can also act as a noun on its own, in which case it is set globally. The options will begin with the words: Control, Ore, Question. The last word is given by the word attribute of the <MystcraftSymbol> element and would default to the option name. The frequency option would have the word Possibility, while the size would have Growth.

Blocking defaults: There will be a blocking symbol (Control, Ore, Inhibit, Contradict) that will have two functions:

  • Blocking preceding distributions for a particular ore (as a modifier),
  • Inverting the effect of an option (as a modifier), i.e., divide instead of multiply.

This helps limit the instability in the world.

We should integrate with Mystcraft ore block instability mechanic, so that increased ore density results in decreased stability.

The DenseOres symbol should disable COG generation for the dimension.

We should verify that the terrain symbols are manifested in existing attributes like world.type and world.isSurface.

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