Craft cookbook
Build Successful The Ravenous rulebook, changelog, player books, master handbook, and balance reports were built successfully.
Ravenous/ravenous_typst/pipeline/head This commit looks good
Details
Build Successful The Ravenous rulebook, changelog, player books, master handbook, and balance reports were built successfully.
Ravenous/ravenous_typst/pipeline/head This commit looks good
Details
This commit is contained in:
parent
dd480b9914
commit
75bb5caeda
|
|
@ -26,6 +26,9 @@ pipeline {
|
|||
SOURCE_FILE = "main.typ"
|
||||
OUTPUT_FILE = "Ravenous_build.pdf"
|
||||
PUBLISHED_FILE = "Ravenous.pdf"
|
||||
CHANGELOG_SOURCE_FILE = "changelog.typ"
|
||||
CHANGELOG_OUTPUT_FILE = "Ravenous_changelog_build.pdf"
|
||||
CHANGELOG_PUBLISHED_FILE = "Ravenous_changelog.pdf"
|
||||
BALANCE_SOURCE_FILE = "balance_report.typ"
|
||||
BALANCE_OUTPUT_FILE = "Report/Ravenous_balance_report_build.pdf"
|
||||
BALANCE_PUBLISHED_FILE = "Ravenous_balance_report.pdf"
|
||||
|
|
@ -110,6 +113,9 @@ pipeline {
|
|||
echo "Building ${SOURCE_FILE} -> ${OUTPUT_FILE}"
|
||||
typst compile "${SOURCE_FILE}" "${OUTPUT_FILE}"
|
||||
|
||||
echo "Building ${CHANGELOG_SOURCE_FILE} -> ${CHANGELOG_OUTPUT_FILE}"
|
||||
typst compile "${CHANGELOG_SOURCE_FILE}" "${CHANGELOG_OUTPUT_FILE}"
|
||||
|
||||
echo "Building ${BALANCE_SOURCE_FILE} -> ${BALANCE_OUTPUT_FILE}"
|
||||
typst compile "${BALANCE_SOURCE_FILE}" "${BALANCE_OUTPUT_FILE}"
|
||||
|
||||
|
|
@ -152,6 +158,7 @@ pipeline {
|
|||
"${SCREEN_PLAINTEXT_FILE}" "${SCREEN_OUTPUT_FILE}"
|
||||
|
||||
test -f "${OUTPUT_FILE}"
|
||||
test -f "${CHANGELOG_OUTPUT_FILE}"
|
||||
test -f "${BALANCE_OUTPUT_FILE}"
|
||||
test -f "${PLAYER_OUTPUT_FILE}"
|
||||
test -f "${COOKBOOK_OUTPUT_FILE}"
|
||||
|
|
@ -165,6 +172,7 @@ pipeline {
|
|||
echo "Builds complete:"
|
||||
ls -lh \
|
||||
"${OUTPUT_FILE}" \
|
||||
"${CHANGELOG_OUTPUT_FILE}" \
|
||||
"${BALANCE_OUTPUT_FILE}" \
|
||||
"${PLAYER_OUTPUT_FILE}" \
|
||||
"${COOKBOOK_OUTPUT_FILE}" \
|
||||
|
|
@ -178,7 +186,7 @@ pipeline {
|
|||
stage('Archive PDFs') {
|
||||
steps {
|
||||
archiveArtifacts(
|
||||
artifacts: "${OUTPUT_FILE},${PLAYER_OUTPUT_FILE},${COOKBOOK_OUTPUT_FILE},${BALANCE_OUTPUT_FILE},${MASTER_OUTPUT_FILE},${MASTER_BALANCE_OUTPUT_FILE},${SCREEN_OUTPUT_FILE}",
|
||||
artifacts: "${OUTPUT_FILE},${CHANGELOG_OUTPUT_FILE},${PLAYER_OUTPUT_FILE},${COOKBOOK_OUTPUT_FILE},${BALANCE_OUTPUT_FILE},${MASTER_OUTPUT_FILE},${MASTER_BALANCE_OUTPUT_FILE},${SCREEN_OUTPUT_FILE}",
|
||||
fingerprint: true
|
||||
)
|
||||
}
|
||||
|
|
@ -226,8 +234,8 @@ pipeline {
|
|||
publishChecks(
|
||||
conclusion: 'SUCCESS',
|
||||
name: 'Build Successful',
|
||||
summary: 'The Ravenous rulebook, player books, master handbook, and balance reports were built successfully.',
|
||||
text: 'All seven PDFs were compiled and published successfully.',
|
||||
summary: 'The Ravenous rulebook, changelog, player books, master handbook, and balance reports were built successfully.',
|
||||
text: 'All eight PDFs were compiled and published successfully.',
|
||||
title: 'Build Successful'
|
||||
)
|
||||
|
||||
|
|
@ -265,8 +273,8 @@ pipeline {
|
|||
* Publish the generated Ravenous PDFs.
|
||||
*
|
||||
* Build artifacts retain explicit CI names in Jenkins, while published copies
|
||||
* use stable rulebook, master-handbook, and balance-report names. Master-facing
|
||||
* PDFs are encrypted before either step.
|
||||
* use stable rulebook, changelog, master-handbook, and balance-report names.
|
||||
* Master-facing PDFs are encrypted before either step.
|
||||
*
|
||||
* @param targetDir Directory receiving the compiled book.
|
||||
*/
|
||||
|
|
@ -286,6 +294,10 @@ def deployTo(String targetDir) {
|
|||
"${env.OUTPUT_FILE}" \
|
||||
"${targetDir}/${env.PUBLISHED_FILE}"
|
||||
|
||||
rsync -a \
|
||||
"${env.CHANGELOG_OUTPUT_FILE}" \
|
||||
"${targetDir}/${env.CHANGELOG_PUBLISHED_FILE}"
|
||||
|
||||
rsync -a \
|
||||
"${env.BALANCE_OUTPUT_FILE}" \
|
||||
"${targetDir}/Report/${env.BALANCE_PUBLISHED_FILE}"
|
||||
|
|
@ -313,6 +325,7 @@ def deployTo(String targetDir) {
|
|||
echo "Published:"
|
||||
ls -lh \
|
||||
"${targetDir}/${env.PUBLISHED_FILE}" \
|
||||
"${targetDir}/${env.CHANGELOG_PUBLISHED_FILE}" \
|
||||
"${targetDir}/Report/${env.BALANCE_PUBLISHED_FILE}" \
|
||||
"${targetDir}/Player/${env.PLAYER_PUBLISHED_FILE}" \
|
||||
"${targetDir}/Player/${env.COOKBOOK_PUBLISHED_FILE}" \
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ La seconde étape consiste à choisir le ou les matériaux dont l'œuvre sera fa
|
|||
"/data/src/craft/forge_materials.csv",
|
||||
evaluate: "markup",
|
||||
theme-name: "steingrund",
|
||||
columns: (1fr, 1em, auto, auto, 2.5fr, 2.5fr),
|
||||
columns: (1fr, 1.2em, auto, auto, 2.5fr, 2.5fr),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -195,10 +195,10 @@
|
|||
[Maniement],
|
||||
[Dég.],
|
||||
[+],
|
||||
[R.Max],
|
||||
[Brise],
|
||||
[Prot.],
|
||||
[Int.],
|
||||
[@rl_rmax:short],
|
||||
[@rl_arbreak:short],
|
||||
[@rl_protection:short],
|
||||
[@rl_integrite:short],
|
||||
[T2],
|
||||
[T1],
|
||||
[Modes],
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
# Structured counterparts for forge options which directly change base stats.
|
||||
# Conditional and rules-text effects remain in the source CSV and are rendered
|
||||
# as effect pills; only unconditional arithmetic belongs here.
|
||||
materials:
|
||||
Acier:
|
||||
weapon: { integrity: 1 }
|
||||
armor: { integrity: 1 }
|
||||
Vif Argent:
|
||||
weapon: { rmax: 1, damage: -2 }
|
||||
armor: { dodge: 2, parry: 2 }
|
||||
Quakeite:
|
||||
weapon: { damage: 5, armor_break: 1 }
|
||||
armor: {}
|
||||
Fer:
|
||||
weapon: { integrity: -1 }
|
||||
armor: { protection: -1 }
|
||||
Mithril:
|
||||
weapon: { integrity: 1, protection: 2 }
|
||||
armor: { integrity: 3, protection: 1 }
|
||||
Vistalt:
|
||||
weapon: { stealth: 4 }
|
||||
armor: { stealth: 3 }
|
||||
Barylium:
|
||||
weapon: { damage: -2 }
|
||||
armor: { dodge: -2, parry: -2 }
|
||||
|
||||
finishings:
|
||||
Affilage: { damage: 1, integrity: -1 }
|
||||
Rematriçage: { torque_two_handed: -5, torque_one_handed: -5 }
|
||||
Dentelage Sangrétique: { armor_break: 1 }
|
||||
Renforcement: { integrity: 1 }
|
||||
Peaufinage: { protection: 1, speed: -2 }
|
||||
Sangrification Profonde: { protection: 2, precision: -1 }
|
||||
|
|
@ -17,6 +17,7 @@
|
|||
#let forge-materials = csv("/data/src/craft/forge_materials.csv")
|
||||
#let forge-finishings = csv("/data/src/craft/forge_finishing.csv")
|
||||
#let recipe-catalog = yaml("/data/config/recipes.yaml")
|
||||
#let forge-modifiers = yaml("/data/config/forge_modifiers.yaml")
|
||||
|
||||
#let number(value) = if type(value) == int or type(value) == float {
|
||||
value
|
||||
|
|
@ -62,6 +63,7 @@
|
|||
satiety: 0,
|
||||
finishing: 0,
|
||||
detail: none,
|
||||
stat-modifiers: (:),
|
||||
) = (
|
||||
name: name,
|
||||
stage: stage,
|
||||
|
|
@ -73,6 +75,7 @@
|
|||
finishing: number(finishing),
|
||||
effect: markup(effect),
|
||||
detail: detail,
|
||||
stat-modifiers: stat-modifiers,
|
||||
)
|
||||
|
||||
#let restoration-component(name, stage) = {
|
||||
|
|
@ -158,12 +161,16 @@
|
|||
item.difficulty,
|
||||
0,
|
||||
[Dégâts #item.damage, dégâts par réussite #item.p_damage, réussites max #item.rmax, brise-armure #item.armor_break, protection #item.protection, intégrité #item.integrity.],
|
||||
detail: item.shape_name + " + " + item.nature_name,
|
||||
)
|
||||
|
||||
#let forge-material-component(name, target) = {
|
||||
let row = find-ingredient(forge-materials, name, "Matériau")
|
||||
let effect-index = if target == "Weapons" { 4 } else { 5 }
|
||||
let target-name = if target == "Weapons" { "weapon" } else { "armor" }
|
||||
let modifiers = forge-modifiers.materials.at(name, default: (:)).at(
|
||||
target-name,
|
||||
default: (:),
|
||||
)
|
||||
component(
|
||||
row.at(0),
|
||||
"Matériau",
|
||||
|
|
@ -172,11 +179,13 @@
|
|||
row.at(3),
|
||||
0,
|
||||
row.at(effect-index),
|
||||
stat-modifiers: modifiers,
|
||||
)
|
||||
}
|
||||
|
||||
#let forge-finishing-component(name, stage) = {
|
||||
let row = find-ingredient(forge-finishings, name, stage)
|
||||
let modifiers = forge-modifiers.finishings.at(name, default: (:))
|
||||
component(
|
||||
row.at(0),
|
||||
stage,
|
||||
|
|
@ -186,6 +195,7 @@
|
|||
0,
|
||||
row.at(5),
|
||||
finishing: row.at(3),
|
||||
stat-modifiers: modifiers,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -243,6 +253,13 @@
|
|||
),
|
||||
)
|
||||
|
||||
#let forge-stat-fields = (
|
||||
"damage", "p_damage", "rmax", "armor_break", "armor_pierce",
|
||||
"antimaterial", "protection", "integrity", "dodge", "parry", "speed",
|
||||
"stealth", "precision", "agility_bonus", "range", "action_cost",
|
||||
"torque_two_handed", "torque_one_handed", "reload_cost",
|
||||
)
|
||||
|
||||
// Forge bases come from weapons.db; materials and finishings remain CSV-backed.
|
||||
#let forge(shape, nature, materials: (), finishings: ()) = {
|
||||
let equipment = find-equipment(shape, nature)
|
||||
|
|
@ -266,7 +283,28 @@
|
|||
),
|
||||
),
|
||||
)
|
||||
let stats = (:)
|
||||
for field in forge-stat-fields {
|
||||
stats.insert(field, equipment.at(field, default: none))
|
||||
}
|
||||
for item in result.components {
|
||||
for (field, delta) in item.stat-modifiers {
|
||||
let current = stats.at(field, default: none)
|
||||
if current != none and current != "null" {
|
||||
stats.insert(field, current + delta)
|
||||
}
|
||||
}
|
||||
}
|
||||
// Fer improves each material effect which already increases weapon damage.
|
||||
if equipment.apply_category == "Weapons" and "Fer" in materials {
|
||||
let boosted-materials = result.components.filter(item => (
|
||||
item.stage == "Matériau"
|
||||
and item.stat-modifiers.at("damage", default: 0) > 0
|
||||
)).len()
|
||||
stats.insert("damage", stats.damage + boosted-materials)
|
||||
}
|
||||
result.insert("equipment", equipment)
|
||||
result.insert("stats", stats)
|
||||
result
|
||||
}
|
||||
|
||||
|
|
@ -281,18 +319,87 @@
|
|||
#text(size: 7.8pt, weight: "bold")[#value]
|
||||
]
|
||||
|
||||
#let forge-stat-labels = (
|
||||
("damage", "Dég."),
|
||||
("p_damage", "+/réuss."),
|
||||
("rmax", "R. max"),
|
||||
("armor_break", "Brise"),
|
||||
("armor_pierce", "Perce"),
|
||||
("antimaterial", "Anti-mat."),
|
||||
("protection", "Prot."),
|
||||
("integrity", "Int."),
|
||||
("dodge", "Esq."),
|
||||
("parry", "Par."),
|
||||
("speed", "Vit."),
|
||||
("stealth", "Disc."),
|
||||
("precision", "Préc."),
|
||||
("agility_bonus", "Agi."),
|
||||
("range", "Portée"),
|
||||
("action_cost", "Actions"),
|
||||
("torque_two_handed", "Torque 2M"),
|
||||
("torque_one_handed", "Torque 1M"),
|
||||
("reload_cost", "Recharge"),
|
||||
)
|
||||
|
||||
#let shown-stat(value) = if value == none or value == "null" { [—] } else { value }
|
||||
|
||||
#let forge-stat-line(stats) = block(
|
||||
width: 100%,
|
||||
inset: (x: 4pt, y: 3.5pt),
|
||||
fill: theme.parchment-dark,
|
||||
stroke: 0.45pt + theme.border,
|
||||
radius: 3pt,
|
||||
)[
|
||||
#for pair in forge-stat-labels {
|
||||
let value = stats.at(pair.at(0), default: none)
|
||||
box(
|
||||
inset: (x: 4pt, y: 2pt),
|
||||
fill: theme.parchment-light,
|
||||
stroke: 0.35pt + theme.border,
|
||||
radius: 8pt,
|
||||
)[
|
||||
#text(size: 5.8pt, fill: theme.muted)[#pair.at(1)]
|
||||
#h(0.25em)
|
||||
#text(size: 7pt, weight: "bold")[#shown-stat(value)]
|
||||
]
|
||||
h(2.5pt)
|
||||
}
|
||||
]
|
||||
|
||||
#let ingredient-name(item) = text(
|
||||
size: 6.6pt,
|
||||
weight: "semibold",
|
||||
fill: theme.heading.transparentize(20%),
|
||||
)[
|
||||
#item.name
|
||||
]
|
||||
|
||||
#let ingredient-effect(item) = text(size: 6.4pt)[
|
||||
#if item.detail != none {
|
||||
text(size: 5.7pt, fill: theme.muted.transparentize(15%))[(#item.detail)]
|
||||
h(0.35em)
|
||||
}
|
||||
#item.effect
|
||||
]
|
||||
|
||||
#let step-pill(step) = box(
|
||||
inset: (x: 3pt, y: 1pt),
|
||||
fill: theme.parchment-light.transparentize(28%),
|
||||
stroke: 0.25pt + theme.border.transparentize(60%),
|
||||
radius: 7pt,
|
||||
)[
|
||||
#text(size: 5.5pt, fill: theme.muted)[#step]
|
||||
]
|
||||
|
||||
// Render any calculated craft data as a complete cookbook card.
|
||||
#let render-recipe(name, ingredients, flavor: none) = {
|
||||
let craft = ingredients.craft
|
||||
let metrics = if craft == "Forge" {
|
||||
let item = ingredients.equipment
|
||||
(
|
||||
([Maîtrise], ingredients.tier),
|
||||
([Coût], ddlvl(ingredients.cost)),
|
||||
([Difficulté], ddlvl(ingredients.difficulty)),
|
||||
([Finition], if ingredients.finishing == 0 { [—] } else { ddlvl(ingredients.finishing) }),
|
||||
([Dég. / réussite], [#item.damage / +#item.p_damage]),
|
||||
([Prot. / Int.], [#item.protection / #item.integrity]),
|
||||
)
|
||||
} else {
|
||||
(
|
||||
|
|
@ -324,34 +431,31 @@
|
|||
}
|
||||
#v(5pt)
|
||||
#grid(
|
||||
columns: (1fr, 1fr, 1fr, 1fr, 1fr, 1fr),
|
||||
columns: metrics.len(),
|
||||
gutter: 3pt,
|
||||
..metrics.map(pair => metric(pair.at(0), pair.at(1))),
|
||||
)
|
||||
#if craft == "Forge" {
|
||||
v(4pt)
|
||||
forge-stat-line(ingredients.stats)
|
||||
}
|
||||
#v(5pt)
|
||||
#grid(
|
||||
columns: (0.9fr, 2.1fr),
|
||||
column-gutter: 8pt,
|
||||
align: top,
|
||||
text(size: 7.1pt)[
|
||||
#text(size: 6.6pt, weight: "bold", fill: theme.dark-gold)[Ingrédients]
|
||||
#for stage in ingredients.stages {
|
||||
if stage.ingredients.len() > 0 {
|
||||
[
|
||||
- *#stage.name* : #stage.ingredients.join([, ])
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
text(size: 7.1pt)[
|
||||
#text(size: 6.6pt, weight: "bold", fill: theme.dark-gold)[Effets]
|
||||
#for item in ingredients.components {
|
||||
[
|
||||
- *#item.name*#if item.detail != none { [ (#item.detail)] } : #item.effect
|
||||
]
|
||||
}
|
||||
],
|
||||
)
|
||||
#text(size: 6.6pt, weight: "bold", fill: theme.dark-gold)[Ingrédients et effets]
|
||||
#v(-1pt)
|
||||
#pad(left: 6pt)[
|
||||
#table(
|
||||
columns: (auto, auto, 1fr),
|
||||
align: (left + horizon, left + horizon, left + horizon),
|
||||
column-gutter: 3pt,
|
||||
stroke: none,
|
||||
inset: (x: 1pt, y: 1.5pt),
|
||||
..ingredients.components.map(item => (
|
||||
ingredient-name(item),
|
||||
step-pill(item.stage),
|
||||
ingredient-effect(item),
|
||||
)).flatten(),
|
||||
)
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue