WorldGen: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
No edit summary
Line 10: Line 10:
== Getting started ==
== Getting started ==
Please follow the instructions here[http://wiki.vintagestory.at/index.php?title=Setting_up_a_dev_environment] for setting up your development environment. We named our project VSTreasureChest but you can choose any name you like. We will do one different thing. When you get to the debug command line arguments instead of passing /flatworld we are going to pass /stdworld:test. The reason we are doing this is because we are going to be placing our chest beside a tree. The /flatworld generates a flat world with no trees so that won't help us much in this scenario. However, depending on the specific terrain gen features you are doing you may want to use /flatworld in the future.
Please follow the instructions here[http://wiki.vintagestory.at/index.php?title=Setting_up_a_dev_environment] for setting up your development environment. We named our project VSTreasureChest but you can choose any name you like. We will do one different thing. When you get to the debug command line arguments instead of passing /flatworld we are going to pass /stdworld:test. The reason we are doing this is because we are going to be placing our chest beside a tree. The /flatworld generates a flat world with no trees so that won't help us much in this scenario. However, depending on the specific terrain gen features you are doing you may want to use /flatworld in the future.
== The mod class ==
The main class and the starting point of our mod will be VSTreasureChestMod.
<code>
using System;
using System.Collections.Generic;
using Vintagestory.API;
using Vintagestory.API.Datastructures;
using Vintagestory.API.Interfaces;
namespace VintageStory.Mods.VSTreasureChest
{
    public class VSTreasureChestMod : ModBase
    {
        private ICoreServerAPI api;
        public override void StartServerSide(ICoreServerAPI api)
        {
            this.api = api;
        }
    }
}
</code>


== The /treasure command ==
== The /treasure command ==
256

edits