Modding:WorldGen Concept: Difference between revisions

From Vintage Story Wiki
m
no edit summary
(Process of world generation and the modability of it)
 
mNo edit summary
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{GameVersion|1.12.14}}
__FORCETOC__
__FORCETOC__
== Intro ==
== Intro ==
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.
{{GameVersion|1.12.4}}
=== Terminology ===
=== Terminology ===
Important terminology to note while reading this article:
Important terminology to note while reading this article:
Line 8: Line 8:
* Chunk column (A set of chunks spanning the vertical height of the world. Given a world height of 256, a chunk column would represent 8 vertically stacked chunks)
* Chunk column (A set of chunks spanning the vertical height of the world. Given a world height of 256, a chunk column would represent 8 vertically stacked chunks)
* Map chunk (The area covered by a chunk column, but not referring to the chunks therein)
* Map chunk (The area covered by a chunk column, but not referring to the chunks therein)
* Region (An area of 16x16 chunk columns)
* Region (The area covered by 16x16 chunk columns)
== Concept ==
== Concept ==
World generation is the process of generating necessary data about the world when the player requires it. World generation is done on a region, map chunk and chunk column basis - each acting as a meaningful subdivision of the world. Each region, map chunk and chunk column is only generated once and stores important data about that area.  
World generation is the process of generating necessary data about the world when the player requires it. World generation is done on a region, map chunk and chunk column basis - each acting as a meaningful subdivision of the world. Each region, map chunk and chunk column is only generated once and stores important data about that area.  
World generation is very modular. Almost all generated parts of the world, such as ore deposits, creatures or trees, are specified via JSON content mods. On a coding level, each stage of generation triggers an event which the base game registers handlers to. Event handlers can be registered or removed through the API to alter any part of generation.
World generation is very modular. Almost all generated parts of the world, such as ore deposits, creatures or trees, are specified via JSON content mods. On a coding level, each stage of generation triggers an event which the base game registers handlers to. Event handlers can be registered or removed through the API to alter any part of generation.
== Content modding ==
== Content modding ==
Using content modding, here are the various things that can be added, modified or removed:
Using content modding, here are the various things that can be added, modified or removed from world generation. Properties relative to world generation are generally located at <code>Vintagestory/assets/survival/worldgen</code>
* Ore deposits
=== Moddable content ===
* Structures  
{| class="wikitable"
* Trees
|-
* Block layers
! Item !! Description
* Block patches
|-
* Geological provinces
| Deposits || Anything that is "deposited" in the ground on generation, such as ores or patches of blocks like gravel and chalk
* Landforms
|-
* Villages
| Structures || Pre-defined structures, such as the ruins found throughout
|-
| Trees || Tree and shrub placement
|-
| Block layers || Layers of blocks found above the rock layer
|-
| Block patches || Patches of blocks, also vegetation
|-
| Geological provinces || Geological attributes and placement
|-
| Landforms || Land layout and the general arrangement of terrain
|}


== Code modding ==
== Code modding ==