Confirmedusers, Bureaucrats, editor, Administrators
1,522
edits
(Basic info on rock strata) |
VeryGoodDog (talk | contribs) (→Deposits: summarize GenDeposits) |
||
Line 62: | Line 62: | ||
=== Deposits === | === Deposits === | ||
Deposits are handled in [https://github.com/anegostudios/vssurvivalmod/blob/master/Systems/WorldGen/Standard/ChunkGen/5.GenDeposits/GenDeposits.cs <code>GenDeposits.cs</code>] in the Survival Mod. The code for deposits handles more than just ores in rocks. There are many steps in the process of generating ores. | |||
# All assets in <code>worldgen/deposits/</code> are loaded and parsed. | |||
## The generator goes over all deposits and adds them to a list. | |||
## If there are any child deposits, they are registered. | |||
# A deposit shape distortion map is created. This is used when initializing deposits. | |||
# The generator goes over all registered deposits. | |||
## Each deposit variant is initialized with a random seed and the deposit shape distortion map. This init process is the same for all deposits and is used only to simplify the code. | |||
## If the deposit variant uses an ore map, one is created for it. Each kind of deposit gets its own ore map. | |||
## If there are any child deposits that also use an ore map, one is created for the child deposit. | |||
This is the end of what is done in <code>GenDeposits</code>. When a new world region is generated, <code>GenDeposits</code> calls <code>.OnMapRegionGen</code> on each deposit variant. | |||
# Region generation begins by updating the vertical distortion ore maps for the region. | |||
# Each deposit variant then generates ore in the region. | |||
<code>GenDeposits.OnMapRegionGen</code> is relatively simple because most of the generation work is given to each variant. What actually happens when a variant generates a region is dependent on which ore generator is used, of which there are several. | |||
=== Structures === | === Structures === |