From 41ae92133eaecba58edf53d593925042c2ee89de Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 17 Dec 2021 22:43:42 -0500 Subject: [PATCH 1/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fde65333..b889c4a8 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Authors: - xen (from New Horizons v0.1.0 onwards) - Mister_Nebula (created original titled Marshmallow) -With help from : +Marshmallow was made with help from : - TAImatem - AmazingAlek - Raicuparta From 6951e398d3790e7739db538bf6698f5e1cb7ad61 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 17 Dec 2021 23:11:24 -0500 Subject: [PATCH 2/3] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index b889c4a8..80f10295 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ A planet creator for Outer Wilds. Planets are created using a JSON file format structure, and placed in the `planets` folder. -There is an example planet bundled with the mod - change some values and see what happens! - ## Credits : Authors: - xen (from New Horizons v0.1.0 onwards) From 9e374e2a6cc7446d63a91d3708ada71aa66b0e6b Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 17 Dec 2021 23:17:10 -0500 Subject: [PATCH 3/3] Update README.md --- README.md | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 80f10295..210221da 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,40 @@ A planet creator for Outer Wilds. Planets are created using a JSON file format structure, and placed in the `planets` folder. -## Credits : +## How to create your own planets using configs: + +Coming soon + +There is a template [here](https://github.com/xen-42/ow-new-horizons-config-template) if you want to release your own planet mod using configs. + +## How to use New Horizons in other mods: + +First create the following interface in your mod: + +``` +public interface INewHorizons +{ + void Create(Dictionary config); + + void LoadConfigs(IModBehaviour mod); + + GameObject GetPlanet(string name); +} +``` + +In your main `ModBehaviour` class you can get the NewHorizons API like so: +``` +INewHorizons NewHorizonsAPI = ModHelper.Interaction.GetModApi("xen.NewHorizons") +``` + +You can then use the API's `LoadConfigs()` method to load from a "planets" folder, or use the `Create()` and `GetPlanet` methods to create planets and do whatever with them. Just make sure you create planets in the `Start()` method or at least before the SolarSystem scene loads, or they will not be created. + +## Credits: Authors: - xen (from New Horizons v0.1.0 onwards) - Mister_Nebula (created original titled Marshmallow) -Marshmallow was made with help from : +Marshmallow was made with help from: - TAImatem - AmazingAlek - Raicuparta