> For the complete documentation index, see [llms.txt](https://docs.ohalee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ohalee.com/products/ultimateguilds/relations.md).

# Relations & Leaderboards

Alliances, rivalries and the guild leaderboards.

## Standings

A standing is one record for a pair of guilds, not one per side, so two guilds can never disagree about whether they are allies.

<table><thead><tr><th width="200">Command</th><th>Effect</th></tr></thead><tbody><tr><td>/guild ally &#x3C;guild></td><td>Offers an alliance. It stands as a request until the other guild offers it back, which accepts it.</td></tr><tr><td>/guild rival &#x3C;guild></td><td>Declares a rival. Takes effect at once — waiting for an enemy's permission is not how rivalries work.</td></tr><tr><td>/guild neutral &#x3C;guild></td><td>Drops whatever standing the two guilds have.</td></tr><tr><td>/guild relations</td><td>Lists who your guild stands with and against, and which offers are still pending.</td></tr></tbody></table>

All four need the `MANAGE_RELATIONS` rank permission, so you decide which rank speaks for the guild abroad. See [ranks.md](/products/ultimateguilds/ranks.md).

```yaml
relations:
  maximum-allies: 3
  track-kills: false
  ally-friendly-fire: true
```

<table><thead><tr><th width="220">Key</th><th>Effect</th></tr></thead><tbody><tr><td>maximum-allies</td><td>How many guilds one guild may be allied to. <code>0</code> for no limit.</td></tr><tr><td>track-kills</td><td>Count kills between rival guilds, for the kills leaderboard.</td></tr><tr><td>ally-friendly-fire</td><td>Set to <code>false</code> to stop members of allied guilds from damaging each other, projectiles included.</td></tr></tbody></table>

Both combat options are off by default, because not every server is a PvP server. Neither listener is registered at all unless one of them is turned on.

## Leaderboards

```yaml
leaderboards:
  size: 10
  refresh-seconds: 300
```

Guilds are ranked by `experience`, `level`, `members` or `kills`. Each board is one query per refresh, held in memory: `/guild top` and the placeholders read the last snapshot and never touch the database, so a scoreboard asking every tick costs nothing. A refresh that fails leaves the previous snapshot standing rather than emptying the board.

```
/guild top [experience|level|members|kills]
```

{% hint style="info" %}
`kills` ranks by kills against **rival** guilds, which is only counted when `track-kills` is on.
{% endhint %}
