Audamir

part 45

Rokgard: ten chains of achievements

The ten achievement chains of Rokgard pay tokens, and only for games that paid. The ledger counts the same games, old games are counted once, and every realm hub has an Achievements tile.

· 11 min read

Achievements in Rokgard pay Golden tokens, and only for games that paid something. The first part, Rokgard: rules, score and leaderboard, says what a game pays and how the rules card shows it. This part says what is counted: ten chains, the ledger, the migration of old games, and the tile in every realm's hub.

The game is in development version 0.97.1 (3 November 2026). The chains arrived in version 0.85 and the tile in version 0.93, both on 2 November. The pictures show the builds of those days: the chains window 0.84.0 and the tile 0.92.3. None of it is deployed or published to players.

ChangeVersionDate
Ten achievement chains of Colony and Lines0.852 Nov 2026
Achievements tile in every realm's hub0.932 Nov 2026

Ten achievement chains (0.85)

The per-realm achievement infrastructure had been in the game since 30 October 2026: the realm marks, the window per realm, the registration of a package's own chains, an event after every finished board game, and payment in the coin of the realm. The chains were missing. The analysis of 30 October proposed seven chains, 27 steps and 2,643 tokens for Colony; the answer to it was that chains should be proposed and grown with new games. So there are two layers: the chains of the whole realm (wins, games played, level) count all its games together, and each game brings its own set of chains. Since 2 November there are ten chains, with 34 steps and 2,988 Golden tokens:

ChainWhat it countsSteps (target → tokens)
winswins in the realm's games1 → 8, 10 → 20, 25 → 35, 50 → 55, 100 → 90, 250 → 150, 500 → 240, 1,000 → 380
playedgames finished10 → 10, 50 → 30, 250 → 80, 1,000 → 220
levellevel of the realm5 → 20, 10 → 50, 20 → 110, 30 → 200, 50 → 350
colony-ladderwins over the Normal AI, over the Strong AI, ten over the Strong AI25, 60, 150
colony-marginlargest margin in figures8 → 20, 12 → 35, 16 → 55
colony-streakwins in a row3 → 20, 5 → 50, 8 → 120
colony-drawdraw against the Strong AI60
chains-ladderthe same for Lines20, 45, 110
chains-streakwins in a row in Lines3 → 10, 5 → 30, 8 → 90
chains-drawdraw against the Strong AI in Lines40
Tokens by achievement chainTen chains in total 2,988 Golden tokens: wins in the realm 978, level of the realm 730, games played 340, wins over AI in Colony 235, wins in a row in Colony 190, wins over AI in Lines 175, wins in a row in Lines 130, margin in Colony 110, draw against the Strong AI in Colony 60, draw against the Strong AI in Lines 40.wins in the realm978level of the realm730games played340wins over AI, Colony235wins in a row, Colony190wins over AI, Lines175wins in a row, Lines130margin, Colony110draw vs Strong AI, Colony60draw vs Strong AI, Lines40in total 2,988 tokens and 34 steps (version 0.85, 2 Nov 2026)
Ten chains in total 2,988 Golden tokens: the biggest are the wins of the realm and its level
The Achievements window, Rokgard tab: ten achievements, 0 of 34 steps, the groups All games, Colony and Lines
Then, 2 Nov 2026, game 0.84.0: the Achievements window with the ten chains of Rokgard in a new profile, all steps at zero

Lines added three chains, seven steps and 345 tokens to the seven chains of the analysis (the differences 34 − 27 and 2,988 − 2,643, my own calculation). Only Colony has margin chains, because only Colony has figures. All goals and rewards are rows of one table in the code, and a check script keeps the total within 2,400 to 3,600 tokens, the share of the reward in what is earned, and the texts. That band is a tool setting, not a measurement of players.

The rewards follow from the hours model. A game takes 5.8 minutes, and a level 2 player earns 149 XP an hour. For wins, played and level, the rule of the tool is that a step that takes 10 hours or more may pay no more than 4% of what the player earned on the way; the other chains are marks of skill. So the wins chain runs from 0.2 hours to the first step to 201 hours to the thousandth win. The total of 2,988 is 13% of the 22,500 XP needed for level 30 and 64% of the 4,650 tokens the planned wardrobe is meant to hold (not built yet). The hours are an estimate: nothing was measured with a human. The notes of 1 November shaped the steps: rewards are balanced later, which is why each sum is a single row, and level 30 is much harder in Rokgard than in Kastgard, which is why the level chain is small.

Only a game that paid counts, and only against Normal or Strong AI

No step can be reached by a game that paid nothing, and none against the cheapest AI. A game counts if its win would have paid XP, so the same threshold of moves, triviality and board size decides. The Weak AI does not count: it is training, it pays XP and tokens and moves the level (and with it the level chain), but it moves no other step, no streak and no margin.

The reason is measurement. A level 2 player beat the Weak AI in 200 of 200 games with a median margin of 26 figures, and the Normal AI in 225 of 500 games with a median of 4. The margin against the Strong AI was missing, so it was measured: 40 games per pairing on the board hex58. The chart shows the medians, with the 90th percentile in brackets:

Margin in figures: median by pairingMedian margin in figures: Normal against Weak 26 (200 wins in 200 games, 90th percentile 36), Strong against Normal 12 (39 wins, 1 draw, 90th percentile 20), Normal against Normal 4 (225 wins in 500 games, 90th percentile 12), Normal against Strong 6 (the only win, 39 losses), Strong against Strong 2 (10 wins, 9 draws, 21 losses, 90th percentile 10).Normal vs Weak26 (90th p. 36)Strong vs Normal12 (90th p. 20)Normal vs Normal4 (90th p. 12)Normal vs Strong6 (the only win)Strong vs Strong2 (90th p. 10)median margin in figures; in brackets the 90th percentile, or the number of wins; steps 12 and 16 would need a margin that the Strong-level player did not reach against the Strong AI
Margin in figures by pairing: the median, in brackets the 90th percentile or the number of wins

A Strong-level player wins against the Strong AI with a margin of at most 10 figures, so steps 12 and 16 would need a better player or a weaker AI. The steps stayed 8, 12 and 16: against the Normal AI a level 2 player reaches them in 34%, 10% and about 2% of wins, that is about 0.6, 2 and 10 hours. What is hard for a Strong-level player should be hard.

The price of the rule. A player who beats only the Weak AI gets no step except the level, and a Lines player who plays only Three in a row gets nothing. The alternative is one number in the table, FROM_LEVEL = 1, and the ledger already holds games against the Weak AI, so the change would need no migration. I did not choose it: the Weak AI in Lines loses in 4 to 9 moves, so the tail of wins could be reached in about 20 hours of farming, against about 200 hours of honest play, for 380 tokens. That is 19% of what the player earned on the way, against the rule of 4%. Whether the Weak AI counts remains with me; the documents have no answer.

Ledger and one writer

Statistics count games by AI level and by board, but neither knows which game paid. So achievements have their own ledger: counts of played, won and drawn games that were counted, and next to them the streak, the longest streak and the largest margin. A game that is not counted touches nothing: it creates no cell, breaks no streak and moves no step. One pure function writes the ledger: it takes a cell and a game and returns a new cell, knowing neither the profile, nor the hours, nor the storage, nor a game by name. The original analysis planned one set of counters for the whole realm, but the Colony streak and the Lines streak are two chains, and the statistics do not know a "paid" flag. So the counters are per game.

One-time migration for old games

A player who played Colony before achievements has no ledger. The migration builds it once, for every game with played games and no cell yet, reading the history rows with the same estimate that once paid XP for old games. The first evaluation unlocks every step the cells reach and pays them in tokens, not in XP or Golden dice. A stored record that the evaluation has run guarantees that this happens once.

The compromise: the history holds at most 1,500 rows for all modes together. Colony games shown only as counts by level count as a win of typical length. Lines games shown only as a count are not counted, because counts do not know the board, so a player with more than 1,500 Lines games loses the oldest. Streak and margin start from zero for everyone.

Verification: the tool plays real games with the old code, writes them as the application does, and loads them with the new code. It covers 34 profiles and 1,694 games. Every profile must load on the new tree, its cells must equal the rule of the ledger, and the migration must unlock exactly what the cells reach; repeated loading, backups and a damaged cell must be stable. The chart shows what the migration paid per profile:

Tokens paid by the migration, by profileMigration of old games on 34 profiles and 1,694 games: 1,580 games with the history cut to 1,500 gave 1,613 tokens (19 steps), 60 Colony games 143 (6 steps), 40 Lines games 78 (4 steps), both games 38 (3 steps), only the Weak AI 0.1,580 games (19 steps)1,61360 Colony games (6 steps)14340 Lines games (4 steps)78both games (3 steps)38only the Weak AI (0 steps)0tokens paid by the migration once; the longest profile is about half of the table total (2,988)
Tokens paid by the migration, once, per profile of the sample: the longest profile with the history cut to 1,500 is about half of the table total

The most extreme profile (1,580 games, history cut to 1,500) got 19 steps and 1,613 tokens, and that is a limit case, not a typical player. A profile with only Weak AI games got nothing, and its file did not change. The source passed 28 mutations, all killed. One survived the first run: the recorder accepted an event of any realm, so the test now calls the recorder directly. In a browser, a Gravity four game against the Normal AI ended in a loss, but a reward for a new achievement raised the tokens from 13 to 23; the XP stayed at 13, because a loss pays nothing. A profile with twelve Colony games against the Normal AI got 4 steps for 63 tokens, and the tile showed "Kastgard 2 / 291 · Rokgard 4 / 34". At 375 px in four languages there is no horizontal scroll.

The Achievements tile in the hub (0.93)

The hub is the screen of a realm with the tiles of its games. After the Statistics appeared in the hubs, the request came that Achievements be a tile of both hubs, just before Statistics, and that the choice of the tab by realm stay as in the rules and score. The first step already showed that a build with Rokgard alone never revealed the Statistics or Achievements tiles, because the played reveal rule read Kastgard's sums.

The tile counts the steps of its own realm, and a click opens the achievements window on that realm's panel. A new reveal rule, realmplayed, reveals the tile on the home screen after any played game, and in a hub after a game of that realm. A realm not yet played shows neither Achievements nor Statistics. Nothing new is saved: hero.revealed keeps one key, and the check against the old tree showed the same 15 ids in the same order.

The Rokgard hub with the Achievements tile: badge 2 / 34 and Statistics with one game
Then, 2 Nov 2026, game 0.92.3: the Rokgard hub after one win in Four with gravity; the Achievements tile shows 2 / 34

Three things stay open: the NEW badge belongs to the tile, not to the hub; a new tile goes to the end of the saved order; and the Lines tile is never revealed in a Rokgard-only build. The last one was left as it is, since it was not part of the request; the fix is one word in the modes data.

Verification: seven new tests and four UI tests. In the browser, the home tile showed "Kastgard 3 / 299 · Rokgard 2 / 34" and the badge "5 / 333", at 375 and 1100 px.

What is not built yet

  • Rokgard wardrobe (R3e). Tokens are collected, but they have nothing to be spent on. The wardrobe plan counts on 4,650 tokens.
  • Balancing tokens and Golden dice waits for a real profile.

What is decided and what remains open

Decided: chains grow with new games (30 Oct); the Achievements tile before Statistics; tokens and Golden dice are balanced later; per-game counters with a ledger, the Weak AI outside the steps, the migration does not count Lines from counts, and the sums are in the table.

Open: whether the Weak AI counts; the band and token sums; the draw against the Strong AI in Lines (40 tokens, about 20 hours by assumption); the NEW badge, the order of tiles and the Lines tile in a Rokgard-only build.

What I take from it

  • The rule against farming must be decided wherever something is rewarded. Achievements keep it strictly; a record keeps it differently, because repeating does not inflate the best in a cell.
  • When counting backwards, it is better not to count than to invent. The price is that someone loses the oldest games.
  • A tile is two decisions: what it shows, and when it is revealed. The second one was hidden in the played rule, which read Kastgard, and it surfaced only with a build of Rokgard alone.
  • A targeted run of tests is not enough. Only the first full run of the verification found the pins that had to be turned on purpose.

Sources and notes