> For the complete documentation index, see [llms.txt](https://docs.spoof.dev/asteroid/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spoof.dev/asteroid/configuration/player-spawning.md).

# Player Spawning

Controls where fake players appear after they join. Useful for hub and lobby servers where you want your fakes gathered in one area.

```yaml
spawning:
  enabled: true
  location:
    delay: 10
    places:
      loc1:
        chance: 50.0
        world: spawn
        minX: 170.5
        minZ: -10.5
        Y: 118
        maxX: 200.5
        maxZ: 15.5
```

## How it works

* If `enabled` is false, fakes spawn wherever the server normally puts new players.
* If `enabled` is true, Asteroid picks one location by weighted selection, then teleports the fake to a random point inside that location's X and Z bounds.

## Settings

| Setting           | What it does                                                                                      |
| ----------------- | ------------------------------------------------------------------------------------------------- |
| `enabled`         | Turns custom spawn locations on or off.                                                           |
| `location.delay`  | Seconds after joining before the fake is teleported. A short delay lets the player load in first. |
| `location.places` | The list of spawn areas. Add as many as you want.                                                 |

## Location fields

| Field          | What it does                                                                                |
| -------------- | ------------------------------------------------------------------------------------------- |
| `chance`       | The weight for this location. Higher means more likely. These are weights, not percentages. |
| `world`        | The world name to spawn in.                                                                 |
| `minX`, `maxX` | The X boundaries. The fake spawns at a random X between them.                               |
| `minZ`, `maxZ` | The Z boundaries. The fake spawns at a random Z between them.                               |
| `Y`            | The height to spawn at.                                                                     |

## Weights explained

The `chance` values are relative and do not need to add up to 100. Two locations with 50 and 50 each have a 50 percent chance. Locations with 10 and 30 give the first 25 percent and the second 75 percent.

## Example: a single lobby spot

```yaml
spawning:
  enabled: true
  location:
    delay: 10
    places:
      lobby:
        chance: 100.0
        world: hub
        minX: -5
        maxX: 5
        minZ: -5
        maxZ: 5
        Y: 65
```

Fakes spawn somewhere in a small 10 by 10 area around the lobby center, which looks more natural than every fake standing on the exact same block.
