-
Notifications
You must be signed in to change notification settings - Fork 27
Design
This page contains notes and ideas related to the design of Custom Ore Generation.
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
). 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). The fourth and final word should be specified as the suffix
attibute (by default, the distribution name).
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
.
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.
Like the biome sets, except define a set of block descriptors. The <BlockSet>
elements could be referenced from distributions using <ReplaceSet>
and <OreBlockSet>
.