WorldGen: Difference between revisions

From Vintage Story Wiki
(Redirected page to Modding:WorldGen API)
Tag: New redirect
 
(29 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
#REDIRECT [[Modding:WorldGen API]]
== Intro ==
 
We will be walking through how plug in and add your own features to the world generation code of Vintage Story by looking at a demo mod called VSTreasureChest. The code for this project can be found here [https://github.com/anegostudios/VSTreasureChest] but we are going to walk through coding it from scratch.
 
== VSTreasureChest ==
This mod places treasure chests around the world for the user to find. Each treasure chest has a random number of ingots in them. The mod only places treasure chests beside trees. It also adds a server command that can be run in the chat window called /treasure that places a treasure chest in front of the player. This can be useful for testing in case you want to change what items are in the chest and you don't want to bother looking for the chest for verification.
 
 
== Getting started ==
Please follow the instructions <a href="http://wiki.vintagestory.at/index.php?title=Setting_up_a_dev_environment">here</a> for setting up your development environment. We named our project VSTreasureChest but you can choose any name you like.
 
 
== The /treasure command ==
First we are going to add the /treasure command.
TODO:
 
 
== Hooking in to the world gen API ==
The IServerEventAPI has a method called ChunkColumnGeneration that allows you to pass a delegate just like we did for our /treasure command. However, the method signature for this is different.
TODO:

Latest revision as of 13:12, 1 January 2021