DEVELOPMENT PLAN #79 — Warning Before It Runs Short: A Supply Outlook

Contributed by: Takeshi Miyaoka on Tuesday, November 03 2026

Last modified on Tuesday, November 03 2026

This is a development plan article about something we would like to build next. Nothing described here is implemented yet; the ideas are still under consideration and may change before they are built.

This morning's article (#78) introduced the Supplies window that now sits right below the national overview. Tonight we look at the next step: an outlook that flags items that are still sufficient but heading for a shortage, before they actually run short. It is registered as improvement item UI-066.

Where things stand: shortages are judged by today's ratio

The Supplies window lists items whose supply ratio for the day (domestic supply ÷ demand) is below 90%, lowest first, up to 10 items. Hovering an item opens the investigation window, and clicking it opens the Resource Market screen. That screen already has 30 days of supply, demand and prices, plus how many days of demand the government stockpile covers, and the National Analysis "Resource supply overview" shows a 7-day average line over the last 14 days.

Image 1: the Resource supply overview in National Analysis, captured from a development debug build (a verification game right after the start, so no lines have been drawn yet).

What is missing

Even if an item's supply ratio slips a little every day, nothing appears in the window until it falls below 90%. By the time it shows up as short, it may be too late to arrange imports or build more facilities. The data is recorded every day, but nothing tells you "this item will probably run short around when". And while the government stockpile is being released for an item that is short, you cannot see how many more days it will last.

Idea 1: items running short soon

For each item we would like to take the 7-day average of the daily supply ratio over the last 14 days and find its slope — how much it falls per day.

  • When an item is listed: today's 7-day average is 90% or more, the slope points down, the line fits well enough (coefficient of determination 0.5 or more), and it will cross 90% within 14 days.
  • How the days are counted: (today's 7-day average − 90%) ÷ daily drop, rounded up. If wood is at 93.4% and falling 0.60 a day, that is 6 days.
  • Handling noise: holidays when production stops are left out of the average, and items with fewer than 7 days of records are skipped, so that a single bad day does not trigger a warning.

In the window, a "Running short soon" section would sit below the list of short supplies, showing up to 4 items in amber as "in N days", soonest first. Items that are already short would get a small "Stock N days" (stockpile ÷ shortfall) only when there is a government stockpile. The Good / Caution / Bad badge would still be decided by current shortages only, not by the outlook.

Concept mock-up (under consideration). Items and numbers are examples, not values from the game.

Idea 2: an outlook chart in the investigation window

When you hover an item in the outlook, the investigation window would gain an "Outlook" box below the finding. It would draw the 14-day line of 7-day averages as a solid line, extend its slope as a dotted line, and mark where it meets 90%: "in 6 days (around 12/07)". The finding would still say "No shortage", with a short note: "At this pace, short in 6 days". The checks for inputs, staffing and capacity stay as they are, so if "4% idle for lack of workers" shows up, you can fix hiring before the shortage arrives.

Concept mock-up (under consideration). The line and numbers are examples.

How we would build it, and how it connects

The calculation would use the 30 days of supply and demand that the Resource Market screen already collects, and run only when the screen is displayed. No new records are added to the save, and the nightly economy processing is not touched. The planned order is: the slope and day calculation with tests, then the new section in the Supplies window, then the outlook chart in the investigation window, then a check of the English labels. With an outlook, the Resource Market's "next step" hints (import, release stockpile, expand production) can be weighed before a shortage, and it buys time for private businesses to add capacity with bank loans (#72).

Tell us what you think

Would a warning up to 14 days ahead be useful, or would only the next few days be easier to read? And should the badge colour change when an outlook appears, or should it stay tied to actual shortages as it is now? We would love to hear your thoughts.

Image 1 was captured from a development debug build using our verification procedure; images 2 and 3 are concept mock-ups (under consideration). Numbers are examples, not values from the game.

This morning's article: DEVELOPMENT SNAPSHOT #78 — Shortages Always in View: A Supply Window Below the Overview

The 7-day supply average: DEVELOPMENT SNAPSHOT #57 — Smoothing the View of 30 Days: A 7-Day Average for Supply Trends

Previous plan: DEVELOPMENT PLAN #77 — Commanders Who Reread the Battle: Counterattacks and Pursuit

See the files and development status on the download page

Comment (0)

Happa - DEVELOPMENT PLAN #79 — Warning Before It Runs Short: A Supply Outlook
https://www.happa.bz/article.php?story=devblog-079-supply-outlook_en