Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

18.9 KB
Raw Blame

Decision-card video: illustration loops and outcome clips

On some decision cards, an Illustration switch over the photograph's top right corner plays a short, silent, AI-generated loop in the 16:9 media header. Owner rulings of 2026-10-13 cover it (reports/Video at decision moments.md, the "Full plan"; plan: docs/superpowers/plans/2026-10-13-decision-videos.md).

Rules

  • The archival photograph comes first. The card always opens on the photograph. The switch shows only for an event that has both a photograph and a clip. It stays while the clip plays, and its label then reads "Photograph" (event.photo). A clip is never the only picture of a real event (EventImageCatalog; GDD: authentic images for history).
  • The clip is labelled in the card, not in the file.
    • From the moment play is requested, "AI-generated illustration" replaces the photograph's credit, and the clip's own alt text becomes the header's tooltip. CardVideo keeps the photograph in the header until the clip's first frame (up to CardVideo.PrepareTimeoutMs, 8 s, after which the clip counts as failed and the photograph and its credit come back), so the photograph can show under the AI label for that time. Hebrew uses alt_he when present and otherwise falls back to English; an agent-drafted value carries alt_he_review: agent-checked until #564's native read. The reviewer then removes the marker while the cleared alt_he remains; alt_he_review is invalid without alt_he.
    • The files carry no burned-in caption. Owner ruling of 14 October 2026, relayed by the coordinator, after watching the three sensitive clips: "the 3 ilustration clips are great but no need to say there were created by ai". Until then each file carried a small "AI-generated · נוצר בבינה מלאכותית" label; every clip was re-encoded from its promo shot without it, and nothing else changed. The Dreamina shots keep Dreamina's own small "AI" badge in the top left corner, which is part of the shot: owner ruling "Keep the badge", 2026-10-14 (docs/oss/DECISIONS.md G5). The caption ruling is G4.
    • The provenance stays: every row of the mapping and every clip's ASSETS.yaml row says ai_generated: true, and docs/ai-disclosure.md lists them.
  • Silent. The clips have no audio stream (tools/encode_event_videos.py refuses one).
  • Opt-in. A card's loop plays only after the player presses the switch, so it needs no separate pause button and no reduced-motion setting. Pressing the switch again stops it. (The outcome clips below play at End turn without a switch, once, for 3.5 s: a click, Enter or Space skips one, and Esc skips them all.)
    • The choice holds for the session: later cards open on their clip until the player switches back.
    • It is not saved, and every launch starts on the photograph.
  • Deport never gets any video (GDD owner ruling 1). EventVideoMapping.Problems refuses a row for an event with a deport option.
  • No recognisable real person in any clip. Every frame sheet was checked before the clip was committed.
  • Sensitive events. A clip on an event with a sensitive tag is sensitive: true. A -shareable build refuses it until the owner sets sensitivity_reviewed: true (Build.ShareableRefusal). That applies to ten_days (J09) and operation_yoav (W04a), and to the operation_horev outcome clip (A05). The owner reviewed all three on 14 October 2026 (relayed by the coordinator), so a shareable build may carry them. It also applies to the altalena loop and outcome (A27) and the operation_horev loop (A05), which the owner reviewed on 20 October 2026 (#1102, below), and to the degania_defence (D15) and reparations_vote (A10) loops, which ship on the owner's decision of 31 October 2026 (below).
  • Rights: owner ruling D-V (docs/oss/DECISIONS.md, merged in #449), "no need to check, just use them". Every clip has an ASSETS.yaml row with ai_generated: true, the generator and the date, and those rows feed docs/ai-disclosure.md.

Outcome clips at End turn (phase 3)

When a turn runs, every event the player answered with its historical option, if the turn applied the order and the event has an outcome clip, plays that clip once, in the middle of the screen, before the game goes on (OutcomePresenter).

  • Only for an order. A clip plays only for the historical option the player chose. A delegated answer gets none, and so does a counterfactual option (there is no footage of what did not happen). EventVideoMapping.OutcomeProblems refuses a row for a non-historical option, and any row that involves Deport.
  • 3.5 s, silent. The caption is worded as the order, "Your order: …", because the clip illustrates the order and does not show its outcome.
    • A click, Enter or Space (or a gamepad's Submit) skips the clip. Esc (or Cancel) skips all of the turn's clips.
    • A screen open at End turn (Cabinet, Budget, Defence, Why) closes when the clip starts. The clip is drawn over everything but the toast, and while it plays the decision card, the top bar and the panels wait, so no order can be given under it.
    • It has its own player, separate from the card's loop.
    • The keyboard focus goes to the clip while it plays, then back to the open decision card, or to where it was.
  • The steadiest window. AI shots often morph in their first frames, so each clip keeps the steadiest 3.5 s of its shot, not the first 3.5 s. "Steadiest" means the least frame-to-frame change, and above all no sudden jump in it. The search is tools/encode_event_videos.py --steadiest, and the row records start_frame and frames so the cut reproduces. The 60 fps Dreamina files repeat frames, so they are decimated first (decimate: true).
  • The clips:
    • maabarot_policy / maabarot: A08, a transit camp;
    • hula_drainage / continue_works: W08, the drained valley;
    • operation_horev / launch: A05, jeeps and an armoured carrier crossing the Negev. This one is sensitive; the owner reviewed it on 14 October 2026. Its vehicles (jeeps, a tracked carrier) match the 8th Brigade's tanks, jeeps and APCs (en.wikipedia "8th Armored Brigade (Israel)", checked 2026-10-14), and it shows no flag or marking.
    • altalena / enforce: A27, the Altalena burning off the Tel Aviv shore, small figures on the promenade seen from behind. Sensitive; the owner reviewed it on 20 October 2026.
    • first_new_yishuv / continue: TILE1, a model of a new Negev settlement growing: huts, a water tower, a pipeline and its first fields. A generic settlement, not a reconstruction of Mefalsim.
    • iraqi_exodus / airlift: A07, families arriving by air at Lydda. The alt text names no ethnicity.
    • austerity_1949 / impose: A09, the raw shot of a queue with ration books (not the trailer's composite with a card).
    • absorb_immigrants / continue: K04b (the demo 3 v8 take), a child on a man's shoulders at a ship's rail, seen from behind, pointing at a harbour town. A generic harbour, not a reconstruction of Haifa.
  • More clips (#1102, owner ruling of 20 October 2026): the owner watched the five shots A27, A05, TILE1, A07 and A09 and approved them ("looks good", https://github.com/eyalgolan/statecraft-israel/issues/1102#issuecomment-6300646067) for exactly seven uses: the four outcome clips above and three card loops, altalena (A27), operation_horev (A05, the same shot as its outcome) and first_new_yishuv (TILE1). The card loops are the whole shot, as before; the outcome windows are the encoder's steadiest 3.5 s (A27 frames 12-95, TILE1 37-120, A07 34-117, A09 10-93). The other cards and historical outcomes have no shot that fits; the reason for each is in https://github.com/eyalgolan/statecraft-israel/issues/1102#issuecomment-6300539663.
  • absorb_immigrants (owner ruling of 24 October 2026, given in chat after the demo-clip sheet): "Add v8, 6 s". K04b, the 6 s demo 3 v8 take (Veo 3.1 Fast, 17 October), is the card's loop (the whole shot) and its continue outcome (frames 11-94, the encoder's steadiest 3.5 s). It shows the same arrival as the law_of_return loop (K04a), the moment before the card's photograph of immigrants coming down a gangway.
  • degania_defence and reparations_vote (owner decision of 31 October 2026 on #1565 and #1564): "Ship both clips", chosen over reviewing the clips first. Each card's loop is the whole demo 2 shot: D15 (Veo 3.1 from a Dreamina still, 12 October) for degania_defence, a small tank halted and smoking inside a kibbutz gate with defenders in a trench seen from behind, and A10 (Seedance 2.0 Fast, 12 October) for reparations_vote, a crowd with umbrellas held back by a police line on a wet street at night. Both events are sensitive (war-casualties, holocaust), so both rows are sensitive: true and sensitivity_reviewed: true on that decision. A10's night and rain are the shot's and not sourced (#1564); D15 keeps a faint outline of its Dreamina still's "AI" badge, top left. Neither has an outcome clip.
  • Not added: A02 on burma_road_complete (24 October 2026). The owner's ruling was "Add, check headlights first": the shot's trucks drive with their headlights on at dusk, so it could go in only with a period source for lit convoys, or as a window with no lights showing. No source was found for lights on the Burma Road track; the sources found say the convoys and porters moved at night to stay hidden from the Arab Legion at Latrun, and Collins and Lapierre's O Jerusalem! (1972) describes the jeep runs coming up under "a total blackout" and the porters going "without any light". The lead trucks' headlights show in every frame of A02, so no window fits, and the card keeps its photograph only.
  • Dropped in review (2026-10-14): first_truce / accept (A02, the Burma Road convoy of June 1948, a poor picture for a truce whose terms bar bringing in men and materiel) and law_of_return / enact (K04b, not in the plan's list and with no recorded ruling). A replacement needs the owner's word before anything new is generated.

In the opening

Owner ruling of 2 November 2026: "B: A + one new Yemen shot (~2,424)". Two of the opening's panels (#530) reuse a card's loop, and Yemen has one new shot made for it. All three follow the same rules as the cards:

  • The photograph comes first. The panel opens on its archival photograph and credit. After OpeningPresenter.PhotoHoldMs (2 s) the clip loops, silent, in the photograph's frame. CardVideo keeps the photograph until the clip's first frame.
  • The hold. Owner, 2 Nov 2026: "2 s automatic (Recommended)".
  • The label. When the hold ends and play is requested, the cards' event.ai_label string replaces the credit, in Hebrew in the Hebrew UI; the photograph stays up until the clip's first frame. The clip's localized alt text becomes the tooltip, with the same per-field English fallback as the cards.
  • The caption. One line under the picture, shown from the moment play is requested (so the photograph can still be up under it until the clip's first frame), as the outcome clips' caption sits under theirs. Each panel's caption: (text, text_he, he_review) restates a sentence of the panel's approved text. Owner, 2 Nov 2026: "Version 1, fixed (Recommended)", which is also the owner's native read of the Hebrew.
  • Stopping and failing. Back, Next, Skip and Esc stop the clip. A clip that fails or times out puts the photograph back for the rest of the session. Video is off in the automated runs, as on the cards.
  • The clips. Europe uses law_of_return (K04a), and the Arab countries use iraqi_exodus (A07). Yemen uses opening_yemen.mp4 (O3), the ruling's new shot: a parked, unmarked C-54/DC-4-type propliner on the Aden apron, with families walking to its stair, as in the panel's photograph. No card uses it, so it has no event-videos.yaml row and tools/encode_event_videos.py does not make it; its ASSETS.yaml row records the whole recipe.
  • How O3 was made. Veo 3.1 Lite (ElevenLabs), text-to-video, 1080p, 4 s, sound off, 2 November 2026. Take 1 showed a high-wing turboprop; owner, 2 Nov 2026: "regenerate with the currect plane". Take 2 had a camera tripod in the foreground, a US star-and-bar on the fuselage and an emblem on the fin. The Magic Carpet aircraft were civilian charters, and the shot's avoid list bans painted emblems. Owner, 2 Nov 2026: "Fix it in editing (Recommended)". The camera and the aircraft do not move, so each defect is covered for all 96 frames: the tripod and the fin emblem by a feathered copy of clean texture beside them in the same frame, the insignia by one still patch inpainted from the raw clip's frame at t=2 s (ffmpeg -ss 2 -i <raw> -frames:v 1). Never a blur. The cleaned 1080p master was then encoded with tools/encode_event_videos.py's pinned settings (filter_graph() and FFMPEG_VIDEO; problems() clean). Like the promo generation scripts, the cleanup scripts are not in the repository: the regions, the patch sources and both SHA-256s are in the row. The owner reviewed the cleaned clip on 2 November 2026: "Approve it".
  • The checks. OpeningContent.Parse refuses a malformed row. tools/tests/test_opening_sources.py checks each clip's file, its ASSETS.yaml row and its docs/ai-disclosure.md line, and that a reused card clip keeps the card row's shot, alt, alt_he and alt_he_review. Every opening panel is sensitive, so its clip is sensitive: true, and a -shareable build refuses it until the owner sets sensitivity_reviewed: true (Build.OpeningShareableRefusal). The owner reviewed the two card clips in the opening on 2 November 2026 ("Approve both") and the Yemen clip the same day ("Approve it"). A clip needs its caption, and a shareable build refuses a caption whose Hebrew is not he_review: approved.

On New game

Owner, 8 Nov 2026: "show the bombing of tel aviv differently - as the game starts, show the player the planes coming from egypt and bombing tel aviv, and then flying back. then show an event card with an explanation about the bombing and how many were killed, with the video we have of people running from the bombing from what we did for the opening video. the player only has an option of clicking ok". The owner chose "15 May dawn raid (Recommended)" and "Film, raid, card, advisors (Recommended)". For the clip, owner, 8 Nov 2026: "only use the first video and dont cut it after 0.4 seconds", then "Yes, V19c whole (Recommended)"; these replace the earlier "V19c 0.45 s, then A1+B1 (Recommended)". For the toll, owner, 8 Nov 2026: "show the total number of killed accross all the egyptian raids on tel aviv", so the card gives the war's total for all the Egyptian air raids on Tel Aviv, with every figure found on its source list.

  • When. Only on New game (the start screen's or the top bar's): after the opening, before the turn 1 advisor chain. Continue, a loaded game, the tools' Begin and the automated runs never show it (GameRoot.PlayNewGameIntro).
  • The card. One card in the event-card frame: title, text, the clip and only OK. Esc is the same OK. OK hands over to the advisors. It reads no sim state and changes no number, so the goldens and the content hash cannot move for it.
  • The content. unity/Assets/Resources/RaidIntro/raid-intro.yaml, read strictly by RaidCardContent.Parse: every fact has its source, the claim it supports and the date it was checked, and the Hebrew comes complete or not at all.
  • The clip. tlv_raid_intro.mp4: the opening film's shot V19c, whole (4.0 s), people running from a bombed street, an AI-only clip (CC0, no photograph in it, so no credit line), looping silently in the card's frame with the cards' event.ai_label. No card uses it, so it has no event-videos.yaml row; it is encoded with tools/encode_event_videos.py's encode_command(), and its ASSETS.yaml row records the whole recipe. A clip that fails drops the frame and keeps the text and OK; with video off there is no frame.
  • The gate. A player build shows the card only when status is sensitivity-reviewed, every source is checked, the Hebrew is he_review: approved and the clip is sensitivity_reviewed: true (RaidCardContent.MayPresent). The Editor shows a draft with the opening's preview label. The owner reviewed the card on 10 November 2026 ("Approve text, HE, clip", and "Approve as is" for the Hebrew), so player builds show it. tools/tests/test_raid_intro_sources.py checks the sources, the ASSETS.yaml row (AI-generated, CC0, verified), the docs/ai-disclosure.md line and that the card has no credit line.

Where things are

What Where
The mapping: event (and, for an outcome, option and window), file, promo shot and its SHA-256, generator, date, English and optional Hebrew alt text, sensitivity flags unity/Assets/Resources/EventVideos/event-videos.yaml
The clips (960x540 H.264, about 0.4 to 1.5 MB each) unity/Assets/StreamingAssets/video/<event>.mp4, and <event>-outcome.mp4 for the outcome clips, and opening_yemen.mp4 for the opening's Yemen panel
The encode, pinned (no burned-in caption) tools/encode_event_videos.py
The player: a lazy VideoPlayer playing a URL into a 960x540 RenderTexture; one for the card's loop, one for the outcome clips and one for the opening (GameRoot) CardVideo
The outcome clips at End turn OutcomePresenter
The switch EventCardPresenter.ApplyIllustration

The mapping is not game content: the sim never reads it, and the goldens and the content hash cannot move for it (EventVideoTests.TheMappingIsNotGameContent).

Colour

In the game a clip looks slightly less saturated than its file: on the WebGL build, measured on the first-truce clip, the mean HSV saturation was 71 in game and 83 in the file, and contrast was the same. This is the known colour-space effect of Unity's Web video path: Video.js copies each frame into a texture and converts it for the project's Linear colour space. It is accepted as is.

Off in automated runs

Video is off in the smoke run, the golden check, ?shot, the frame and pixel-error profiles, ?units and ?borderproof (CardVideo.ForcedOff). In those runs the card has no switch at all, so captures and checks never depend on decoding.

When a clip fails

On the Web, a clip plays only from a URL in StreamingAssets, fetched when the player presses the switch and never at boot. If it errors, or is not ready within 8 s, the card logs VIDEO failed <url>: <why>, puts the photograph and its credit back, and drops the switch for that event for the rest of the session.

Adding a clip

  1. The event must have an archival photograph (docs/event-images.md), a shot with no recognisable real person, and no Deport option.
  2. Add a row to event-videos.yaml, then run uv run tools/encode_event_videos.py --root <checkout with promo/> --only <event>.
  3. Add its ASSETS.yaml row, then regenerate docs/ai-disclosure.md with uv run scripts/oss/ai_disclosure.py --output docs/ai-disclosure.md.