Realm Director


Announces each player's milestones (achievements, first landing on each planet) and hands out small rewards from a fixed list, within cooldowns and an hourly budget. An optional outside agent can write the announcement and pick the reward; without one, templates are used.

Tweaks
13 hours ago
2.1
4
Owner:
resnickio
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
13 hours ago
Latest Version:
0.1.0 (13 hours ago)
Factorio version:
2.1
Downloaded by:
4 users

Realm Director

Milestone announcements and small rewards for multiplayer servers.

When a player earns an achievement or sets foot on a new planet for the first time, Realm Director tells the whole server and may hand them a small reward. Each milestone counts once per player, ever. Rewards come from a short fixed list, only include what the team has already researched, and are limited by a per-player cooldown and an hourly budget.

Everything is a runtime Mod setting, so an admin can change it mid-game without restarting the server.

What it does

  • Achievements. Each achievement a player earns is announced once.
  • First landings. A player's first landing on each planet other than Nauvis is announced once. When you add the mod to a running save, planets that already have a surface count as visited for everyone already in the game, so old trips aren't announced as firsts.
  • Small rewards. Repair packs, ammo, landfill, solid fuel, construction robots or modules, a handful at a time, each needing its technology researched. A player who is offline gets theirs when they're back in the game with a character.
  • Saved with the game. History, cooldowns and waiting rewards live in the save, so a reload or restart never awards a milestone twice.
  • Logged. Each announcement is written to the server log.

Settings

Under Settings → Mod settings → Map (admins, in game or on the server):

Setting Default
Announce milestones On
Give rewards On
Minutes between a player's rewards 30
Rewards per hour, server-wide 4
Wait for the agent Off
Seconds to wait for the agent 45

Milestones that come during a cooldown, or after the hourly budget is spent, are still announced, without a reward.

An optional agent

With Wait for the agent on, an outside program connected over RCON gets a short time to write the announcement and pick one of the offered rewards, through /director-bridge. It can only read pending milestones, answer one, and read the status. Its text is cleaned of rich text and length-limited, and a reward it didn't get offered is refused. If it doesn't answer in time, the mod announces the milestone itself.
Without an agent, the mod works on its own.

Commands

/director shows the director's status and limits. Admins only; from the server console and RCON it answers in JSON.

Credits

Part of a larger, experimental "Realm" project for the hacktorio server. Works alongside Realm Kits.

MIT licence.