From 153c38e6b89d2536d82e3baa5810d95c73d19b38 Mon Sep 17 00:00:00 2001 From: gator Date: Thu, 17 Sep 2026 17:34:33 +0000 Subject: [PATCH] Quote the storyboard from what will actually be drawn The estimate was cast x 3 + shots x 2. It counted characters who appear in no shot, whose sheets are skipped, and knew nothing about the per-day wardrobe sheets a multi-day story needs. On the Memory Road board that is 73 quoted against 82 drawn. --- trailer.html | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/trailer.html b/trailer.html index 7d37b9e..15b073b 100644 --- a/trailer.html +++ b/trailer.html @@ -326,7 +326,7 @@ var undrawn = shots.filter(function (s) { return !s.opening_url; }).length; var unfilmed = shots.filter(function (s) { return !s.clip_url; }).length; var filmed = shots.length - unfilmed; - var imgs = cast.length * 3 + shots.length * 2; + var imgs = boardImages(shots, cast); var s = String(meta.draw_state || ""); var drawing = s && !/^(drawn|failed)/.test(s); var isLead = meta.writer === RUN.lead_writer; @@ -397,6 +397,35 @@ return a.join("") !== b.join(""); } + // What the storyboard will actually cost to draw. Three sheets for every + // character who is seen or heard, one more per extra day they are dressed + // differently, and two frames per shot. + function boardImages(shots, cast) { + var seen = {}; + shots.forEach(function (s) { + (s.visible_characters || []).forEach(function (c) { seen[String(c)] = 1; }); + (s.audio || []).forEach(function (a) { + if (String(a.text || "").trim()) seen[String(a.character_id)] = 1; }); + }); + var present = cast.filter(function (c) { return seen[String(c.id)]; }); + + var days = {}; + shots.forEach(function (s) { + var d = String(s.day || "").trim(); + if (!d) return; + (s.visible_characters || []).forEach(function (c) { + (days[String(c)] = days[String(c)] || {})[d] = 1; }); + }); + var extra = 0; + present.forEach(function (c) { + var wd = c.wardrobe_by_day || {}; + var base = Object.keys(wd).sort()[0] || ""; + Object.keys(days[String(c.id)] || {}).forEach(function (d) { + if (d !== base && wd[d]) extra += 1; }); + }); + return present.length * 3 + extra + shots.length * 2; + } + function mmss(n) { return Math.floor(n / 60) + ":" + String(Math.round(n % 60)).padStart(2, "0"); }