Seven Powers is a seven-player game that plays by Diplomacy's rules, built as an atmoBB extension. Staff attach a game to a thread, members volunteer for seats, players send in secret orders from a map in the thread, and the GM resolves each turn until someone holds 18 supply centers or the GM declares a draw.
It's my example of how far the plugin system goes, and it's very overbuilt. It uses every capability an extension can ask for, plus a custom panel, a standalone page, and a rules engine that started life as a Rust crate.
Playing a game
- Staff attach a game to a thread on a public board and pick the GM, the player count, which powers are in play, whether you can build anywhere, and whether draws are allowed. The GM and takeover fields take a handle, so nobody has to go find a DID.
- Members press volunteer to sign up. The GM picks players right in the seat list or deals every power at random. The game starts once every power has a player, or the GM can start early with two or more.
- To give an order, click a unit, then where it's going on the map. Or type into the order list (Enter takes the first match, Escape starts over). Each order sends as soon as it's finished, so there's no submit button.
- An illegal order gets refused right away with a reason, like "The army in Venice can't reach Moscow: they aren't adjacent, and no chain of fleets could convoy it there." The refused order stays beside its unit until you fix it.
- Until a turn resolves, everyone else sees only which powers have orders in. Your orders are visible to you and the GM.
- The GM resolves each phase: movement, then retreats if anything got dislodged, then winter builds and disbands. Everyone can open the results as text, and the GM copies that into a reply announcing the turn.
- Deadlines only remind. The GM sets one, and when it hits, players who still owe orders get a notification. The GM still decides when to resolve.
- Members can volunteer as a replacement mid-game, the GM can swap a player in, and staff can take over as GM if the GM disappears.
- Notifications go out (to people who turned them on) when the game starts, after every resolution, when a deadline hits, and when it ends.
- A solo win ends the game on its own. A draw is the GM's call, if the game allows draws. The map then shows the final board, and the seat list shows each power's final centers, the winner, and who got eliminated.
How it works (IT'S EXTREMELY OVERBUILT I KNOW THIS I KNOW πββοΈ)
- The rules engine is TedDriggs/diplomacy, a Rust crate, used unchanged. Extensions run as JavaScript inside WebAssembly, so the Rust gets compiled to WebAssembly, converted back into JavaScript with wasm2js, and then compiled into WebAssembly again by the extension kit. It worked on the first try, which I still don't totally believe.
- It passes the DATC, the standard test suite for Diplomacy adjudicators. All 164 runnable cases pass, both in Node and inside the actual plugin sandbox. The 7 it skips are the ones upstream skips too.
- I drew the map from scratch over Natural Earth coastlines, with every province's position placed by hand. A test fails if the drawing shows a border the adjudicator doesn't have, or the other way around.
- Every game is public record. The game, volunteers, assignments, takeovers, every resolved phase, and the ending all live in the forum's own repo as is.keith.sevenpowers.* records, written by the forum account. Nobody can forge a move, and anyone on the atmosphere can read the whole history.
- Only unresolved orders are private. They sit in the extension's private storage until the GM resolves. Resolution locks the phase, publishes the results, and only then deletes the held orders. If a write fails partway, the GM gets a retry that picks up where it stopped without adjudicating twice.
- A replay page rebuilds a game from its published records alone, so a finished game can be stepped through on any forum with the extension installed, even after the forum that ran it is gone. Signed-out visitors get a "view the board" link to it.
- The panel picks up the forum's colors, fonts, and light or dark mode. The power colors stay put, with edges tuned so Russia's near-white and Turkey's yellow still read on light themes.
- A full movement phase resolves in about 64 ms once the plugin is warm. The slowest case I could build, a power with 18 units going into civil disorder, takes about 1.6 seconds, still well inside atmoBB's 5 second limit per call.
Installing it on your forum
- Go to Admin β Extensions and paste https://github.com/keithk/atmobb-seven-powers. Leave the tag blank to get the newest release (v1.0.1 right now).
- Read the review. It declares five collections under is.keith.sevenpowers and asks for kv, records, timers, and notify. Confirm if you're okay with that.
- Reconnect the forum account from Admin β Connection. The extension writes records as the forum, so the login needs the new collections. If the consent screen doesn't list them yet, the PDS is still caching the old permissions; wait about ten minutes and reconnect again.
- Open a thread on a public board and attach Seven Powers from the thread page. Members-only boards can't host a game, since everything the extension publishes is public.
A few things to know first:
- Extensions are still alpha. The host API can change between atmoBB releases.
- Attaching is one-way. The thread stays a game thread even if you uninstall.
- Uninstalling doesn't delete the game records already in the forum's repo.
- If you want to fork it and publish under your own name, bun run rename-authority com.yourname.game moves every collection and lexicon to your own NSID.
Building your own
The extensions guide walks you from a starter template to a running panel. Seven Powers is the deep end. Its README covers everything above in a lot more detail, including how the panel talks to the forum and how replays stay inside the per-call limits. If you build something, post it here!