> 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/fluctuation.md).

# Fluctuation

Fluctuation makes the fake player count rise and fall over time instead of sitting at a fixed number. This is what stops your server from showing the exact same count all day.

```yaml
fluctuation:
  enabled: true
  update: 1800
  console_log: true
  methods:
    basic: 'formula'
    player_base: '{random[1,2]}'
  multiplier:
    default: 1.2
    increasePerPlayer: 0.05
  machine_learning:
    collect_data: true
  time_of_day:
    country: "GMT"
    clock:
      - "00:00 40-50"
      - "01:00 50-60"
```

If fluctuation is disabled, the fake count is controlled only by the fixed `multiplier` and the `lifespan` setting from Spoofing Limits.

## General settings

| Setting       | What it does                                                                 |
| ------------- | ---------------------------------------------------------------------------- |
| `enabled`     | Turns fluctuation on or off.                                                 |
| `update`      | How often, in seconds, Asteroid recalculates the target. 1800 is 30 minutes. |
| `console_log` | Prints the new count and multiplier to console each cycle.                   |

## Choosing a method

`methods.basic` picks how the target multiplier is calculated each cycle.

| Value              | How it decides                                                                       |
| ------------------ | ------------------------------------------------------------------------------------ |
| `formula`          | A simple math formula based on real player count. Predictable and easy to tune.      |
| `machine-learning` | Predicts a natural count from your server's own history. Needs collected data first. |

### The formula method

Only used when `basic` is `formula`.

```
newMultiplier = default + (realPlayers - 2) * increasePerPlayer
```

With `default: 1.2` and `increasePerPlayer: 0.05`:

| Real players | Multiplier |
| ------------ | ---------- |
| 2            | 1.2        |
| 10           | 1.6        |
| 50           | 3.6        |

The more real players you have, the more aggressively Asteroid spoofs. A small server gets a gentle nudge, a busy server gets a bigger lift.

### The machine-learning method

Only used when `basic` is `machine-learning`. Asteroid records your real player counts over time and trains a small neural network on them, learning patterns from the time of day, day of week, month, and player count, then predicts a natural multiplier without manual tuning.

```yaml
machine_learning:
  collect_data: true
```

`collect_data` gathers data even while you use the formula method, so it has history to learn from when you switch later.

## Player base

`player_base` sets a guaranteed minimum that fluctuation always keeps.

| Value           | Meaning                                          |
| --------------- | ------------------------------------------------ |
| `NONE`          | No forced minimum. Fluctuation has full control. |
| `TIME_OF_DAY`   | Uses the time-of-day schedule below.             |
| `{random[x,y]}` | A random minimum in the given range each cycle.  |

## Time-of-day schedule

Only used when `player_base` is `TIME_OF_DAY`. Set different minimum fake counts depending on the clock.

```yaml
time_of_day:
  country: "GMT"
  clock:
    - "00:00 40-50"
    - "06:00 20-30"
```

Each entry is `HH:MM min-max`: the time it starts applying (24-hour), and the range to randomly pick a minimum from. Every cycle, Asteroid finds the most recent entry that has passed and picks a random number in its range.

Example with `00:00 40-50` and `06:00 20-30`: at 03:00 the minimum is a random 40 to 50; at 06:00 or later it switches to 20 to 30. A fresh value is picked every cycle, so the minimum drifts naturally. Set `country` to your server timezone, for example `EST`, `CET`, or `Asia/Tokyo`.
