This commit is contained in:
Mister_Nebula 2020-06-22 22:36:43 +01:00
commit dee2dd1016
3 changed files with 64 additions and 23 deletions

View File

@ -1,39 +1,67 @@
# Marshmallow ![logo](logo.png)
A planet creator for Outer Wilds. A planet creator for Outer Wilds.
Planets are created using a JSON file format structure, and placed in the `planets` folder. Planets are created using a JSON file format structure, and placed in the `planets` folder.
Moon support is coming soon! There is an example planet bundled with the mod - change some values and see what happens!
Support for mods to create custom planets / moons is also coming soon!
<!-- TOC --> <!-- TOC -->
- [Creating a planet file](#creating-a-planet-file-) - [Creating a planet file](#creating-a-planet-file-)
- [Using Marshmallow from other mods](#using-marshmallow-from-other-mods-) - [Using Marshmallow from other mods](#using-marshmallow-from-other-mods-)
- [Submit bugs / Chat about life](#submit-bugs--chat-about-life-) - [Submit bugs / Chat about life](#submit-bugs--chat-about-life-)
- [Credits](#credits-)
<!-- /TOC --> <!-- /TOC -->
## Creating a planet file : ## Creating a planet file :
This list will update as more options are added. Structure JSON file like so : This list will update as more options are added. Here is an example of a file :
``` ```
{ {
"name" : "Test Planet", "name" : "Gallifrey",
"position" : { "position" : {
"x" : 0, "x" : 0,
"y" : 0, "y" : 0,
"z" : 5000 "z" : 10000
}, },
"orbitAngle" : 0, "orbitAngle" : 45,
"primaryBody" : "SUN", "primaryBody" : "SUN",
"hasFog" : true, "isMoon" : false,
"fogTint" : { "hasSpawnPoint" : true,
"r" : 255, "hasClouds" : true,
"g" : 100, "topCloudSize" : 650,
"b" : 0, "bottomCloudSize" : 600,
"a" : 128 "bottomCloudTint" :
}, {
"fogDensity" : 0.5 "r" : 255,
"g" : 0,
"b" : 0,
"a" : 128
},
"topCloudTint" :
{
"r" : 255,
"g" : 0,
"b" : 0,
"a" : 128
},
"hasWater" : true,
"waterSize" : 401,
"hasRain" : true,
"hasGravity" : true,
"surfaceAcceleration" : 12,
"hasMapMarker" : true,
"hasFog" : true,
"fogTint" :
{
"r" : 255,
"g" : 100,
"b" : 0,
"a" : 128
},
"fogDensity" : 0.75,
"groundSize" : 400
} }
``` ```
Everything in "Required" is always needed, and so is every tabbed line in an option. Everything in "Required" is always needed, and so is every tabbed line in an option.
@ -42,6 +70,7 @@ Everything in "Required" is always needed, and so is every tabbed line in an opt
- position - The Vector3 positon of the planet in world space. - position - The Vector3 positon of the planet in world space.
- orbitAngle - The angle of the orbit. - orbitAngle - The angle of the orbit.
- primaryBody - The AstroObject ID of the body this planet orbits. - primaryBody - The AstroObject ID of the body this planet orbits.
- isMoon - Is the body a moon or not a moon (a planet)?
### Optional : ### Optional :
- hasGround - Set to "true" if you want to have a sphere as a ground. - hasGround - Set to "true" if you want to have a sphere as a ground.
@ -69,6 +98,8 @@ To use the API, first define this interface in your mod.
public interface IMarshmallow public interface IMarshmallow
{ {
void Create(Dictionary<string, object> config); void Create(Dictionary<string, object> config);
GameObject GetPlanet(string name);
} }
``` ```
Then, you need to find the Marshmallow API. This can be done using the interaction helpers of OWML. Then, you need to find the Marshmallow API. This can be done using the interaction helpers of OWML.
@ -84,6 +115,7 @@ var configDict = new Dictionary<string, object>
{ "position", new Vector3(0, 0, 3000) }, { "position", new Vector3(0, 0, 3000) },
{ "orbitAngle", 0 }, { "orbitAngle", 0 },
{ "primaryBody", "SUN" }, { "primaryBody", "SUN" },
{ "isMoon" : false },
{ "hasSpawnPoint", true }, { "hasSpawnPoint", true },
{ "hasGround", true }, { "hasGround", true },
{ "groundSize", 400f }, { "groundSize", 400f },
@ -110,3 +142,12 @@ marshmallowApi.Create(configDict);
## Submit bugs / Chat about life : ## Submit bugs / Chat about life :
Did you know we have a nice [Outer Wilds discord](https://discord.gg/Sftcc9Z)? Drop by to submit bugs, ask questions, and chat about whatever. Did you know we have a nice [Outer Wilds discord](https://discord.gg/Sftcc9Z)? Drop by to submit bugs, ask questions, and chat about whatever.
Join us modding folk in the `#modding` channel! Join us modding folk in the `#modding` channel!
## Credits :
Written by Mister_Nebula
With help from :
- TAImatem
- AmazingAlek
- Raicuparta
- and the Outer Wilds discord server.

BIN
logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@ -3,6 +3,6 @@
"author": "misternebula", "author": "misternebula",
"name": "Marshmallow", "name": "Marshmallow",
"uniqueName": "misternebula.Marshmallow", "uniqueName": "misternebula.Marshmallow",
"version": "1.0", "version": "1.0.0",
"owmlVersion": "0.3.39" "owmlVersion": "0.3.53"
} }