Mentor d'écriture : champs d'histoire pour scènes, arcs et PNJ
Qualité & Sécurité / Web (ESLint · angular-eslint + sonarjs) (push) Successful in 52s
Qualité & Sécurité / MegaLinter (PMD · Ruff · Bandit · gitleaks · hadolint) (push) Successful in 54s
Qualité & Sécurité / Trivy (CVE dépendances Maven / pip / npm) (push) Failing after 54s

- Scène : « Utilité » (ce que l'histoire perd si on la coupe) et « Tactique
  et moral des adversaires » (comment ils se battent, quand ils fuient ou se
  rendent), dans l'éditeur, la vue et le PDF (réservés au MJ).
- Arc : « Histoire cachée » (la vérité que les joueurs reconstituent) et
  « Accroches » (une par ligne), nouvelle section de l'éditeur ; dans le PDF,
  histoire cachée en encadré secret et accroches, version MJ uniquement.
- PNJ : bloc « Rôle dans l'histoire », indépendant du système de jeu : rôle
  (opposant, allié, ressource, figurant), motivation, ce qu'il sait,
  signe distinctif. Dans le PDF, le signe distinctif se voit aussi en
  version joueurs ; rôle, motivation et savoir restent réservés au MJ.
- Huit fiches du coach pour ces champs, rédigées pour LoreMind.
- Relecture d'éditeur : WRITE-016 (opposant ou allié sans motivation, lien
  vers la fiche du PNJ), WRITE-017 (arc avec une seule accroche) ; un combat
  dont la tactique est écrite n'est plus signalé « sans but » (WRITE-008).
- Migration V27 (colonnes scènes/arcs, fiche PNJ en JSON) ; champs
  conservés à l'export/import de campagne.

Vérifié : core clean verify (1277 tests, dont règles, rendu MJ/joueurs,
aller-retour export/import), web build + 844 vitest, lint sans erreur,
migration V27 appliquée sur une base existante et fiche PNJ enregistrée
puis signalée par la relecture dans le navigateur.
À redéployer : core + web (migration V27).
This commit is contained in:
2026-10-17 17:07:10 +02:00
parent 0c0581e894
commit 106754fd77
57 changed files with 1262 additions and 51 deletions
@@ -1,6 +1,7 @@
package com.loremind.application.campaigncontext; package com.loremind.application.campaigncontext;
import com.loremind.domain.campaigncontext.bestiary.Npc; import com.loremind.domain.campaigncontext.bestiary.Npc;
import com.loremind.domain.campaigncontext.bestiary.NpcStory;
import com.loremind.domain.shared.ReorderSupport; import com.loremind.domain.shared.ReorderSupport;
import com.loremind.domain.campaigncontext.ports.NpcRepository; import com.loremind.domain.campaigncontext.ports.NpcRepository;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@@ -29,8 +30,17 @@ public class NpcService {
String campaignId, String campaignId,
List<String> relatedPageIds, List<String> relatedPageIds,
String folder, String folder,
Integer order Integer order,
) {} /** Rôle dans l'histoire ; null = inchangé (mise à jour) / non renseigné (création). */
NpcStory story
) {
public NpcData(String name, String portraitImageId, String headerImageId, Map<String, String> values,
Map<String, List<String>> imageValues, Map<String, Map<String, String>> keyValueValues,
String campaignId, List<String> relatedPageIds, String folder, Integer order) {
this(name, portraitImageId, headerImageId, values, imageValues, keyValueValues, campaignId,
relatedPageIds, folder, order, null);
}
}
public Npc createNpc(NpcData data) { public Npc createNpc(NpcData data) {
int order = data.order() != null int order = data.order() != null
@@ -47,6 +57,7 @@ public class NpcService {
.relatedPageIds(data.relatedPageIds() != null ? new ArrayList<>(data.relatedPageIds()) : new ArrayList<>()) .relatedPageIds(data.relatedPageIds() != null ? new ArrayList<>(data.relatedPageIds()) : new ArrayList<>())
.folder(normalizeFolder(data.folder())) .folder(normalizeFolder(data.folder()))
.order(order) .order(order)
.story(cleanStory(data.story()))
.build(); .build();
return npcRepository.save(npc); return npcRepository.save(npc);
} }
@@ -70,12 +81,22 @@ public class NpcService {
existing.setKeyValueValues(data.keyValueValues() != null ? new HashMap<>(data.keyValueValues()) : new HashMap<>()); existing.setKeyValueValues(data.keyValueValues() != null ? new HashMap<>(data.keyValueValues()) : new HashMap<>());
existing.setRelatedPageIds(data.relatedPageIds() != null ? new ArrayList<>(data.relatedPageIds()) : new ArrayList<>()); existing.setRelatedPageIds(data.relatedPageIds() != null ? new ArrayList<>(data.relatedPageIds()) : new ArrayList<>());
existing.setFolder(normalizeFolder(data.folder())); existing.setFolder(normalizeFolder(data.folder()));
if (data.story() != null) {
existing.setStory(cleanStory(data.story()));
}
if (data.order() != null) { if (data.order() != null) {
existing.setOrder(data.order()); existing.setOrder(data.order());
} }
return npcRepository.save(existing); return npcRepository.save(existing);
} }
/** Fiche nettoyée, ou null si elle est vide (rien à stocker). */
private static NpcStory cleanStory(NpcStory story) {
if (story == null) return null;
NpcStory clean = story.normalized();
return clean.hasContent() ? clean : null;
}
public void deleteNpc(String id) { public void deleteNpc(String id) {
npcRepository.deleteById(id); npcRepository.deleteById(id);
} }
@@ -125,6 +125,8 @@ public class SceneService {
case "playerNarration" -> scene.setPlayerNarration(value); case "playerNarration" -> scene.setPlayerNarration(value);
case "choicesConsequences" -> scene.setChoicesConsequences(value); case "choicesConsequences" -> scene.setChoicesConsequences(value);
case "combatDifficulty" -> scene.setCombatDifficulty(value); case "combatDifficulty" -> scene.setCombatDifficulty(value);
case "tactics" -> scene.setTactics(value);
case "purpose" -> scene.setPurpose(value);
case "enemies" -> scene.setEnemies(value); case "enemies" -> scene.setEnemies(value);
case "gmSecretNotes" -> scene.setGmSecretNotes(value); case "gmSecretNotes" -> scene.setGmSecretNotes(value);
default -> { /* clé inconnue → ignorée (garde-fou anti-écrasement) */ } default -> { /* clé inconnue → ignorée (garde-fou anti-écrasement) */ }
@@ -4,6 +4,9 @@ import com.loremind.domain.campaigncontext.Campaign;
import com.loremind.domain.campaigncontext.ports.ArcRepository; import com.loremind.domain.campaigncontext.ports.ArcRepository;
import com.loremind.domain.campaigncontext.ports.CampaignRepository; import com.loremind.domain.campaigncontext.ports.CampaignRepository;
import com.loremind.domain.campaigncontext.ports.ChapterRepository; import com.loremind.domain.campaigncontext.ports.ChapterRepository;
import com.loremind.domain.campaigncontext.bestiary.Npc;
import com.loremind.domain.campaigncontext.bestiary.NpcStory;
import com.loremind.domain.campaigncontext.ports.NpcRepository;
import com.loremind.domain.campaigncontext.ports.QuestRepository; import com.loremind.domain.campaigncontext.ports.QuestRepository;
import com.loremind.domain.campaigncontext.ports.SceneRepository; import com.loremind.domain.campaigncontext.ports.SceneRepository;
import com.loremind.domain.campaigncontext.quest.Quest; import com.loremind.domain.campaigncontext.quest.Quest;
@@ -91,17 +94,20 @@ public class WritingReviewService {
private final ChapterRepository chapterRepository; private final ChapterRepository chapterRepository;
private final SceneRepository sceneRepository; private final SceneRepository sceneRepository;
private final QuestRepository questRepository; private final QuestRepository questRepository;
private final NpcRepository npcRepository;
public WritingReviewService(CampaignRepository campaignRepository, public WritingReviewService(CampaignRepository campaignRepository,
ArcRepository arcRepository, ArcRepository arcRepository,
ChapterRepository chapterRepository, ChapterRepository chapterRepository,
SceneRepository sceneRepository, SceneRepository sceneRepository,
QuestRepository questRepository) { QuestRepository questRepository,
NpcRepository npcRepository) {
this.campaignRepository = campaignRepository; this.campaignRepository = campaignRepository;
this.arcRepository = arcRepository; this.arcRepository = arcRepository;
this.chapterRepository = chapterRepository; this.chapterRepository = chapterRepository;
this.sceneRepository = sceneRepository; this.sceneRepository = sceneRepository;
this.questRepository = questRepository; this.questRepository = questRepository;
this.npcRepository = npcRepository;
} }
/** Relit toute la campagne et renvoie les remarques dans l'ordre de l'arbre. */ /** Relit toute la campagne et renvoie les remarques dans l'ordre de l'arbre. */
@@ -122,6 +128,11 @@ public class WritingReviewService {
chapters.sort(Comparator.comparingInt(Chapter::getOrder)); chapters.sort(Comparator.comparingInt(Chapter::getOrder));
boolean visibleArc = arc.getType() != ArcType.SYSTEM; boolean visibleArc = arc.getType() != ArcType.SYSTEM;
// WRITE-017 — une seule accroche : les personnages n'ont qu'une raison de s'en mêler.
if (visibleArc && countLines(arc.getHooks()) == 1) {
treeRemarks.add(arcRemark(arc, "WRITE-017-SINGLE-HOOK", WritingRemarkCategory.AGENCY, Map.of()));
}
// WRITE-005 (arc) : seulement sur un arc qui a déjà du contenu. // WRITE-005 (arc) : seulement sur un arc qui a déjà du contenu.
if (visibleArc && isBlank(arc.getStakes()) if (visibleArc && isBlank(arc.getStakes())
&& (!chapters.isEmpty() || arcsWithQuests.contains(arc.getId()))) { && (!chapters.isEmpty() || arcsWithQuests.contains(arc.getId()))) {
@@ -164,6 +175,7 @@ public class WritingReviewService {
List<WritingRemark> remarks = new ArrayList<>(campaignRemarks); List<WritingRemark> remarks = new ArrayList<>(campaignRemarks);
remarks.addAll(treeRemarks); remarks.addAll(treeRemarks);
remarks.addAll(reviewNpcs(campaignId));
return new WritingReviewReport(campaignId, remarks); return new WritingReviewReport(campaignId, remarks);
} }
@@ -437,7 +449,8 @@ public class WritingReviewService {
/** WRITE-008 — combat sans but : ni choix décrits, ni notes sur les motivations des ennemis. */ /** WRITE-008 — combat sans but : ni choix décrits, ni notes sur les motivations des ennemis. */
private void checkCombatPurpose(Arc arc, Chapter chapter, Scene scene, List<WritingRemark> out) { private void checkCombatPurpose(Arc arc, Chapter chapter, Scene scene, List<WritingRemark> out) {
if (isCombat(scene) && isBlank(scene.getChoicesConsequences()) && isBlank(scene.getGmSecretNotes())) { if (isCombat(scene) && isBlank(scene.getChoicesConsequences()) && isBlank(scene.getGmSecretNotes())
&& isBlank(scene.getTactics())) {
out.add(sceneRemark(arc, chapter, scene, "WRITE-008-COMBAT-NO-PURPOSE", WritingRemarkCategory.STAKES, out.add(sceneRemark(arc, chapter, scene, "WRITE-008-COMBAT-NO-PURPOSE", WritingRemarkCategory.STAKES,
Map.of())); Map.of()));
} }
@@ -455,8 +468,34 @@ public class WritingReviewService {
} }
} }
// --- PNJ ----------------------------------------------------------------------------------
/**
* WRITE-016 — opposant ou allié sans motivation : un PNJ qui pèse sur l'intrigue doit
* vouloir quelque chose, sinon le MJ ne sait pas comment le faire réagir. Les figurants
* et les PNJ sans rôle précisé ne sont pas jugés (pas de bruit sur les seconds rôles).
*/
private List<WritingRemark> reviewNpcs(String campaignId) {
List<WritingRemark> out = new ArrayList<>();
for (Npc npc : npcRepository.findByCampaignId(campaignId)) {
NpcStory story = npc.getStory();
if (story != null && story.drivesThePlot() && story.normalized().motivation() == null) {
out.add(new WritingRemark(ReadinessEntityType.NPC, npc.getId(), labelOr(npc.getName(), "PNJ"),
"WRITE-016-NPC-NO-MOTIVATION", WritingRemarkCategory.STAKES,
Map.of("role", story.normalized().role()), null, null));
}
}
return out;
}
// --- Helpers ---------------------------------------------------------------------------- // --- Helpers ----------------------------------------------------------------------------
/** Nombre de lignes non vides (une accroche par ligne, puces « - » comprises). */
private static int countLines(String text) {
if (isBlank(text)) return 0;
return (int) text.lines().filter(l -> !l.isBlank()).count();
}
private static boolean isCombat(Scene scene) { private static boolean isCombat(Scene scene) {
return typeOf(scene) == SceneType.ENCOUNTER return typeOf(scene) == SceneType.ENCOUNTER
|| !isBlank(scene.getCombatDifficulty()) || !isBlank(scene.getCombatDifficulty())
@@ -60,6 +60,9 @@ public class Npc {
/** Ordre d'affichage dans la liste des PNJ de la campagne. */ /** Ordre d'affichage dans la liste des PNJ de la campagne. */
private int order; private int order;
/** Rôle dans l'histoire (rôle, motivation, ce qu'il sait, signe distinctif). Null = non renseigné. */
private NpcStory story;
private LocalDateTime createdAt; private LocalDateTime createdAt;
private LocalDateTime updatedAt; private LocalDateTime updatedAt;
@@ -0,0 +1,49 @@
package com.loremind.domain.campaigncontext.bestiary;
import java.util.Locale;
import java.util.Set;
/**
* Fiche « rôle dans l'histoire » d'un PNJ, indépendante du système de jeu (le gabarit du
* système porte les caractéristiques) : ce qui rend le PNJ jouable et utile au récit.
*
* @param role place dans l'histoire : {@code OPPONENT} (s'oppose aux PJ), {@code ALLY}
* (les aide), {@code RESOURCE} (détient une information ou un service),
* {@code EXTRA} (figurant) ; null = non précisé
* @param motivation ce qu'il veut, et ce qu'il est prêt à faire pour l'obtenir
* @param knowledge ce qu'il sait (et peut révéler) — réservé au MJ
* @param mannerism signe distinctif à jouer (geste, phrasé, tic)
*/
public record NpcStory(String role, String motivation, String knowledge, String mannerism) {
public static final Set<String> ROLES = Set.of("OPPONENT", "ALLY", "RESOURCE", "EXTRA");
private static final int SHORT_MAX = 300;
private static final int LONG_MAX = 10_000;
/** Copie nettoyée : rôle inconnu → null, textes rognés (blancs → null) et bornés. */
public NpcStory normalized() {
String r = role == null ? null : role.trim().toUpperCase(Locale.ROOT);
// Set.of(...).contains(null) lève une NullPointerException : rôle absent testé à part.
return new NpcStory(r != null && ROLES.contains(r) ? r : null,
clean(motivation, LONG_MAX), clean(knowledge, LONG_MAX), clean(mannerism, SHORT_MAX));
}
/** Vrai si au moins un élément est renseigné. */
public boolean hasContent() {
NpcStory n = normalized();
return n.role() != null || n.motivation() != null || n.knowledge() != null || n.mannerism() != null;
}
/** Un PNJ qui pèse sur l'intrigue (opposant ou allié) : sa motivation est attendue. */
public boolean drivesThePlot() {
String r = normalized().role();
return "OPPONENT".equals(r) || "ALLY".equals(r);
}
private static String clean(String s, int max) {
if (s == null) return null;
String t = s.trim();
if (t.isEmpty()) return null;
return t.length() > max ? t.substring(0, max) : t;
}
}
@@ -38,6 +38,8 @@ public class Arc {
private String gmNotes; // Notes privées du MJ (non exportées vers FoundryVTT) private String gmNotes; // Notes privées du MJ (non exportées vers FoundryVTT)
private String rewards; // Récompenses et progression private String rewards; // Récompenses et progression
private String resolution; // Dénouement prévu private String resolution; // Dénouement prévu
private String hiddenTruth; // Histoire cachée : ce qui s'est vraiment passé (réservé au MJ)
private String hooks; // Accroches : pourquoi les personnages s'en mêlent (une par ligne)
/** /**
* IDs des pages du Lore associées à cet arc (weak cross-context references). * IDs des pages du Lore associées à cet arc (weak cross-context references).
@@ -48,6 +48,8 @@ public class Scene {
// === Combat ou rencontre === // === Combat ou rencontre ===
private String combatDifficulty; // Difficulté estimée private String combatDifficulty; // Difficulté estimée
private String tactics; // Tactique et moral des adversaires (quand fuient-ils, se rendent-ils ?)
private String purpose; // Utilité : ce que l'histoire perd si on coupe la scène
private String enemies; // Liste des ennemis et créatures (texte libre) private String enemies; // Liste des ennemis et créatures (texte libre)
/** /**
@@ -0,0 +1,43 @@
package com.loremind.infrastructure.persistence.converter;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.loremind.domain.campaigncontext.bestiary.NpcStory;
import jakarta.persistence.AttributeConverter;
import jakarta.persistence.Converter;
/**
* Convertit la fiche {@link NpcStory} (rôle dans l'histoire d'un PNJ) en JSON stocké dans une colonne TEXT,
* et inversement. Fiche vide → NULL en base. Champs inconnus ignorés (fiche écrite par
* une version plus récente).
*/
@Converter
public class NpcStoryJsonConverter implements AttributeConverter<NpcStory, String> {
private static final ObjectMapper MAPPER = new ObjectMapper()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
@Override
public String convertToDatabaseColumn(NpcStory attribute) {
if (attribute == null || !attribute.hasContent()) {
return null;
}
try {
return MAPPER.writeValueAsString(attribute);
} catch (Exception e) {
throw new IllegalStateException("Erreur sérialisation NpcStory → JSON", e);
}
}
@Override
public NpcStory convertToEntityAttribute(String dbData) {
if (dbData == null || dbData.isBlank()) {
return null;
}
try {
return MAPPER.readValue(dbData, NpcStory.class);
} catch (Exception e) {
throw new IllegalStateException("Erreur désérialisation JSON → NpcStory", e);
}
}
}
@@ -72,6 +72,12 @@ public class ArcJpaEntity {
@Column(columnDefinition = "TEXT") @Column(columnDefinition = "TEXT")
private String resolution; private String resolution;
@Column(name = "hidden_truth", columnDefinition = "TEXT")
private String hiddenTruth;
@Column(name = "hooks", columnDefinition = "TEXT")
private String hooks;
/** /**
* IDs des pages du Lore liées à cet arc, stockés en JSON dans une colonne TEXT. * IDs des pages du Lore liées à cet arc, stockés en JSON dans une colonne TEXT.
* Pas de FK cross-context : respect des Bounded Contexts. * Pas de FK cross-context : respect des Bounded Contexts.
@@ -67,6 +67,11 @@ public class NpcJpaEntity {
@Column(name = "\"order\"", nullable = false) @Column(name = "\"order\"", nullable = false)
private int order; private int order;
/** Fiche « rôle dans l'histoire » (JSON). NULL = non renseignée. */
@Column(name = "story", columnDefinition = "TEXT")
@Convert(converter = com.loremind.infrastructure.persistence.converter.NpcStoryJsonConverter.class)
private com.loremind.domain.campaigncontext.bestiary.NpcStory story;
@Column(name = "created_at", nullable = false, updatable = false) @Column(name = "created_at", nullable = false, updatable = false)
private LocalDateTime createdAt; private LocalDateTime createdAt;
@@ -78,6 +78,14 @@ public class SceneJpaEntity {
@Column(name = "choices_consequences", columnDefinition = "TEXT") @Column(name = "choices_consequences", columnDefinition = "TEXT")
private String choicesConsequences; private String choicesConsequences;
// Tactique et moral des adversaires
@Column(name = "tactics", columnDefinition = "TEXT")
private String tactics;
// Utilité de la scène dans l'histoire
@Column(name = "purpose", columnDefinition = "TEXT")
private String purpose;
// Combat // Combat
@Column(name = "combat_difficulty", columnDefinition = "TEXT") @Column(name = "combat_difficulty", columnDefinition = "TEXT")
private String combatDifficulty; private String combatDifficulty;
@@ -77,6 +77,8 @@ public class PostgresArcRepository implements ArcRepository {
.gmNotes(jpaEntity.getGmNotes()) .gmNotes(jpaEntity.getGmNotes())
.rewards(jpaEntity.getRewards()) .rewards(jpaEntity.getRewards())
.resolution(jpaEntity.getResolution()) .resolution(jpaEntity.getResolution())
.hiddenTruth(jpaEntity.getHiddenTruth())
.hooks(jpaEntity.getHooks())
// Defensive copy : jamais de null en domaine pour simplifier les appelants. // Defensive copy : jamais de null en domaine pour simplifier les appelants.
.relatedPageIds(jpaEntity.getRelatedPageIds() != null .relatedPageIds(jpaEntity.getRelatedPageIds() != null
? new ArrayList<>(jpaEntity.getRelatedPageIds()) ? new ArrayList<>(jpaEntity.getRelatedPageIds())
@@ -104,6 +106,8 @@ public class PostgresArcRepository implements ArcRepository {
.gmNotes(arc.getGmNotes()) .gmNotes(arc.getGmNotes())
.rewards(arc.getRewards()) .rewards(arc.getRewards())
.resolution(arc.getResolution()) .resolution(arc.getResolution())
.hiddenTruth(arc.getHiddenTruth())
.hooks(arc.getHooks())
.relatedPageIds(arc.getRelatedPageIds() != null .relatedPageIds(arc.getRelatedPageIds() != null
? new ArrayList<>(arc.getRelatedPageIds()) ? new ArrayList<>(arc.getRelatedPageIds())
: new ArrayList<>()) : new ArrayList<>())
@@ -68,6 +68,7 @@ public class PostgresNpcRepository implements NpcRepository {
.campaignId(e.getCampaignId().toString()) .campaignId(e.getCampaignId().toString())
.relatedPageIds(e.getRelatedPageIds() != null ? new ArrayList<>(e.getRelatedPageIds()) : new ArrayList<>()) .relatedPageIds(e.getRelatedPageIds() != null ? new ArrayList<>(e.getRelatedPageIds()) : new ArrayList<>())
.folder(e.getFolder()) .folder(e.getFolder())
.story(e.getStory())
.order(e.getOrder()) .order(e.getOrder())
.createdAt(e.getCreatedAt()) .createdAt(e.getCreatedAt())
.updatedAt(e.getUpdatedAt()) .updatedAt(e.getUpdatedAt())
@@ -87,6 +88,7 @@ public class PostgresNpcRepository implements NpcRepository {
.campaignId(Long.parseLong(n.getCampaignId())) .campaignId(Long.parseLong(n.getCampaignId()))
.relatedPageIds(n.getRelatedPageIds() != null ? new ArrayList<>(n.getRelatedPageIds()) : new ArrayList<>()) .relatedPageIds(n.getRelatedPageIds() != null ? new ArrayList<>(n.getRelatedPageIds()) : new ArrayList<>())
.folder(n.getFolder()) .folder(n.getFolder())
.story(n.getStory())
.order(n.getOrder()) .order(n.getOrder())
.createdAt(n.getCreatedAt()) .createdAt(n.getCreatedAt())
.updatedAt(n.getUpdatedAt()) .updatedAt(n.getUpdatedAt())
@@ -80,6 +80,8 @@ public class PostgresSceneRepository implements SceneRepository {
.gmSecretNotes(jpaEntity.getGmSecretNotes()) .gmSecretNotes(jpaEntity.getGmSecretNotes())
.choicesConsequences(jpaEntity.getChoicesConsequences()) .choicesConsequences(jpaEntity.getChoicesConsequences())
.combatDifficulty(jpaEntity.getCombatDifficulty()) .combatDifficulty(jpaEntity.getCombatDifficulty())
.tactics(jpaEntity.getTactics())
.purpose(jpaEntity.getPurpose())
.enemies(jpaEntity.getEnemies()) .enemies(jpaEntity.getEnemies())
.enemyIds(jpaEntity.getEnemyIds() != null .enemyIds(jpaEntity.getEnemyIds() != null
? new ArrayList<>(jpaEntity.getEnemyIds()) ? new ArrayList<>(jpaEntity.getEnemyIds())
@@ -123,6 +125,8 @@ public class PostgresSceneRepository implements SceneRepository {
.gmSecretNotes(scene.getGmSecretNotes()) .gmSecretNotes(scene.getGmSecretNotes())
.choicesConsequences(scene.getChoicesConsequences()) .choicesConsequences(scene.getChoicesConsequences())
.combatDifficulty(scene.getCombatDifficulty()) .combatDifficulty(scene.getCombatDifficulty())
.tactics(scene.getTactics())
.purpose(scene.getPurpose())
.enemies(scene.getEnemies()) .enemies(scene.getEnemies())
.enemyIds(scene.getEnemyIds() != null .enemyIds(scene.getEnemyIds() != null
? new ArrayList<>(scene.getEnemyIds()) ? new ArrayList<>(scene.getEnemyIds())
@@ -129,6 +129,8 @@ class CampaignContentInserter {
e.setGmNotes(d.gmNotes()); e.setGmNotes(d.gmNotes());
e.setRewards(d.rewards()); e.setRewards(d.rewards());
e.setResolution(d.resolution()); e.setResolution(d.resolution());
e.setHiddenTruth(d.hiddenTruth());
e.setHooks(d.hooks());
e.setRelatedPageIds(d.relatedPageIds()); // remappe en 2e passe e.setRelatedPageIds(d.relatedPageIds()); // remappe en 2e passe
e.setIllustrationImageIds(IdRemapper.remapStringList(maps.imageMap, d.illustrationImageIds())); e.setIllustrationImageIds(IdRemapper.remapStringList(maps.imageMap, d.illustrationImageIds()));
maps.arcMap.put(d.id(), arcRepo.save(e).getId()); maps.arcMap.put(d.id(), arcRepo.save(e).getId());
@@ -267,6 +269,7 @@ class CampaignContentInserter {
e.setRelatedPageIds(d.relatedPageIds()); // remappe en 2e passe e.setRelatedPageIds(d.relatedPageIds()); // remappe en 2e passe
e.setFolder(d.folder()); e.setFolder(d.folder());
e.setOrder(d.order()); e.setOrder(d.order());
e.setStory(d.story());
maps.npcMap.put(d.id(), npcRepo.save(e).getId()); maps.npcMap.put(d.id(), npcRepo.save(e).getId());
} }
result.count("npcs", maps.npcMap.size()); result.count("npcs", maps.npcMap.size());
@@ -317,6 +320,8 @@ class CampaignContentInserter {
e.setBattlemaps(resolveBattlemaps(d, maps)); e.setBattlemaps(resolveBattlemaps(d, maps));
e.setGraphX(d.graphX()); e.setGraphX(d.graphX());
e.setGraphY(d.graphY()); e.setGraphY(d.graphY());
e.setTactics(d.tactics());
e.setPurpose(d.purpose());
e.setBranches(d.branches()); // remappe en 2e passe e.setBranches(d.branches()); // remappe en 2e passe
// Rooms : l'id (UUID) et les branches restent tels quels ; seules leurs refs // Rooms : l'id (UUID) et les branches restent tels quels ; seules leurs refs
// d'images (galerie + plan) sont remappees vers les images importees. // d'images (galerie + plan) sont remappees vers les images importees.
@@ -614,7 +614,7 @@ public class ExportService {
e.getType() != null ? e.getType().name() : null, e.getType() != null ? e.getType().name() : null,
e.getIcon(), e.getThemes(), e.getStakes(), e.getGmNotes(), e.getIcon(), e.getThemes(), e.getStakes(), e.getGmNotes(),
e.getRewards(), e.getResolution(), e.getRelatedPageIds(), e.getRewards(), e.getResolution(), e.getRelatedPageIds(),
e.getIllustrationImageIds()); e.getIllustrationImageIds(), e.getHiddenTruth(), e.getHooks());
} }
private ContentExport.ChapterDto toChapterDto(ChapterJpaEntity e) { private ContentExport.ChapterDto toChapterDto(ChapterJpaEntity e) {
@@ -643,7 +643,7 @@ public class ExportService {
e.getEnemies(), e.getEnemyIds(), e.getRelatedPageIds(), e.getEnemies(), e.getEnemyIds(), e.getRelatedPageIds(),
e.getIllustrationImageIds(), null, null, // legacy battlemap : plus émis e.getIllustrationImageIds(), null, null, // legacy battlemap : plus émis
e.getBattlemaps(), e.getBranches(), e.getRooms(), e.getType(), e.getBattlemaps(), e.getBranches(), e.getRooms(), e.getType(),
e.getGraphX(), e.getGraphY()); e.getGraphX(), e.getGraphY(), e.getTactics(), e.getPurpose());
} }
private ContentExport.CharacterDto toCharacterDto(CharacterJpaEntity e) { private ContentExport.CharacterDto toCharacterDto(CharacterJpaEntity e) {
@@ -655,7 +655,7 @@ public class ExportService {
private ContentExport.NpcDto toNpcDto(NpcJpaEntity e) { private ContentExport.NpcDto toNpcDto(NpcJpaEntity e) {
return new ContentExport.NpcDto(e.getId(), e.getName(), e.getPortraitImageId(), return new ContentExport.NpcDto(e.getId(), e.getName(), e.getPortraitImageId(),
e.getHeaderImageId(), e.getValues(), e.getImageValues(), e.getKeyValueValues(), e.getHeaderImageId(), e.getValues(), e.getImageValues(), e.getKeyValueValues(),
e.getCampaignId(), e.getRelatedPageIds(), e.getFolder(), e.getOrder()); e.getCampaignId(), e.getRelatedPageIds(), e.getFolder(), e.getOrder(), e.getStory());
} }
private ContentExport.EnemyDto toEnemyDto(EnemyJpaEntity e) { private ContentExport.EnemyDto toEnemyDto(EnemyJpaEntity e) {
@@ -147,7 +147,10 @@ public record ContentExport(
String rewards, String rewards,
String resolution, String resolution,
List<String> relatedPageIds, List<String> relatedPageIds,
List<String> illustrationImageIds List<String> illustrationImageIds,
/** Histoire cachée et accroches ; absentes des bundles antérieurs (null). */
String hiddenTruth,
String hooks
) {} ) {}
public record ChapterDto( public record ChapterDto(
@@ -197,7 +200,10 @@ public record ContentExport(
List<Room> rooms, List<Room> rooms,
SceneType type, SceneType type,
Double graphX, Double graphX,
Double graphY Double graphY,
/** Tactique des adversaires et utilité ; absentes des bundles antérieurs (null). */
String tactics,
String purpose
) {} ) {}
public record CharacterDto( public record CharacterDto(
@@ -224,7 +230,9 @@ public record ContentExport(
Long campaignId, Long campaignId,
List<String> relatedPageIds, List<String> relatedPageIds,
String folder, String folder,
int order int order,
/** Rôle dans l'histoire ; absent des bundles antérieurs (null). */
com.loremind.domain.campaigncontext.bestiary.NpcStory story
) {} ) {}
public record EnemyDto( public record EnemyDto(
@@ -1,6 +1,7 @@
package com.loremind.infrastructure.transfer.pdf; package com.loremind.infrastructure.transfer.pdf;
import com.loremind.domain.campaigncontext.CampaignPublication; import com.loremind.domain.campaigncontext.CampaignPublication;
import com.loremind.domain.campaigncontext.bestiary.NpcStory;
import com.loremind.domain.campaigncontext.quest.NodeType; import com.loremind.domain.campaigncontext.quest.NodeType;
import com.loremind.domain.campaigncontext.quest.Prerequisite; import com.loremind.domain.campaigncontext.quest.Prerequisite;
import com.loremind.domain.campaigncontext.quest.QuestNodeRef; import com.loremind.domain.campaigncontext.quest.QuestNodeRef;
@@ -538,6 +539,8 @@ public class PdfExportService {
private void arcFields(Ctx ctx, ArcJpaEntity arc) { private void arcFields(Ctx ctx, ArcJpaEntity arc) {
illustrations(ctx, arc.getIllustrationImageIds()); illustrations(ctx, arc.getIllustrationImageIds());
ctx.gmBlock(LABEL_DESCRIPTION, arc.getDescription()); ctx.gmBlock(LABEL_DESCRIPTION, arc.getDescription());
ctx.gmBox(CSS_SECRET, "Histoire cachée", arc.getHiddenTruth());
ctx.gmBlock("Accroches", arc.getHooks());
ctx.gmBlock(LABEL_THEMES, arc.getThemes()); ctx.gmBlock(LABEL_THEMES, arc.getThemes());
ctx.gmBlock(LABEL_ENJEUX, arc.getStakes()); ctx.gmBlock(LABEL_ENJEUX, arc.getStakes());
ctx.gmBlock(LABEL_RECOMPENSES, arc.getRewards()); ctx.gmBlock(LABEL_RECOMPENSES, arc.getRewards());
@@ -628,6 +631,7 @@ public class PdfExportService {
.append(esc(sc.getName())).append(DIV_CLOSE); .append(esc(sc.getName())).append(DIV_CLOSE);
sceneMeta(b, sc); sceneMeta(b, sc);
ctx.gmBlock("Résumé", sc.getDescription()); ctx.gmBlock("Résumé", sc.getDescription());
ctx.gmBlock("Utilité", sc.getPurpose());
block(b, "Ambiance", sc.getAtmosphere(), "ambiance"); block(b, "Ambiance", sc.getAtmosphere(), "ambiance");
box(b, "readaloud", "À lire aux joueurs", sc.getPlayerNarration()); box(b, "readaloud", "À lire aux joueurs", sc.getPlayerNarration());
ctx.gmBox(CSS_SECRET, "Notes secrètes MJ", sc.getGmSecretNotes()); ctx.gmBox(CSS_SECRET, "Notes secrètes MJ", sc.getGmSecretNotes());
@@ -635,7 +639,7 @@ public class PdfExportService {
if (ctx.gm) blockHtml(b, "Sorties", sceneBranchItems(sc.getBranches(), st)); if (ctx.gm) blockHtml(b, "Sorties", sceneBranchItems(sc.getBranches(), st));
// Combat : difficulte + ennemis de la rencontre (fiches du bestiaire en renvoi // Combat : difficulte + ennemis de la rencontre (fiches du bestiaire en renvoi
// « p. N » + texte libre) dans le meme encadre rouge. // « p. N » + texte libre) dans le meme encadre rouge.
combatBox(ctx, "Combat", sc.getCombatDifficulty(), sc.getEnemyIds(), sc.getEnemies(), st); combatBox(ctx, "Combat", sc.getCombatDifficulty(), sc.getEnemyIds(), sc.getEnemies(), sc.getTactics(), st);
illustrations(ctx, sc.getIllustrationImageIds()); illustrations(ctx, sc.getIllustrationImageIds());
if (ctx.maps != null) { if (ctx.maps != null) {
mapLinks(ctx, sc); mapLinks(ctx, sc);
@@ -706,7 +710,7 @@ public class PdfExportService {
if (r.getFloor() != null) b.append(" · Étage ").append(r.getFloor()); if (r.getFloor() != null) b.append(" · Étage ").append(r.getFloor());
b.append(SPAN_CLOSE).append(esc(r.getName())).append(DIV_CLOSE); b.append(SPAN_CLOSE).append(esc(r.getName())).append(DIV_CLOSE);
ctx.gmBlock(LABEL_DESCRIPTION, r.getDescription()); ctx.gmBlock(LABEL_DESCRIPTION, r.getDescription());
combatBox(ctx, "Ennemis", null, r.getEnemyIds(), r.getEnemies(), st); combatBox(ctx, "Ennemis", null, r.getEnemyIds(), r.getEnemies(), null, st);
ctx.gmBlock("Butin", r.getLoot()); ctx.gmBlock("Butin", r.getLoot());
ctx.gmBlock("Pièges", r.getTraps()); ctx.gmBlock("Pièges", r.getTraps());
ctx.gmBox(CSS_SECRET, LABEL_NOTES_MJ, r.getGmNotes()); ctx.gmBox(CSS_SECRET, LABEL_NOTES_MJ, r.getGmNotes());
@@ -776,7 +780,7 @@ public class PdfExportService {
* leur fiche (« Bandit (p. 24) »), puis texte libre. Rien si tout est vide. * leur fiche (« Bandit (p. 24) »), puis texte libre. Rien si tout est vide.
*/ */
private static void combatBox(Ctx ctx, String label, String difficulty, List<String> enemyIds, private static void combatBox(Ctx ctx, String label, String difficulty, List<String> enemyIds,
String freeText, Structure st) { String freeText, String tactics, Structure st) {
if (!ctx.gm) return; if (!ctx.gm) return;
List<String> enemies = new ArrayList<>(); List<String> enemies = new ArrayList<>();
if (enemyIds != null) { if (enemyIds != null) {
@@ -785,7 +789,7 @@ public class PdfExportService {
if (name != null) enemies.add(xref("enemy-" + id, name) + " " + pageRef("enemy-" + id)); if (name != null) enemies.add(xref("enemy-" + id, name) + " " + pageRef("enemy-" + id));
} }
} }
if (!notBlank(difficulty) && enemies.isEmpty() && !notBlank(freeText)) return; if (!notBlank(difficulty) && enemies.isEmpty() && !notBlank(freeText) && !notBlank(tactics)) return;
StringBuilder b = ctx.body; StringBuilder b = ctx.body;
b.append("<div class=\"box combat\"><div class=\"box-label\">").append(esc(label)).append(DIV_CLOSE); b.append("<div class=\"box combat\"><div class=\"box-label\">").append(esc(label)).append(DIV_CLOSE);
prose(b, difficulty); prose(b, difficulty);
@@ -795,6 +799,7 @@ public class PdfExportService {
b.append("</ul>"); b.append("</ul>");
} }
prose(b, freeText); prose(b, freeText);
block(b, "Tactique et moral", tactics);
b.append(DIV_CLOSE); b.append(DIV_CLOSE);
} }
@@ -907,13 +912,14 @@ public class PdfExportService {
/** Une fiche persona generique pour la mise en page (PNJ ou ennemi). */ /** Une fiche persona generique pour la mise en page (PNJ ou ennemi). */
record PersonaRow(Long id, int order, String name, String folder, String level, String portraitId, record PersonaRow(Long id, int order, String name, String folder, String level, String portraitId,
Map<String, String> values, Map<String, Map<String, String>> keyValueValues, Map<String, String> values, Map<String, Map<String, String>> keyValueValues,
Map<String, List<String>> imageValues, Map<String, String> foundryStats) {} Map<String, List<String>> imageValues, Map<String, String> foundryStats,
NpcStory story) {}
private List<PersonaRow> npcEntries(CampaignJpaEntity c) { private List<PersonaRow> npcEntries(CampaignJpaEntity c) {
List<PersonaRow> out = new ArrayList<>(); List<PersonaRow> out = new ArrayList<>();
for (NpcJpaEntity n : npcRepo.findByCampaignIdOrderByOrderAsc(c.getId())) { for (NpcJpaEntity n : npcRepo.findByCampaignIdOrderByOrderAsc(c.getId())) {
out.add(new PersonaRow(n.getId(), n.getOrder(), n.getName(), n.getFolder(), null, n.getPortraitImageId(), out.add(new PersonaRow(n.getId(), n.getOrder(), n.getName(), n.getFolder(), null, n.getPortraitImageId(),
n.getValues(), n.getKeyValueValues(), n.getImageValues(), null)); n.getValues(), n.getKeyValueValues(), n.getImageValues(), null, n.getStory()));
} }
return out; return out;
} }
@@ -922,7 +928,7 @@ public class PdfExportService {
List<PersonaRow> out = new ArrayList<>(); List<PersonaRow> out = new ArrayList<>();
for (EnemyJpaEntity e : enemyRepo.findByCampaignIdOrderByOrderAsc(c.getId())) { for (EnemyJpaEntity e : enemyRepo.findByCampaignIdOrderByOrderAsc(c.getId())) {
out.add(new PersonaRow(e.getId(), e.getOrder(), e.getName(), e.getFolder(), e.getLevel(), e.getPortraitImageId(), out.add(new PersonaRow(e.getId(), e.getOrder(), e.getName(), e.getFolder(), e.getLevel(), e.getPortraitImageId(),
e.getValues(), e.getKeyValueValues(), e.getImageValues(), e.getFoundryStats())); e.getValues(), e.getKeyValueValues(), e.getImageValues(), e.getFoundryStats(), null));
} }
return out; return out;
} }
@@ -1003,7 +1009,14 @@ public class PdfExportService {
b.append("<td class=\"persona-content\">"); b.append("<td class=\"persona-content\">");
b.append("<div class=\"persona-name\">").append(esc(r.name())); b.append("<div class=\"persona-name\">").append(esc(r.name()));
if (notBlank(r.level())) b.append(" <span class=\"level\">Niv. ").append(esc(r.level())).append(SPAN_CLOSE); if (notBlank(r.level())) b.append(" <span class=\"level\">Niv. ").append(esc(r.level())).append(SPAN_CLOSE);
String role = r.story() != null ? ROLE_LABELS.get(r.story().role()) : null;
if (ctx.gm && role != null) b.append(" <span class=\"level\">").append(role).append(SPAN_CLOSE);
b.append(DIV_CLOSE); b.append(DIV_CLOSE);
if (r.story() != null) {
block(b, "Signe distinctif", r.story().mannerism());
ctx.gmBlock("Motivation", r.story().motivation());
ctx.gmBlock("Ce qu'il sait", r.story().knowledge());
}
renderFields(ctx, template, r.values(), r.keyValueValues(), r.imageValues(), null); renderFields(ctx, template, r.values(), r.keyValueValues(), r.imageValues(), null);
@@ -1023,6 +1036,10 @@ public class PdfExportService {
b.append("</td></tr></table></div>"); b.append("</td></tr></table></div>");
} }
/** Libelles des roles d'un PNJ dans l'histoire (fiche « role dans l'histoire »). */
private static final Map<String, String> ROLE_LABELS = Map.of(
"OPPONENT", "Opposant", "ALLY", "Allié", "RESOURCE", "Ressource", "EXTRA", "Figurant");
/** Valeurs de stats considerees comme "vides"/bruit (masquees dans le livret). */ /** Valeurs de stats considerees comme "vides"/bruit (masquees dans le livret). */
private static final Set<String> STAT_NOISE_VALUES = Set.of("0", "0.0", "false", "none", "null", "", "-", "—"); private static final Set<String> STAT_NOISE_VALUES = Set.of("0", "0.0", "false", "none", "null", "", "-", "—");
/** Premier segment de chemin a elaguer du libelle (purement structurel). */ /** Premier segment de chemin a elaguer du libelle (purement structurel). */
@@ -83,7 +83,8 @@ public class NpcController {
dto.getCampaignId(), dto.getCampaignId(),
dto.getRelatedPageIds(), dto.getRelatedPageIds(),
dto.getFolder(), dto.getFolder(),
order order,
dto.getStory()
); );
} }
} }
@@ -29,6 +29,8 @@ public class ArcDTO {
private String gmNotes; private String gmNotes;
private String rewards; private String rewards;
private String resolution; private String resolution;
private String hiddenTruth;
private String hooks;
/** IDs des pages du Lore liées à cet arc (weak cross-context references). */ /** IDs des pages du Lore liées à cet arc (weak cross-context references). */
private List<String> relatedPageIds = new ArrayList<>(); private List<String> relatedPageIds = new ArrayList<>();
@@ -24,5 +24,6 @@ public class NpcDTO {
/** IDs de Pages de Lore référencées par ce PNJ (référence faible cross-context). */ /** IDs de Pages de Lore référencées par ce PNJ (référence faible cross-context). */
private List<String> relatedPageIds = new ArrayList<>(); private List<String> relatedPageIds = new ArrayList<>();
private String folder; private String folder;
private com.loremind.domain.campaigncontext.bestiary.NpcStory story;
private int order; private int order;
} }
@@ -31,6 +31,8 @@ public class SceneDTO {
private String gmSecretNotes; private String gmSecretNotes;
private String choicesConsequences; private String choicesConsequences;
private String combatDifficulty; private String combatDifficulty;
private String tactics;
private String purpose;
private String enemies; private String enemies;
/** IDs des fiches du bestiaire engagées dans la rencontre (weak refs). */ /** IDs des fiches du bestiaire engagées dans la rencontre (weak refs). */
@@ -32,6 +32,8 @@ public class ArcMapper {
dto.setGmNotes(arc.getGmNotes()); dto.setGmNotes(arc.getGmNotes());
dto.setRewards(arc.getRewards()); dto.setRewards(arc.getRewards());
dto.setResolution(arc.getResolution()); dto.setResolution(arc.getResolution());
dto.setHiddenTruth(arc.getHiddenTruth());
dto.setHooks(arc.getHooks());
dto.setRelatedPageIds(copyList(arc.getRelatedPageIds())); dto.setRelatedPageIds(copyList(arc.getRelatedPageIds()));
dto.setIllustrationImageIds(copyList(arc.getIllustrationImageIds())); dto.setIllustrationImageIds(copyList(arc.getIllustrationImageIds()));
return dto; return dto;
@@ -55,6 +57,8 @@ public class ArcMapper {
.gmNotes(dto.getGmNotes()) .gmNotes(dto.getGmNotes())
.rewards(dto.getRewards()) .rewards(dto.getRewards())
.resolution(dto.getResolution()) .resolution(dto.getResolution())
.hiddenTruth(dto.getHiddenTruth())
.hooks(dto.getHooks())
.relatedPageIds(copyList(dto.getRelatedPageIds())) .relatedPageIds(copyList(dto.getRelatedPageIds()))
.illustrationImageIds(copyList(dto.getIllustrationImageIds())) .illustrationImageIds(copyList(dto.getIllustrationImageIds()))
.build(); .build();
@@ -23,6 +23,7 @@ public class NpcMapper {
dto.setCampaignId(n.getCampaignId()); dto.setCampaignId(n.getCampaignId());
dto.setRelatedPageIds(n.getRelatedPageIds() != null ? new ArrayList<>(n.getRelatedPageIds()) : new ArrayList<>()); dto.setRelatedPageIds(n.getRelatedPageIds() != null ? new ArrayList<>(n.getRelatedPageIds()) : new ArrayList<>());
dto.setFolder(n.getFolder()); dto.setFolder(n.getFolder());
dto.setStory(n.getStory());
dto.setOrder(n.getOrder()); dto.setOrder(n.getOrder());
return dto; return dto;
} }
@@ -40,6 +41,7 @@ public class NpcMapper {
.campaignId(dto.getCampaignId()) .campaignId(dto.getCampaignId())
.relatedPageIds(dto.getRelatedPageIds() != null ? new ArrayList<>(dto.getRelatedPageIds()) : new ArrayList<>()) .relatedPageIds(dto.getRelatedPageIds() != null ? new ArrayList<>(dto.getRelatedPageIds()) : new ArrayList<>())
.folder(dto.getFolder()) .folder(dto.getFolder())
.story(dto.getStory())
.order(dto.getOrder()) .order(dto.getOrder())
.build(); .build();
} }
@@ -43,6 +43,8 @@ public class SceneMapper {
dto.setGmSecretNotes(scene.getGmSecretNotes()); dto.setGmSecretNotes(scene.getGmSecretNotes());
dto.setChoicesConsequences(scene.getChoicesConsequences()); dto.setChoicesConsequences(scene.getChoicesConsequences());
dto.setCombatDifficulty(scene.getCombatDifficulty()); dto.setCombatDifficulty(scene.getCombatDifficulty());
dto.setTactics(scene.getTactics());
dto.setPurpose(scene.getPurpose());
dto.setEnemies(scene.getEnemies()); dto.setEnemies(scene.getEnemies());
dto.setEnemyIds(scene.getEnemyIds() != null dto.setEnemyIds(scene.getEnemyIds() != null
? new ArrayList<>(scene.getEnemyIds()) ? new ArrayList<>(scene.getEnemyIds())
@@ -81,6 +83,8 @@ public class SceneMapper {
.gmSecretNotes(dto.getGmSecretNotes()) .gmSecretNotes(dto.getGmSecretNotes())
.choicesConsequences(dto.getChoicesConsequences()) .choicesConsequences(dto.getChoicesConsequences())
.combatDifficulty(dto.getCombatDifficulty()) .combatDifficulty(dto.getCombatDifficulty())
.tactics(dto.getTactics())
.purpose(dto.getPurpose())
.enemies(dto.getEnemies()) .enemies(dto.getEnemies())
.enemyIds(dto.getEnemyIds() != null .enemyIds(dto.getEnemyIds() != null
? new ArrayList<>(dto.getEnemyIds()) ? new ArrayList<>(dto.getEnemyIds())
@@ -0,0 +1,9 @@
-- Champs d'écriture (mentor) :
-- scène : tactique et moral des adversaires, utilité (ce qu'on perd si on la coupe) ;
-- arc : histoire cachée, accroches ;
-- PNJ : fiche « rôle dans l'histoire » (rôle, motivation, ce qu'il sait, signe distinctif) en JSON.
ALTER TABLE scenes ADD COLUMN tactics TEXT;
ALTER TABLE scenes ADD COLUMN purpose TEXT;
ALTER TABLE arcs ADD COLUMN hidden_truth TEXT;
ALTER TABLE arcs ADD COLUMN hooks TEXT;
ALTER TABLE npcs ADD COLUMN story TEXT;
@@ -4,6 +4,9 @@ import com.loremind.domain.campaigncontext.Campaign;
import com.loremind.domain.campaigncontext.ports.ArcRepository; import com.loremind.domain.campaigncontext.ports.ArcRepository;
import com.loremind.domain.campaigncontext.ports.CampaignRepository; import com.loremind.domain.campaigncontext.ports.CampaignRepository;
import com.loremind.domain.campaigncontext.ports.ChapterRepository; import com.loremind.domain.campaigncontext.ports.ChapterRepository;
import com.loremind.domain.campaigncontext.bestiary.Npc;
import com.loremind.domain.campaigncontext.bestiary.NpcStory;
import com.loremind.domain.campaigncontext.ports.NpcRepository;
import com.loremind.domain.campaigncontext.ports.QuestRepository; import com.loremind.domain.campaigncontext.ports.QuestRepository;
import com.loremind.domain.campaigncontext.ports.SceneRepository; import com.loremind.domain.campaigncontext.ports.SceneRepository;
import com.loremind.domain.campaigncontext.quest.Quest; import com.loremind.domain.campaigncontext.quest.Quest;
@@ -47,6 +50,7 @@ class WritingReviewServiceTest {
@Mock private ChapterRepository chapterRepository; @Mock private ChapterRepository chapterRepository;
@Mock private SceneRepository sceneRepository; @Mock private SceneRepository sceneRepository;
@Mock private QuestRepository questRepository; @Mock private QuestRepository questRepository;
@Mock private NpcRepository npcRepository;
@InjectMocks private WritingReviewService service; @InjectMocks private WritingReviewService service;
@@ -459,4 +463,53 @@ class WritingReviewServiceTest {
assertEquals("3", r.params().get("count")); assertEquals("3", r.params().get("count"));
assertFalse(ruleIds().contains("WRITE-003-SINGLE-CLUE")); assertFalse(ruleIds().contains("WRITE-003-SINGLE-CLUE"));
} }
// --- WRITE-008 : la tactique des adversaires donne un but au combat ---
@Test
void combatPurpose_notRaised_whenTacticsAreWritten() {
tree(List.of(scene("fight", 0).type(SceneType.ENCOUNTER).choicesConsequences(null)
.tactics("Ils fuient dès que leur chef tombe").build()));
assertFalse(ruleIds().contains("WRITE-008-COMBAT-NO-PURPOSE"));
}
// --- WRITE-016 : opposant ou allié sans motivation ---
@Test
void npcWithoutMotivation_onlyForPlotDrivingRoles() {
when(npcRepository.findByCampaignId(CAMP)).thenReturn(List.of(
Npc.builder().id("n1").name("Ysolde").story(new NpcStory("OPPONENT", " ", null, null)).build(),
Npc.builder().id("n2").name("Borin").story(new NpcStory("ALLY", "Protéger sa fille", null, null)).build(),
Npc.builder().id("n3").name("Le passant").story(new NpcStory("EXTRA", null, null, null)).build(),
Npc.builder().id("n4").name("Sans fiche").build()));
List<WritingRemark> remarks = service.review(CAMP).remarks().stream()
.filter(r -> r.ruleId().equals("WRITE-016-NPC-NO-MOTIVATION")).toList();
assertEquals(1, remarks.size());
assertEquals("n1", remarks.get(0).entityId());
assertEquals(ReadinessEntityType.NPC, remarks.get(0).entityType());
assertEquals("OPPONENT", remarks.get(0).params().get("role"));
}
// --- WRITE-017 : une seule accroche ---
@Test
void singleHook_whenTheArcHasExactlyOne() {
Arc arc = arc("arc", ArcType.HUB);
arc.setHooks("- Le prêtre a disparu");
tree(arc, chapter("chap", "arc"), List.of(scene("s1", 0).build()));
assertEquals(ReadinessEntityType.ARC, remark("WRITE-017-SINGLE-HOOK").entityType());
}
@Test
void singleHook_notRaised_withSeveralHooks_orNone() {
Arc several = arc("arc", ArcType.HUB);
several.setHooks("- Le prêtre a disparu\n\n- Une récompense est offerte");
tree(several, chapter("chap", "arc"), List.of(scene("s1", 0).build()));
assertFalse(ruleIds().contains("WRITE-017-SINGLE-HOOK"));
Arc none = arc("arc", ArcType.HUB);
tree(none, chapter("chap", "arc"), List.of(scene("s1", 0).build()));
assertFalse(ruleIds().contains("WRITE-017-SINGLE-HOOK"), "accroches non renseignées : pas de remarque");
}
} }
@@ -0,0 +1,29 @@
package com.loremind.domain.campaigncontext.bestiary;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
/** Fiche « rôle dans l'histoire » d'un PNJ : nettoyage et rôle moteur de l'intrigue. */
class NpcStoryTest {
@Test
void normalized_cleansRoleAndTexts() {
NpcStory s = new NpcStory(" ally ", " Venger son frère ", " ", "x".repeat(400)).normalized();
assertEquals("ALLY", s.role());
assertEquals("Venger son frère", s.motivation());
assertNull(s.knowledge());
assertEquals(300, s.mannerism().length());
assertNull(new NpcStory("BOSS", null, null, null).normalized().role(), "rôle inconnu écarté");
}
@Test
void contentAndPlotRole() {
assertFalse(new NpcStory(" ", "", null, null).hasContent());
assertTrue(new NpcStory(null, null, null, "Se gratte la barbe").hasContent());
assertTrue(new NpcStory("OPPONENT", null, null, null).drivesThePlot());
assertTrue(new NpcStory("ally", null, null, null).drivesThePlot());
assertFalse(new NpcStory("EXTRA", null, null, null).drivesThePlot());
assertFalse(new NpcStory(null, "x", null, null).drivesThePlot());
}
}
@@ -165,6 +165,7 @@ class ContentExportImportRoundTripTest {
ArcJpaEntity arc = arcRepo.save(ArcJpaEntity.builder() ArcJpaEntity arc = arcRepo.save(ArcJpaEntity.builder()
.name("RT Arc").campaignId(campaign.getId()).order(0).type(ArcType.HUB) .name("RT Arc").campaignId(campaign.getId()).order(0).type(ArcType.HUB)
.hiddenTruth("RT vérité").hooks("- RT accroche 1\n- RT accroche 2")
.relatedPageIds(new ArrayList<>(List.of(String.valueOf(page.getId())))) .relatedPageIds(new ArrayList<>(List.of(String.valueOf(page.getId()))))
.illustrationImageIds(new ArrayList<>(List.of(imageRef))).build()); .illustrationImageIds(new ArrayList<>(List.of(imageRef))).build());
@@ -189,6 +190,7 @@ class ContentExportImportRoundTripTest {
sceneRepo.save(SceneJpaEntity.builder() sceneRepo.save(SceneJpaEntity.builder()
.name("RT Scene").chapterId(chapterB.getId()).order(0) .name("RT Scene").chapterId(chapterB.getId()).order(0)
.tactics("RT fuient à la moitié").purpose("RT révèle le traître")
.enemyIds(new ArrayList<>(List.of(String.valueOf(enemy.getId())))) .enemyIds(new ArrayList<>(List.of(String.valueOf(enemy.getId()))))
.relatedPageIds(new ArrayList<>(List.of(String.valueOf(page.getId())))) .relatedPageIds(new ArrayList<>(List.of(String.valueOf(page.getId()))))
.illustrationImageIds(new ArrayList<>(List.of(imageRef))) .illustrationImageIds(new ArrayList<>(List.of(imageRef)))
@@ -198,6 +200,7 @@ class ContentExportImportRoundTripTest {
npcRepo.save(NpcJpaEntity.builder() npcRepo.save(NpcJpaEntity.builder()
.name("RT Npc").campaignId(campaign.getId()).portraitImageId(imageRef).folder("Ville").order(0) .name("RT Npc").campaignId(campaign.getId()).portraitImageId(imageRef).folder("Ville").order(0)
.story(new com.loremind.domain.campaigncontext.bestiary.NpcStory("ALLY", "RT venger son frère", null, "RT tic"))
.relatedPageIds(new ArrayList<>(List.of(String.valueOf(page.getId())))).build()); .relatedPageIds(new ArrayList<>(List.of(String.valueOf(page.getId())))).build());
ItemCatalogJpaEntity catalog = ItemCatalogJpaEntity.builder() ItemCatalogJpaEntity catalog = ItemCatalogJpaEntity.builder()
@@ -353,6 +356,18 @@ class ContentExportImportRoundTripTest {
assertEquals((int) playthroughsBefore, result.created().get("playthroughs")); assertEquals((int) playthroughsBefore, result.created().get("playthroughs"));
} }
@Test
void import_keepsStoryFields_ofArcsScenesAndNpcs() {
assertEquals("RT vérité", importedArc.getHiddenTruth());
assertTrue(importedArc.getHooks().contains("RT accroche 2"));
assertEquals(2, rtScenes.size());
assertTrue(rtScenes.stream().allMatch(s -> "RT fuient à la moitié".equals(s.getTactics())
&& "RT révèle le traître".equals(s.getPurpose())));
List<NpcJpaEntity> npcs = npcRepo.findAll().stream().filter(n -> "RT Npc".equals(n.getName())).toList();
assertEquals(2, npcs.size());
assertTrue(npcs.stream().allMatch(n -> n.getStory() != null && "RT venger son frère".equals(n.getStory().motivation())));
}
@Test @Test
void import_remapsPrepEntities_arcPointsToImportedPage() { void import_remapsPrepEntities_arcPointsToImportedPage() {
assertTrue(importedArc.getRelatedPageIds().contains(String.valueOf(importedPageId))); assertTrue(importedArc.getRelatedPageIds().contains(String.valueOf(importedPageId)));
@@ -0,0 +1,78 @@
package com.loremind.infrastructure.transfer.pdf;
import com.loremind.domain.campaigncontext.bestiary.NpcStory;
import com.loremind.domain.campaigncontext.structure.SceneType;
import com.loremind.infrastructure.persistence.entity.*;
import com.loremind.infrastructure.persistence.jpa.*;
import com.loremind.infrastructure.transfer.pdf.PdfExportOptions.LoreScope;
import com.loremind.infrastructure.transfer.pdf.PdfExportOptions.PageFormat;
import com.loremind.infrastructure.transfer.pdf.PdfExportOptions.Section;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.transaction.annotation.Transactional;
import java.util.EnumSet;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;
/**
* Champs d'écriture dans le livret : histoire cachée et accroches de l'arc, utilité et
* tactique des scènes, rôle dans l'histoire des PNJ — secrets réservés à la version MJ,
* signe distinctif visible de tous.
*/
@SpringBootTest
@Transactional
class PdfExportStoryFieldsTest {
@Autowired private PdfExportService service;
@Autowired private CampaignJpaRepository campaignRepo;
@Autowired private ArcJpaRepository arcRepo;
@Autowired private ChapterJpaRepository chapterRepo;
@Autowired private SceneJpaRepository sceneRepo;
@Autowired private NpcJpaRepository npcRepo;
private String campaignId;
@BeforeEach
void seed() {
CampaignJpaEntity camp = campaignRepo.save(CampaignJpaEntity.builder().name("Récit").arcsCount(1).build());
campaignId = String.valueOf(camp.getId());
ArcJpaEntity arc = arcRepo.save(ArcJpaEntity.builder().name("Acte I").campaignId(camp.getId()).order(0)
.hiddenTruth("Le régent a empoisonné le roi.").hooks("- Un ami disparaît\n- Une prime est offerte").build());
ChapterJpaEntity ch = chapterRepo.save(ChapterJpaEntity.builder().name("Chap").arcId(arc.getId()).order(0).build());
chapterRepo.save(ChapterJpaEntity.builder().name("Chap 2").arcId(arc.getId()).order(1).build());
sceneRepo.save(SceneJpaEntity.builder().name("L'embuscade").chapterId(ch.getId()).order(0)
.type(SceneType.ENCOUNTER).combatDifficulty("Moyenne")
.purpose("Montrer que le régent a des hommes partout.")
.tactics("Ils fuient dès que leur sergent tombe.").build());
npcRepo.save(NpcJpaEntity.builder().campaignId(camp.getId()).name("Ysolde").order(0)
.story(new NpcStory("OPPONENT", "Garder le trône.", "Où est caché le prince.", "Tapote sa bague."))
.build());
}
@Test
void gmEdition_showsEveryStoryField() {
String x = service.xhtml(campaignId, PdfExportOptions.defaults());
for (String s : List.of("Histoire cachée", "Le régent a empoisonné le roi.", ">Accroches<", "Une prime est offerte",
">Utilité<", "Montrer que le régent a des hommes partout.",
"Tactique et moral", "Ils fuient dès que leur sergent tombe.",
">Opposant<", "Garder le trône.", "Où est caché le prince.", "Tapote sa bague.")) {
assertTrue(x.contains(s), "absent de la version MJ : " + s);
}
}
@Test
void playerEdition_keepsOnlyTheMannerism() {
String x = service.xhtml(campaignId, new PdfExportOptions(false, PageFormat.A4, false,
EnumSet.allOf(Section.class), LoreScope.ALL));
assertTrue(x.contains("Tapote sa bague."), "le signe distinctif se voit");
for (String s : List.of("Le régent a empoisonné le roi.", "Une prime est offerte",
"Montrer que le régent a des hommes partout.", "Ils fuient dès que leur sergent tombe.",
">Opposant<", "Garder le trône.", "Où est caché le prince.")) {
assertFalse(x.contains(s), "secret présent dans la version joueurs : " + s);
}
}
}
@@ -95,6 +95,35 @@
</app-expandable-section> </app-expandable-section>
<!-- Thèmes et enjeux --> <!-- Thèmes et enjeux -->
<!-- Histoire cachée et accroches : la vérité que les joueurs découvriront, et pourquoi ils s'en mêlent. -->
<app-expandable-section [title]="'arcEdit.truthHooksSectionTitle' | translate" icon="🗝️" [initiallyOpen]="focusSection === 'hooks'" [filled]="truthHooksFilled">
<div class="field">
<div class="field-label-row">
<label for="arc-edit-hidden-truth">{{ 'arcEdit.hiddenTruthLabel' | translate }}</label>
<app-writing-coach-trigger topic="arc.hiddenTruth"></app-writing-coach-trigger>
</div>
<textarea
id="arc-edit-hidden-truth"
formControlName="hiddenTruth"
[placeholder]="'arcEdit.hiddenTruthPlaceholder' | translate"
rows="4">
</textarea>
</div>
<div class="field">
<div class="field-label-row">
<label for="arc-edit-hooks">{{ 'arcEdit.hooksLabel' | translate }}</label>
<app-writing-coach-trigger topic="arc.hooks"></app-writing-coach-trigger>
</div>
<textarea
id="arc-edit-hooks"
formControlName="hooks"
[placeholder]="'arcEdit.hooksPlaceholder' | translate"
rows="4">
</textarea>
<small class="field-hint">{{ 'arcEdit.hooksHint' | translate }}</small>
</div>
</app-expandable-section>
<app-expandable-section [title]="'arcEdit.themesStakesSectionTitle' | translate" icon="🎭" [initiallyOpen]="focusSection === 'stakes'" [filled]="themesStakesFilled"> <app-expandable-section [title]="'arcEdit.themesStakesSectionTitle' | translate" icon="🎭" [initiallyOpen]="focusSection === 'stakes'" [filled]="themesStakesFilled">
<div class="field-row"> <div class="field-row">
<div class="field"> <div class="field">
@@ -97,6 +97,10 @@ export class ArcEditComponent implements OnInit {
return !!(v.themes || v.stakes); return !!(v.themes || v.stakes);
} }
get gmNotesFilled(): boolean { return !!this.form.value.gmNotes; } get gmNotesFilled(): boolean { return !!this.form.value.gmNotes; }
get truthHooksFilled(): boolean {
const v = this.form.value;
return !!(v.hiddenTruth || v.hooks);
}
get rewardsResolutionFilled(): boolean { get rewardsResolutionFilled(): boolean {
const v = this.form.value; const v = this.form.value;
return !!(v.rewards || v.resolution); return !!(v.rewards || v.resolution);
@@ -126,7 +130,9 @@ export class ArcEditComponent implements OnInit {
stakes: [''], stakes: [''],
gmNotes: [''], gmNotes: [''],
rewards: [''], rewards: [''],
resolution: [''] resolution: [''],
hiddenTruth: [''],
hooks: ['']
}); });
} }
@@ -179,7 +185,9 @@ export class ArcEditComponent implements OnInit {
stakes: arc.stakes ?? '', stakes: arc.stakes ?? '',
gmNotes: arc.gmNotes ?? '', gmNotes: arc.gmNotes ?? '',
rewards: arc.rewards ?? '', rewards: arc.rewards ?? '',
resolution: arc.resolution ?? '' resolution: arc.resolution ?? '',
hiddenTruth: arc.hiddenTruth ?? '',
hooks: arc.hooks ?? ''
}); });
this.layoutService.show(buildCampaignSidebarConfig(campaign, allCampaigns, treeData, this.campaignId, this.translate)); this.layoutService.show(buildCampaignSidebarConfig(campaign, allCampaigns, treeData, this.campaignId, this.translate));
@@ -199,6 +207,8 @@ export class ArcEditComponent implements OnInit {
gmNotes: this.form.value.gmNotes, gmNotes: this.form.value.gmNotes,
rewards: this.form.value.rewards, rewards: this.form.value.rewards,
resolution: this.form.value.resolution, resolution: this.form.value.resolution,
hiddenTruth: this.form.value.hiddenTruth,
hooks: this.form.value.hooks,
relatedPageIds: this.relatedPageIds, relatedPageIds: this.relatedPageIds,
illustrationImageIds: this.illustrationImageIds, illustrationImageIds: this.illustrationImageIds,
icon: this.selectedIcon icon: this.selectedIcon
@@ -84,6 +84,18 @@
} }
</section> </section>
</div> </div>
@if (arc.hooks?.trim()) {
<section class="view-section">
<h2 class="view-section-title"><span class="view-section-icon">🪝</span> {{ 'arcView.hooksTitle' | translate }}</h2>
<p class="view-section-body">{{ arc.hooks }}</p>
</section>
}
@if (arc.hiddenTruth?.trim()) {
<section class="view-section view-section--private">
<h2 class="view-section-title"><span class="view-section-icon">🗝️</span> {{ 'arcView.hiddenTruthTitle' | translate }}</h2>
<p class="view-section-body">{{ arc.hiddenTruth }}</p>
</section>
}
<section class="view-section"> <section class="view-section">
<h2 class="view-section-title"><span class="view-section-icon">🎁</span> {{ 'arcView.rewardsTitle' | translate }}</h2> <h2 class="view-section-title"><span class="view-section-icon">🎁</span> {{ 'arcView.rewardsTitle' | translate }}</h2>
@if (arc.rewards?.trim()) { @if (arc.rewards?.trim()) {
@@ -87,6 +87,48 @@
</app-dynamic-fields-form> </app-dynamic-fields-form>
</div> </div>
<!-- Rôle dans l'histoire : indépendant du système de jeu (le gabarit porte les caractéristiques). -->
<fieldset class="story-block">
<legend>{{ 'npcEdit.storyTitle' | translate }}</legend>
<p class="hint">{{ 'npcEdit.storyHint' | translate }}</p>
<div class="field">
<div class="field-label-row">
<label for="npc-role">{{ 'npcEdit.roleLabel' | translate }}</label>
<app-writing-coach-trigger topic="npc.role"></app-writing-coach-trigger>
</div>
<select id="npc-role" name="role" [(ngModel)]="story.role">
<option [ngValue]="null">{{ 'npcEdit.roleNone' | translate }}</option>
@for (r of roles; track r) {
<option [ngValue]="r">{{ ('npcEdit.role.' + r) | translate }}</option>
}
</select>
</div>
<div class="field">
<div class="field-label-row">
<label for="npc-motivation">{{ 'npcEdit.motivationLabel' | translate }}</label>
<app-writing-coach-trigger topic="npc.motivation"></app-writing-coach-trigger>
</div>
<textarea id="npc-motivation" name="motivation" rows="3" [(ngModel)]="story.motivation"
[placeholder]="'npcEdit.motivationPlaceholder' | translate"></textarea>
</div>
<div class="field">
<div class="field-label-row">
<label for="npc-knowledge">{{ 'npcEdit.knowledgeLabel' | translate }}</label>
<app-writing-coach-trigger topic="npc.knowledge"></app-writing-coach-trigger>
</div>
<textarea id="npc-knowledge" name="knowledge" rows="3" [(ngModel)]="story.knowledge"
[placeholder]="'npcEdit.knowledgePlaceholder' | translate"></textarea>
</div>
<div class="field">
<div class="field-label-row">
<label for="npc-mannerism">{{ 'npcEdit.mannerismLabel' | translate }}</label>
<app-writing-coach-trigger topic="npc.mannerism"></app-writing-coach-trigger>
</div>
<input id="npc-mannerism" name="mannerism" type="text" [(ngModel)]="story.mannerism"
[placeholder]="'npcEdit.mannerismPlaceholder' | translate" />
</div>
</fieldset>
<!-- Pages de Lore liées (uniquement si la campagne est rattachée à un Lore) --> <!-- Pages de Lore liées (uniquement si la campagne est rattachée à un Lore) -->
@if (loreId) { @if (loreId) {
<div class="field"> <div class="field">
@@ -155,3 +155,23 @@
background: rgba(248, 113, 113, 0.08); background: rgba(248, 113, 113, 0.08);
} }
} }
// Rôle dans l'histoire : bloc encadré, indépendant des champs du système de jeu.
.story-block {
border: 1px solid #1f2937;
border-radius: 10px;
padding: 0.9rem 1rem 1rem;
margin: 1rem 0;
display: flex;
flex-direction: column;
gap: 0.9rem;
legend {
padding: 0 0.4rem;
color: #e5e7eb;
font-weight: 600;
font-size: 0.95rem;
}
.hint { margin: 0; }
}
@@ -5,6 +5,7 @@ import { FormsModule } from '@angular/forms';
import { LucideAngularModule, Save, ArrowLeft, Drama, Trash2, Sparkles } from 'lucide-angular'; import { LucideAngularModule, Save, ArrowLeft, Drama, Trash2, Sparkles } from 'lucide-angular';
import { TranslatePipe, TranslateService } from '@ngx-translate/core'; import { TranslatePipe, TranslateService } from '@ngx-translate/core';
import { NpcService } from '../../../services/npc.service'; import { NpcService } from '../../../services/npc.service';
import { NPC_ROLES, NpcStory } from '../../../services/npc.model';
import { CampaignService } from '../../../services/campaign.service'; import { CampaignService } from '../../../services/campaign.service';
import { GameSystemService } from '../../../services/game-system.service'; import { GameSystemService } from '../../../services/game-system.service';
import { PageService } from '../../../services/page.service'; import { PageService } from '../../../services/page.service';
@@ -16,6 +17,7 @@ import { DynamicFieldsFormComponent } from '../../../shared/dynamic-fields-form/
import { SingleImagePickerComponent } from '../../../shared/single-image-picker/single-image-picker.component'; import { SingleImagePickerComponent } from '../../../shared/single-image-picker/single-image-picker.component';
import { LoreLinkPickerComponent } from '../../../shared/lore-link-picker/lore-link-picker.component'; import { LoreLinkPickerComponent } from '../../../shared/lore-link-picker/lore-link-picker.component';
import { ConfirmDialogService } from '../../../shared/confirm-dialog/confirm-dialog.service'; import { ConfirmDialogService } from '../../../shared/confirm-dialog/confirm-dialog.service';
import { WritingCoachTriggerComponent } from '../../../shared/writing-coach/writing-coach-trigger.component';
/** /**
* Editeur plein ecran d'une fiche de PNJ. * Editeur plein ecran d'une fiche de PNJ.
@@ -25,7 +27,7 @@ import { ConfirmDialogService } from '../../../shared/confirm-dialog/confirm-dia
*/ */
@Component({ @Component({
selector: 'app-npc-edit', selector: 'app-npc-edit',
imports: [FormsModule, LucideAngularModule, TranslatePipe, AiChatDrawerComponent, DynamicFieldsFormComponent, SingleImagePickerComponent, LoreLinkPickerComponent], imports: [FormsModule, LucideAngularModule, TranslatePipe, AiChatDrawerComponent, DynamicFieldsFormComponent, SingleImagePickerComponent, LoreLinkPickerComponent, WritingCoachTriggerComponent],
templateUrl: './npc-edit.component.html', templateUrl: './npc-edit.component.html',
styleUrls: ['./npc-edit.component.scss'] styleUrls: ['./npc-edit.component.scss']
}) })
@@ -68,6 +70,9 @@ export class NpcEditComponent implements OnInit {
lorePages: Page[] = []; lorePages: Page[] = [];
/** IDs des pages de lore référencées par ce PNJ. */ /** IDs des pages de lore référencées par ce PNJ. */
relatedPageIds: string[] = []; relatedPageIds: string[] = [];
/** Rôle dans l'histoire (fiche indépendante du système de jeu). */
story: NpcStory = { role: null };
readonly roles = NPC_ROLES;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
@@ -103,6 +108,7 @@ export class NpcEditComponent implements OnInit {
this.imageValues = n.imageValues ?? {}; this.imageValues = n.imageValues ?? {};
this.keyValueValues = n.keyValueValues ?? {}; this.keyValueValues = n.keyValueValues ?? {};
this.relatedPageIds = [...(n.relatedPageIds ?? [])]; this.relatedPageIds = [...(n.relatedPageIds ?? [])];
this.story = { ...(n.story ?? {}), role: n.story?.role ?? null };
this.order = n.order ?? 0; this.order = n.order ?? 0;
}, },
error: () => this.back() error: () => this.back()
@@ -157,7 +163,8 @@ export class NpcEditComponent implements OnInit {
imageValues: this.imageValues, imageValues: this.imageValues,
keyValueValues: this.keyValueValues, keyValueValues: this.keyValueValues,
campaignId: this.campaignId, campaignId: this.campaignId,
relatedPageIds: this.relatedPageIds relatedPageIds: this.relatedPageIds,
story: { ...this.story, role: this.story.role || null }
}; };
const isCreation = !this.npcId; const isCreation = !this.npcId;
const req = this.npcId const req = this.npcId
@@ -19,6 +19,26 @@
<app-persona-view [persona]="npc" [templateFields]="templateFields"></app-persona-view> <app-persona-view [persona]="npc" [templateFields]="templateFields"></app-persona-view>
@if (npc?.story; as story) {
<section class="nv-story">
<h2 class="nv-story-title">
{{ 'npcView.storyTitle' | translate }}
@if (story.role) {
<span class="nv-role">{{ ('npcEdit.role.' + story.role) | translate }}</span>
}
</h2>
@if (story.mannerism) {
<p><strong>{{ 'npcEdit.mannerismLabel' | translate }} :</strong> {{ story.mannerism }}</p>
}
@if (story.motivation) {
<p><strong>{{ 'npcEdit.motivationLabel' | translate }} :</strong> {{ story.motivation }}</p>
}
@if (story.knowledge) {
<p class="nv-private"><strong>{{ 'npcEdit.knowledgeLabel' | translate }} :</strong> {{ story.knowledge }}</p>
}
</section>
}
<!-- Pages de Lore liées à ce PNJ (sa ville, sa faction…) --> <!-- Pages de Lore liées à ce PNJ (sa ville, sa faction…) -->
@if (loreId && (npc?.relatedPageIds?.length ?? 0) > 0) { @if (loreId && (npc?.relatedPageIds?.length ?? 0) > 0) {
<section class="nv-lore-links"> <section class="nv-lore-links">
@@ -92,3 +92,39 @@
} }
} }
} }
// Fiche « rôle dans l'histoire » (indépendante du système de jeu).
.nv-story {
margin: 1.25rem 0;
padding: 0.9rem 1rem;
border: 1px solid #1f2937;
border-radius: 10px;
background: #111827;
p { margin: 0.35rem 0; color: #d1d5db; line-height: 1.5; white-space: pre-line; }
strong { color: #e5e7eb; }
}
.nv-story-title {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.95rem;
color: white;
margin: 0 0 0.4rem;
}
.nv-role {
font-size: 0.72rem;
text-transform: uppercase;
letter-spacing: 0.05em;
padding: 0.1rem 0.5rem;
border-radius: 999px;
background: rgba(108, 99, 255, 0.15);
color: #c7d2fe;
}
.nv-private {
border-left: 2px dashed #ab9fd6;
padding-left: 0.6rem;
}
@@ -64,6 +64,20 @@
</textarea> </textarea>
</div> </div>
<!-- Utilité : ce que l'histoire perd si on coupe la scène (aide à trier et à rythmer). -->
<div class="field">
<div class="field-label-row">
<label for="scene-edit-purpose">{{ 'sceneEdit.purposeLabel' | translate }}</label>
<app-writing-coach-trigger topic="scene.purpose"></app-writing-coach-trigger>
</div>
<textarea
id="scene-edit-purpose"
formControlName="purpose"
[placeholder]="'sceneEdit.purposePlaceholder' | translate"
rows="2">
</textarea>
</div>
<div class="field"> <div class="field">
<label>{{ 'sceneEdit.iconLabel' | translate }}</label> <label>{{ 'sceneEdit.iconLabel' | translate }}</label>
<app-icon-picker [options]="campaignIconOptions" [(selected)]="selectedIcon"></app-icon-picker> <app-icon-picker [options]="campaignIconOptions" [(selected)]="selectedIcon"></app-icon-picker>
@@ -348,6 +362,18 @@
rows="4"> rows="4">
</textarea> </textarea>
</div> </div>
<div class="field">
<div class="field-label-row">
<label for="scene-edit-tactics">{{ 'sceneEdit.tacticsLabel' | translate }}</label>
<app-writing-coach-trigger topic="scene.tactics"></app-writing-coach-trigger>
</div>
<textarea
id="scene-edit-tactics"
formControlName="tactics"
[placeholder]="'sceneEdit.tacticsPlaceholder' | translate"
rows="3">
</textarea>
</div>
</app-expandable-section> </app-expandable-section>
<!-- Section : Pages Lore associées (B2 cross-context) --> <!-- Section : Pages Lore associées (B2 cross-context) -->
@@ -154,7 +154,7 @@ export class SceneEditComponent implements OnInit {
get branchesFilled(): boolean { return this.branches.length > 0; } get branchesFilled(): boolean { return this.branches.length > 0; }
get combatFilled(): boolean { get combatFilled(): boolean {
const v = this.form.value; const v = this.form.value;
return !!(v.combatDifficulty || v.enemies) || this.enemyIds.length > 0; return !!(v.combatDifficulty || v.enemies || v.tactics) || this.enemyIds.length > 0;
} }
get loreFilled(): boolean { return this.relatedPageIds.length > 0; } get loreFilled(): boolean { return this.relatedPageIds.length > 0; }
get dungeonFilled(): boolean { return this.rooms.length > 0; } get dungeonFilled(): boolean { return this.rooms.length > 0; }
@@ -191,7 +191,10 @@ export class SceneEditComponent implements OnInit {
choicesConsequences: [''], choicesConsequences: [''],
// Combat // Combat
combatDifficulty: [''], combatDifficulty: [''],
enemies: [''] enemies: [''],
tactics: [''],
// Utilité dans l'histoire
purpose: ['']
}); });
} }
@@ -281,7 +284,9 @@ export class SceneEditComponent implements OnInit {
gmSecretNotes: scene.gmSecretNotes ?? '', gmSecretNotes: scene.gmSecretNotes ?? '',
choicesConsequences: scene.choicesConsequences ?? '', choicesConsequences: scene.choicesConsequences ?? '',
combatDifficulty: scene.combatDifficulty ?? '', combatDifficulty: scene.combatDifficulty ?? '',
enemies: scene.enemies ?? '' enemies: scene.enemies ?? '',
tactics: scene.tactics ?? '',
purpose: scene.purpose ?? ''
}); });
this.layoutService.show(buildCampaignSidebarConfig(campaign, allCampaigns, treeData, this.campaignId, this.translate)); this.layoutService.show(buildCampaignSidebarConfig(campaign, allCampaigns, treeData, this.campaignId, this.translate));
@@ -304,6 +309,8 @@ export class SceneEditComponent implements OnInit {
choicesConsequences: this.form.value.choicesConsequences, choicesConsequences: this.form.value.choicesConsequences,
combatDifficulty: this.form.value.combatDifficulty, combatDifficulty: this.form.value.combatDifficulty,
enemies: this.form.value.enemies, enemies: this.form.value.enemies,
tactics: this.form.value.tactics,
purpose: this.form.value.purpose,
enemyIds: this.enemyIds, enemyIds: this.enemyIds,
relatedPageIds: this.relatedPageIds, relatedPageIds: this.relatedPageIds,
illustrationImageIds: this.illustrationImageIds, illustrationImageIds: this.illustrationImageIds,
@@ -73,6 +73,12 @@
<p class="view-section-body">{{ scene.choicesConsequences }}</p> <p class="view-section-body">{{ scene.choicesConsequences }}</p>
</section> </section>
} }
@if (scene.purpose?.trim()) {
<section class="view-section">
<h2 class="view-section-title"><span class="view-section-icon">🎯</span> {{ 'sceneView.purposeSectionTitle' | translate }}</h2>
<p class="view-section-body">{{ scene.purpose }}</p>
</section>
}
<!-- Combat ou rencontre --> <!-- Combat ou rencontre -->
@if (scene.combatDifficulty?.trim() || scene.enemies?.trim() || linkedEnemies.length > 0) { @if (scene.combatDifficulty?.trim() || scene.enemies?.trim() || linkedEnemies.length > 0) {
@if (scene.combatDifficulty?.trim()) { @if (scene.combatDifficulty?.trim()) {
@@ -100,6 +106,12 @@
</section> </section>
} }
} }
@if (scene.tactics?.trim()) {
<section class="view-section">
<h2 class="view-section-title"><span class="view-section-icon">🛡️</span> {{ 'sceneView.tacticsSectionTitle' | translate }}</h2>
<p class="view-section-body">{{ scene.tactics }}</p>
</section>
}
<!-- Notes et secrets du MJ (privé) --> <!-- Notes et secrets du MJ (privé) -->
@if (scene.gmSecretNotes?.trim()) { @if (scene.gmSecretNotes?.trim()) {
<section class="view-section view-section--private"> <section class="view-section view-section--private">
@@ -21,6 +21,8 @@ export function remarkAction(remark: WritingRemark, campaignId: string): GapActi
return { link: [...base, 'arcs', remark.arcId ?? '', 'chapters', remark.entityId, 'edit'], queryParams }; return { link: [...base, 'arcs', remark.arcId ?? '', 'chapters', remark.entityId, 'edit'], queryParams };
case 'ARC': case 'ARC':
return { link: [...base, 'arcs', remark.entityId, 'edit'], queryParams }; return { link: [...base, 'arcs', remark.entityId, 'edit'], queryParams };
case 'NPC':
return { link: [...base, 'npcs', remark.entityId, 'edit'] };
default: default:
return { link: base }; return { link: base };
} }
@@ -38,5 +40,6 @@ const FOCUS_BY_RULE: Record<string, string> = {
'WRITE-011-ISOLATED-SCENE': 'branches', 'WRITE-011-ISOLATED-SCENE': 'branches',
'WRITE-012-CHOKEPOINT': 'choices', 'WRITE-012-CHOKEPOINT': 'choices',
'WRITE-013-LINEAR-DUNGEON': 'rooms', 'WRITE-013-LINEAR-DUNGEON': 'rooms',
'WRITE-015-SAME-SOURCE-CLUES': 'branches' 'WRITE-015-SAME-SOURCE-CLUES': 'branches',
'WRITE-017-SINGLE-HOOK': 'hooks'
}; };
+16
View File
@@ -67,6 +67,10 @@ export interface Arc {
gmNotes?: string; gmNotes?: string;
rewards?: string; rewards?: string;
resolution?: string; resolution?: string;
/** Histoire cachée (réservée au MJ). */
hiddenTruth?: string;
/** Accroches : une par ligne. */
hooks?: string;
/** IDs des pages du Lore liées à cet arc (weak cross-context refs). */ /** IDs des pages du Lore liées à cet arc (weak cross-context refs). */
relatedPageIds?: string[]; relatedPageIds?: string[];
@@ -89,6 +93,10 @@ export interface ArcCreate {
gmNotes?: string; gmNotes?: string;
rewards?: string; rewards?: string;
resolution?: string; resolution?: string;
/** Histoire cachée (réservée au MJ). */
hiddenTruth?: string;
/** Accroches : une par ligne. */
hooks?: string;
relatedPageIds?: string[]; relatedPageIds?: string[];
illustrationImageIds?: string[]; illustrationImageIds?: string[];
@@ -297,6 +305,10 @@ export interface Scene {
gmSecretNotes?: string; gmSecretNotes?: string;
choicesConsequences?: string; choicesConsequences?: string;
combatDifficulty?: string; combatDifficulty?: string;
/** Tactique et moral des adversaires. */
tactics?: string;
/** Utilité : ce que l'histoire perd si on coupe la scène. */
purpose?: string;
enemies?: string; enemies?: string;
/** IDs des fiches du bestiaire engagées dans la rencontre (weak refs). */ /** IDs des fiches du bestiaire engagées dans la rencontre (weak refs). */
@@ -340,6 +352,10 @@ export interface SceneCreate {
gmSecretNotes?: string; gmSecretNotes?: string;
choicesConsequences?: string; choicesConsequences?: string;
combatDifficulty?: string; combatDifficulty?: string;
/** Tactique et moral des adversaires. */
tactics?: string;
/** Utilité : ce que l'histoire perd si on coupe la scène. */
purpose?: string;
enemies?: string; enemies?: string;
/** IDs des fiches du bestiaire engagées dans la rencontre (weak refs). */ /** IDs des fiches du bestiaire engagées dans la rencontre (weak refs). */
+19
View File
@@ -16,6 +16,24 @@ export interface Npc {
/** Dossier de classement (ex. « Bard's Gate »). Vide/absent = non classé. */ /** Dossier de classement (ex. « Bard's Gate »). Vide/absent = non classé. */
folder?: string | null; folder?: string | null;
order?: number; order?: number;
/** Rôle dans l'histoire (indépendant du système de jeu). */
story?: NpcStory | null;
}
/** Place d'un PNJ dans l'histoire. */
export type NpcRole = 'OPPONENT' | 'ALLY' | 'RESOURCE' | 'EXTRA';
export const NPC_ROLES: NpcRole[] = ['OPPONENT', 'ALLY', 'RESOURCE', 'EXTRA'];
/** Fiche « rôle dans l'histoire » d'un PNJ (miroir du record Java NpcStory). */
export interface NpcStory {
role?: NpcRole | null;
/** Ce qu'il veut, et ce qu'il est prêt à faire. */
motivation?: string | null;
/** Ce qu'il sait (réservé au MJ). */
knowledge?: string | null;
/** Signe distinctif à jouer (geste, phrasé, tic). */
mannerism?: string | null;
} }
export interface NpcCreate { export interface NpcCreate {
@@ -28,4 +46,5 @@ export interface NpcCreate {
campaignId: string; campaignId: string;
relatedPageIds?: string[]; relatedPageIds?: string[];
folder?: string | null; folder?: string | null;
story?: NpcStory | null;
} }
@@ -25,7 +25,7 @@ describe('writing review content', () => {
const rules = emittedRules(); const rules = emittedRules();
it('finds the rules emitted by the core', () => { it('finds the rules emitted by the core', () => {
expect(rules).toHaveLength(15); expect(rules).toHaveLength(17);
}); });
for (const lang of ['fr', 'en'] as const) { for (const lang of ['fr', 'en'] as const) {
@@ -72,3 +72,19 @@ describe('remarkAction', () => {
expect(remarkAction(r, 'camp').link).toEqual(['/campaigns', 'camp']); expect(remarkAction(r, 'camp').link).toEqual(['/campaigns', 'camp']);
}); });
}); });
describe('remarkAction for NPCs and hooks', () => {
const base: WritingRemark = {
entityType: 'NPC', entityId: 'n1', ruleId: 'WRITE-016-NPC-NO-MOTIVATION',
category: 'STAKES', params: { role: 'OPPONENT' }, arcId: null, chapterId: null
};
it('opens the NPC editor', () => {
expect(remarkAction(base, 'camp')).toEqual({ link: ['/campaigns', 'camp', 'npcs', 'n1', 'edit'] });
});
it('opens the arc editor on the hooks section', () => {
expect(remarkAction({ ...base, entityType: 'ARC', entityId: 'a1', ruleId: 'WRITE-017-SINGLE-HOOK' }, 'camp'))
.toEqual({ link: ['/campaigns', 'camp', 'arcs', 'a1', 'edit'], queryParams: { focus: 'hooks' } });
});
});
+135 -6
View File
@@ -517,7 +517,13 @@
"optionalHint": "Only the title is required. Expand and fill in only the sections you need — everything else is optional.", "optionalHint": "Only the title is required. Expand and fill in only the sections you need — everything else is optional.",
"themesStakesSectionTitle": "Themes and stakes", "themesStakesSectionTitle": "Themes and stakes",
"gmNotesSectionTitle": "GM notes", "gmNotesSectionTitle": "GM notes",
"rewardsResolutionSectionTitle": "Rewards and resolution" "rewardsResolutionSectionTitle": "Rewards and resolution",
"truthHooksSectionTitle": "Hidden truth and hooks",
"hiddenTruthLabel": "Hidden truth (GM only)",
"hiddenTruthPlaceholder": "What really happened, which the players will uncover bit by bit",
"hooksLabel": "Hooks",
"hooksPlaceholder": "- A friend of the characters goes missing\n- A reward is offered for…",
"hooksHint": "One hook per line. Aim for at least two, of different kinds."
}, },
"arcView": { "arcView": {
"subtitleHub": "Hub arc (non-linear quests)", "subtitleHub": "Hub arc (non-linear quests)",
@@ -549,7 +555,9 @@
"deleteConfirmMessage": "Delete the arc \"{{name}}\"?", "deleteConfirmMessage": "Delete the arc \"{{name}}\"?",
"questsTitle": "Quests in this arc", "questsTitle": "Quests in this arc",
"questsEmpty": "No quests yet. Add one to populate this hub.", "questsEmpty": "No quests yet. Add one to populate this hub.",
"createQuest": "New quest" "createQuest": "New quest",
"hooksTitle": "Hooks",
"hiddenTruthTitle": "Hidden truth"
}, },
"campaigns": { "campaigns": {
"heroTitle": "Your Campaigns", "heroTitle": "Your Campaigns",
@@ -1062,7 +1070,11 @@
"branchTargetBroken": "Destination not found (deleted scene): pick a new destination or remove this branch.", "branchTargetBroken": "Destination not found (deleted scene): pick a new destination or remove this branch.",
"battlemapAdd": "Add a map", "battlemapAdd": "Add a map",
"battlemapLabelPlaceholder": "Label (e.g.: Day, Night, Floor 1…)", "battlemapLabelPlaceholder": "Label (e.g.: Day, Night, Floor 1…)",
"battlemapRemoveMap": "Remove this map" "battlemapRemoveMap": "Remove this map",
"purposeLabel": "Purpose of the scene",
"purposePlaceholder": "If it were cut, what would the story lose? (information, a choice, an emotion…)",
"tacticsLabel": "Enemy tactics and morale",
"tacticsPlaceholder": "How they fight, and when they flee, surrender or negotiate"
}, },
"sceneView": { "sceneView": {
"subtitle": "Scene", "subtitle": "Scene",
@@ -1092,7 +1104,9 @@
"deleteTitle": "Delete scene", "deleteTitle": "Delete scene",
"deleteMessage": "Delete the scene \"{{name}}\"?", "deleteMessage": "Delete the scene \"{{name}}\"?",
"deleteIrreversible": "This action is irreversible.", "deleteIrreversible": "This action is irreversible.",
"deleteError": "Error while deleting the scene" "deleteError": "Error while deleting the scene",
"purposeSectionTitle": "Purpose",
"tacticsSectionTitle": "Tactics and morale"
}, },
"characterEdit": { "characterEdit": {
"backToCampaign": "Back to campaign", "backToCampaign": "Back to campaign",
@@ -1139,7 +1153,23 @@
"chatSuggestion3": "Imagine 3 signature lines that characterize them", "chatSuggestion3": "Imagine 3 signature lines that characterize them",
"deleteTitle": "Delete this sheet?", "deleteTitle": "Delete this sheet?",
"deleteMessage": "Delete the sheet for \"{{name}}\"?", "deleteMessage": "Delete the sheet for \"{{name}}\"?",
"irreversible": "This action is irreversible." "irreversible": "This action is irreversible.",
"storyTitle": "Role in the story",
"storyHint": "Independent of the game system: what makes this NPC playable and useful to the story.",
"roleLabel": "Role",
"roleNone": "Not set",
"role": {
"OPPONENT": "Opponent",
"ALLY": "Ally",
"RESOURCE": "Resource (informant, service)",
"EXTRA": "Extra"
},
"motivationLabel": "Motivation",
"motivationPlaceholder": "What they want, and what they're willing to do to get it",
"knowledgeLabel": "What they know (GM only)",
"knowledgePlaceholder": "The information they can reveal, and on what condition",
"mannerismLabel": "Distinctive trait",
"mannerismPlaceholder": "A gesture, a way of speaking, a tic to play at the table"
}, },
"npcList": { "npcList": {
"create": "New NPC", "create": "New NPC",
@@ -1154,7 +1184,8 @@
"npcView": { "npcView": {
"aiAssistant": "AI Assistant", "aiAssistant": "AI Assistant",
"relatedPages": "Linked Lore pages", "relatedPages": "Linked Lore pages",
"deletedPage": "(deleted page)" "deletedPage": "(deleted page)",
"storyTitle": "Role in the story"
}, },
"enemyEdit": { "enemyEdit": {
"backToEnemies": "Back to enemies", "backToEnemies": "Back to enemies",
@@ -1992,6 +2023,28 @@
], ],
"example": "Three smugglers aren't trying to kill anyone: they want to sink the boat holding the evidence. If they succeed, the fight is lost, even with every PC still standing.", "example": "Three smugglers aren't trying to kill anyone: they want to sink the boat holding the evidence. If they succeed, the fight is lost, even with every PC still standing.",
"pitfall": "The \"bag of hit points\" fight: with no goal other than taking the enemy down, it quickly becomes repetitive. Give each side a purpose." "pitfall": "The \"bag of hit points\" fight: with no goal other than taking the enemy down, it quickly becomes repetitive. Give each side a purpose."
},
"purpose": {
"title": "Purpose of the scene",
"purpose": "Every scene should bring something to the story. Knowing what you'd lose by cutting it helps decide what to keep, what to shorten, and what to improvise.",
"questions": [
"What do the players learn here that they won't learn anywhere else?",
"What decision do they make, or what emotion do they feel?",
"If time runs short, can it be summed up in two sentences?"
],
"example": "Without the inn, the players never meet Maëlis: they lose their only ally and the first lead to the tower.",
"pitfall": "A scene that only exists to look nice or fill a session: players feel it, and the pacing collapses."
},
"tactics": {
"title": "Enemy tactics and morale",
"purpose": "Enemies who want to survive make a fight come alive: they use the terrain, protect their leader and know when to run. The GM then knows how to play them without improvising at random.",
"questions": [
"How does the terrain favour them?",
"What makes them flee, surrender or negotiate?",
"Who do they protect, and what do they do if their leader falls?"
],
"example": "The smugglers shoot from the boats and cut the moorings if approached. If the sergeant falls, they drop their weapons and offer to talk.",
"pitfall": "Enemies who all fight to the death: the fight becomes plain hit point subtraction, with no choices for the players."
} }
}, },
"chapter": { "chapter": {
@@ -2082,6 +2135,28 @@
], ],
"example": "The guild is publicly exposed; or the PCs buy it out themselves; or the villages are lost and the next arc opens with the exodus.", "example": "The guild is publicly exposed; or the PCs buy it out themselves; or the villages are lost and the next arc opens with the exodus.",
"pitfall": "A single ending written in advance: the players' choices no longer matter. Prepare outcomes, not a script." "pitfall": "A single ending written in advance: the players' choices no longer matter. Prepare outcomes, not a script."
},
"hiddenTruth": {
"title": "Hidden truth",
"purpose": "The truth the players will piece together. Everything else follows from it: every clue, every revelation is a trace it left behind.",
"questions": [
"What really happened, and who is responsible?",
"What traces did it leave, and where?",
"Can the players fully understand it by the end?"
],
"example": "The regent poisoned the old king to rule in the prince's place. The court physician knows and keeps quiet out of fear.",
"pitfall": "A truth too complicated to discover in play. If a player can't sum it up in one sentence at the end, simplify it."
},
"hooks": {
"title": "Hooks",
"purpose": "The reasons that push the characters to get involved. Several hooks of different kinds let players choose their motivation instead of having it imposed.",
"questions": [
"Which one plays on interest (reward, contract)?",
"Which one affects a character personally?",
"Which one falls on them without them looking for it?"
],
"example": "- The council offers a reward to find the prince.\n- A character's sister worked at the palace and has vanished.\n- The regent's guards come to arrest the characters for no reason.",
"pitfall": "A single hook, presented as an obligation: if it doesn't speak to the table, the adventure starts reluctantly."
} }
}, },
"publication": { "publication": {
@@ -2140,6 +2215,50 @@
"example": "Writing: Camille Martin\nMaps: Léo Dubois\nEditing: Alex\nPlaytesters: the Thursday table (Inès, Yanis, Paul, Mira)", "example": "Writing: Camille Martin\nMaps: Léo Dubois\nEditing: Alex\nPlaytesters: the Thursday table (Inès, Yanis, Paul, Mira)",
"pitfall": "Forgetting the playtesters, or the credits required by an artwork's or a game system's licence." "pitfall": "Forgetting the playtesters, or the credits required by an artwork's or a game system's licence."
} }
},
"npc": {
"role": {
"title": "Role in the story",
"purpose": "Knowing what place an NPC holds tells you how much preparation they deserve: an opponent or an ally weighs on the plot, an extra only needs one detail.",
"questions": [
"Does this NPC help the characters, oppose them, or hold something they need?",
"Do they act on their own, or are they the prize others fight over?"
],
"example": "Borin the blacksmith is a resource: he knows who ordered the crypt keys, but will only tell someone who helps him.",
"pitfall": "Allies who do everything in the players' place. An ally has limits: what they can't or won't do."
},
"motivation": {
"title": "Motivation",
"purpose": "What the NPC wants decides everything they do. With a clear motivation, the GM knows how they react to anything the players do.",
"questions": [
"What do they want, right now?",
"What are they afraid to lose?",
"How far are they willing to go?"
],
"example": "Ysolde wants the throne for herself, but fears scandal above all: she'd rather bribe than kill.",
"pitfall": "A villain who is evil \"just because\": players can neither understand, manipulate nor convince them."
},
"knowledge": {
"title": "What they know",
"purpose": "Listing what the NPC can reveal avoids improvising contradictory answers and ties the NPC to the adventure's clues.",
"questions": [
"What useful information do they hold?",
"On what condition will they share it (trust, money, threat)?",
"What do they wrongly believe they know?"
],
"example": "He saw the notary leave the room at midnight. He'll say so in exchange for safe passage out of town.",
"pitfall": "An NPC who knows everything and tells the first person who asks: the investigation is solved in one conversation."
},
"mannerism": {
"title": "Distinctive trait",
"purpose": "One detail to play at the table makes an NPC memorable in seconds, and helps players recognise who is speaking.",
"questions": [
"What gesture or habit gives them away?",
"How do they speak: fast, slowly, with a pet word?"
],
"example": "Taps her ring every time she lies, and ends her sentences with \"don't you agree?\".",
"pitfall": "A long physical description nobody remembers: one strong detail beats a full portrait."
}
} }
} }
}, },
@@ -2233,6 +2352,16 @@
"observation": "The {{count}} paths leading to \"{{entity}}\" all start from \"{{kind}}\" scenes.", "observation": "The {{count}} paths leading to \"{{entity}}\" all start from \"{{kind}}\" scenes.",
"why": "If all the information goes through one kind of scene (only interrogations, only searches), a table that dislikes it or fails at it will miss every clue at once.", "why": "If all the information goes through one kind of scene (only interrogations, only searches), a table that dislikes it or fails at it will miss every clue at once.",
"question": "Could a clue come from another kind of scene: a place to search, a document, an event?" "question": "Could a clue come from another kind of scene: a place to search, a document, an event?"
},
"WRITE-016-NPC-NO-MOTIVATION": {
"observation": "\"{{entity}}\" weighs on the plot, but their motivation isn't written.",
"why": "An opponent or ally who wants nothing specific is hard to play: the GM doesn't know how they react when the players upset their plans.",
"question": "What does this NPC want, and what are they afraid to lose?"
},
"WRITE-017-SINGLE-HOOK": {
"observation": "\"{{entity}}\" has only one hook.",
"why": "If that single reason doesn't speak to the players, the adventure starts reluctantly. Several hooks of different kinds let them choose why to get involved.",
"question": "What other reason, personal or self-interested, could push the characters to act?"
} }
} }
}, },
+135 -6
View File
@@ -517,7 +517,13 @@
"optionalHint": "Seul le titre est requis. Déplie et remplis uniquement les sections utiles — tout le reste est optionnel.", "optionalHint": "Seul le titre est requis. Déplie et remplis uniquement les sections utiles — tout le reste est optionnel.",
"themesStakesSectionTitle": "Thèmes et enjeux", "themesStakesSectionTitle": "Thèmes et enjeux",
"gmNotesSectionTitle": "Notes du MJ", "gmNotesSectionTitle": "Notes du MJ",
"rewardsResolutionSectionTitle": "Récompenses et dénouement" "rewardsResolutionSectionTitle": "Récompenses et dénouement",
"truthHooksSectionTitle": "Histoire cachée et accroches",
"hiddenTruthLabel": "Histoire cachée (réservée au MJ)",
"hiddenTruthPlaceholder": "Ce qui s'est vraiment passé, que les joueurs découvriront peu à peu",
"hooksLabel": "Accroches",
"hooksPlaceholder": "- Un ami des personnages disparaît\n- Une récompense est offerte pour…",
"hooksHint": "Une accroche par ligne. Visez-en au moins deux, de nature différente."
}, },
"arcView": { "arcView": {
"subtitleHub": "Arc en hub (quêtes non linéaires)", "subtitleHub": "Arc en hub (quêtes non linéaires)",
@@ -549,7 +555,9 @@
"deleteConfirmMessage": "Supprimer l'arc \"{{name}}\" ?", "deleteConfirmMessage": "Supprimer l'arc \"{{name}}\" ?",
"questsTitle": "Quêtes de cet arc", "questsTitle": "Quêtes de cet arc",
"questsEmpty": "Aucune quête pour l'instant. Ajoutez-en une pour peupler ce hub.", "questsEmpty": "Aucune quête pour l'instant. Ajoutez-en une pour peupler ce hub.",
"createQuest": "Nouvelle quête" "createQuest": "Nouvelle quête",
"hooksTitle": "Accroches",
"hiddenTruthTitle": "Histoire cachée"
}, },
"campaigns": { "campaigns": {
"heroTitle": "Vos Campagnes", "heroTitle": "Vos Campagnes",
@@ -1062,7 +1070,11 @@
"branchTargetBroken": "Destination introuvable (scène supprimée) : choisissez une nouvelle destination ou retirez cette branche.", "branchTargetBroken": "Destination introuvable (scène supprimée) : choisissez une nouvelle destination ou retirez cette branche.",
"battlemapAdd": "Ajouter une carte", "battlemapAdd": "Ajouter une carte",
"battlemapLabelPlaceholder": "Libellé (ex : Jour, Nuit, Étage 1…)", "battlemapLabelPlaceholder": "Libellé (ex : Jour, Nuit, Étage 1…)",
"battlemapRemoveMap": "Retirer cette carte" "battlemapRemoveMap": "Retirer cette carte",
"purposeLabel": "Utilité de la scène",
"purposePlaceholder": "Si on la coupe, qu'est-ce que l'histoire perd ? (une info, un choix, une émotion…)",
"tacticsLabel": "Tactique et moral des adversaires",
"tacticsPlaceholder": "Comment ils se battent, et quand ils fuient, se rendent ou négocient"
}, },
"sceneView": { "sceneView": {
"subtitle": "Scène", "subtitle": "Scène",
@@ -1092,7 +1104,9 @@
"deleteTitle": "Supprimer la scène", "deleteTitle": "Supprimer la scène",
"deleteMessage": "Supprimer la scène \"{{name}}\" ?", "deleteMessage": "Supprimer la scène \"{{name}}\" ?",
"deleteIrreversible": "Cette action est irréversible.", "deleteIrreversible": "Cette action est irréversible.",
"deleteError": "Erreur lors de la suppression de la scène" "deleteError": "Erreur lors de la suppression de la scène",
"purposeSectionTitle": "Utilité",
"tacticsSectionTitle": "Tactique et moral"
}, },
"characterEdit": { "characterEdit": {
"backToCampaign": "Retour à la campagne", "backToCampaign": "Retour à la campagne",
@@ -1139,7 +1153,23 @@
"chatSuggestion3": "Imagine 3 répliques signatures qui le caractérisent", "chatSuggestion3": "Imagine 3 répliques signatures qui le caractérisent",
"deleteTitle": "Supprimer la fiche ?", "deleteTitle": "Supprimer la fiche ?",
"deleteMessage": "Supprimer la fiche de \"{{name}}\" ?", "deleteMessage": "Supprimer la fiche de \"{{name}}\" ?",
"irreversible": "Cette action est irréversible." "irreversible": "Cette action est irréversible.",
"storyTitle": "Rôle dans l'histoire",
"storyHint": "Indépendant du système de jeu : ce qui rend ce PNJ jouable et utile au récit.",
"roleLabel": "Rôle",
"roleNone": "Non précisé",
"role": {
"OPPONENT": "Opposant",
"ALLY": "Allié",
"RESOURCE": "Ressource (informateur, service)",
"EXTRA": "Figurant"
},
"motivationLabel": "Motivation",
"motivationPlaceholder": "Ce qu'il veut, et ce qu'il est prêt à faire pour l'obtenir",
"knowledgeLabel": "Ce qu'il sait (réservé au MJ)",
"knowledgePlaceholder": "Les informations qu'il peut révéler, et à quelle condition",
"mannerismLabel": "Signe distinctif",
"mannerismPlaceholder": "Un geste, une façon de parler, un tic à jouer à la table"
}, },
"npcList": { "npcList": {
"create": "Nouveau PNJ", "create": "Nouveau PNJ",
@@ -1154,7 +1184,8 @@
"npcView": { "npcView": {
"aiAssistant": "Assistant IA", "aiAssistant": "Assistant IA",
"relatedPages": "Pages de Lore liées", "relatedPages": "Pages de Lore liées",
"deletedPage": "(page supprimée)" "deletedPage": "(page supprimée)",
"storyTitle": "Rôle dans l'histoire"
}, },
"enemyEdit": { "enemyEdit": {
"backToEnemies": "Retour aux ennemis", "backToEnemies": "Retour aux ennemis",
@@ -1992,6 +2023,28 @@
], ],
"example": "Trois contrebandiers ne cherchent pas à tuer : ils veulent couler la barque qui contient les preuves. S'ils y parviennent, le combat est perdu, même si tous les PJ sont debout.", "example": "Trois contrebandiers ne cherchent pas à tuer : ils veulent couler la barque qui contient les preuves. S'ils y parviennent, le combat est perdu, même si tous les PJ sont debout.",
"pitfall": "Le combat « sac de points de vie » : sans autre objectif que d'abattre l'adversaire, il devient vite répétitif. Donne un but à chaque camp." "pitfall": "Le combat « sac de points de vie » : sans autre objectif que d'abattre l'adversaire, il devient vite répétitif. Donne un but à chaque camp."
},
"purpose": {
"title": "Utilité de la scène",
"purpose": "Chaque scène doit apporter quelque chose à l'histoire. Savoir ce qu'on perdrait en la coupant aide à décider ce qu'on garde, ce qu'on raccourcit, et ce qu'on improvise.",
"questions": [
"Qu'apprennent les joueurs ici qu'ils n'apprendront nulle part ailleurs ?",
"Quelle décision prennent-ils, ou quelle émotion vivent-ils ?",
"Si le temps manque en séance, peut-on la résumer en deux phrases ?"
],
"example": "Sans l'auberge, les joueurs ne rencontrent jamais Maëlis : ils perdent leur seule alliée et la première piste vers la tour.",
"pitfall": "Une scène qui n'existe que pour « faire joli » ou pour remplir une séance : les joueurs le sentent, et le rythme s'effondre."
},
"tactics": {
"title": "Tactique et moral des adversaires",
"purpose": "Des adversaires qui veulent survivre rendent un combat vivant : ils utilisent le terrain, protègent leur chef et savent quand fuir. Le MJ sait alors comment les jouer sans improviser au hasard.",
"questions": [
"Comment le terrain les avantage-t-il ?",
"Qu'est-ce qui les fait fuir, se rendre ou négocier ?",
"Qui protègent-ils, et que font-ils si leur chef tombe ?"
],
"example": "Les contrebandiers tirent depuis les barques et coupent les amarres si on les approche. Si le sergent tombe, ils jettent leurs armes et proposent de parler.",
"pitfall": "Des ennemis qui se battent tous jusqu'à la mort : le combat devient une simple soustraction de points de vie, sans choix pour les joueurs."
} }
}, },
"chapter": { "chapter": {
@@ -2082,6 +2135,28 @@
], ],
"example": "La guilde est démasquée publiquement ; ou bien elle est rachetée par les PJ eux-mêmes ; ou bien les villages sont perdus et l'arc suivant commence par l'exode.", "example": "La guilde est démasquée publiquement ; ou bien elle est rachetée par les PJ eux-mêmes ; ou bien les villages sont perdus et l'arc suivant commence par l'exode.",
"pitfall": "Une seule fin écrite d'avance : les choix des joueurs ne comptent plus. Prépare des issues, pas un scénario." "pitfall": "Une seule fin écrite d'avance : les choix des joueurs ne comptent plus. Prépare des issues, pas un scénario."
},
"hiddenTruth": {
"title": "Histoire cachée",
"purpose": "La vérité que les joueurs vont reconstituer. Tout le reste en découle : chaque indice, chaque révélation est une trace qu'elle a laissée.",
"questions": [
"Qu'est-ce qui s'est vraiment passé, et qui en est responsable ?",
"Quelles traces cela a-t-il laissées, et où ?",
"Les joueurs peuvent-ils la comprendre entièrement à la fin ?"
],
"example": "Le régent a empoisonné le vieux roi pour gouverner à la place du prince. Le médecin de la cour le sait et se tait par peur.",
"pitfall": "Une vérité trop compliquée pour être découverte en jeu. Si un joueur ne peut pas la résumer en une phrase à la fin, simplifiez-la."
},
"hooks": {
"title": "Accroches",
"purpose": "Les raisons qui poussent les personnages à se lancer. Plusieurs accroches de nature différente laissent les joueurs choisir leur motivation au lieu de la subir.",
"questions": [
"Laquelle joue sur l'intérêt (récompense, contrat) ?",
"Laquelle touche un personnage personnellement ?",
"Laquelle tombe sur eux sans qu'ils la cherchent ?"
],
"example": "- Le conseil offre une récompense pour retrouver le prince.\n- La sœur d'un personnage travaillait au palais et a disparu.\n- Des gardes du régent viennent arrêter les personnages sans raison.",
"pitfall": "Une seule accroche, présentée comme une obligation : si elle ne parle pas à la table, l'aventure démarre à contrecœur."
} }
}, },
"publication": { "publication": {
@@ -2140,6 +2215,50 @@
"example": "Écriture : Camille Martin\nCartes : Léo Dubois\nRelecture : Alex\nTesteurs : la table du jeudi (Inès, Yanis, Paul, Mira)", "example": "Écriture : Camille Martin\nCartes : Léo Dubois\nRelecture : Alex\nTesteurs : la table du jeudi (Inès, Yanis, Paul, Mira)",
"pitfall": "Oublier les testeurs, ou les crédits exigés par la licence d'une illustration ou d'un système de jeu." "pitfall": "Oublier les testeurs, ou les crédits exigés par la licence d'une illustration ou d'un système de jeu."
} }
},
"npc": {
"role": {
"title": "Rôle dans l'histoire",
"purpose": "Savoir quelle place tient un PNJ dit combien de préparation il mérite : un opposant ou un allié pèse sur l'intrigue, un figurant n'a besoin que d'un détail.",
"questions": [
"Ce PNJ aide-t-il les personnages, s'y oppose-t-il, ou détient-il quelque chose dont ils ont besoin ?",
"Agit-il de lui-même, ou est-il l'enjeu que d'autres se disputent ?"
],
"example": "Borin le forgeron est une ressource : il sait qui a commandé les clés de la crypte, mais ne le dira qu'à quelqu'un qui l'aide.",
"pitfall": "Des alliés qui font tout à la place des joueurs. Un allié a des limites : ce qu'il ne peut pas ou ne veut pas faire."
},
"motivation": {
"title": "Motivation",
"purpose": "Ce que le PNJ veut décide de tout ce qu'il fait. Avec une motivation claire, le MJ sait comment il réagit à n'importe quelle action des joueurs.",
"questions": [
"Que veut-il, maintenant ?",
"Que craint-il de perdre ?",
"Jusqu'où est-il prêt à aller ?"
],
"example": "Ysolde veut le trône pour elle-même, mais elle craint plus que tout le scandale : elle préfère acheter que tuer.",
"pitfall": "Un méchant méchant « parce que » : les joueurs ne peuvent ni le comprendre, ni le manipuler, ni le convaincre."
},
"knowledge": {
"title": "Ce qu'il sait",
"purpose": "La liste de ce que le PNJ peut révéler évite d'improviser des réponses contradictoires et relie le PNJ aux indices de l'aventure.",
"questions": [
"Quelles informations utiles détient-il ?",
"À quelle condition les donnera-t-il (confiance, argent, menace) ?",
"Que croit-il savoir à tort ?"
],
"example": "Il a vu le notaire sortir de la chambre à minuit. Il le dira contre la promesse d'un passage sûr hors de la ville.",
"pitfall": "Un PNJ qui sait tout et le dit au premier venu : l'enquête se résout en une conversation."
},
"mannerism": {
"title": "Signe distinctif",
"purpose": "Un détail à jouer à la table rend un PNJ mémorable en quelques secondes, et aide les joueurs à reconnaître qui parle.",
"questions": [
"Quel geste, quelle manie le trahit ?",
"Comment parle-t-il : vite, lentement, avec un mot fétiche ?"
],
"example": "Tapote sa bague chaque fois qu'elle ment, et termine ses phrases par « n'est-ce pas ? ».",
"pitfall": "Une longue description physique que personne ne retient : un seul détail fort vaut mieux qu'un portrait complet."
}
} }
} }
}, },
@@ -2233,6 +2352,16 @@
"observation": "Les {{count}} chemins qui mènent à « {{entity}} » partent tous de scènes « {{kind}} ».", "observation": "Les {{count}} chemins qui mènent à « {{entity}} » partent tous de scènes « {{kind}} ».",
"why": "Si toute l'information passe par le même genre de scène (que des interrogatoires, que des fouilles), une table qui n'aime pas ce genre ou y échoue manquera tous les indices à la fois.", "why": "Si toute l'information passe par le même genre de scène (que des interrogatoires, que des fouilles), une table qui n'aime pas ce genre ou y échoue manquera tous les indices à la fois.",
"question": "Un indice pourrait-il venir d'un autre genre de scène : un lieu à fouiller, un document, un événement ?" "question": "Un indice pourrait-il venir d'un autre genre de scène : un lieu à fouiller, un document, un événement ?"
},
"WRITE-016-NPC-NO-MOTIVATION": {
"observation": "« {{entity}} » pèse sur l'intrigue, mais sa motivation n'est pas écrite.",
"why": "Un opposant ou un allié qui ne veut rien de précis est difficile à jouer : le MJ ne sait pas comment il réagit quand les joueurs bousculent ses plans.",
"question": "Que veut ce PNJ, et que craint-il de perdre ?"
},
"WRITE-017-SINGLE-HOOK": {
"observation": "« {{entity}} » n'a qu'une seule accroche.",
"why": "Si cette unique raison ne parle pas aux joueurs, l'aventure démarre à contrecœur. Plusieurs accroches de nature différente leur laissent choisir pourquoi s'en mêler.",
"question": "Quelle autre raison, personnelle ou intéressée, pourrait pousser les personnages à agir ?"
} }
} }
}, },
+10 -2
View File
@@ -55,7 +55,13 @@
"chatSuggestion3": "Suggest a two-act resolution", "chatSuggestion3": "Suggest a two-act resolution",
"deleteTitle": "Delete arc", "deleteTitle": "Delete arc",
"deleteMessage": "Delete the arc \"{{name}}\"?", "deleteMessage": "Delete the arc \"{{name}}\"?",
"irreversible": "This action is irreversible." "irreversible": "This action is irreversible.",
"truthHooksSectionTitle": "Hidden truth and hooks",
"hiddenTruthLabel": "Hidden truth (GM only)",
"hiddenTruthPlaceholder": "What really happened, which the players will uncover bit by bit",
"hooksLabel": "Hooks",
"hooksPlaceholder": "- A friend of the characters goes missing\n- A reward is offered for…",
"hooksHint": "One hook per line. Aim for at least two, of different kinds."
}, },
"arcView": { "arcView": {
"subtitleHub": "Hub arc (non-linear quests)", "subtitleHub": "Hub arc (non-linear quests)",
@@ -87,6 +93,8 @@
"deleteCascade": "This action will also delete: {{parts}}.", "deleteCascade": "This action will also delete: {{parts}}.",
"irreversible": "This action is irreversible.", "irreversible": "This action is irreversible.",
"deleteConfirmTitle": "Delete arc", "deleteConfirmTitle": "Delete arc",
"deleteConfirmMessage": "Delete the arc \"{{name}}\"?" "deleteConfirmMessage": "Delete the arc \"{{name}}\"?",
"hooksTitle": "Hooks",
"hiddenTruthTitle": "Hidden truth"
} }
} }
+10 -2
View File
@@ -55,7 +55,13 @@
"chatSuggestion3": "Suggère un dénouement en deux actes", "chatSuggestion3": "Suggère un dénouement en deux actes",
"deleteTitle": "Supprimer l'arc", "deleteTitle": "Supprimer l'arc",
"deleteMessage": "Supprimer l'arc \"{{name}}\" ?", "deleteMessage": "Supprimer l'arc \"{{name}}\" ?",
"irreversible": "Cette action est irréversible." "irreversible": "Cette action est irréversible.",
"truthHooksSectionTitle": "Histoire cachée et accroches",
"hiddenTruthLabel": "Histoire cachée (réservée au MJ)",
"hiddenTruthPlaceholder": "Ce qui s'est vraiment passé, que les joueurs découvriront peu à peu",
"hooksLabel": "Accroches",
"hooksPlaceholder": "- Un ami des personnages disparaît\n- Une récompense est offerte pour…",
"hooksHint": "Une accroche par ligne. Visez-en au moins deux, de nature différente."
}, },
"arcView": { "arcView": {
"subtitleHub": "Arc en hub (quêtes non linéaires)", "subtitleHub": "Arc en hub (quêtes non linéaires)",
@@ -87,6 +93,8 @@
"deleteCascade": "Cette action supprimera aussi : {{parts}}.", "deleteCascade": "Cette action supprimera aussi : {{parts}}.",
"irreversible": "Cette action est irréversible.", "irreversible": "Cette action est irréversible.",
"deleteConfirmTitle": "Supprimer l'arc", "deleteConfirmTitle": "Supprimer l'arc",
"deleteConfirmMessage": "Supprimer l'arc \"{{name}}\" ?" "deleteConfirmMessage": "Supprimer l'arc \"{{name}}\" ?",
"hooksTitle": "Accroches",
"hiddenTruthTitle": "Histoire cachée"
} }
} }
@@ -44,7 +44,23 @@
"chatSuggestion3": "Imagine 3 signature lines that characterize them", "chatSuggestion3": "Imagine 3 signature lines that characterize them",
"deleteTitle": "Delete this sheet?", "deleteTitle": "Delete this sheet?",
"deleteMessage": "Delete the sheet for \"{{name}}\"?", "deleteMessage": "Delete the sheet for \"{{name}}\"?",
"irreversible": "This action is irreversible." "irreversible": "This action is irreversible.",
"storyTitle": "Role in the story",
"storyHint": "Independent of the game system: what makes this NPC playable and useful to the story.",
"roleLabel": "Role",
"roleNone": "Not set",
"role": {
"OPPONENT": "Opponent",
"ALLY": "Ally",
"RESOURCE": "Resource (informant, service)",
"EXTRA": "Extra"
},
"motivationLabel": "Motivation",
"motivationPlaceholder": "What they want, and what they're willing to do to get it",
"knowledgeLabel": "What they know (GM only)",
"knowledgePlaceholder": "The information they can reveal, and on what condition",
"mannerismLabel": "Distinctive trait",
"mannerismPlaceholder": "A gesture, a way of speaking, a tic to play at the table"
}, },
"npcList": { "npcList": {
"create": "New NPC", "create": "New NPC",
@@ -59,7 +75,8 @@
"npcView": { "npcView": {
"aiAssistant": "AI Assistant", "aiAssistant": "AI Assistant",
"relatedPages": "Linked Lore pages", "relatedPages": "Linked Lore pages",
"deletedPage": "(deleted page)" "deletedPage": "(deleted page)",
"storyTitle": "Role in the story"
}, },
"enemyEdit": { "enemyEdit": {
"backToEnemies": "Back to enemies", "backToEnemies": "Back to enemies",
@@ -44,7 +44,23 @@
"chatSuggestion3": "Imagine 3 répliques signatures qui le caractérisent", "chatSuggestion3": "Imagine 3 répliques signatures qui le caractérisent",
"deleteTitle": "Supprimer la fiche ?", "deleteTitle": "Supprimer la fiche ?",
"deleteMessage": "Supprimer la fiche de \"{{name}}\" ?", "deleteMessage": "Supprimer la fiche de \"{{name}}\" ?",
"irreversible": "Cette action est irréversible." "irreversible": "Cette action est irréversible.",
"storyTitle": "Rôle dans l'histoire",
"storyHint": "Indépendant du système de jeu : ce qui rend ce PNJ jouable et utile au récit.",
"roleLabel": "Rôle",
"roleNone": "Non précisé",
"role": {
"OPPONENT": "Opposant",
"ALLY": "Allié",
"RESOURCE": "Ressource (informateur, service)",
"EXTRA": "Figurant"
},
"motivationLabel": "Motivation",
"motivationPlaceholder": "Ce qu'il veut, et ce qu'il est prêt à faire pour l'obtenir",
"knowledgeLabel": "Ce qu'il sait (réservé au MJ)",
"knowledgePlaceholder": "Les informations qu'il peut révéler, et à quelle condition",
"mannerismLabel": "Signe distinctif",
"mannerismPlaceholder": "Un geste, une façon de parler, un tic à jouer à la table"
}, },
"npcList": { "npcList": {
"create": "Nouveau PNJ", "create": "Nouveau PNJ",
@@ -59,7 +75,8 @@
"npcView": { "npcView": {
"aiAssistant": "Assistant IA", "aiAssistant": "Assistant IA",
"relatedPages": "Pages de Lore liées", "relatedPages": "Pages de Lore liées",
"deletedPage": "(page supprimée)" "deletedPage": "(page supprimée)",
"storyTitle": "Rôle dans l'histoire"
}, },
"enemyEdit": { "enemyEdit": {
"backToEnemies": "Retour aux ennemis", "backToEnemies": "Retour aux ennemis",
+8 -2
View File
@@ -91,7 +91,11 @@
"deleteMessage": "Delete the scene \"{{name}}\"?", "deleteMessage": "Delete the scene \"{{name}}\"?",
"deleteIrreversible": "This action is irreversible.", "deleteIrreversible": "This action is irreversible.",
"saveError": "Error while saving", "saveError": "Error while saving",
"deleteError": "Error while deleting" "deleteError": "Error while deleting",
"purposeLabel": "Purpose of the scene",
"purposePlaceholder": "If it were cut, what would the story lose? (information, a choice, an emotion…)",
"tacticsLabel": "Enemy tactics and morale",
"tacticsPlaceholder": "How they fight, and when they flee, surrender or negotiate"
}, },
"sceneView": { "sceneView": {
"subtitle": "Scene", "subtitle": "Scene",
@@ -121,7 +125,9 @@
"deleteTitle": "Delete scene", "deleteTitle": "Delete scene",
"deleteMessage": "Delete the scene \"{{name}}\"?", "deleteMessage": "Delete the scene \"{{name}}\"?",
"deleteIrreversible": "This action is irreversible.", "deleteIrreversible": "This action is irreversible.",
"deleteError": "Error while deleting the scene" "deleteError": "Error while deleting the scene",
"purposeSectionTitle": "Purpose",
"tacticsSectionTitle": "Tactics and morale"
}, },
"sceneType": { "sceneType": {
"GENERIC": "Generic scene", "GENERIC": "Generic scene",
+8 -2
View File
@@ -91,7 +91,11 @@
"deleteMessage": "Supprimer la scène \"{{name}}\" ?", "deleteMessage": "Supprimer la scène \"{{name}}\" ?",
"deleteIrreversible": "Cette action est irréversible.", "deleteIrreversible": "Cette action est irréversible.",
"saveError": "Erreur lors de la sauvegarde", "saveError": "Erreur lors de la sauvegarde",
"deleteError": "Erreur lors de la suppression" "deleteError": "Erreur lors de la suppression",
"purposeLabel": "Utilité de la scène",
"purposePlaceholder": "Si on la coupe, qu'est-ce que l'histoire perd ? (une info, un choix, une émotion…)",
"tacticsLabel": "Tactique et moral des adversaires",
"tacticsPlaceholder": "Comment ils se battent, et quand ils fuient, se rendent ou négocient"
}, },
"sceneView": { "sceneView": {
"subtitle": "Scène", "subtitle": "Scène",
@@ -121,7 +125,9 @@
"deleteTitle": "Supprimer la scène", "deleteTitle": "Supprimer la scène",
"deleteMessage": "Supprimer la scène \"{{name}}\" ?", "deleteMessage": "Supprimer la scène \"{{name}}\" ?",
"deleteIrreversible": "Cette action est irréversible.", "deleteIrreversible": "Cette action est irréversible.",
"deleteError": "Erreur lors de la suppression de la scène" "deleteError": "Erreur lors de la suppression de la scène",
"purposeSectionTitle": "Utilité",
"tacticsSectionTitle": "Tactique et moral"
}, },
"sceneType": { "sceneType": {
"GENERIC": "Scène générique", "GENERIC": "Scène générique",
@@ -107,6 +107,28 @@
], ],
"example": "Three smugglers aren't trying to kill anyone: they want to sink the boat holding the evidence. If they succeed, the fight is lost, even with every PC still standing.", "example": "Three smugglers aren't trying to kill anyone: they want to sink the boat holding the evidence. If they succeed, the fight is lost, even with every PC still standing.",
"pitfall": "The \"bag of hit points\" fight: with no goal other than taking the enemy down, it quickly becomes repetitive. Give each side a purpose." "pitfall": "The \"bag of hit points\" fight: with no goal other than taking the enemy down, it quickly becomes repetitive. Give each side a purpose."
},
"purpose": {
"title": "Purpose of the scene",
"purpose": "Every scene should bring something to the story. Knowing what you'd lose by cutting it helps decide what to keep, what to shorten, and what to improvise.",
"questions": [
"What do the players learn here that they won't learn anywhere else?",
"What decision do they make, or what emotion do they feel?",
"If time runs short, can it be summed up in two sentences?"
],
"example": "Without the inn, the players never meet Maëlis: they lose their only ally and the first lead to the tower.",
"pitfall": "A scene that only exists to look nice or fill a session: players feel it, and the pacing collapses."
},
"tactics": {
"title": "Enemy tactics and morale",
"purpose": "Enemies who want to survive make a fight come alive: they use the terrain, protect their leader and know when to run. The GM then knows how to play them without improvising at random.",
"questions": [
"How does the terrain favour them?",
"What makes them flee, surrender or negotiate?",
"Who do they protect, and what do they do if their leader falls?"
],
"example": "The smugglers shoot from the boats and cut the moorings if approached. If the sergeant falls, they drop their weapons and offer to talk.",
"pitfall": "Enemies who all fight to the death: the fight becomes plain hit point subtraction, with no choices for the players."
} }
}, },
"chapter": { "chapter": {
@@ -197,6 +219,28 @@
], ],
"example": "The guild is publicly exposed; or the PCs buy it out themselves; or the villages are lost and the next arc opens with the exodus.", "example": "The guild is publicly exposed; or the PCs buy it out themselves; or the villages are lost and the next arc opens with the exodus.",
"pitfall": "A single ending written in advance: the players' choices no longer matter. Prepare outcomes, not a script." "pitfall": "A single ending written in advance: the players' choices no longer matter. Prepare outcomes, not a script."
},
"hiddenTruth": {
"title": "Hidden truth",
"purpose": "The truth the players will piece together. Everything else follows from it: every clue, every revelation is a trace it left behind.",
"questions": [
"What really happened, and who is responsible?",
"What traces did it leave, and where?",
"Can the players fully understand it by the end?"
],
"example": "The regent poisoned the old king to rule in the prince's place. The court physician knows and keeps quiet out of fear.",
"pitfall": "A truth too complicated to discover in play. If a player can't sum it up in one sentence at the end, simplify it."
},
"hooks": {
"title": "Hooks",
"purpose": "The reasons that push the characters to get involved. Several hooks of different kinds let players choose their motivation instead of having it imposed.",
"questions": [
"Which one plays on interest (reward, contract)?",
"Which one affects a character personally?",
"Which one falls on them without them looking for it?"
],
"example": "- The council offers a reward to find the prince.\n- A character's sister worked at the palace and has vanished.\n- The regent's guards come to arrest the characters for no reason.",
"pitfall": "A single hook, presented as an obligation: if it doesn't speak to the table, the adventure starts reluctantly."
} }
}, },
"publication": { "publication": {
@@ -255,6 +299,50 @@
"example": "Writing: Camille Martin\nMaps: Léo Dubois\nEditing: Alex\nPlaytesters: the Thursday table (Inès, Yanis, Paul, Mira)", "example": "Writing: Camille Martin\nMaps: Léo Dubois\nEditing: Alex\nPlaytesters: the Thursday table (Inès, Yanis, Paul, Mira)",
"pitfall": "Forgetting the playtesters, or the credits required by an artwork's or a game system's licence." "pitfall": "Forgetting the playtesters, or the credits required by an artwork's or a game system's licence."
} }
},
"npc": {
"role": {
"title": "Role in the story",
"purpose": "Knowing what place an NPC holds tells you how much preparation they deserve: an opponent or an ally weighs on the plot, an extra only needs one detail.",
"questions": [
"Does this NPC help the characters, oppose them, or hold something they need?",
"Do they act on their own, or are they the prize others fight over?"
],
"example": "Borin the blacksmith is a resource: he knows who ordered the crypt keys, but will only tell someone who helps him.",
"pitfall": "Allies who do everything in the players' place. An ally has limits: what they can't or won't do."
},
"motivation": {
"title": "Motivation",
"purpose": "What the NPC wants decides everything they do. With a clear motivation, the GM knows how they react to anything the players do.",
"questions": [
"What do they want, right now?",
"What are they afraid to lose?",
"How far are they willing to go?"
],
"example": "Ysolde wants the throne for herself, but fears scandal above all: she'd rather bribe than kill.",
"pitfall": "A villain who is evil \"just because\": players can neither understand, manipulate nor convince them."
},
"knowledge": {
"title": "What they know",
"purpose": "Listing what the NPC can reveal avoids improvising contradictory answers and ties the NPC to the adventure's clues.",
"questions": [
"What useful information do they hold?",
"On what condition will they share it (trust, money, threat)?",
"What do they wrongly believe they know?"
],
"example": "He saw the notary leave the room at midnight. He'll say so in exchange for safe passage out of town.",
"pitfall": "An NPC who knows everything and tells the first person who asks: the investigation is solved in one conversation."
},
"mannerism": {
"title": "Distinctive trait",
"purpose": "One detail to play at the table makes an NPC memorable in seconds, and helps players recognise who is speaking.",
"questions": [
"What gesture or habit gives them away?",
"How do they speak: fast, slowly, with a pet word?"
],
"example": "Taps her ring every time she lies, and ends her sentences with \"don't you agree?\".",
"pitfall": "A long physical description nobody remembers: one strong detail beats a full portrait."
}
} }
} }
} }
@@ -107,6 +107,28 @@
], ],
"example": "Trois contrebandiers ne cherchent pas à tuer : ils veulent couler la barque qui contient les preuves. S'ils y parviennent, le combat est perdu, même si tous les PJ sont debout.", "example": "Trois contrebandiers ne cherchent pas à tuer : ils veulent couler la barque qui contient les preuves. S'ils y parviennent, le combat est perdu, même si tous les PJ sont debout.",
"pitfall": "Le combat « sac de points de vie » : sans autre objectif que d'abattre l'adversaire, il devient vite répétitif. Donne un but à chaque camp." "pitfall": "Le combat « sac de points de vie » : sans autre objectif que d'abattre l'adversaire, il devient vite répétitif. Donne un but à chaque camp."
},
"purpose": {
"title": "Utilité de la scène",
"purpose": "Chaque scène doit apporter quelque chose à l'histoire. Savoir ce qu'on perdrait en la coupant aide à décider ce qu'on garde, ce qu'on raccourcit, et ce qu'on improvise.",
"questions": [
"Qu'apprennent les joueurs ici qu'ils n'apprendront nulle part ailleurs ?",
"Quelle décision prennent-ils, ou quelle émotion vivent-ils ?",
"Si le temps manque en séance, peut-on la résumer en deux phrases ?"
],
"example": "Sans l'auberge, les joueurs ne rencontrent jamais Maëlis : ils perdent leur seule alliée et la première piste vers la tour.",
"pitfall": "Une scène qui n'existe que pour « faire joli » ou pour remplir une séance : les joueurs le sentent, et le rythme s'effondre."
},
"tactics": {
"title": "Tactique et moral des adversaires",
"purpose": "Des adversaires qui veulent survivre rendent un combat vivant : ils utilisent le terrain, protègent leur chef et savent quand fuir. Le MJ sait alors comment les jouer sans improviser au hasard.",
"questions": [
"Comment le terrain les avantage-t-il ?",
"Qu'est-ce qui les fait fuir, se rendre ou négocier ?",
"Qui protègent-ils, et que font-ils si leur chef tombe ?"
],
"example": "Les contrebandiers tirent depuis les barques et coupent les amarres si on les approche. Si le sergent tombe, ils jettent leurs armes et proposent de parler.",
"pitfall": "Des ennemis qui se battent tous jusqu'à la mort : le combat devient une simple soustraction de points de vie, sans choix pour les joueurs."
} }
}, },
"chapter": { "chapter": {
@@ -197,6 +219,28 @@
], ],
"example": "La guilde est démasquée publiquement ; ou bien elle est rachetée par les PJ eux-mêmes ; ou bien les villages sont perdus et l'arc suivant commence par l'exode.", "example": "La guilde est démasquée publiquement ; ou bien elle est rachetée par les PJ eux-mêmes ; ou bien les villages sont perdus et l'arc suivant commence par l'exode.",
"pitfall": "Une seule fin écrite d'avance : les choix des joueurs ne comptent plus. Prépare des issues, pas un scénario." "pitfall": "Une seule fin écrite d'avance : les choix des joueurs ne comptent plus. Prépare des issues, pas un scénario."
},
"hiddenTruth": {
"title": "Histoire cachée",
"purpose": "La vérité que les joueurs vont reconstituer. Tout le reste en découle : chaque indice, chaque révélation est une trace qu'elle a laissée.",
"questions": [
"Qu'est-ce qui s'est vraiment passé, et qui en est responsable ?",
"Quelles traces cela a-t-il laissées, et où ?",
"Les joueurs peuvent-ils la comprendre entièrement à la fin ?"
],
"example": "Le régent a empoisonné le vieux roi pour gouverner à la place du prince. Le médecin de la cour le sait et se tait par peur.",
"pitfall": "Une vérité trop compliquée pour être découverte en jeu. Si un joueur ne peut pas la résumer en une phrase à la fin, simplifiez-la."
},
"hooks": {
"title": "Accroches",
"purpose": "Les raisons qui poussent les personnages à se lancer. Plusieurs accroches de nature différente laissent les joueurs choisir leur motivation au lieu de la subir.",
"questions": [
"Laquelle joue sur l'intérêt (récompense, contrat) ?",
"Laquelle touche un personnage personnellement ?",
"Laquelle tombe sur eux sans qu'ils la cherchent ?"
],
"example": "- Le conseil offre une récompense pour retrouver le prince.\n- La sœur d'un personnage travaillait au palais et a disparu.\n- Des gardes du régent viennent arrêter les personnages sans raison.",
"pitfall": "Une seule accroche, présentée comme une obligation : si elle ne parle pas à la table, l'aventure démarre à contrecœur."
} }
}, },
"publication": { "publication": {
@@ -255,6 +299,50 @@
"example": "Écriture : Camille Martin\nCartes : Léo Dubois\nRelecture : Alex\nTesteurs : la table du jeudi (Inès, Yanis, Paul, Mira)", "example": "Écriture : Camille Martin\nCartes : Léo Dubois\nRelecture : Alex\nTesteurs : la table du jeudi (Inès, Yanis, Paul, Mira)",
"pitfall": "Oublier les testeurs, ou les crédits exigés par la licence d'une illustration ou d'un système de jeu." "pitfall": "Oublier les testeurs, ou les crédits exigés par la licence d'une illustration ou d'un système de jeu."
} }
},
"npc": {
"role": {
"title": "Rôle dans l'histoire",
"purpose": "Savoir quelle place tient un PNJ dit combien de préparation il mérite : un opposant ou un allié pèse sur l'intrigue, un figurant n'a besoin que d'un détail.",
"questions": [
"Ce PNJ aide-t-il les personnages, s'y oppose-t-il, ou détient-il quelque chose dont ils ont besoin ?",
"Agit-il de lui-même, ou est-il l'enjeu que d'autres se disputent ?"
],
"example": "Borin le forgeron est une ressource : il sait qui a commandé les clés de la crypte, mais ne le dira qu'à quelqu'un qui l'aide.",
"pitfall": "Des alliés qui font tout à la place des joueurs. Un allié a des limites : ce qu'il ne peut pas ou ne veut pas faire."
},
"motivation": {
"title": "Motivation",
"purpose": "Ce que le PNJ veut décide de tout ce qu'il fait. Avec une motivation claire, le MJ sait comment il réagit à n'importe quelle action des joueurs.",
"questions": [
"Que veut-il, maintenant ?",
"Que craint-il de perdre ?",
"Jusqu'où est-il prêt à aller ?"
],
"example": "Ysolde veut le trône pour elle-même, mais elle craint plus que tout le scandale : elle préfère acheter que tuer.",
"pitfall": "Un méchant méchant « parce que » : les joueurs ne peuvent ni le comprendre, ni le manipuler, ni le convaincre."
},
"knowledge": {
"title": "Ce qu'il sait",
"purpose": "La liste de ce que le PNJ peut révéler évite d'improviser des réponses contradictoires et relie le PNJ aux indices de l'aventure.",
"questions": [
"Quelles informations utiles détient-il ?",
"À quelle condition les donnera-t-il (confiance, argent, menace) ?",
"Que croit-il savoir à tort ?"
],
"example": "Il a vu le notaire sortir de la chambre à minuit. Il le dira contre la promesse d'un passage sûr hors de la ville.",
"pitfall": "Un PNJ qui sait tout et le dit au premier venu : l'enquête se résout en une conversation."
},
"mannerism": {
"title": "Signe distinctif",
"purpose": "Un détail à jouer à la table rend un PNJ mémorable en quelques secondes, et aide les joueurs à reconnaître qui parle.",
"questions": [
"Quel geste, quelle manie le trahit ?",
"Comment parle-t-il : vite, lentement, avec un mot fétiche ?"
],
"example": "Tapote sa bague chaque fois qu'elle ment, et termine ses phrases par « n'est-ce pas ? ».",
"pitfall": "Une longue description physique que personne ne retient : un seul détail fort vaut mieux qu'un portrait complet."
}
} }
} }
} }
@@ -89,6 +89,16 @@
"observation": "The {{count}} paths leading to \"{{entity}}\" all start from \"{{kind}}\" scenes.", "observation": "The {{count}} paths leading to \"{{entity}}\" all start from \"{{kind}}\" scenes.",
"why": "If all the information goes through one kind of scene (only interrogations, only searches), a table that dislikes it or fails at it will miss every clue at once.", "why": "If all the information goes through one kind of scene (only interrogations, only searches), a table that dislikes it or fails at it will miss every clue at once.",
"question": "Could a clue come from another kind of scene: a place to search, a document, an event?" "question": "Could a clue come from another kind of scene: a place to search, a document, an event?"
},
"WRITE-016-NPC-NO-MOTIVATION": {
"observation": "\"{{entity}}\" weighs on the plot, but their motivation isn't written.",
"why": "An opponent or ally who wants nothing specific is hard to play: the GM doesn't know how they react when the players upset their plans.",
"question": "What does this NPC want, and what are they afraid to lose?"
},
"WRITE-017-SINGLE-HOOK": {
"observation": "\"{{entity}}\" has only one hook.",
"why": "If that single reason doesn't speak to the players, the adventure starts reluctantly. Several hooks of different kinds let them choose why to get involved.",
"question": "What other reason, personal or self-interested, could push the characters to act?"
} }
} }
} }
@@ -89,6 +89,16 @@
"observation": "Les {{count}} chemins qui mènent à « {{entity}} » partent tous de scènes « {{kind}} ».", "observation": "Les {{count}} chemins qui mènent à « {{entity}} » partent tous de scènes « {{kind}} ».",
"why": "Si toute l'information passe par le même genre de scène (que des interrogatoires, que des fouilles), une table qui n'aime pas ce genre ou y échoue manquera tous les indices à la fois.", "why": "Si toute l'information passe par le même genre de scène (que des interrogatoires, que des fouilles), une table qui n'aime pas ce genre ou y échoue manquera tous les indices à la fois.",
"question": "Un indice pourrait-il venir d'un autre genre de scène : un lieu à fouiller, un document, un événement ?" "question": "Un indice pourrait-il venir d'un autre genre de scène : un lieu à fouiller, un document, un événement ?"
},
"WRITE-016-NPC-NO-MOTIVATION": {
"observation": "« {{entity}} » pèse sur l'intrigue, mais sa motivation n'est pas écrite.",
"why": "Un opposant ou un allié qui ne veut rien de précis est difficile à jouer : le MJ ne sait pas comment il réagit quand les joueurs bousculent ses plans.",
"question": "Que veut ce PNJ, et que craint-il de perdre ?"
},
"WRITE-017-SINGLE-HOOK": {
"observation": "« {{entity}} » n'a qu'une seule accroche.",
"why": "Si cette unique raison ne parle pas aux joueurs, l'aventure démarre à contrecœur. Plusieurs accroches de nature différente leur laissent choisir pourquoi s'en mêler.",
"question": "Quelle autre raison, personnelle ou intéressée, pourrait pousser les personnages à agir ?"
} }
} }
} }