Speedup
A queued order finishes at a fixed time, and there are two ways to bring that time forward: the resource-priced speedup, paid for out of the town’s wallet, and a Speed Up item — one of the Guidelines, Napoleon’s Diary or Archimedes’ Note — which is earned, never bought.
Troop training cannot be sped up at all, by resources or by an item: a training order always runs its full timer.
They work on different sets of queues, and the difference matters:
| Building upgrade | Research | Troop training | Wall fortifications | |
|---|---|---|---|---|
| Resource-priced speedup | yes | — | never | — |
| Speed Up item | yes | yes | never | yes |
Neither ever finishes a job by itself: both move finished_at earlier, and
the job completes on the next resolver tick once that time passes (within a
few seconds).
How the resource-priced speedup works
Each use reduces the target’s finished_at by speedup_reduction_seconds
(configurable per realm, default 3600 seconds / 1 hour), divided by the
realm’s time_scale — a fast realm at
time_scale 3.0 removes 1200 seconds per use, not 3600. If the reduced time
would fall in the past, it is clamped to now.
Resources are deducted immediately at the time of the speedup call, and each
use consumes one of the order’s speedup_max_uses.
How a Speed Up item works
An item reduces the same finished_at, but it carries its own figure and its
own list of queues it may be pointed at. Three shapes exist:
| Shape | Field | What it removes |
|---|---|---|
| Fixed | reduction_seconds | Exactly that many seconds, divided by the realm’s time_scale — the same pacing the resource-priced speedup gets |
| Ranged | reduction_seconds + reduction_seconds_max | A figure drawn from that inclusive range, then paced the same way |
| Fractional | reduction_fraction | That fraction of the time still remaining at the moment you use it. Never re-paced — the remaining time is already on the realm’s clock |
The fractional shape is worth most on a long job used early: Ultimate Guidelines takes 30% off a 40-hour upgrade you have just started (12 hours) and 30% off the same upgrade with an hour left (18 minutes). The ranged draw (Master Guidelines) is not random — see Items: it is a published function of your own stack, and using other items never moves it.
Every item names the queues it may shorten, published as speedup_targets on
GET /api/v1/items/catalog. Pointing one at a queue it does not name is a
400, not a silent no-op.
Items do not consume the use limit
A Speed Up item never checks or consumes speedup_max_uses. That limit
governs the resource-priced speedup alone. So one 15-minute Beginner
Guideline does not lock every later Guideline out of that order, and
Guidelines stack freely on one job — which is the whole point of holding
several.
Once per order
Napoleon’s Diary and Archimedes’ Note may be applied at most once to
any one order, forever. A second attempt on the same construction, research level or queued
fortification is a 409 and spends nothing; a different order accepts one
normally (a research row is reused for each level, so the next level is a new
order). No other Speed Up item is limited this way.
Free finish under 5 minutes (buildings only)
Once a building upgrade has less than 5 minutes of wall-clock time
left, the resource-priced speedup is free: no resources are charged and the
speedup_max_uses limit is neither checked nor consumed. The threshold
is a fixed 5 real-world minutes on the countdown — it is not divided by the
realm’s time_scale. A Speed Up item used in this window still consumes the
item: the window waives resources and the limit, never the item.
Troop training has no resource-priced speedup at all, free or paid: a training order always runs its full timer (see below). Speed Up items cannot shorten it either.
Speeding up with an item
POST /api/v1/items/{item_id}/use
See Items for the endpoint in full. For a speedup item,
target carries exactly one id, and which one depends on the queue (a
training_id is always a 400, Training cannot be sped up.):
| Queue | target | Where the id comes from |
|---|---|---|
| Building upgrade | { "building_upgrade_id": 42 } | upgrade_id on a building in GET /api/v1/state/ |
| Research | { "research_id": 7 } | GET /api/v1/research/ — a row with completed: false |
| Wall fortifications | { "fortification_id": 5 } | GET /api/v1/fortifications/queue |
Each id is an integer from -2,147,483,648 to 2,147,483,647, the range an
order’s id is stored in; one outside it is a 422.
quantity must be 1.
applied
{ "finished_at": "2026-06-25T12:40:00Z", "reduced_seconds": 1200, "speedup_target": "research"}reduced_seconds is what was actually taken off, which is less than the
item promises when the order had less time left than that — the finish time
is floored at now, never pushed into the past.
Errors
| Status | Reason |
|---|---|
| 400 | No target, or more than one; a queue this item does not name; quantity other than 1 |
| 404 | No such order, not yours, or already finished and merely waiting for the next tick |
| 409 | A once_per_order item has already been applied to that order |
A refusal spends nothing — the item is still in your inventory.
Building speedup (resource-priced)
POST /api/v1/buildings/{building_id}/speedup
Speed up the active upgrade on one of your buildings, paying resources.
Path parameters
| Parameter | Type | Description |
|---|---|---|
building_id | UUID | ID of the building with an active upgrade |
Response — BuildingResponse
Returns the building with the updated construction_finishes_at field.
Errors
| Status | Reason |
|---|---|
| 400 | No active upgrade on this building |
| 400 | Speedup limit reached (does not apply under the free 5-minute window) |
| 400 | Insufficient resources for speedup cost (never charged under the free 5-minute window) |
| 404 | Building not found or not owned by you |
Example
POST /api/v1/buildings/3fa85f64-5717-4562-b3fc-2c963f66afa6/speedupAuthorization: Bearer <token>{ "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "town": "1c2d3e4f-...", "yaml_id": "Farm", "level": 2, "under_construction": true, "construction_finishes_at": "2026-06-25T13:00:00Z"}Training cannot be sped up with resources
POST /api/v1/units/training/{training_id}/speedup
Always answers 400 with Training cannot be sped up. and changes nothing.
A training order runs its full timer, however little time is left and however
you split the training into orders; otherwise many tiny orders would make
training instant. The route stays so a client gets a clear refusal. A Speed Up
item aimed at a training order (training_id) gets the same refusal.
Path parameters
| Parameter | Type | Description |
|---|---|---|
training_id | integer | ID of the training order (not looked up) |
Errors
| Status | Reason |
|---|---|
| 400 | Training cannot be sped up. |
Realm configuration
Realm administrators can tune the RESOURCE-PRICED speedup in the realm YAML:
| Field | Default | Description |
|---|---|---|
speedup_reduction_seconds | 3600 | Seconds removed from finish time per speedup use, divided by the realm’s time_scale |
speedup_max_uses | 1 | Maximum RESOURCE-PRICED speedup uses per building upgrade. Speed Up items ignore it |
speedup_building_cost | [] (free) | Resources deducted per building speedup use |
Speed Up items are catalog entries instead, one per item, with their own figure and their own queues:
items: - id: senior_guidelines name: Senior Guidelines kind: speedup reduction_seconds: 28800 # 8 hours, paced by time_scale speedup_targets: [building, research] - id: master_guidelines name: Master Guidelines kind: speedup reduction_seconds: 36000 # a draw in [10h, 30h] reduction_seconds_max: 108000 speedup_targets: [building, research] - id: napoleons_diary name: Napoleon's Diary kind: speedup reduction_fraction: 0.3 # 30% of the time REMAINING once_per_order: true speedup_targets: [building, research]speedup_targets must name at least one of building, research and
fortification. Naming training is rejected when the realm config loads:
training cannot be sped up. once_per_order may only be set on a fractional
item; every queue records that an item has been applied to its order.
Example YAML
speedup_reduction_seconds: 3600speedup_max_uses: 1speedup_building_cost: - resource_id: wood amount: 100The building IDs are returned by
GET /api/v1/buildings/ and POST /api/v1/buildings/. Research row IDs come
from GET /api/v1/research/ and queued-fortification IDs from
GET /api/v1/fortifications/queue; both are only reachable with a Speed Up
item, since there is no resource-priced speedup for either queue.