From 1a95a467539aea956130fcdb21492615d661a4f4 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Sun, 23 Aug 2026 00:02:32 +0200 Subject: [PATCH] Thin down report --- README.md | 6 +- data/config/balance_report_master.yaml | 2 - setup/analysis/creature_advanced_report.typ | 124 ++++++++++---------- setup/theme/themes.typ | 36 ++++++ 4 files changed, 104 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index c5055d2..ba89a0d 100644 --- a/README.md +++ b/README.md @@ -67,13 +67,13 @@ advanced_balance: creature_ids: [] # Every master-visible creature show_extra: true # Include alternate player stances show_balanced: true # Keep rows already matching their targets - diagnostic_rows_per_page: 18 - attack_rows_per_page: 60 # Portrait pagination limit ``` `creature_ids` is only a narrowing filter over the master-visible collection. It never overrides `show_to_master`: requesting a hidden or unknown ID cannot -make that creature appear in the report. +make that creature appear in the report. Advanced tables use Typst's natural +page flow and repeat their headers automatically; only creature boundaries +force a new page. The calculations and presentation are kept in separate modules, so later metrics can reuse the same normalized defense and attack records without diff --git a/data/config/balance_report_master.yaml b/data/config/balance_report_master.yaml index 1964322..cf53335 100644 --- a/data/config/balance_report_master.yaml +++ b/data/config/balance_report_master.yaml @@ -15,8 +15,6 @@ advanced_balance: creature_ids: [] show_extra: true show_balanced: true - diagnostic_rows_per_page: 18 - attack_rows_per_page: 60 # Coordinates are percentages of the map width and height, measured from the # top-left corner. A database region omitted here is automatically listed in diff --git a/setup/analysis/creature_advanced_report.typ b/setup/analysis/creature_advanced_report.typ index 47001c7..09df5af 100644 --- a/setup/analysis/creature_advanced_report.typ +++ b/setup/analysis/creature_advanced_report.typ @@ -39,24 +39,38 @@ stroke: 0.35pt + color.transparentize(if muted { 68% } else { 0% }), )[#text(fill: if muted { report-theme.muted-ink.lighten(18%) } else { color.darken(18%) })[#expected]] } -#let attack-family-color(kind) = if kind in ("ATK", "ASE", "CMB", "FLR", "GRB", "MXU", "ADF", "CLV", "AOE", "WID") { - report-theme.chart-1 +#let attack-family-color(kind) = if kind == "ATK" { + report-theme.attack-basic +} else if kind == "ASE" { + report-theme.attack-assault +} else if kind == "CMB" { + report-theme.attack-combo +} else if kind == "FLR" { + report-theme.attack-flurry +} else if kind == "GRB" { + report-theme.attack-grab +} else if kind == "MXU" { + report-theme.attack-mixed +} else if kind == "ADF" { + report-theme.attack-defensive +} else if kind in ("CLV", "AOE", "WID") { + report-theme.attack-area } else if kind in ("BYP", "TBU", "TBZ", "TSH", "WIP", "BIS") { - report-theme.blood + report-theme.attack-danger } else if kind == "MVT" { - report-theme.chart-3 + report-theme.attack-movement } else if kind in ("DEF", "REV") { - report-theme.chart-4 + report-theme.attack-defense } else if kind == "PAS" { - report-theme.chart-4.lighten(22%) + report-theme.attack-passive } else if kind == "CLM" { - report-theme.dark-gold + report-theme.attack-culmination } else if kind in ("TRA", "BAD") { - report-theme.chart-2 + report-theme.attack-utility } else if kind in ("SRG", "HRG") { - report-theme.heading-accent + report-theme.attack-enrage } else if kind in ("STA", "SZO", "SIT") { - report-theme.muted + report-theme.attack-setup } else { report-theme.muted-ink } @@ -141,6 +155,9 @@ ]] } #let diagnostic-pills(tags) = tags.map(tag => diagnostic-pill(tag)).join(h(2pt)) +#let report-heading(level, body) = block(above: 1em, below: 0.5em)[ + #heading(level: level, body) +] #let heuristic-summary(diagnostics) = if diagnostics.len() > 0 { let tags = diagnostics.map(item => item.tags).flatten().dedup() let counts = tags.map(tag => ( @@ -160,8 +177,8 @@ ] } -#let heuristic-methodology() = page(paper: "a4", margin: (x: 14mm, y: 14mm))[ - #heading(level: 2)[Analyse avancée — méthode des archétypes] +#let heuristic-methodology() = [ + #report-heading(2, [Analyse avancée — méthode des archétypes]) #text(size: 7.4pt, fill: report-theme.muted-ink)[ Cette lecture ne remplace pas le type déclaré d’une capacité. Elle simule chaque attaque contre les profils de joueurs de sa Difficulté, mesure les dégâts après @@ -281,65 +298,54 @@ let creature-ids = config.at("creature_ids", default: ()) let show-extra = config.at("show_extra", default: true) let show-balanced = config.at("show_balanced", default: true) - let attack-rows-per-page = config.at("attack_rows_per_page", default: 28) - let diagnostic-rows-per-page = config.at("diagnostic_rows_per_page", default: 18) let analyses = advanced-analysis( creature-ids: creature-ids, show-extra: show-extra, show-balanced: show-balanced, ) + set page(paper: "a4", margin: (x: 10mm, y: 10mm)) heuristic-methodology() + if analyses.len() > 0 { pagebreak() } - for analysis in analyses { + for (creature-index, analysis) in analyses.enumerate() { + if creature-index > 0 { pagebreak() } let creature = analysis.creature let balancing = creature.raw.balancing.first() - page(paper: "a4", margin: (x: 10mm, y: 10mm))[ - #heading(level: 2)[Analyse avancée — #creature.name] - #text(size: 7.4pt, fill: report-theme.muted-ink)[ - Modèle de compatibilité #strong(analysis.model) · Difficulté - #compact-profile(balancing.profile_hse) · #balancing.player_groupsize joueurs · - #balancing.monster_groupsize créature(s). Les lignes Defensive et Offensive - correspondent aux profils supplémentaires demandés par `show_extra`. - ] - #heading(level: 3)[Durabilité par partie et profil offensif des joueurs] - #text(size: 5.6pt, fill: report-theme.muted-ink)[Écart au nombre de tours cible :] - #h(2pt)#durability-legend-pill([< 20 %], report-theme.chart-4) - #h(2pt)#durability-legend-pill([20–30 %], report-theme.chart-3) - #h(2pt)#durability-legend-pill([30–40 %], report-theme.chart-1) - #h(2pt)#durability-legend-pill([≥ 40 %], report-theme.blood) - #defense-table(analysis.defense) - #heading(level: 3)[Signature offensive — synthèse] - #heuristic-summary(analysis.diagnostics) + report-heading(2, [Analyse avancée — #creature.name]) + text(size: 7.4pt, fill: report-theme.muted-ink)[ + Modèle de compatibilité #strong(analysis.model) · Difficulté + #compact-profile(balancing.profile_hse) · #balancing.player_groupsize joueurs · + #balancing.monster_groupsize créature(s). Les lignes Defensive et Offensive + correspondent aux profils supplémentaires demandés par `show_extra`. ] + report-heading(3, [Durabilité par partie et profil offensif des joueurs]) + text(size: 5.6pt, fill: report-theme.muted-ink)[Écart au nombre de tours cible :] + h(2pt); durability-legend-pill([< 20 %], report-theme.chart-4) + h(2pt); durability-legend-pill([20–30 %], report-theme.chart-3) + h(2pt); durability-legend-pill([30–40 %], report-theme.chart-1) + h(2pt); durability-legend-pill([≥ 40 %], report-theme.blood) + defense-table(analysis.defense) + report-heading(3, [Signature offensive — synthèse]) + heuristic-summary(analysis.diagnostics) - let diagnostic-chunks = analysis.diagnostics.chunks(diagnostic-rows-per-page) - for (index, rows) in diagnostic-chunks.enumerate() { - page(paper: "a4", margin: (x: 10mm, y: 10mm))[ - #heading(level: 3)[Diagnostic heuristique des attaques — #creature.name (#(index + 1)/#diagnostic-chunks.len())] - #text(size: 6.4pt, fill: report-theme.muted-ink)[ - *R* : réussites de l’attaque et écart à sa Difficulté. *Défense* : réussites - requises pour survivre / dés disponibles, probabilité d’y parvenir, puis - seuil effectif. *1R/2R* : dégâts subis par la cible à une ou deux réussites. - *Survie/max* : profils survivants sur profils disponibles et catégorie sans - mitigation. Les archétypes sont heuristiques et indépendants du type déclaré. - ] - #diagnostic-table(rows) - ] - } + report-heading(3, [Diagnostic heuristique des attaques — #creature.name]) + text(size: 6.4pt, fill: report-theme.muted-ink)[ + *R* : réussites de l’attaque et écart à sa Difficulté. *Défense* : réussites + requises pour survivre / dés disponibles, probabilité d’y parvenir, puis + seuil effectif. *1R/2R* : dégâts subis par la cible à une ou deux réussites. + *Survie/max* : profils survivants sur profils disponibles et catégorie sans + mitigation. Les archétypes sont heuristiques et indépendants du type déclaré. + ] + diagnostic-table(analysis.diagnostics) - let chunks = analysis.attacks.chunks(attack-rows-per-page) - for (index, rows) in chunks.enumerate() { - page(paper: "a4", margin: (x: 10mm, y: 10mm))[ - #heading(level: 3)[Létalité des capacités — #creature.name (#(index + 1)/#chunks.len())] - #text(size: 7.2pt, fill: report-theme.muted-ink)[ - La première ligne de chaque capacité est son profil cible de balancing; - les suivantes montrent les autres postures. La couleur du nom suit le - type déclaré, les cibles suivent un gradient de gravité, et le ✓ ou × - indique si dégâts et armure correspondent tous deux aux cibles en base. - ] - #attack-table(rows) - ] - } + report-heading(3, [Létalité des capacités — #creature.name]) + text(size: 7.2pt, fill: report-theme.muted-ink)[ + La première ligne de chaque capacité est son profil cible de balancing; + les suivantes montrent les autres postures. La couleur du nom suit le + type déclaré, les cibles suivent un gradient de gravité, et le ✓ ou × + indique si dégâts et armure correspondent tous deux aux cibles en base. + ] + attack-table(analysis.attacks) } } diff --git a/setup/theme/themes.typ b/setup/theme/themes.typ index 63b0a2d..fb0df17 100644 --- a/setup/theme/themes.typ +++ b/setup/theme/themes.typ @@ -19,6 +19,24 @@ chart-3: rgb("#486A73"), chart-4: rgb("#687447"), + //----- Advanced attack families ----- + attack-basic: rgb("#9A3F32"), + attack-assault: rgb("#B45B35"), + attack-combo: rgb("#8C5638"), + attack-flurry: rgb("#C07835"), + attack-grab: rgb("#76513B"), + attack-mixed: rgb("#9A6A42"), + attack-defensive: rgb("#65734B"), + attack-area: rgb("#A34B43"), + attack-danger: rgb("#762A2A"), + attack-movement: rgb("#486A73"), + attack-defense: rgb("#687447"), + attack-passive: rgb("#829064"), + attack-culmination: rgb("#5E3D2E"), + attack-utility: rgb("#A77835"), + attack-setup: rgb("#817665"), + attack-enrage: rgb("#7A405A"), + //----- Semantic colors ----- heading: rgb("#7A2424"), heading-accent: rgb("#9b8050"), @@ -194,6 +212,24 @@ chart-3: rgb("#57486F"), // gothic violet chart-4: rgb("#253F52"), // deep night + //----- Advanced attack families ----- + attack-basic: rgb("#76283D"), // vampire wine + attack-assault: rgb("#91364B"), // fresh crimson + attack-combo: rgb("#68405E"), // bruised plum + attack-flurry: rgb("#7D526D"), // dusty mauve + attack-grab: rgb("#4D3D57"), // crypt violet + attack-mixed: rgb("#655878"), // twilight lavender + attack-defensive: rgb("#465E70"), // cold ward steel + attack-area: rgb("#80334F"), // spreading blood + attack-danger: rgb("#541D2D"), // dried blood + attack-movement: rgb("#52758A"), // glacial blue + attack-defense: rgb("#3F6370"), // frozen teal + attack-passive: rgb("#718698"), // snow-shadow blue + attack-culmination: rgb("#342D4D"), // cathedral midnight + attack-utility: rgb("#6C647F"), // silver violet + attack-setup: rgb("#7A7E89"), // weathered silver + attack-enrage: rgb("#692344"), // black cherry + //----- Semantic colors ----- heading: rgb("#572331"), heading-accent: rgb("#7D879B"),