. Moons Editor Setup

Updated a week ago

Creating Your Moon Definition

  1. In your Unity Project window, create a new folder for your moon.

    • Example: PathToContentContainer/Content/Moons/MyMoon.
  2. Inside that folder, create another folder named Registry.

    • Example: PathToContentContainer/Content/Moons/MyMoon/Registry.
  3. Inside the Registry folder, right-click and select:
    Create → DawnLib → Definitions → Dusk Moon Definition.

  4. Make sure you have the following ready before proceeding:

    • A SelectableLevel ScriptableObject with all necessary vanilla blank references configured.
    • A valid Unity Scene properly set up for your moon.

Configuring the DuskMoonDefinition

Once you’ve created the DuskMoonDefinition, you’ll see several fields that need to be filled in.

Required Fields

Field Description
Config Entries Place you can create various Config Entries in.
Namespace A unique identifier prefix for your mod or content. Example: code_rebirth.
Key Becomes autofilled in by reading the planet name in your SelectableLevel.
SelectableLevel Assign your existing SelectableLevel ScriptableObject here.
Terminal Predicate (optional) Allows conditional logic for when the moon should appear in the terminal.
Pricing Strategy (optional) Defines custom pricing logic for your moon that supercedes the cost field.
Cost Cost of the moon, overriden by Pricing Strategy if created.
Outside Enemies Spawn Probability Range Range of outside enemies that spawn each cycle, vanilla has it hardcoded to 3 by default.
Generate Enemy PowerCount Configs Creates a config to edit the power count of inside, outside and daytime enemies.
Generate Enemy SpawnCurve Configs Creates a config to edit the animation curves for enemy spawn weights.
Generate Enemy Spawn Probability Range Configs Creates a config to edit the random range of enemies that spawn for each cycle for inside outside and daytime enemies.
Generate MinMax Scrap Config Creates a config to edit the min and max scrap amounts of a moon.
Generate Time Config Creates a config to edit the time speed multiplier of the moon.
Generate Cost Config Creates a config to edit the cost of the moon.
Generate Disable Predicate Config Creates a config to get rid of the Terminal Predicate affecting the moon.
Generate Disable Pricing Strategy Config Creates a config to get rid of the pricing strategy and rely purely on cost.

Setting Up Scene Data

The SceneDatas list determines which scenes are linked to this moon.
You must add at least one entry to this list.

For each SceneData entry:

  1. Drag your scene asset into the Scene Reference field.
  2. Set a Namespace for that scene (Key is auto-filled in).
    • Example: code_rebirth.
  3. Configure the following optional parameters if needed:
    • Landing Override – Custom scene used when the player lands.
    • Leaving Override – Custom scene used when leaving the moon.
    • Base Weight – Controls how often the scene appears relative to others.
    • Weather Weights – Adjusts scene selection based on weather conditions (e.g., eclipsed, rainy, stormy).

Organizing and Bundling

After your scenes and definitions are configured:

  1. Put your Scene asset into its own AssetBundle.

    • Example: oxydescene1.
  2. Put your DuskMoonDefinition (and any related assets) into a separate AssetBundle.

    • Example: oxydemoondefinition.
  3. Add ONLY the moon definition's AssetBundle to the list of AssetBundles in your ContentContainer
    (created during the Unity Setup stage).

Once that’s done, your content is registered!