A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
Steam: Content Survey answers (owner-approved) and the five achievement icons (Refs #2156) (#2173)
Eyal Golan7070df8e29df
diff --git a/ASSETS.yaml b/ASSETS.yamlindex e2cf1f005..949288189 100644--- a/ASSETS.yaml+++ b/ASSETS.yaml@@ -1420,6 +1420,56 @@ rules:source: "The kit's eight 1920x1080 screenshots of the game's own WebGL build (main at c0a38256, captured 2026-10-14/15 with tools/web_check.py --shots and tools/headed.py's Browser), each at half size on one sheet; listed with their SHA-256 in docs/steam/coming-soon-kit.md. Map derived from Copernicus DEM (NOTICE); the Defence screen's portraits are David Ben-Gurion (public domain, NARA) and Yaakov Dori (CC0), their rows in ASSETS.portraits.yaml"status: verifiednote: "Not AI. No Cabinet screen, no GPO portrait, no AI painting or clip, no sensitive event card. CC BY-SA 4.0 by coordinator ruling (2026-10-15): the screenshots show the CC BY-SA 4.0 bakes of D13."+ - glob: "docs/steam/achievements/OBJ_RAILWAY_unlocked.png"+ licence: CC-BY-4.0+ source: "Steam achievement icon OBJ_RAILWAY, the unlocked colour icon, 256x256: a railway track in perspective running to the horizon. Drawn with Pillow primitives by tools/steam_achievement_icons.py (#2156), in the game's UI colour tokens (unity/Assets/UI/Statecraft.uss:5-17, CC BY 4.0). Option A, chosen by the owner on 1 November 2026 ('All A (Recommended)', relayed by the coordinator)."+ status: verified+ note: "Not AI. No font, photograph, 3D model (none of Tal Heuberger's CC BY-NC-ND models), flag or symbol; original art, so CC BY 4.0 like the project's other original art (LICENSING.md)."+ - glob: "docs/steam/achievements/OBJ_RAILWAY_locked.png"+ licence: CC-BY-4.0+ source: "Steam achievement icon OBJ_RAILWAY, the locked icon (the unlocked one in greyscale, darkened), 256x256: a railway track in perspective running to the horizon. Drawn with Pillow primitives by tools/steam_achievement_icons.py (#2156), in the game's UI colour tokens (unity/Assets/UI/Statecraft.uss:5-17, CC BY 4.0). Option A, chosen by the owner on 1 November 2026 ('All A (Recommended)', relayed by the coordinator)."+ status: verified+ note: "Not AI. No font, photograph, 3D model (none of Tal Heuberger's CC BY-NC-ND models), flag or symbol; original art, so CC BY 4.0 like the project's other original art (LICENSING.md)."+ - glob: "docs/steam/achievements/OBJ_BURMA_ROAD_unlocked.png"+ licence: CC-BY-4.0+ source: "Steam achievement icon OBJ_BURMA_ROAD, the unlocked colour icon, 256x256: a switchback road climbing between mountains. Drawn with Pillow primitives by tools/steam_achievement_icons.py (#2156), in the game's UI colour tokens (unity/Assets/UI/Statecraft.uss:5-17, CC BY 4.0). Option A, chosen by the owner on 1 November 2026 ('All A (Recommended)', relayed by the coordinator)."+ status: verified+ note: "Not AI. No font, photograph, 3D model (none of Tal Heuberger's CC BY-NC-ND models), flag or symbol; original art, so CC BY 4.0 like the project's other original art (LICENSING.md)."+ - glob: "docs/steam/achievements/OBJ_BURMA_ROAD_locked.png"+ licence: CC-BY-4.0+ source: "Steam achievement icon OBJ_BURMA_ROAD, the locked icon (the unlocked one in greyscale, darkened), 256x256: a switchback road climbing between mountains. Drawn with Pillow primitives by tools/steam_achievement_icons.py (#2156), in the game's UI colour tokens (unity/Assets/UI/Statecraft.uss:5-17, CC BY 4.0). Option A, chosen by the owner on 1 November 2026 ('All A (Recommended)', relayed by the coordinator)."+ status: verified+ note: "Not AI. No font, photograph, 3D model (none of Tal Heuberger's CC BY-NC-ND models), flag or symbol; original art, so CC BY 4.0 like the project's other original art (LICENSING.md)."+ - glob: "docs/steam/achievements/OBJ_YISHUVIM_unlocked.png"+ licence: CC-BY-4.0+ source: "Steam achievement icon OBJ_YISHUVIM, the unlocked colour icon, 256x256: six simple houses in two rows of three. Drawn with Pillow primitives by tools/steam_achievement_icons.py (#2156), in the game's UI colour tokens (unity/Assets/UI/Statecraft.uss:5-17, CC BY 4.0). Option A, chosen by the owner on 1 November 2026 ('All A (Recommended)', relayed by the coordinator)."+ status: verified+ note: "Not AI. No font, photograph, 3D model (none of Tal Heuberger's CC BY-NC-ND models), flag or symbol; original art, so CC BY 4.0 like the project's other original art (LICENSING.md)."+ - glob: "docs/steam/achievements/OBJ_YISHUVIM_locked.png"+ licence: CC-BY-4.0+ source: "Steam achievement icon OBJ_YISHUVIM, the locked icon (the unlocked one in greyscale, darkened), 256x256: six simple houses in two rows of three. Drawn with Pillow primitives by tools/steam_achievement_icons.py (#2156), in the game's UI colour tokens (unity/Assets/UI/Statecraft.uss:5-17, CC BY 4.0). Option A, chosen by the owner on 1 November 2026 ('All A (Recommended)', relayed by the coordinator)."+ status: verified+ note: "Not AI. No font, photograph, 3D model (none of Tal Heuberger's CC BY-NC-ND models), flag or symbol; original art, so CC BY 4.0 like the project's other original art (LICENSING.md)."+ - glob: "docs/steam/achievements/OBJ_ABSORB_IMMIGRANTS_unlocked.png"+ licence: CC-BY-4.0+ source: "Steam achievement icon OBJ_ABSORB_IMMIGRANTS, the unlocked colour icon, 256x256: a plain passenger ship on waves, with no flag or marking. Drawn with Pillow primitives by tools/steam_achievement_icons.py (#2156), in the game's UI colour tokens (unity/Assets/UI/Statecraft.uss:5-17, CC BY 4.0). Option A, chosen by the owner on 1 November 2026 ('All A (Recommended)', relayed by the coordinator)."+ status: verified+ note: "Not AI. No font, photograph, 3D model (none of Tal Heuberger's CC BY-NC-ND models), flag or symbol; original art, so CC BY 4.0 like the project's other original art (LICENSING.md)."+ - glob: "docs/steam/achievements/OBJ_ABSORB_IMMIGRANTS_locked.png"+ licence: CC-BY-4.0+ source: "Steam achievement icon OBJ_ABSORB_IMMIGRANTS, the locked icon (the unlocked one in greyscale, darkened), 256x256: a plain passenger ship on waves, with no flag or marking. Drawn with Pillow primitives by tools/steam_achievement_icons.py (#2156), in the game's UI colour tokens (unity/Assets/UI/Statecraft.uss:5-17, CC BY 4.0). Option A, chosen by the owner on 1 November 2026 ('All A (Recommended)', relayed by the coordinator)."+ status: verified+ note: "Not AI. No font, photograph, 3D model (none of Tal Heuberger's CC BY-NC-ND models), flag or symbol; original art, so CC BY 4.0 like the project's other original art (LICENSING.md)."+ - glob: "docs/steam/achievements/CAMPAIGN_DONE_unlocked.png"+ licence: CC-BY-4.0+ source: "Steam achievement icon CAMPAIGN_DONE, the unlocked colour icon, 256x256: a calendar page with a check mark. Drawn with Pillow primitives by tools/steam_achievement_icons.py (#2156), in the game's UI colour tokens (unity/Assets/UI/Statecraft.uss:5-17, CC BY 4.0). Option A, chosen by the owner on 1 November 2026 ('All A (Recommended)', relayed by the coordinator)."+ status: verified+ note: "Not AI. No font, photograph, 3D model (none of Tal Heuberger's CC BY-NC-ND models), flag or symbol; original art, so CC BY 4.0 like the project's other original art (LICENSING.md)."+ - glob: "docs/steam/achievements/CAMPAIGN_DONE_locked.png"+ licence: CC-BY-4.0+ source: "Steam achievement icon CAMPAIGN_DONE, the locked icon (the unlocked one in greyscale, darkened), 256x256: a calendar page with a check mark. Drawn with Pillow primitives by tools/steam_achievement_icons.py (#2156), in the game's UI colour tokens (unity/Assets/UI/Statecraft.uss:5-17, CC BY 4.0). Option A, chosen by the owner on 1 November 2026 ('All A (Recommended)', relayed by the coordinator)."+ status: verified+ note: "Not AI. No font, photograph, 3D model (none of Tal Heuberger's CC BY-NC-ND models), flag or symbol; original art, so CC BY 4.0 like the project's other original art (LICENSING.md)."- glob: "docs/GDD-v0.1.pdf"licence: CC-BY-4.0source: "The owner's game design document (Statecraft-Israel-GDD-v0.1.pages), exported to PDF on 2026-10-12; text copy in docs/GDD.md"diff --git a/docs/steam/achievements/CAMPAIGN_DONE_locked.png b/docs/steam/achievements/CAMPAIGN_DONE_locked.pngnew file mode 100644index 000000000..73b6587ccBinary files /dev/null and b/docs/steam/achievements/CAMPAIGN_DONE_locked.png differdiff --git a/docs/steam/achievements/CAMPAIGN_DONE_unlocked.png b/docs/steam/achievements/CAMPAIGN_DONE_unlocked.pngnew file mode 100644index 000000000..9ac8e3b87Binary files /dev/null and b/docs/steam/achievements/CAMPAIGN_DONE_unlocked.png differdiff --git a/docs/steam/achievements/OBJ_ABSORB_IMMIGRANTS_locked.png b/docs/steam/achievements/OBJ_ABSORB_IMMIGRANTS_locked.pngnew file mode 100644index 000000000..5e66a1fccBinary files /dev/null and b/docs/steam/achievements/OBJ_ABSORB_IMMIGRANTS_locked.png differdiff --git a/docs/steam/achievements/OBJ_ABSORB_IMMIGRANTS_unlocked.png b/docs/steam/achievements/OBJ_ABSORB_IMMIGRANTS_unlocked.pngnew file mode 100644index 000000000..c4f20029dBinary files /dev/null and b/docs/steam/achievements/OBJ_ABSORB_IMMIGRANTS_unlocked.png differdiff --git a/docs/steam/achievements/OBJ_BURMA_ROAD_locked.png b/docs/steam/achievements/OBJ_BURMA_ROAD_locked.pngnew file mode 100644index 000000000..2c0ee4d45Binary files /dev/null and b/docs/steam/achievements/OBJ_BURMA_ROAD_locked.png differdiff --git a/docs/steam/achievements/OBJ_BURMA_ROAD_unlocked.png b/docs/steam/achievements/OBJ_BURMA_ROAD_unlocked.pngnew file mode 100644index 000000000..f12ff3e9eBinary files /dev/null and b/docs/steam/achievements/OBJ_BURMA_ROAD_unlocked.png differdiff --git a/docs/steam/achievements/OBJ_RAILWAY_locked.png b/docs/steam/achievements/OBJ_RAILWAY_locked.pngnew file mode 100644index 000000000..6f976e93eBinary files /dev/null and b/docs/steam/achievements/OBJ_RAILWAY_locked.png differdiff --git a/docs/steam/achievements/OBJ_RAILWAY_unlocked.png b/docs/steam/achievements/OBJ_RAILWAY_unlocked.pngnew file mode 100644index 000000000..5a59b9963Binary files /dev/null and b/docs/steam/achievements/OBJ_RAILWAY_unlocked.png differdiff --git a/docs/steam/achievements/OBJ_YISHUVIM_locked.png b/docs/steam/achievements/OBJ_YISHUVIM_locked.pngnew file mode 100644index 000000000..47befb09bBinary files /dev/null and b/docs/steam/achievements/OBJ_YISHUVIM_locked.png differdiff --git a/docs/steam/achievements/OBJ_YISHUVIM_unlocked.png b/docs/steam/achievements/OBJ_YISHUVIM_unlocked.pngnew file mode 100644index 000000000..8daf5c303Binary files /dev/null and b/docs/steam/achievements/OBJ_YISHUVIM_unlocked.png differdiff --git a/docs/steam/coming-soon-kit.md b/docs/steam/coming-soon-kit.mdindex fd5002163..04850c6fd 100644--- a/docs/steam/coming-soon-kit.md+++ b/docs/steam/coming-soon-kit.md@@ -348,6 +348,86 @@ October 2026). The same page says some content is not allowed for sale in German(RELEASING.md; Valve's survey page). Re-check if the GDD's settlement-control rules ship: the Deport outcome thenneeds its own line (store-page-draft.md section 6).+### Answers with evidence (approved by the owner, 1 November 2026)++**Approved by the owner on 1 November 2026** ("Approve as drafted"; for "Frequent Violence or Gore", "Tick it+(Recommended)"; both relayed by the coordinator). An agent drafted these from the repository at `main` `709e7ddc`;+nothing here has been entered in Steamworks, and the owner enters the survey. The open items at the end of this+subsection are not settled by that approval. Where+this subsection and the table above differ, this one is newer: the table was written at `c0a38256`, before the game ran+the GDD loop with combat, captures and prisoners (`content/eras.yaml:15`, `systems: { loop: gdd }`). Every citation is+`file:line` at `709e7ddc`; re-check each against the first Steam build before submitting. Where an answer was unclear,+the draft took the more cautious disclosure and says why.++What the build contains that the table above does not mention:++- **Combat the player orders.** A player unit can attack an adjacent enemy unit (artillery from range); losses are stated+ in people, and units can be destroyed, retreat or surrender (`sim/Statecraft.Sim/Combat.cs:8-12`;+ `unity/Assets/UI/strings.en.yaml:113`, the advisor's combat page; `strings.en.yaml:373-376`, "{0} was destroyed",+ "surrendered with {1:N0} people"; `strings.en.yaml:676`, "you lose {2:N0} people, they lose {3:N0}"). Enemy units+ attack too (`content/rules.yaml:211-215`). Combat never targets a city, its residents or the score+ (`Combat.cs:11-12`; `strings.en.yaml:113`). An attacked hex shows grey smoke and a warm glow, "kept calm, not+ cinematic" (`unity/Assets/Scripts/Map/HexTiles/Core/HexUnderAttack.cs:13`; `Map/UnderAttackLayer.cs:12`). Map units+ are 3D figures of soldiers, among them Arab armies' infantry (`unity/Assets/Art/Collection/figure-ala-infantry-1948-v1/`+ and its neighbours) **[confirm which appear in play]**.+- **Prisoners of war.** A surrender takes prisoners, held on Food and returned by exchange cards+ (`sim/Statecraft.Sim/Prisoners.cs:8-13`; `strings.en.yaml:325-331`, `940-941`).+- **Capturing Arab towns.** When Israeli units hold an enemy-held town (Acre, Nazareth, Lod, Ramla, Gaza, Beersheba:+ `content/rules.yaml:172`), the player chooses "Raid and withdraw" or "Occupy", and later "Annex"+ (`strings.en.yaml:226-254`). Several towns' residents are recorded as having fled at capture+ (`content/settlement_targets.yaml:25`, `80`, `95`, `109`), which the game says in play (`strings.en.yaml:254`) and+ marks on the map as "Depopulated" (`strings.en.yaml:276`).+- **Deport is in the build but switched off.** The option, its description ("The residents are displaced, and the place+ is depopulated", `strings.en.yaml:229`, `232`) and its rules ship in the code (`sim/Statecraft.Sim/SettlementControl.cs:69`,+ `120-124`), but `mvp.deport_in_play: false` (`content/rules.yaml:253-256`) refuses it, and the dialog does not show it+ (`unity/Assets/Scripts/UI/CaptureDialogPresenter.cs:18-19`). Valve asks for content "even if it's not accessible", so+ the draft discloses it.+- **Sensitive events.** Seven events carry `war-casualties`: `ten_days.yaml:11`, `degania_defence.yaml:12`,+ `altalena.yaml:12`, `operation_yoav.yaml:11`, `operation_hiram.yaml:10`, `operation_horev.yaml:10` and+ `burma_road_complete.yaml:24` (all in `content/events/`). One carries `terror` (`bernadotte_assassination.yaml:11`) and+ two `holocaust` (`reparations_claim.yaml:10`, `reparations_vote.yaml:13`). The table above counted five, one and one.++| Topic | Answer | Evidence (`file:line` at `709e7ddc`) | Why, and what is unsure |+| --- | --- | --- | --- |+| Violence | **Yes: war violence, historical and non-graphic.** The player orders attacks between military units on a hex map; losses are numbers of people; war, an assassination and deaths are described in text. No injury, death or body is shown. | Combat and its text, above; `bernadotte_assassination.yaml:4` ("Lehi gunmen assassinated the UN mediator"); `burma_road_complete.yaml:7` ("those killed in the convoy"); photo alt texts with no injury or body (`unity/Assets/UI/EventImages/event-images.yaml:55`, `69`, `124`, `152`, `180`, `396`); clips: a burning ship at a distance and a tank "halted and smoking" (`docs/event-videos.md:68-69`, `87-90`). | If a question asks whether the violence is against humans or realistic, answer yes for both: the soldiers are people and the war is real, even though the depiction is abstract. |+| "Frequent Violence or Gore" (Mature Content) | **Tick it**, with the description below (owner, 1 Nov 2026, "Tick it (Recommended)"). | Combat is a regular player action through the war turns (above); the seven `war-casualties` events. | There is no gore at all; it is ticked because combat is a core loop, not an occasional scene. Ticking hides the game only from players who filter that out. |+| Blood and gore | **None.** | No blood or body in any photograph alt text (`event-images.yaml`) or clip description (`docs/event-videos.md:62-93`); combat shows smoke and a glow only (`HexUnderAttack.cs:13`). | The alt texts and descriptions are text; the owner should look at the 29 photographs and the clips once before submitting **[confirm]**. |+| Sexual content, nudity | **None.** | `grep -i -w -E 'sex\|sexual\|nude\|naked\|rape'` over `content/events/`, `unity/Assets/UI/strings.en.yaml` and `event-images.yaml` finds nothing. | |+| Drugs, alcohol, tobacco | **Alcohol reference: yes (cautious). Drugs: none. Tobacco: unsure.** A city can build "a winery" as an industry; no drinking is shown. | `content/projects.yaml:25` (`id: winery`); `content/cities.yaml:80-82` (Rishon LeZion's vineyards). No drug word in `content/`. | The winery is an economic building, but some boards count any alcohol reference. Tobacco: nobody has checked the 29 archival photographs for a cigarette **[confirm]**. |+| Gambling | **None.** No wagering, no money, no loot boxes, no casino. | Combat draws one random number per engagement from a die-like table (`content/rules.yaml:190-210`, "per face"; `sim/Statecraft.Sim/Combat.cs:294`); this is a game mechanic, not gambling. | |+| Strong language | **None.** | The same `grep` with common profanity finds nothing. | |+| Real-world conflict and sensitive themes | **Yes, central.** The Arab-Israeli war of 1948 and after, from the Israeli government's perspective, which the game says; Arab armies and Palestinian actors are computer-run enemies; the player captures Arab towns, some depopulated; prisoners of war; terror (one event); the Holocaust as a reference (two events); deaths in war (seven events). Deport (displacement of a town's residents) is in the build, switched off and hidden. | `docs/CONTENT_POLICY.md:7-17` (perspective; Arab and Palestinian actors computer-run at `:13`); `Combat.cs:23-25` (the Arab sides fight as one team); the capture, Deport, prisoner and event lines above; "Arab refugees" as a party in the model (`content/model.yaml:67`). | **OWNER: sensitive.** The most likely answer to draw reviewer questions and reports. The mature-content description should name captures and depopulated towns, and Deport while it ships in the build (store-page-draft.md section 6 already proposes a Deport sentence). |+| Holocaust and Nazi symbols | Reference only: the reparations claim and vote, as text and a photograph of a 1952 protest. No camps, no swastikas. | `reparations_claim.yaml:4`; `event-images.yaml:410`; `docs/CONTENT_POLICY.md:38` ("shown without swastikas"). | Germany: see the note above. |+| Real people | Real historical figures in their public roles; ratings are game balance. | `docs/CONTENT_POLICY.md:39-41`; `content/people.yaml`. | Living people: CONTENT_POLICY says the maintainer does not add them; not re-checked person by person here **[confirm]**. |+| User-generated content | **None.** No mods, no workshop, no level sharing. The map editor is a Unity editor window for developers, not in the game. | `docs/GDD.md:222` ("a Unity editor window saves `content/map/overrides.yaml`"); the game saves only its own autosave (`unity/Assets/Scripts/SaveStore.cs:15`). | |+| User interaction, online | **None in the game.** Single-player, no chat, no multiplayer. The share buttons open a social site in the browser only when pressed. On Steam, Steam's own achievements and Steam Cloud. | `unity/Assets/Scripts/UI/ShareShot.cs:21`, `28` (the itch link and the six site buttons); `docs/steam/README.md`, "Achievements" and "Steam Cloud" (PR #2165). | The share buttons send nothing from the game; the player posts on the site. |+| In-game purchases | **None.** Free; no purchase, no DLC, no currency. | O2 in `docs/oss/DECISIONS.md`; no purchasing package in `unity/Packages/manifest.json` (`grep -c -i -E 'purchas\|com.unity.ads'` gives 0). | |+| Advertising | **None.** | The same `grep`: no ads package. | |+| Data collection | **Point to the privacy statement:** `docs/steam/privacy.md` (PR #2165). The game collects nothing of its own; Unity's engine analytics and diagnostics settings are on and named there (owner, 1 Nov 2026, "Name them"). | `unity/ProjectSettings/ProjectSettings.asset:96` (`submitAnalytics: 1`); `unity/ProjectSettings/UnityConnectSettings.asset:15` (`m_EngineDiagnosticsEnabled: 1`); `unity/Packages/manifest.json:31` (`com.unity.modules.unityanalytics`). | Do not answer "collects no data" without the Unity caveat; say what the privacy page says and no more. |+| Generative AI | Unchanged from the table above: Pre-Generated yes (section 4), Live-Generated no. | Section 4 of this file. | |++**Mature-content description** (approved with the survey on 1 November 2026; it extends store-page-draft.md section 6+with the combat and capture facts above, and leaves Deport to the open item below):++> Statecraft: Israel depicts real events of 1948-1951 from the perspective of Israel's government, including war,+> terror attacks, refugees and displacement, and references to the Holocaust. The player commands military units in+> abstract turn-based combat, takes prisoners of war and decides the fate of captured towns, some of whose residents+> fled. These are shown through sourced text, archival photographs and a symbolic map, not graphic violence. Some+> decision cards can also show a short, silent, AI-generated illustration, labelled as such in the game. Real+> historical figures appear in their public roles; their in-game ratings are game balance, not judgements of the+> people.++**Open items** (not settled by the approval; settle each before submitting):++- **Deport: OPEN, owner decision pending.** While Deport ships in the build, even switched off, either the description+ gets the sentence store-page-draft.md section 6 proposes for it, or the option and its strings leave the build first.+ The owner has not chosen, and the agents do not choose.+- **The photographs and clips:** nobody has yet looked at the 29 archival photographs and the clips for blood, a+ cigarette or other tobacco, or a Nazi symbol; the answers above rest on their alt texts and descriptions.+- **Living people:** `content/people.yaml` has not been checked person by person.+- **Unit figures:** which 3D soldier figures appear in play (above).+- **The Steam build:** re-check every citation against the first Steam build.+## 6. Tags, languages and platforms**Tags** (Steam lets the developer pick up to 20 from its list; pick in Steamworks **[confirm]** the names there):diff --git a/tools/steam_achievement_icons.py b/tools/steam_achievement_icons.pynew file mode 100644index 000000000..7b59d6ea0--- /dev/null+++ b/tools/steam_achievement_icons.py@@ -0,0 +1,192 @@+# /// script+# requires-python = ">=3.11"+# dependencies = ["pillow==12.3.0"]+# ///+"""Steam achievement icons (#2156): the five icons the owner chose on 1 November 2026 ("All A (Recommended)"), each+as an unlocked colour PNG and a greyed locked PNG, 256x256, in docs/steam/achievements/.++Every shape is drawn here with Pillow primitives: no font, no photograph, no 3D model, no AI image, no flag. The+colours are the game's UI tokens (unity/Assets/UI/Statecraft.uss:5-17, CC BY 4.0, LICENSING.md). Each icon is drawn+at 1024x1024 and downsampled for smooth edges. The locked icon is the unlocked one in greyscale, darkened and+flattened. The API names are those in docs/steam/README.md, "Achievements".++Usage: uv run tools/steam_achievement_icons.py [OUT_DIR] (default docs/steam/achievements)+"""+import math+import sys+from pathlib import Path++from PIL import Image, ImageDraw, ImageEnhance, ImageOps++S = 1024 # working size; the icons are 256x256+NAVY_DEEP = (9, 14, 26)+NAVY_SOLID = (14, 22, 38)+NAVY_RAISED = (20, 31, 52)+GOLD = (196, 160, 92)+GOLD_LIGHT = (232, 204, 142)+INK = (236, 228, 210)+INK_DIM = (170, 164, 150)+FOCUS = (120, 98, 58)+++def frame():+ im = Image.new("RGB", (S, S), NAVY_DEEP)+ d = ImageDraw.Draw(im)+ # raised medallion with a double gold ring+ d.ellipse((40, 40, S - 40, S - 40), fill=NAVY_RAISED)+ d.ellipse((40, 40, S - 40, S - 40), outline=GOLD, width=28)+ d.ellipse((96, 96, S - 96, S - 96), outline=GOLD_LIGHT, width=8)+ return im, d+++def poly_line(d, pts, fill, width):+ d.line(pts, fill=fill, width=width, joint="curve")+ r = width // 2+ for x, y in (pts[0], pts[-1]):+ d.ellipse((x - r, y - r, x + r, y + r), fill=fill)+++def railway_a():+ """Track in perspective running to the horizon."""+ im, d = frame()+ hz = 330 # horizon+ vx = S // 2+ # sleepers: spaced by perspective+ for i in range(1, 12):+ t = (i / 11) ** 1.8+ y = hz + 40 + t * 520+ half = 30 + t * 270+ th = 6 + t * 26+ d.rectangle((vx - half, y - th / 2, vx + half, y + th / 2), fill=FOCUS)+ # rails converging to the vanishing point+ for side in (-1, 1):+ d.line([(vx + side * 14, hz), (vx + side * 230, 900)], fill=GOLD_LIGHT, width=30)+ # cut off below the medallion's inner ring with a navy mask outside a circle+ return clip(im)+++def burma_a():+ """A switchback road climbing a ridge."""+ im, d = frame()+ d.polygon([(110, 820), (330, 380), (470, 520), (640, 280), (920, 820)], fill=NAVY_SOLID)+ d.polygon([(330, 380), (380, 470), (300, 520)], fill=FOCUS)+ d.polygon([(640, 280), (700, 390), (600, 420)], fill=FOCUS)+ road = [(240, 900), (360, 790), (660, 760), (720, 700), (400, 650), (360, 590), (600, 560), (650, 500), (560, 420)]+ poly_line(d, road, GOLD_LIGHT, 46)+ # dashed centre line+ dash_line(d, road, NAVY_RAISED, 10, 26, 22)+ return clip(im)+++def dash_line(d, pts, fill, width, dash, gap):+ carry = 0.0+ on = True+ for (x0, y0), (x1, y1) in zip(pts, pts[1:]):+ seg = math.hypot(x1 - x0, y1 - y0)+ pos = 0.0+ while pos < seg:+ step = min((dash if on else gap) - carry, seg - pos)+ if on:+ t0, t1 = pos / seg, (pos + step) / seg+ d.line([(x0 + (x1 - x0) * t0, y0 + (y1 - y0) * t0), (x0 + (x1 - x0) * t1, y0 + (y1 - y0) * t1)], fill=fill, width=width)+ pos += step+ carry += step+ if carry >= (dash if on else gap) - 1e-6:+ carry = 0.0+ on = not on+++def house(d, cx, cy, w, fill, roof):+ h = w * 0.7+ d.rectangle((cx - w / 2, cy - h / 2, cx + w / 2, cy + h / 2), fill=fill)+ d.polygon([(cx - w / 2 - w * 0.12, cy - h / 2), (cx, cy - h / 2 - w * 0.55), (cx + w / 2 + w * 0.12, cy - h / 2)], fill=roof)+ d.rectangle((cx - w * 0.12, cy, cx + w * 0.12, cy + h / 2), fill=NAVY_RAISED)+++def yishuvim_a():+ """Six small houses in two rows of three."""+ im, d = frame()+ for row, y in enumerate((440, 690)):+ for col, x in enumerate((300, 512, 724)):+ house(d, x, y, 150, INK, GOLD_LIGHT)+ d.line([(190, 800), (834, 800)], fill=GOLD, width=14)+ return clip(im)+++def immigrants_a():+ """A passenger ship on the waves (no flag, no marking)."""+ im, d = frame()+ # hull+ d.polygon([(200, 560), (830, 560), (760, 690), (270, 690)], fill=INK)+ # superstructure and funnel+ d.rectangle((330, 470, 690, 560), fill=INK_DIM)+ for x in range(370, 680, 70):+ d.ellipse((x, 498, x + 30, 528), fill=NAVY_RAISED)+ d.rectangle((560, 370, 640, 470), fill=GOLD_LIGHT)+ d.rectangle((560, 370, 640, 400), fill=NAVY_SOLID)+ # waves+ for i, y in enumerate((730, 800)):+ pts = [(x, y + 18 * math.sin((x + i * 60) / 45)) for x in range(160, 870, 8)]+ d.line(pts, fill=GOLD, width=16, joint="curve")+ return clip(im)+++def done_a():+ """A calendar page with a check mark."""+ im, d = frame()+ d.rounded_rectangle((270, 270, 754, 760), radius=36, fill=INK)+ d.rounded_rectangle((270, 270, 754, 380), radius=36, fill=GOLD)+ d.rectangle((270, 340, 754, 380), fill=GOLD)+ for x in (360, 664):+ d.rounded_rectangle((x - 18, 220, x + 18, 320), radius=16, fill=GOLD_LIGHT)+ # grid of small day squares+ for r in range(3):+ for c in range(5):+ x, y = 315 + c * 84, 420 + r * 96+ d.rectangle((x, y, x + 54, y + 54), fill=(205, 198, 182))+ # check mark over the grid+ poly_line(d, [(370, 560), (480, 670), (690, 430)], NAVY_DEEP, 90)+ poly_line(d, [(370, 560), (480, 670), (690, 430)], FOCUS, 56)+ return clip(im)+++def clip(im):+ """Keep the motif inside the medallion's inner ring and redraw the rings on top."""+ mask = Image.new("L", (S, S), 0)+ ImageDraw.Draw(mask).ellipse((104, 104, S - 104, S - 104), fill=255)+ base, d = frame()+ base.paste(im, (0, 0), mask)+ d = ImageDraw.Draw(base)+ d.ellipse((40, 40, S - 40, S - 40), outline=GOLD, width=28)+ d.ellipse((96, 96, S - 96, S - 96), outline=GOLD_LIGHT, width=8)+ return base+++def locked(im):+ g = ImageOps.grayscale(im)+ g = ImageEnhance.Contrast(g).enhance(0.55)+ g = ImageEnhance.Brightness(g).enhance(0.62)+ return g.convert("RGB")+++ICONS = {+ "OBJ_RAILWAY": railway_a,+ "OBJ_BURMA_ROAD": burma_a,+ "OBJ_YISHUVIM": yishuvim_a,+ "OBJ_ABSORB_IMMIGRANTS": immigrants_a,+ "CAMPAIGN_DONE": done_a,+}+++def main(argv: list[str]) -> None:+ out = Path(argv[1]) if len(argv) > 1 else Path(__file__).resolve().parents[1] / "docs" / "steam" / "achievements"+ out.mkdir(parents=True, exist_ok=True)+ for api, draw in ICONS.items():+ unlocked = draw().resize((256, 256), Image.LANCZOS)+ unlocked.save(out / f"{api}_unlocked.png", optimize=True)+ locked(unlocked).save(out / f"{api}_locked.png", optimize=True)+ print(f"{api}: {out / (api + '_unlocked.png')}, {out / (api + '_locked.png')}")+++if __name__ == "__main__":+ main(sys.argv)