Skip to content

Creating Spawn Points

GameWyrm edited this page Feb 15, 2023 · 3 revisions

How Outer Relics Works

Before you start creating an addon, you should know how Outer Relics works. When Outer Wilds first loads the main Solar System scene from the menu, it creates randomized data for where items and hints should appear, based on the settings from the save file. Once randomization is complete, Outer Relics is set to place keys and hints in the locations selected by the randomizer whenever you load into the Solar System. (Note: if using New Horizons, custom Solar Systems are actually still in the vanilla Solar System, just with everything in the vanilla system disabled.)

Starting Up

After installing Outer Relics, go to the configuration page and scroll down to the Advanced section. There are two settings you need to edit here:

  1. Enable Dev Mode. This will enable more logs in the console, but more importantly will also allow you to create placement files. Note that if you're using a controller, using D-Pad left and right is used for placement, so be careful when using the scout.
  2. Insert the full name of your mod into the Mod Folder Name box. This includes the mod author, for example, "GameWyrm.OuterRelics".

Determining Placements

First, before you can start creating spawn points, you should understand how spawns work. Placement files are separated by body, then location, then individual spawn points.

  • A body is simply a major object in the Solar System, but it MUST be loaded when the system is loaded. If you use a smaller body that's been set to only load when approaching another body, then placements on that body will fail.

  • A location is a greater area that an item can spawn in. This might be a campsite, a building, or perhaps the entirety of a small moon. If you have a larger, more dense area, like a city, you may want to split it into multiple locations. Every location has a name, for example "Southern Observatory."

  • A spawn point is a precise spot where an item can spawn. Every spawn point has a name. There are two types of spawn points. If the spawn point comes from a placement file, it'll be an item spawn; if it comes from your Hint Placement file, it'll be a hint.

Start by going in-game. If you load a file with Dev Mode on, you'll notice some new settings in your pause menu. The first is "Choose Location." Click on this and you'll be prompted to type your location. If you're adding more spawns to an existing location, you'll want to type in the same name; otherwise put in the name of the new location. The name should be something that the user will understand.

After selecting a location, create a spawn point. Point where you want the spawn point to be and press D-Pad right, or Numpad 7. This will create an indicator that will let you preview the item spawn. Keep placing indicators until you have a position that you are happy with. Note that the rotation of the item will depend on your orientation. If you are in a location will gravity, the orientation will be set when you place the indicator. If you are in zero-g, the orientation of indicators will constantly update to match yours. Once the indicator is in the correct position, press D-Pad left or Numpad 8 to save the position. If it doesn't work, pay attention to the failure message and ensure you've followed the steps so far.

If you did everything correctly, then there should be a Hints folder and Placements folder in your main mod folder. The placement file will be placed in one of these folders based on your placement mode. At this point, you should be in normal placement mode, so you should check the Placements folder. In it, you'll find a .json file matching the internal name of the body you put down. Open it up with VSCode and you'll see something like this:

{
  "modName": "MyName.MyCoolMod",
  "orVersion": "1.0.0",
  "modVersion": "1.0.0",
  "spawnLocations": [
    {
      "system": "MyCustomSystem",
      "body": "MyCoolPlanet_Body",
      "LocationName": "MyCoolTower",
      "spawnPoints": [
        {
          "spawnPointName": "",
          "parent": "Sector/Sector_Tower/Tower/First_Floor/Collider",
          "position": {
            "x": 51.675,
            "y": 128.953,
            "z": 5.78389
          },
          "rotation": {
            "x": 0,
            "y": 75.68,
            "z": 0
          },
          "Logic": []
        }
      ]
    }
  ]
}

There's a lot of info here, and if you want to learn more, check the Documentation page. For now, all you need to be concerned with is the spawnPointName field. Put in the name of the spawn point, which should be something unique within the location and the user will be able to recognize (for example, "By the Window"). Once you've put in the name, save the file. You can then repeat this process, placing more spawn points to fill out the location. When you're done with one location, you can move to another location and change the active location from the pause menu.

If you want to place hints, select "Change Placement Mode" from the pause menu. You do not need to set locations for hints or name them (though you can edit the spawnPointNames for personal organization if you wish. Do not edit the locationNames unless you know what you are doing). The process is otherwise the same. Hints are saved in Hints\HintPlacements.json in your mod folder.

Once you've created some or all the spawn points you want, you'll need to register your mod.

Wanting to create addons? Here's where you want to go:

  1. Addon Guide
  2. Creating Spawn Points
  3. Register Your Mod

If you want to look at documentation, check out

the API documentation

or the Placement File documentation.

Clone this wiki locally