Modding:WorldGen Concept: Difference between revisions

From Vintage Story Wiki
Marked this version for translation
mNo edit summary
(Marked this version for translation)
Line 2: Line 2:
__FORCETOC__
__FORCETOC__
<languages/><translate>
<languages/><translate>
== Intro ==
== Intro == <!--T:1-->
This article introduces how world generation is handled in Vintage story, and the extent to which it can be modded. It is also intended as a general introduction for modding endeavors in regards to world generation.
This article introduces how world generation is handled in Vintage story, and the extent to which it can be modded. It is also intended as a general introduction for modding endeavors in regards to world generation.
=== Terminology ===
=== Terminology ===
Line 35: Line 35:
|}
|}


== Code modding ==
== Code modding == <!--T:2-->
Using code modding, it is possible to remove any specific part of world generation from the base game entirely, as well as add new functionality.
Using code modding, it is possible to remove any specific part of world generation from the base game entirely, as well as add new functionality.
=== World types ===
=== World types ===
Line 42: Line 42:
The chunk column generation event is additionally subdivided into passes. Passes are essentially layers in the generation of a chunk column - first laying down the rock layer in one pass, and doing more general cross-chunk actions in later passes, such as flooding them with light or growing patches of grass. Passes exist under '''EnumWorldGenPass'''. The pass has to be specified when registering event handlers for chunk column generation.
The chunk column generation event is additionally subdivided into passes. Passes are essentially layers in the generation of a chunk column - first laying down the rock layer in one pass, and doing more general cross-chunk actions in later passes, such as flooding them with light or growing patches of grass. Passes exist under '''EnumWorldGenPass'''. The pass has to be specified when registering event handlers for chunk column generation.


<!--T:3-->
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 61: Line 62:
|}
|}


=== Events ===
=== Events === <!--T:4-->
The generation of either a region ('''IMapRegion'''), map chunk ('''IMapChunk'''), or chunks contained in that chunk column ('''IServerChunk''' and '''IWorldChunk'''), triggers an event (in that order). Each of these interfaces holds some specific data about the given region. It is possible to register handlers to events, wherein access is provided for the given interface. The order in which the handlers are assigned is based on the execute order of their specific mod systems.  
The generation of either a region ('''IMapRegion'''), map chunk ('''IMapChunk'''), or chunks contained in that chunk column ('''IServerChunk''' and '''IWorldChunk'''), triggers an event (in that order). Each of these interfaces holds some specific data about the given region. It is possible to register handlers to events, wherein access is provided for the given interface. The order in which the handlers are assigned is based on the execute order of their specific mod systems.  


==== Accessing events ====
==== Accessing events ==== <!--T:5-->
</translate>
</translate>
<syntaxhighlight lang="c#">
<syntaxhighlight lang="c#">
Confirmedusers
13,514

edits