2 Commits

Author SHA1 Message Date
uberwald ec0e522145 Add ranged attacks for monsters
Release Creation / build (release) Successful in 1m13s
2026-04-29 22:24:42 +02:00
uberwald 8123b53f75 Import de personnages du précédent système
Release Creation / build (release) Successful in 1m21s
2026-04-27 22:29:49 +02:00
34 changed files with 3879 additions and 85 deletions
+368
View File
@@ -0,0 +1,368 @@
#!/usr/bin/env python3
"""
convert-old-system.py
Convertit les fichiers JSON d'acteurs exportés de l'ancien système Célestopol 1922
(system id: celestopol1922) vers le format du nouveau système (fvtt-celestopol).
Usage:
python3 convert-old-system.py <fichier.json> [fichier2.json ...]
Le fichier converti est écrit à côté du fichier source sous le nom :
<nom>-converted.json
"""
import json
import os
import re
import sys
import uuid
# ─── Mapping des types d'anomalies (préfixe "CEL1922.opt." → clé nouveau système) ─────
ANOMALY_TYPE_MAP = {
"none": "none",
"entropie": "entropie",
"communicationaveclesmorts": "communicationaveclesmorts",
"illusion": "illusion",
"suggestion": "suggestion",
"tarotdivinatoire": "tarotdivinatoire",
"telekinesie": "telekinesie",
"telepathie": "telepathie",
"voyageastral": "voyageastral",
}
# Clé anomaly vide → "none"
VALID_ANOMALY_TYPES = set(ANOMALY_TYPE_MAP.values())
# ─── Domaines (stats) ──────────────────────────────────────────────────────────────────
STATS = ["ame", "corps", "coeur", "esprit"]
# Compétences par domaine (dans l'ordre du nouveau système)
SKILLS = {
"ame": ["artifice", "attraction", "coercition", "faveur"],
"corps": ["echauffouree", "effacement", "mobilite", "prouesse"],
"coeur": ["appreciation", "arts", "inspiration", "traque"],
"esprit": ["instruction", "mtechnologique", "raisonnement", "traitement"],
}
def make_id():
"""Génère un identifiant Foundry-compatible (16 chars hex)."""
return uuid.uuid4().hex[:16]
def strip_prefix(label: str) -> str:
"""Extrait la clé depuis 'CEL1922.opt.<clé>'."""
return label.split(".")[-1]
def resolve_anomaly_type(old_system: dict) -> str:
"""
Résout le type d'anomalie depuis l'ancien système.
old_system.anomaly est un int (index dans anomalytypes[]).
"""
anomalytypes = old_system.get("skill", {}).get("anomalytypes", [])
idx = old_system.get("anomaly", 0)
try:
idx = int(idx)
except (ValueError, TypeError):
idx = 0
if idx == 0 or not anomalytypes:
return "none"
if idx < len(anomalytypes):
raw = strip_prefix(anomalytypes[idx])
return ANOMALY_TYPE_MAP.get(raw, "none")
return "none"
def resolve_anomaly_type_from_name(item_name: str) -> str:
"""
Infère le type d'anomalie depuis le nom de l'item (ex: 'Entropie 1''entropie').
Fallback si le mapping par index est insuffisant.
"""
# Normalise : minuscules, retire accents, retire espaces et chiffres
name_clean = item_name.lower().strip()
name_clean = re.sub(r"\s*\d+\s*$", "", name_clean).strip() # retire le niveau en fin
name_clean = re.sub(r"\s+", "", name_clean) # retire tous les espaces
# Normalisation des accents courants
replacements = [
("é", "e"), ("è", "e"), ("ê", "e"), ("ë", "e"),
("à", "a"), ("â", "a"), ("ä", "a"),
("î", "i"), ("ï", "i"),
("ô", "o"), ("ö", "o"),
("û", "u"), ("ù", "u"), ("ü", "u"),
("ç", "c"),
]
for src, dst in replacements:
name_clean = name_clean.replace(src, dst)
for key in ANOMALY_TYPE_MAP:
if key == "none":
continue
if key in name_clean or name_clean in key:
return key
return "none"
def convert_stats_character(old_skill: dict, warnings: list) -> dict:
"""Convertit system.skill (ancien) → system.stats (nouveau) pour un PJ."""
stats = {}
for stat in STATS:
old_stat = old_skill.get(stat, {})
new_stat = {
"label": stat,
"res": int(old_stat.get("res", 0) or 0),
}
for skill in SKILLS[stat]:
old_sk = old_stat.get(skill, {})
val = old_sk.get("value", 0)
try:
val = int(val) if val is not None else 0
except (ValueError, TypeError):
warnings.append(f"Valeur de compétence invalide pour {stat}.{skill}: {val!r} → 0")
val = 0
new_stat[skill] = {"label": skill, "value": val}
stats[stat] = new_stat
return stats
def convert_stats_npc(old_skill: dict, warnings: list) -> dict:
"""Convertit system.skill (ancien) → system.stats (nouveau) pour un PNJ."""
stats = {}
for stat in STATS:
old_stat = old_skill.get(stat, {})
res = int(old_stat.get("res", 0) or 0)
stats[stat] = {
"label": stat,
"res": res,
"actuel": res, # actuel = res par défaut
}
return stats
def convert_attributs(old_attributs: dict) -> dict:
"""Convertit les attributs du vieux format plat vers SchemaField {value, max}."""
return {
"entregent": {
"value": int(old_attributs.get("entregent", 0) or 0),
"max": int(old_attributs.get("entregentmax", 0) or 0),
},
"fortune": {
"value": int(old_attributs.get("fortune", 0) or 0),
"max": int(old_attributs.get("fortunemax", 0) or 0),
},
"reve": {
"value": int(old_attributs.get("reve", 0) or 0),
"max": int(old_attributs.get("revemax", 0) or 0),
},
"vision": {
"value": int(old_attributs.get("vision", 0) or 0),
"max": int(old_attributs.get("visionmax", 0) or 0),
},
}
def convert_item(item: dict, warnings: list) -> dict | None:
"""
Convertit un item de l'ancien format vers le nouveau.
Retourne None si l'item doit être ignoré (type inconnu sans données utiles).
"""
old_type = item.get("type", "")
old_sys = item.get("system", {})
name = item.get("name", "Sans nom")
new_item = {
"_id": make_id(),
"name": name,
"img": item.get("img", "icons/svg/item-bag.svg"),
"effects": [],
"flags": {},
"sort": 0,
}
if old_type == "anomaly":
level = 0
try:
level = int(old_sys.get("value", 1) or 1)
except (ValueError, TypeError):
level = 1
level = max(1, min(4, level))
# Résolution du subtype : l'ancien système le stocke mal ("weapon"), on l'infère du nom
subtype = resolve_anomaly_type_from_name(name)
if subtype == "none":
warnings.append(f"Impossible de déterminer le type d'anomalie depuis '{name}', 'none' utilisé")
new_item["type"] = "anomaly"
new_item["system"] = {
"subtype": subtype,
"level": level,
"usesRemaining": level,
"technique": old_sys.get("technique", "") or "",
"narratif": old_sys.get("narratif", "") or "",
}
elif old_type == "aspect":
valeur = 0
try:
valeur = int(old_sys.get("value", 0) or 0)
except (ValueError, TypeError):
valeur = 0
new_item["type"] = "aspect"
new_item["system"] = {
"valeur": valeur,
"description": old_sys.get("narratif", "") or old_sys.get("technique", "") or "",
}
elif old_type == "item":
old_subtype = (old_sys.get("subtype") or "").lower().strip()
damage = old_sys.get("damage", "") or ""
protect = old_sys.get("protection", "") or ""
if old_subtype == "weapon" or (damage and not protect):
new_item["type"] = "weapon"
new_item["system"] = {
"type": "melee",
"degats": "0",
"portee": "contact",
"equipped": False,
"description": old_sys.get("technique", "") or old_sys.get("narratif", "") or "",
}
if damage:
warnings.append(f"Item '{name}' : valeur damage='{damage}' non convertie automatiquement, à saisir manuellement")
elif old_subtype == "armor" or (protect and not damage):
new_item["type"] = "armure"
new_item["system"] = {
"protection": 1,
"malus": 1,
"equipped": False,
"description": old_sys.get("technique", "") or old_sys.get("narratif", "") or "",
}
if protect:
warnings.append(f"Item '{name}' : valeur protection='{protect}' non convertie automatiquement, à saisir manuellement")
else:
# Équipement générique
new_item["type"] = "equipment"
new_item["system"] = {
"description": old_sys.get("technique", "") or old_sys.get("narratif", "") or "",
}
else:
warnings.append(f"Type d'item inconnu '{old_type}' pour '{name}', ignoré")
return None
return new_item
def convert_actor(old: dict) -> tuple[dict, list[str]]:
"""Convertit un acteur complet. Retourne (new_actor, warnings)."""
warnings = []
actor_type = old.get("type", "character")
old_sys = old.get("system", {})
old_skill = old_sys.get("skill", {})
new_sys = {}
# ── Champs communs ──────────────────────────────────────────────────────────────
new_sys["concept"] = old_sys.get("concept", "") or ""
new_sys["description"] = old_sys.get("description", "") or "" # gardé dans metier/concept
new_sys["metier"] = old_sys.get("metier", "") or old_sys.get("concept", "") or ""
new_sys["faction"] = old_sys.get("faction", "") or ""
# ── Blessures / Destin / Spleen ─────────────────────────────────────────────────
new_sys["blessures"] = {"lvl": int(old_sys.get("blessures", {}).get("lvl", 0) or 0)}
new_sys["destin"] = {"lvl": int(old_sys.get("destin", {}).get("lvl", 0) or 0)}
new_sys["spleen"] = {"lvl": int(old_sys.get("spleen", {}).get("lvl", 0) or 0)}
# ── Stats ───────────────────────────────────────────────────────────────────────
if actor_type == "character":
new_sys["stats"] = convert_stats_character(old_skill, warnings)
# Anomalie : type depuis l'index, niveau depuis anomalyval
anomaly_type = resolve_anomaly_type(old_sys)
anomaly_val = int(old_sys.get("anomalyval", 0) or 0)
new_sys["anomaly"] = {"type": anomaly_type, "value": anomaly_val}
# Attributs
new_sys["attributs"] = convert_attributs(old_sys.get("attributs", {}))
# Biographie → historique
new_sys["historique"] = old_sys.get("description", "") or ""
new_sys["descriptionPhysique"] = ""
new_sys["descriptionPsychologique"] = ""
new_sys["initiative"] = 0
# Factions (vide)
new_sys["factions"] = old_sys.get("factions", {})
elif actor_type == "npc":
new_sys["stats"] = convert_stats_npc(old_skill, warnings)
new_sys["npcType"] = old_sys.get("npcType", "standard") or "standard"
new_sys["historique"] = old_sys.get("description", "") or ""
# ── Items ───────────────────────────────────────────────────────────────────────
new_items = []
for item in old.get("items", []):
converted = convert_item(item, warnings)
if converted:
new_items.append(converted)
new_actor = {
"_id": make_id(),
"name": old.get("name", "Personnage sans nom"),
"type": actor_type,
"img": old.get("img", "icons/svg/mystery-man.svg"),
"system": new_sys,
"items": new_items,
"effects": [],
"folder": None,
"flags": {},
"prototypeToken": old.get("prototypeToken", {}),
}
return new_actor, warnings
def convert_file(path: str) -> None:
"""Lit path, convertit, écrit <base>-converted.json."""
print(f"\n{'' * 60}")
print(f"Traitement : {path}")
with open(path, "r", encoding="utf-8") as f:
old = json.load(f)
new_actor, warnings = convert_actor(old)
for w in warnings:
print(f"{w}")
base, _ = os.path.splitext(path)
out_path = f"{base}-converted.json"
with open(out_path, "w", encoding="utf-8") as f:
json.dump(new_actor, f, ensure_ascii=False, indent=2)
print(f" ✓ Écrit : {out_path}")
print(f" type={new_actor['type']} items={len(new_actor['items'])} avertissements={len(warnings)}")
def main():
if len(sys.argv) < 2:
print("Usage: python3 convert-old-system.py <fichier.json> [fichier2.json ...]")
sys.exit(1)
for path in sys.argv[1:]:
if not os.path.isfile(path):
print(f"Fichier introuvable : {path}", file=sys.stderr)
continue
convert_file(path)
print(f"\n{'' * 60}")
print("Conversion terminée.")
if __name__ == "__main__":
main()
@@ -0,0 +1,143 @@
{
"_id": "e9e583fc41454c90",
"name": "Ajax",
"type": "npc",
"img": "https://assets.forge-vtt.com/630dd9fa56bd61d804eb1dec/tokenizer/celestopol/ajax.Avatar.webp?1719437847752",
"system": {
"concept": "",
"description": "",
"metier": "",
"faction": "",
"blessures": {
"lvl": 0
},
"destin": {
"lvl": 0
},
"spleen": {
"lvl": 0
},
"stats": {
"ame": {
"label": "ame",
"res": 0,
"actuel": 0
},
"corps": {
"label": "corps",
"res": 0,
"actuel": 0
},
"coeur": {
"label": "coeur",
"res": 0,
"actuel": 0
},
"esprit": {
"label": "esprit",
"res": 0,
"actuel": 0
}
},
"npcType": "standard",
"historique": ""
},
"items": [],
"effects": [],
"folder": null,
"flags": {},
"prototypeToken": {
"name": "Ajax",
"displayName": 0,
"actorLink": false,
"appendNumber": false,
"prependAdjective": false,
"texture": {
"src": "https://assets.forge-vtt.com/630dd9fa56bd61d804eb1dec/tokenizer/celestopol/ajax.Token.webp?1719437847752",
"scaleX": 1,
"scaleY": 1,
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"anchorX": 0.5,
"anchorY": 0.5,
"fit": "contain",
"tint": "#ffffff",
"alphaThreshold": 0.75
},
"width": 1,
"height": 1,
"lockRotation": false,
"rotation": 0,
"alpha": 1,
"disposition": -1,
"displayBars": 0,
"bar1": {
"attribute": null
},
"bar2": {
"attribute": null
},
"light": {
"alpha": 0.5,
"angle": 360,
"bright": 0,
"coloration": 1,
"dim": 0,
"attenuation": 0.5,
"luminosity": 0.5,
"saturation": 0,
"contrast": 0,
"shadows": 0,
"animation": {
"type": null,
"speed": 5,
"intensity": 5,
"reverse": false
},
"darkness": {
"min": 0,
"max": 1
},
"negative": false,
"priority": 0,
"color": null
},
"sight": {
"enabled": true,
"range": 30,
"angle": 360,
"visionMode": "basic",
"color": null,
"attenuation": 0.1,
"brightness": 0,
"saturation": 0,
"contrast": 0
},
"detectionModes": [],
"flags": {},
"randomImg": false,
"occludable": {
"radius": 0
},
"ring": {
"enabled": false,
"colors": {
"ring": null,
"background": null
},
"effects": 1,
"subject": {
"scale": 1,
"texture": null
}
},
"turnMarker": {
"mode": 1,
"animation": null,
"src": null,
"disposition": false
},
"movementAction": null
}
}
@@ -0,0 +1,459 @@
{
"folder": "fbRXVyFLLyOpuiTd",
"name": "Ajax",
"type": "npc",
"img": "https://assets.forge-vtt.com/630dd9fa56bd61d804eb1dec/tokenizer/celestopol/ajax.Avatar.webp?1719437847752",
"system": {
"concept": "",
"anomaly": "0",
"anomalyval": 0,
"anomalymax": "0",
"initiative": 0,
"description": "",
"prefs": {
"typeofthrow": {
"check": true,
"choice": "0"
}
},
"prompt": {
"typeofthrow": {
"check": true,
"choice": "0"
},
"configure": {
"numberofdice": 0,
"aspect": 0,
"bonus": 0,
"bonusauspiciousdice": 0,
"typeofthrow": 0,
"aspectskill": 0,
"bonusmalusskill": 0,
"aspectspeciality": 0,
"rolldifficulty": 0,
"bonusmalusspeciality": 0
}
},
"skill": {
"skilltypes": [
"CEL1922.opt.ame",
"CEL1922.opt.attraction",
"CEL1922.opt.artifice",
"CEL1922.opt.coercition",
"CEL1922.opt.faveur",
"CEL1922.opt.corps",
"CEL1922.opt.echauffouree",
"CEL1922.opt.effacement",
"CEL1922.opt.prouesse",
"CEL1922.opt.mobilite",
"CEL1922.opt.coeur",
"CEL1922.opt.appreciation",
"CEL1922.opt.arts",
"CEL1922.opt.inspiration",
"CEL1922.opt.traque",
"CEL1922.opt.esprit",
"CEL1922.opt.instruction",
"CEL1922.opt.mtechnologique",
"CEL1922.opt.raisonnement",
"CEL1922.opt.traitement"
],
"moondicetypes": [
"CEL1922.opt.nouvellelune",
"CEL1922.opt.premiercroissant",
"CEL1922.opt.premierquartier",
"CEL1922.opt.lunegibbeuse",
"CEL1922.opt.lunevoutee",
"CEL1922.opt.derniercroissant",
"CEL1922.opt.dernierquartier",
"CEL1922.opt.pleinelune"
],
"woundstypes": [
"CEL1922.opt.none",
"CEL1922.opt.anodin",
"CEL1922.opt.derisoire",
"CEL1922.opt.negligeable",
"CEL1922.opt.superficiel",
"CEL1922.opt.leger",
"CEL1922.opt.modere",
"CEL1922.opt.grave",
"CEL1922.opt.dramatique"
],
"woundsmalus": [
0,
0,
0,
-1,
-1,
-2,
-2,
-3,
-999
],
"woundsrecup": [
"CEL1922.opt.none",
"CEL1922.1 minute",
"CEL1922.1 minute",
"CEL1922.10 minutes",
"CEL1922.10 minutes",
"CEL1922.30 minutes",
"CEL1922.30 minutes",
"CEL1922.1 day",
"CEL1922.Out of Fiction"
],
"destinytypes": [
"CEL1922.opt.none",
"CEL1922.opt.libel1",
"CEL1922.opt.libel2",
"CEL1922.opt.libel3",
"CEL1922.opt.libel4",
"CEL1922.opt.libel5",
"CEL1922.opt.libel6",
"CEL1922.opt.libel7",
"CEL1922.opt.libel8"
],
"spleentypes": [
"CEL1922.opt.none",
"CEL1922.opt.libel1",
"CEL1922.opt.libel2",
"CEL1922.opt.libel3",
"CEL1922.opt.libel4",
"CEL1922.opt.libel5",
"CEL1922.opt.libel6",
"CEL1922.opt.libel7",
"CEL1922.opt.libel8"
],
"anomalytypes": [
"CEL1922.opt.none",
"CEL1922.opt.entropie",
"CEL1922.opt.communicationaveclesmorts",
"CEL1922.opt.illusion",
"CEL1922.opt.suggestion",
"CEL1922.opt.tarotdivinatoire",
"CEL1922.opt.telekinesie",
"CEL1922.opt.telepathie",
"CEL1922.opt.voyageastral"
],
"ame": {
"res": 0,
"actuel": 0,
"artifice": {
"value": 0
},
"attraction": {
"value": 0
},
"coercition": {
"value": 0
},
"faveur": {
"value": 0
}
},
"corps": {
"res": 0,
"actuel": 0,
"echauffouree": {
"value": 0
},
"effacement": {
"value": 0
},
"prouesse": {
"value": 0
},
"mobilite": {
"value": 0
}
},
"coeur": {
"res": 0,
"actuel": 0,
"appreciation": {
"value": 0
},
"arts": {
"value": 0
},
"inspiration": {
"value": 0
},
"traque": {
"value": 0
}
},
"esprit": {
"res": 0,
"actuel": 0,
"instruction": {
"value": 0
},
"mtechnologique": {
"value": 0
},
"raisonnement": {
"value": 0
},
"traitement": {
"value": 0
}
},
"aspecttypes": [
"CEL1922.opt.none",
"CEL1922.opt.aspect1",
"CEL1922.opt.aspect2",
"CEL1922.opt.aspect3",
"CEL1922.opt.aspect4",
"CEL1922.opt.aspect5",
"CEL1922.opt.aspect6",
"CEL1922.opt.aspect7",
"CEL1922.opt.aspect8"
]
},
"blessures": {
"lvl": 0,
"blessure_1": {
"check": false,
"bonus": 0,
"malus": 0
},
"blessure_2": {
"check": false,
"bonus": 0,
"malus": 0
},
"blessure_3": {
"check": false,
"bonus": 0,
"malus": -1
},
"blessure_4": {
"check": false,
"bonus": 0,
"malus": -1
},
"blessure_5": {
"check": false,
"bonus": 0,
"malus": -2
},
"blessure_6": {
"check": false,
"bonus": 0,
"malus": -2
},
"blessure_7": {
"check": false,
"bonus": 0,
"malus": -3
},
"blessure_8": {
"check": false,
"bonus": 0,
"malus": -999
}
},
"destin": {
"lvl": 0,
"destin_1": {
"check": false,
"bonus": 0,
"malus": 0
},
"destin_2": {
"check": false,
"bonus": 0,
"malus": 0
},
"destin_3": {
"check": false,
"bonus": 0,
"malus": 0
},
"destin_4": {
"check": false,
"bonus": 0,
"malus": 0
},
"destin_5": {
"check": false,
"bonus": 0,
"malus": 0
},
"destin_6": {
"check": false,
"bonus": 0,
"malus": 0
},
"destin_7": {
"check": false,
"bonus": 0,
"malus": 0
},
"destin_8": {
"check": false,
"bonus": 0,
"malus": 0
}
},
"spleen": {
"lvl": 0,
"spleen_1": {
"check": false,
"bonus": 0,
"malus": 0
},
"spleen_2": {
"check": false,
"bonus": 0,
"malus": 0
},
"spleen_3": {
"check": false,
"bonus": 0,
"malus": 0
},
"spleen_4": {
"check": false,
"bonus": 0,
"malus": 0
},
"spleen_5": {
"check": false,
"bonus": 0,
"malus": 0
},
"spleen_6": {
"check": false,
"bonus": 0,
"malus": 0
},
"spleen_7": {
"check": false,
"bonus": 0,
"malus": 0
},
"spleen_8": {
"check": false,
"bonus": 0,
"malus": 0
}
}
},
"prototypeToken": {
"name": "Ajax",
"displayName": 0,
"actorLink": false,
"appendNumber": false,
"prependAdjective": false,
"texture": {
"src": "https://assets.forge-vtt.com/630dd9fa56bd61d804eb1dec/tokenizer/celestopol/ajax.Token.webp?1719437847752",
"scaleX": 1,
"scaleY": 1,
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"anchorX": 0.5,
"anchorY": 0.5,
"fit": "contain",
"tint": "#ffffff",
"alphaThreshold": 0.75
},
"width": 1,
"height": 1,
"lockRotation": false,
"rotation": 0,
"alpha": 1,
"disposition": -1,
"displayBars": 0,
"bar1": {
"attribute": null
},
"bar2": {
"attribute": null
},
"light": {
"alpha": 0.5,
"angle": 360,
"bright": 0,
"coloration": 1,
"dim": 0,
"attenuation": 0.5,
"luminosity": 0.5,
"saturation": 0,
"contrast": 0,
"shadows": 0,
"animation": {
"type": null,
"speed": 5,
"intensity": 5,
"reverse": false
},
"darkness": {
"min": 0,
"max": 1
},
"negative": false,
"priority": 0,
"color": null
},
"sight": {
"enabled": true,
"range": 30,
"angle": 360,
"visionMode": "basic",
"color": null,
"attenuation": 0.1,
"brightness": 0,
"saturation": 0,
"contrast": 0
},
"detectionModes": [],
"flags": {},
"randomImg": false,
"occludable": {
"radius": 0
},
"ring": {
"enabled": false,
"colors": {
"ring": null,
"background": null
},
"effects": 1,
"subject": {
"scale": 1,
"texture": null
}
},
"turnMarker": {
"mode": 1,
"animation": null,
"src": null,
"disposition": false
},
"movementAction": null
},
"items": [],
"effects": [],
"flags": {},
"_stats": {
"systemId": "celestopol1922",
"systemVersion": "0.0.7bêta",
"coreVersion": "13.348",
"createdTime": 1719437808862,
"modifiedTime": 1719437944369,
"lastModifiedBy": "6VFjkRpqiseDFIh9",
"compendiumSource": null,
"duplicateSource": null,
"exportSource": {
"worldId": "celestopol-1922",
"uuid": "Actor.QcGcXhb9FvHCb3uf",
"coreVersion": "13.351",
"systemId": "celestopol1922",
"systemVersion": "1.2.0"
}
},
"ownership": {
"default": 0
}
}
@@ -0,0 +1,296 @@
{
"_id": "04f6df7b17f747c6",
"name": "BAO WANG",
"type": "character",
"img": "https://assets.forge-vtt.com/630dd9fa56bd61d804eb1dec/systems/celestopol1922/images/pj/bao_wang.png?1719410935795",
"system": {
"concept": "LESCROC",
"description": "<h1>BAO WANG : LESCROC </h1><p></p><p><span class=\"fontstyle0\">Ancien employé du casino flottant la Libellule, Bao Wang officiait comme videur.</span></p><p></p><p><span class=\"fontstyle0\">Après une adolescence de petite frappe dans les faubourgs de Shanghai, il parvint à sintroduire dans un obus-traversier pour rejoindre Célestopol, autant attiré par les perspectives offertes par la cité lunaire que par le besoin de se faire oublier des services de police de sa ville natale.</span></p><p></p><p><span class=\"fontstyle0\">Problème : Bao répugne à se battre et préfère largement la finesse à la violence. De son ancienne vie, il conserve un goût prononcé pour le jeu et la gente féminine. Par ailleurs, Bao a également un certain penchant pour les cabarets clandestins dans lesquels il aime à se travestir à loccasion. Cest dans lun de ces lieux interlopes de la cité que le jeune Chinois a rencontré Ernest. Ils ont sympathisé et le vétéran a su voir un certain potentiel chez Bao. Ce dernier, passablement désœuvré et fauché, accepta sans trop y croire dintégrer lagence du Lys blanc.</span></p><p></p><p><span class=\"fontstyle0\">Son sens de la débrouillardise et son passé houleux parfois bien utile lui octroient des compétences uniques et font désormais de lui un agent indispensable. Le jeune homme sinvestit dailleurs sincèrement dans son travail. Toujours tiré à quatre épingles, Bao est reconnu parmi ses coéquipiers comme le plus nonchalant du groupe.</span> <br style=\"font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px\" /></p>",
"metier": "LESCROC",
"faction": "",
"blessures": {
"lvl": 0
},
"destin": {
"lvl": 0
},
"spleen": {
"lvl": 0
},
"stats": {
"ame": {
"label": "ame",
"res": 2,
"artifice": {
"label": "artifice",
"value": 4
},
"attraction": {
"label": "attraction",
"value": 2
},
"coercition": {
"label": "coercition",
"value": 2
},
"faveur": {
"label": "faveur",
"value": 2
}
},
"corps": {
"label": "corps",
"res": 4,
"echauffouree": {
"label": "echauffouree",
"value": 0
},
"effacement": {
"label": "effacement",
"value": 4
},
"mobilite": {
"label": "mobilite",
"value": 2
},
"prouesse": {
"label": "prouesse",
"value": 2
}
},
"coeur": {
"label": "coeur",
"res": 0,
"appreciation": {
"label": "appreciation",
"value": 2
},
"arts": {
"label": "arts",
"value": 0
},
"inspiration": {
"label": "inspiration",
"value": 1
},
"traque": {
"label": "traque",
"value": 3
}
},
"esprit": {
"label": "esprit",
"res": 0,
"instruction": {
"label": "instruction",
"value": 1
},
"mtechnologique": {
"label": "mtechnologique",
"value": 2
},
"raisonnement": {
"label": "raisonnement",
"value": 1
},
"traitement": {
"label": "traitement",
"value": 2
}
}
},
"anomaly": {
"type": "entropie",
"value": 1
},
"attributs": {
"entregent": {
"value": 0,
"max": 0
},
"fortune": {
"value": 0,
"max": 0
},
"reve": {
"value": 0,
"max": 0
},
"vision": {
"value": 0,
"max": 0
}
},
"historique": "<h1>BAO WANG : LESCROC </h1><p></p><p><span class=\"fontstyle0\">Ancien employé du casino flottant la Libellule, Bao Wang officiait comme videur.</span></p><p></p><p><span class=\"fontstyle0\">Après une adolescence de petite frappe dans les faubourgs de Shanghai, il parvint à sintroduire dans un obus-traversier pour rejoindre Célestopol, autant attiré par les perspectives offertes par la cité lunaire que par le besoin de se faire oublier des services de police de sa ville natale.</span></p><p></p><p><span class=\"fontstyle0\">Problème : Bao répugne à se battre et préfère largement la finesse à la violence. De son ancienne vie, il conserve un goût prononcé pour le jeu et la gente féminine. Par ailleurs, Bao a également un certain penchant pour les cabarets clandestins dans lesquels il aime à se travestir à loccasion. Cest dans lun de ces lieux interlopes de la cité que le jeune Chinois a rencontré Ernest. Ils ont sympathisé et le vétéran a su voir un certain potentiel chez Bao. Ce dernier, passablement désœuvré et fauché, accepta sans trop y croire dintégrer lagence du Lys blanc.</span></p><p></p><p><span class=\"fontstyle0\">Son sens de la débrouillardise et son passé houleux parfois bien utile lui octroient des compétences uniques et font désormais de lui un agent indispensable. Le jeune homme sinvestit dailleurs sincèrement dans son travail. Toujours tiré à quatre épingles, Bao est reconnu parmi ses coéquipiers comme le plus nonchalant du groupe.</span> <br style=\"font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px\" /></p>",
"descriptionPhysique": "",
"descriptionPsychologique": "",
"initiative": 0,
"factions": {
"pinkerton": 0,
"police": 0,
"okhrana": 0,
"lunanovatek": 0,
"oto": 0,
"syndicats": 0,
"vorovskoymir": 0,
"cour": 0,
"perso": 0,
"libel": "",
"perso2": 0,
"libel2": ""
}
},
"items": [
{
"_id": "23315ed101e248c8",
"name": "Entropie 1",
"img": "https://assets.forge-vtt.com/bazaar/core/icons/svg/item-bag.svg",
"effects": [],
"flags": {},
"sort": 0,
"type": "anomaly",
"system": {
"subtype": "entropie",
"level": 1,
"usesRemaining": 1,
"technique": "<p><span class=\"fontstyle0\">Bao peut relancer le dé de la Lune une fois lors dun même scénario et choisit de conserver le résultat quil préfère (cette faculté ne fonctionne pas sur les tests de chance).</span></p>",
"narratif": "<p><span class=\"fontstyle0\">Bao peut influer sur le hasard de manière mineure. </span><span class=\"fontstyle2\">Exemple : <em>avoir une bonne main en jouant au poker à la distribution, que le feu soit au vert en tournant au coin de la rue, etc.</em></span></p>"
}
},
{
"_id": "4edb4b80b9514a7b",
"name": "Belle gueule 2",
"img": "https://assets.forge-vtt.com/bazaar/core/icons/svg/item-bag.svg",
"effects": [],
"flags": {},
"sort": 0,
"type": "aspect",
"system": {
"valeur": 2,
"description": ""
}
},
{
"_id": "153b0a094ca4462e",
"name": "Aime le jeu 1",
"img": "https://assets.forge-vtt.com/bazaar/core/icons/svg/item-bag.svg",
"effects": [],
"flags": {},
"sort": 0,
"type": "aspect",
"system": {
"valeur": 1,
"description": ""
}
},
{
"_id": "cbdc76f66bd041a0",
"name": "Nouvel Équipement",
"img": "https://assets.forge-vtt.com/bazaar/core/icons/svg/item-bag.svg",
"effects": [],
"flags": {},
"sort": 0,
"type": "equipment",
"system": {
"description": ""
}
}
],
"effects": [],
"folder": null,
"flags": {},
"prototypeToken": {
"name": "BAO WANG",
"displayName": 0,
"actorLink": false,
"appendNumber": false,
"prependAdjective": false,
"texture": {
"src": "https://assets.forge-vtt.com/630dd9fa56bd61d804eb1dec/tokenizer/celestopol/bao_wang.Token.webp?1719410935795",
"scaleX": 1,
"scaleY": 1,
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"tint": "#ffffff",
"anchorX": 0.5,
"anchorY": 0.5,
"fit": "contain",
"alphaThreshold": 0.75
},
"width": 1,
"height": 1,
"lockRotation": false,
"rotation": 0,
"alpha": 1,
"disposition": -1,
"displayBars": 0,
"bar1": {
"attribute": null
},
"bar2": {
"attribute": null
},
"light": {
"alpha": 0.5,
"angle": 360,
"bright": 0,
"coloration": 1,
"dim": 0,
"attenuation": 0.5,
"luminosity": 0.5,
"saturation": 0,
"contrast": 0,
"shadows": 0,
"animation": {
"type": null,
"speed": 5,
"intensity": 5,
"reverse": false
},
"darkness": {
"min": 0,
"max": 1
},
"color": null,
"negative": false,
"priority": 0
},
"sight": {
"enabled": false,
"range": 0,
"angle": 360,
"visionMode": "basic",
"attenuation": 0.1,
"brightness": 0,
"saturation": 0,
"contrast": 0,
"color": null
},
"detectionModes": [],
"flags": {},
"randomImg": false,
"occludable": {
"radius": 0
},
"ring": {
"enabled": false,
"colors": {
"ring": null,
"background": null
},
"effects": 1,
"subject": {
"scale": 1,
"texture": null
}
},
"turnMarker": {
"mode": 1,
"animation": null,
"src": null,
"disposition": false
},
"movementAction": null
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,143 @@
{
"_id": "fabe178df844475b",
"name": "Citoyen",
"type": "npc",
"img": "https://assets.forge-vtt.com/630dd9fa56bd61d804eb1dec/tokenizer/celestopol/citoyen.Avatar.webp?1719438184882",
"system": {
"concept": "",
"description": "",
"metier": "",
"faction": "",
"blessures": {
"lvl": 0
},
"destin": {
"lvl": 0
},
"spleen": {
"lvl": 0
},
"stats": {
"ame": {
"label": "ame",
"res": 0,
"actuel": 0
},
"corps": {
"label": "corps",
"res": 0,
"actuel": 0
},
"coeur": {
"label": "coeur",
"res": 0,
"actuel": 0
},
"esprit": {
"label": "esprit",
"res": 0,
"actuel": 0
}
},
"npcType": "standard",
"historique": ""
},
"items": [],
"effects": [],
"folder": null,
"flags": {},
"prototypeToken": {
"name": "Citoyen",
"displayName": 0,
"actorLink": false,
"appendNumber": false,
"prependAdjective": false,
"texture": {
"src": "https://assets.forge-vtt.com/630dd9fa56bd61d804eb1dec/tokenizer/celestopol/citoyen.Token.webp?1719438184882",
"scaleX": 1,
"scaleY": 1,
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"anchorX": 0.5,
"anchorY": 0.5,
"fit": "contain",
"tint": "#ffffff",
"alphaThreshold": 0.75
},
"width": 1,
"height": 1,
"lockRotation": false,
"rotation": 0,
"alpha": 1,
"disposition": -1,
"displayBars": 0,
"bar1": {
"attribute": null
},
"bar2": {
"attribute": null
},
"light": {
"alpha": 0.5,
"angle": 360,
"bright": 0,
"coloration": 1,
"dim": 0,
"attenuation": 0.5,
"luminosity": 0.5,
"saturation": 0,
"contrast": 0,
"shadows": 0,
"animation": {
"type": null,
"speed": 5,
"intensity": 5,
"reverse": false
},
"darkness": {
"min": 0,
"max": 1
},
"negative": false,
"priority": 0,
"color": null
},
"sight": {
"enabled": true,
"range": 30,
"angle": 360,
"visionMode": "basic",
"color": null,
"attenuation": 0.1,
"brightness": 0,
"saturation": 0,
"contrast": 0
},
"detectionModes": [],
"flags": {},
"randomImg": false,
"occludable": {
"radius": 0
},
"ring": {
"enabled": false,
"colors": {
"ring": null,
"background": null
},
"effects": 1,
"subject": {
"scale": 1,
"texture": null
}
},
"turnMarker": {
"mode": 1,
"animation": null,
"src": null,
"disposition": false
},
"movementAction": null
}
}
@@ -0,0 +1,459 @@
{
"folder": "5aDs3Gbi2cHy35X9",
"name": "Citoyen",
"type": "npc",
"img": "https://assets.forge-vtt.com/630dd9fa56bd61d804eb1dec/tokenizer/celestopol/citoyen.Avatar.webp?1719438184882",
"system": {
"concept": "",
"anomaly": "0",
"anomalyval": 0,
"anomalymax": "0",
"initiative": 0,
"description": "",
"prefs": {
"typeofthrow": {
"check": true,
"choice": "0"
}
},
"prompt": {
"typeofthrow": {
"check": true,
"choice": "0"
},
"configure": {
"numberofdice": 0,
"aspect": 0,
"bonus": 0,
"bonusauspiciousdice": 0,
"typeofthrow": 0,
"aspectskill": 0,
"bonusmalusskill": 0,
"aspectspeciality": 0,
"rolldifficulty": 0,
"bonusmalusspeciality": 0
}
},
"skill": {
"skilltypes": [
"CEL1922.opt.ame",
"CEL1922.opt.attraction",
"CEL1922.opt.artifice",
"CEL1922.opt.coercition",
"CEL1922.opt.faveur",
"CEL1922.opt.corps",
"CEL1922.opt.echauffouree",
"CEL1922.opt.effacement",
"CEL1922.opt.prouesse",
"CEL1922.opt.mobilite",
"CEL1922.opt.coeur",
"CEL1922.opt.appreciation",
"CEL1922.opt.arts",
"CEL1922.opt.inspiration",
"CEL1922.opt.traque",
"CEL1922.opt.esprit",
"CEL1922.opt.instruction",
"CEL1922.opt.mtechnologique",
"CEL1922.opt.raisonnement",
"CEL1922.opt.traitement"
],
"moondicetypes": [
"CEL1922.opt.nouvellelune",
"CEL1922.opt.premiercroissant",
"CEL1922.opt.premierquartier",
"CEL1922.opt.lunegibbeuse",
"CEL1922.opt.lunevoutee",
"CEL1922.opt.derniercroissant",
"CEL1922.opt.dernierquartier",
"CEL1922.opt.pleinelune"
],
"woundstypes": [
"CEL1922.opt.none",
"CEL1922.opt.anodin",
"CEL1922.opt.derisoire",
"CEL1922.opt.negligeable",
"CEL1922.opt.superficiel",
"CEL1922.opt.leger",
"CEL1922.opt.modere",
"CEL1922.opt.grave",
"CEL1922.opt.dramatique"
],
"woundsmalus": [
0,
0,
0,
-1,
-1,
-2,
-2,
-3,
-999
],
"woundsrecup": [
"CEL1922.opt.none",
"CEL1922.1 minute",
"CEL1922.1 minute",
"CEL1922.10 minutes",
"CEL1922.10 minutes",
"CEL1922.30 minutes",
"CEL1922.30 minutes",
"CEL1922.1 day",
"CEL1922.Out of Fiction"
],
"destinytypes": [
"CEL1922.opt.none",
"CEL1922.opt.libel1",
"CEL1922.opt.libel2",
"CEL1922.opt.libel3",
"CEL1922.opt.libel4",
"CEL1922.opt.libel5",
"CEL1922.opt.libel6",
"CEL1922.opt.libel7",
"CEL1922.opt.libel8"
],
"spleentypes": [
"CEL1922.opt.none",
"CEL1922.opt.libel1",
"CEL1922.opt.libel2",
"CEL1922.opt.libel3",
"CEL1922.opt.libel4",
"CEL1922.opt.libel5",
"CEL1922.opt.libel6",
"CEL1922.opt.libel7",
"CEL1922.opt.libel8"
],
"anomalytypes": [
"CEL1922.opt.none",
"CEL1922.opt.entropie",
"CEL1922.opt.communicationaveclesmorts",
"CEL1922.opt.illusion",
"CEL1922.opt.suggestion",
"CEL1922.opt.tarotdivinatoire",
"CEL1922.opt.telekinesie",
"CEL1922.opt.telepathie",
"CEL1922.opt.voyageastral"
],
"ame": {
"res": 0,
"actuel": 0,
"artifice": {
"value": 0
},
"attraction": {
"value": 0
},
"coercition": {
"value": 0
},
"faveur": {
"value": 0
}
},
"corps": {
"res": 0,
"actuel": 0,
"echauffouree": {
"value": 0
},
"effacement": {
"value": 0
},
"prouesse": {
"value": 0
},
"mobilite": {
"value": 0
}
},
"coeur": {
"res": 0,
"actuel": 0,
"appreciation": {
"value": 0
},
"arts": {
"value": 0
},
"inspiration": {
"value": 0
},
"traque": {
"value": 0
}
},
"esprit": {
"res": 0,
"actuel": 0,
"instruction": {
"value": 0
},
"mtechnologique": {
"value": 0
},
"raisonnement": {
"value": 0
},
"traitement": {
"value": 0
}
},
"aspecttypes": [
"CEL1922.opt.none",
"CEL1922.opt.aspect1",
"CEL1922.opt.aspect2",
"CEL1922.opt.aspect3",
"CEL1922.opt.aspect4",
"CEL1922.opt.aspect5",
"CEL1922.opt.aspect6",
"CEL1922.opt.aspect7",
"CEL1922.opt.aspect8"
]
},
"blessures": {
"lvl": 0,
"blessure_1": {
"check": false,
"bonus": 0,
"malus": 0
},
"blessure_2": {
"check": false,
"bonus": 0,
"malus": 0
},
"blessure_3": {
"check": false,
"bonus": 0,
"malus": -1
},
"blessure_4": {
"check": false,
"bonus": 0,
"malus": -1
},
"blessure_5": {
"check": false,
"bonus": 0,
"malus": -2
},
"blessure_6": {
"check": false,
"bonus": 0,
"malus": -2
},
"blessure_7": {
"check": false,
"bonus": 0,
"malus": -3
},
"blessure_8": {
"check": false,
"bonus": 0,
"malus": -999
}
},
"destin": {
"lvl": 0,
"destin_1": {
"check": false,
"bonus": 0,
"malus": 0
},
"destin_2": {
"check": false,
"bonus": 0,
"malus": 0
},
"destin_3": {
"check": false,
"bonus": 0,
"malus": 0
},
"destin_4": {
"check": false,
"bonus": 0,
"malus": 0
},
"destin_5": {
"check": false,
"bonus": 0,
"malus": 0
},
"destin_6": {
"check": false,
"bonus": 0,
"malus": 0
},
"destin_7": {
"check": false,
"bonus": 0,
"malus": 0
},
"destin_8": {
"check": false,
"bonus": 0,
"malus": 0
}
},
"spleen": {
"lvl": 0,
"spleen_1": {
"check": false,
"bonus": 0,
"malus": 0
},
"spleen_2": {
"check": false,
"bonus": 0,
"malus": 0
},
"spleen_3": {
"check": false,
"bonus": 0,
"malus": 0
},
"spleen_4": {
"check": false,
"bonus": 0,
"malus": 0
},
"spleen_5": {
"check": false,
"bonus": 0,
"malus": 0
},
"spleen_6": {
"check": false,
"bonus": 0,
"malus": 0
},
"spleen_7": {
"check": false,
"bonus": 0,
"malus": 0
},
"spleen_8": {
"check": false,
"bonus": 0,
"malus": 0
}
}
},
"prototypeToken": {
"name": "Citoyen",
"displayName": 0,
"actorLink": false,
"appendNumber": false,
"prependAdjective": false,
"texture": {
"src": "https://assets.forge-vtt.com/630dd9fa56bd61d804eb1dec/tokenizer/celestopol/citoyen.Token.webp?1719438184882",
"scaleX": 1,
"scaleY": 1,
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"anchorX": 0.5,
"anchorY": 0.5,
"fit": "contain",
"tint": "#ffffff",
"alphaThreshold": 0.75
},
"width": 1,
"height": 1,
"lockRotation": false,
"rotation": 0,
"alpha": 1,
"disposition": -1,
"displayBars": 0,
"bar1": {
"attribute": null
},
"bar2": {
"attribute": null
},
"light": {
"alpha": 0.5,
"angle": 360,
"bright": 0,
"coloration": 1,
"dim": 0,
"attenuation": 0.5,
"luminosity": 0.5,
"saturation": 0,
"contrast": 0,
"shadows": 0,
"animation": {
"type": null,
"speed": 5,
"intensity": 5,
"reverse": false
},
"darkness": {
"min": 0,
"max": 1
},
"negative": false,
"priority": 0,
"color": null
},
"sight": {
"enabled": true,
"range": 30,
"angle": 360,
"visionMode": "basic",
"color": null,
"attenuation": 0.1,
"brightness": 0,
"saturation": 0,
"contrast": 0
},
"detectionModes": [],
"flags": {},
"randomImg": false,
"occludable": {
"radius": 0
},
"ring": {
"enabled": false,
"colors": {
"ring": null,
"background": null
},
"effects": 1,
"subject": {
"scale": 1,
"texture": null
}
},
"turnMarker": {
"mode": 1,
"animation": null,
"src": null,
"disposition": false
},
"movementAction": null
},
"items": [],
"effects": [],
"flags": {},
"_stats": {
"systemId": "celestopol1922",
"systemVersion": "0.0.7bêta",
"coreVersion": "13.348",
"createdTime": 1719438039685,
"modifiedTime": 1719438184895,
"lastModifiedBy": "6VFjkRpqiseDFIh9",
"compendiumSource": null,
"duplicateSource": null,
"exportSource": {
"worldId": "celestopol-1922",
"uuid": "Actor.H4qPWYC8kbacuBfm",
"coreVersion": "13.351",
"systemId": "celestopol1922",
"systemVersion": "1.2.0"
}
},
"ownership": {
"default": 0
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

+282
View File
@@ -67,6 +67,7 @@ Hooks.once("init", () => {
SYSTEM, SYSTEM,
rollMoonStandalone: (actor = null) => CelestopolRoll.rollMoonStandalone(actor), rollMoonStandalone: (actor = null) => CelestopolRoll.rollMoonStandalone(actor),
manageFactionAspects: (actor = null) => _manageFactionAspects(actor), manageFactionAspects: (actor = null) => _manageFactionAspects(actor),
resetFactionAspects: () => _resetFactionAspects(),
getFactionAspectState: () => _getFactionAspectState(), getFactionAspectState: () => _getFactionAspectState(),
getFactionAspectSummary: (actor = null) => _getFactionAspectSummary(actor), getFactionAspectSummary: (actor = null) => _getFactionAspectSummary(actor),
getFactionDisplayLabel: (value) => _getFactionDisplayLabel(value), getFactionDisplayLabel: (value) => _getFactionDisplayLabel(value),
@@ -361,6 +362,259 @@ function _registerHandlebarsHelpers() {
}) })
} }
/* ─── Migration depuis l'ancien système ─────────────────────────────────── */
/** Mapping des types d'anomalies ancien→nouveau */
const _OLD_ANOMALY_TYPES = [
"none", "entropie", "communicationaveclesmorts", "illusion",
"suggestion", "tarotdivinatoire", "telekinesie", "telepathie", "voyageastral",
]
const _OLD_SKILLS = {
ame: ["artifice", "attraction", "coercition", "faveur"],
corps: ["echauffouree", "effacement", "mobilite", "prouesse"],
coeur: ["appreciation", "arts", "inspiration", "traque"],
esprit: ["instruction", "mtechnologique", "raisonnement", "traitement"],
}
/** Infère le type d'anomalie depuis le nom de l'item (ex: "Entropie 1" → "entropie"). */
function _anomalyTypeFromName(name) {
let n = name.toLowerCase().replace(/\s*\d+\s*$/, "").replace(/\s+/g, "")
const accents = [["é","e"],["è","e"],["ê","e"],["ë","e"],["à","a"],["â","a"],
["î","i"],["ï","i"],["ô","o"],["û","u"],["ù","u"],["ü","u"],["ç","c"]]
for (const [s,d] of accents) n = n.replaceAll(s, d)
return _OLD_ANOMALY_TYPES.find(k => k !== "none" && (k.includes(n) || n.includes(k))) ?? "none"
}
/** Convertit les stats d'un PJ (skill → stats). */
function _convertStatsCharacter(oldSkill) {
const stats = {}
for (const stat of ["ame","corps","coeur","esprit"]) {
const os = oldSkill[stat] ?? {}
const ns = { label: stat, res: Number(os.res ?? 0) }
for (const sk of _OLD_SKILLS[stat]) {
const val = Number(os[sk]?.value ?? 0) || 0
ns[sk] = { label: sk, value: val }
}
stats[stat] = ns
}
return stats
}
/** Convertit les stats d'un PNJ (skill → stats avec actuel). */
function _convertStatsNPC(oldSkill) {
const stats = {}
for (const stat of ["ame","corps","coeur","esprit"]) {
const res = Number(oldSkill[stat]?.res ?? 0)
stats[stat] = { label: stat, res, actuel: res }
}
return stats
}
/** Convertit les attributs du format plat vers {value, max}. */
function _convertAttributs(a = {}) {
return {
entregent: { value: Number(a.entregent ?? 0), max: Number(a.entregentmax ?? 0) },
fortune: { value: Number(a.fortune ?? 0), max: Number(a.fortunemax ?? 0) },
reve: { value: Number(a.reve ?? 0), max: Number(a.revemax ?? 0) },
vision: { value: Number(a.vision ?? 0), max: Number(a.visionmax ?? 0) },
}
}
/** Convertit un item de l'ancien format. Retourne null si ignoré. */
function _convertItem(item, warnings) {
const os = item.system ?? {}
const name = item.name ?? "Sans nom"
const base = {
name,
img: item.img ?? "icons/svg/item-bag.svg",
effects: [],
flags: {},
sort: 0,
}
if (item.type === "anomaly") {
const level = Math.max(1, Math.min(4, Number(os.value ?? 1) || 1))
const subtype = _anomalyTypeFromName(name)
if (subtype === "none")
warnings.push(`Impossible de déterminer le type d'anomalie depuis "${name}"`)
return { ...base, type: "anomaly", system: {
subtype, level, usesRemaining: level,
technique: os.technique ?? "", narratif: os.narratif ?? "",
}}
}
if (item.type === "aspect") {
return { ...base, type: "aspect", system: {
valeur: Number(os.value ?? 0) || 0,
description: os.narratif ?? os.technique ?? "",
}}
}
if (item.type === "item") {
const sub = (os.subtype ?? "").toLowerCase()
if (sub === "weapon") {
if (os.damage) warnings.push(`"${name}" : dégâts "${os.damage}" à saisir manuellement`)
return { ...base, type: "weapon", system: {
type: "melee", degats: "0", portee: "contact", equipped: false,
description: os.technique ?? os.narratif ?? "",
}}
}
if (sub === "armor") {
if (os.protection) warnings.push(`"${name}" : protection "${os.protection}" à saisir manuellement`)
return { ...base, type: "armure", system: {
protection: 1, malus: 1, equipped: false,
description: os.technique ?? os.narratif ?? "",
}}
}
return { ...base, type: "equipment", system: {
description: os.technique ?? os.narratif ?? "",
}}
}
warnings.push(`Type d'item inconnu "${item.type}" pour "${name}", ignoré`)
return null
}
/** Convertit un acteur complet de l'ancien format vers le nouveau. */
function _convertOldActor(old) {
const warnings = []
const os = old.system ?? {}
const osk = os.skill ?? {}
const type = old.type ?? "character"
// Anomalie : résolution depuis l'index stocké dans os.anomaly
const anomalyIdx = Number(os.anomaly ?? 0)
const anomalyTypes = osk.anomalytypes ?? _OLD_ANOMALY_TYPES.map(k => `CEL1922.opt.${k}`)
const rawAnomalyKey = (anomalyTypes[anomalyIdx] ?? "").split(".").pop() ?? "none"
const anomalyType = _OLD_ANOMALY_TYPES.includes(rawAnomalyKey) ? rawAnomalyKey : "none"
const sys = {
concept: os.concept ?? "",
metier: os.metier ?? os.concept ?? "",
faction: os.faction ?? "",
blessures: { lvl: Number(os.blessures?.lvl ?? 0) },
destin: { lvl: Number(os.destin?.lvl ?? 0) },
spleen: { lvl: Number(os.spleen?.lvl ?? 0) },
}
if (type === "character") {
sys.stats = _convertStatsCharacter(osk)
sys.anomaly = { type: anomalyType, value: Number(os.anomalyval ?? 0) }
sys.attributs = _convertAttributs(os.attributs)
sys.historique = os.description ?? ""
sys.descriptionPhysique = ""
sys.descriptionPsychologique = ""
sys.initiative = 0
sys.factions = os.factions ?? {}
} else {
sys.stats = _convertStatsNPC(osk)
sys.npcType = os.npcType ?? "standard"
sys.historique = os.description ?? ""
}
const items = (old.items ?? []).map(it => _convertItem(it, warnings)).filter(Boolean)
const actor = {
name: old.name ?? "Personnage sans nom",
type,
img: old.img ?? "icons/svg/mystery-man.svg",
system: sys,
items,
effects: [],
folder: null,
flags: {},
prototypeToken: old.prototypeToken ?? {},
}
return { actor, warnings }
}
/** Ouvre la dialog DialogV2 de migration et gère l'import de l'acteur. */
async function _openMigrationDialog() {
const content = `
<div class="cel-migration-dialog" style="padding:0.5em 0">
<p style="margin-bottom:0.8em">${game.i18n.localize("CELESTOPOL.Migration.instructions")}</p>
<div style="display:flex;gap:0.5em;align-items:center">
<label style="font-weight:bold;white-space:nowrap">
${game.i18n.localize("CELESTOPOL.Migration.fileLabel")}
</label>
<input type="file" id="cel-migration-file" accept=".json" style="flex:1">
</div>
</div>`
await foundry.applications.api.DialogV2.wait({
window: { title: game.i18n.localize("CELESTOPOL.Migration.title") },
classes: ["fvtt-celestopol"],
content,
buttons: [
{
label: game.i18n.localize("CELESTOPOL.Migration.importBtn"),
icon: "fas fa-file-import",
action: "import",
default: true,
callback: (_event, _btn, dialog) => {
const fileInput = dialog.element.querySelector("#cel-migration-file")
return fileInput?.files?.[0] ?? null
},
},
{
label: game.i18n.localize("Cancel"),
icon: "fas fa-times",
action: "cancel",
callback: () => null,
},
],
submit: async (result) => {
if (!result) return
const text = await result.text()
let old
try { old = JSON.parse(text) }
catch {
ui.notifications.error(game.i18n.localize("CELESTOPOL.Migration.errorParse"))
return
}
const { actor, warnings } = _convertOldActor(old)
try {
const created = await Actor.create(actor)
ui.notifications.info(game.i18n.format("CELESTOPOL.Migration.success", {
name: created.name, count: actor.items.length,
}))
if (warnings.length) {
console.warn(`Célestopol Migration | ${created.name} — avertissements :`)
warnings.forEach(w => console.warn(" ⚠", w))
ui.notifications.warn(game.i18n.format("CELESTOPOL.Migration.warnings", { count: warnings.length }))
}
} catch(err) {
console.error("Célestopol Migration | Échec de création de l'acteur :", err)
ui.notifications.error(game.i18n.localize("CELESTOPOL.Migration.errorCreate"))
}
},
})
}
/**
* Classe de menu de paramètre pour la migration.
* Étend ApplicationV2 (requis par registerMenu) mais surcharge render()
* pour déclencher directement la dialog de migration.
*/
class CelestopolMigrationMenu extends foundry.applications.api.ApplicationV2 {
static DEFAULT_OPTIONS = {
id: "celestopol-migration",
window: { title: "CELESTOPOL.Migration.title" },
classes: ["fvtt-celestopol"],
position: { width: 480 },
}
/** Surcharge : ignore le rendu AppV2 et ouvre directement la dialog. */
async render(...args) {
await _openMigrationDialog()
return this
}
}
/* ─── Settings ───────────────────────────────────────────────────────────── */ /* ─── Settings ───────────────────────────────────────────────────────────── */
function _registerSettings() { function _registerSettings() {
@@ -397,6 +651,16 @@ function _registerSettings() {
type: Boolean, type: Boolean,
default: false, default: false,
}) })
// Entrée de menu : migration depuis l'ancien système
game.settings.registerMenu(SYSTEM_ID, "migrateOldSystem", {
name: "CELESTOPOL.Setting.migrateOldSystem.name",
hint: "CELESTOPOL.Setting.migrateOldSystem.hint",
label: "CELESTOPOL.Setting.migrateOldSystem.label",
icon: "fas fa-file-import",
type: CelestopolMigrationMenu,
restricted: true,
})
} }
async function _createWelcomeChatMessage() { async function _createWelcomeChatMessage() {
@@ -955,6 +1219,24 @@ async function _setFactionAspectState(state) {
return cleanState return cleanState
} }
async function _resetFactionAspects() {
if (!game.user.isGM) {
ui.notifications.warn(game.i18n.localize("CELESTOPOL.FactionAspect.gmOnly"))
return
}
const confirmed = await foundry.applications.api.DialogV2.confirm({
window: { title: game.i18n.localize("CELESTOPOL.FactionAspect.resetTitle") },
content: `<p>${game.i18n.localize("CELESTOPOL.FactionAspect.resetConfirm")}</p>`,
yes: { label: game.i18n.localize("CELESTOPOL.FactionAspect.resetConfirmYes"), icon: "fas fa-redo" },
no: { label: game.i18n.localize("Cancel"), icon: "fas fa-times" },
rejectClose: false,
})
if (!confirmed) return
const state = _getFactionAspectState()
await _setFactionAspectState({ ...state, activatedAspects: [] })
ui.notifications.info(game.i18n.localize("CELESTOPOL.FactionAspect.resetSuccess"))
}
function _refreshFactionAspectSheets() { function _refreshFactionAspectSheets() {
for (const actor of game.actors.contents) { for (const actor of game.actors.contents) {
if (actor.type !== "character") continue if (actor.type !== "character") continue
+21 -1
View File
@@ -189,7 +189,12 @@
"renforts": "Renforts", "renforts": "Renforts",
"renseignements": "Renseignements", "renseignements": "Renseignements",
"ressources": "Ressources", "ressources": "Ressources",
"surveillance": "Surveillance" "surveillance": "Surveillance",
"resetButton": "Réinitialiser",
"resetTitle": "Réinitialiser les Aspects de faction",
"resetConfirm": "Voulez-vous réinitialiser tous les Aspects de faction mobilisés ? Cette action efface la réserve de scénario en cours.",
"resetConfirmYes": "Réinitialiser",
"resetSuccess": "Aspects de faction réinitialisés pour le nouveau scénario."
}, },
"Track": { "Track": {
"blessures": "Blessures", "blessures": "Blessures",
@@ -448,8 +453,23 @@
"rollMoonDieByDefault": { "rollMoonDieByDefault": {
"name": "Lancer le dé de la lune par défaut", "name": "Lancer le dé de la lune par défaut",
"hint": "Cocher automatiquement 'Lancer le dé de la lune' dans les fenêtres de jet" "hint": "Cocher automatiquement 'Lancer le dé de la lune' dans les fenêtres de jet"
},
"migrateOldSystem": {
"name": "Migration depuis l'ancien système",
"hint": "Importer un personnage exporté depuis l'ancien système Célestopol 1922 (celestopol1922).",
"label": "Migrer un personnage…"
} }
}, },
"Migration": {
"title": "Migration ancien système Célestopol",
"instructions": "Sélectionnez un fichier JSON exporté depuis l'ancien système Célestopol 1922. Le personnage sera converti et créé automatiquement dans la liste des acteurs.",
"fileLabel": "Fichier JSON :",
"importBtn": "Convertir et importer",
"success": "'{name}' importé avec succès ({count} item(s)).",
"warnings": "{count} avertissement(s) — consultez la console (F12) pour le détail.",
"errorParse": "Impossible de lire le fichier JSON. Vérifiez qu'il s'agit bien d'un export Célestopol valide.",
"errorCreate": "Échec de la création de l'acteur. Consultez la console (F12) pour le détail."
},
"Welcome": { "Welcome": {
"title": "Bienvenue dans Célestopol 1922", "title": "Bienvenue dans Célestopol 1922",
"intro": "Bienvenue dans le système FoundryVTT de Célestopol 1922.", "intro": "Bienvenue dans le système FoundryVTT de Célestopol 1922.",
@@ -32,6 +32,7 @@ export default class CelestopolCharacterSheet extends CelestopolActorSheet {
supprimerXpLog: CelestopolCharacterSheet.#onSupprimerXpLog, supprimerXpLog: CelestopolCharacterSheet.#onSupprimerXpLog,
rollMoonDie: CelestopolCharacterSheet.#onRollMoonDie, rollMoonDie: CelestopolCharacterSheet.#onRollMoonDie,
manageFactionAspects: CelestopolCharacterSheet.#onManageFactionAspects, manageFactionAspects: CelestopolCharacterSheet.#onManageFactionAspects,
resetFactionAspects: CelestopolCharacterSheet.#onResetFactionAspects,
}, },
} }
@@ -245,6 +246,10 @@ export default class CelestopolCharacterSheet extends CelestopolActorSheet {
await game.celestopol?.manageFactionAspects(this.document) await game.celestopol?.manageFactionAspects(this.document)
} }
static async #onResetFactionAspects() {
await game.celestopol?.resetFactionAspects()
}
/** Ouvre un dialogue pour dépenser de l'XP. */ /** Ouvre un dialogue pour dépenser de l'XP. */
static async #onDepenseXp() { static async #onDepenseXp() {
const actor = this.document const actor = this.document
+1 -1
View File
@@ -1 +1 @@
MANIFEST-000089 MANIFEST-000097
+7 -7
View File
@@ -1,7 +1,7 @@
2026/04/27-17:34:57.971923 7f57a57ee6c0 Recovering log #86 2026/04/27-22:18:49.718901 7fed937fe6c0 Recovering log #95
2026/04/27-17:34:57.982802 7f57a57ee6c0 Delete type=3 #84 2026/04/27-22:18:49.728863 7fed937fe6c0 Delete type=3 #93
2026/04/27-17:34:57.982897 7f57a57ee6c0 Delete type=0 #86 2026/04/27-22:18:49.728935 7fed937fe6c0 Delete type=0 #95
2026/04/27-17:40:33.923146 7f57977fe6c0 Level-0 table #92: started 2026/04/27-22:29:30.180780 7feb10fff6c0 Level-0 table #100: started
2026/04/27-17:40:33.923179 7f57977fe6c0 Level-0 table #92: 0 bytes OK 2026/04/27-22:29:30.180810 7feb10fff6c0 Level-0 table #100: 0 bytes OK
2026/04/27-17:40:33.960133 7f57977fe6c0 Delete type=0 #90 2026/04/27-22:29:30.187367 7feb10fff6c0 Delete type=0 #98
2026/04/27-17:40:34.016282 7f57977fe6c0 Manual compaction at level-0 from '!journal!eNYstmPK0mMmVJYC' @ 72057594037927935 : 1 .. '!journal.pages!eNYstmPK0mMmVJYC.r9h1ggd3G9hiqYJX' @ 0 : 0; will stop at (end) 2026/04/27-22:29:30.210881 7feb10fff6c0 Manual compaction at level-0 from '!journal!eNYstmPK0mMmVJYC' @ 72057594037927935 : 1 .. '!journal.pages!eNYstmPK0mMmVJYC.r9h1ggd3G9hiqYJX' @ 0 : 0; will stop at (end)
+7 -11
View File
@@ -1,11 +1,7 @@
2026/04/26-21:30:37.725370 7f57a5fef6c0 Delete type=3 #1 2026/04/27-22:04:32.581280 7fed927fc6c0 Recovering log #91
2026/04/26-22:44:03.500717 7f57977fe6c0 Level-0 table #87: started 2026/04/27-22:04:32.591253 7fed927fc6c0 Delete type=3 #89
2026/04/26-22:44:03.500753 7f57977fe6c0 Level-0 table #87: 0 bytes OK 2026/04/27-22:04:32.591326 7fed927fc6c0 Delete type=0 #91
2026/04/26-22:44:03.506825 7f57977fe6c0 Delete type=0 #85 2026/04/27-22:06:50.324351 7feb10fff6c0 Level-0 table #96: started
2026/04/26-22:44:03.534971 7f57977fe6c0 Manual compaction at level-0 from '!journal!eNYstmPK0mMmVJYC' @ 72057594037927935 : 1 .. '!journal.pages!eNYstmPK0mMmVJYC.r9h1ggd3G9hiqYJX' @ 0 : 0; will stop at '!journal.pages!eNYstmPK0mMmVJYC.r9h1ggd3G9hiqYJX' @ 1 : 1 2026/04/27-22:06:50.324370 7feb10fff6c0 Level-0 table #96: 0 bytes OK
2026/04/26-22:44:03.534983 7f57977fe6c0 Compacting 1@0 + 0@1 files 2026/04/27-22:06:50.330761 7feb10fff6c0 Delete type=0 #94
2026/04/26-22:44:03.538403 7f57977fe6c0 Generated table #88@0: 6 keys, 5441 bytes 2026/04/27-22:06:50.339938 7feb10fff6c0 Manual compaction at level-0 from '!journal!eNYstmPK0mMmVJYC' @ 72057594037927935 : 1 .. '!journal.pages!eNYstmPK0mMmVJYC.r9h1ggd3G9hiqYJX' @ 0 : 0; will stop at (end)
2026/04/26-22:44:03.538450 7f57977fe6c0 Compacted 1@0 + 0@1 files => 5441 bytes
2026/04/26-22:44:03.544821 7f57977fe6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
2026/04/26-22:44:03.545059 7f57977fe6c0 Delete type=2 #5
2026/04/26-22:44:03.555755 7f57977fe6c0 Manual compaction at level-0 from '!journal.pages!eNYstmPK0mMmVJYC.r9h1ggd3G9hiqYJX' @ 1 : 1 .. '!journal.pages!eNYstmPK0mMmVJYC.r9h1ggd3G9hiqYJX' @ 0 : 0; will stop at (end)
+1 -1
View File
@@ -1 +1 @@
MANIFEST-000147 MANIFEST-000157
+14 -14
View File
@@ -1,14 +1,14 @@
2026/04/27-17:34:57.942157 7f5797fff6c0 Recovering log #144 2026/04/27-22:18:49.690384 7fed92ffd6c0 Recovering log #154
2026/04/27-17:34:57.953303 7f5797fff6c0 Delete type=3 #142 2026/04/27-22:18:49.702685 7fed92ffd6c0 Delete type=3 #152
2026/04/27-17:34:57.953395 7f5797fff6c0 Delete type=0 #144 2026/04/27-22:18:49.702754 7fed92ffd6c0 Delete type=0 #154
2026/04/27-17:40:33.795334 7f57977fe6c0 Level-0 table #150: started 2026/04/27-22:29:30.170390 7feb10fff6c0 Level-0 table #160: started
2026/04/27-17:40:33.811935 7f57977fe6c0 Level-0 table #150: 3524 bytes OK 2026/04/27-22:29:30.173958 7feb10fff6c0 Level-0 table #160: 3524 bytes OK
2026/04/27-17:40:33.849036 7f57977fe6c0 Delete type=0 #148 2026/04/27-22:29:30.180662 7feb10fff6c0 Delete type=0 #158
2026/04/27-17:40:33.960338 7f57977fe6c0 Manual compaction at level-0 from '!items!anomCommMorts001' @ 72057594037927935 : 1 .. '!items!null' @ 0 : 0; will stop at '!items!null' @ 125 : 1 2026/04/27-22:29:30.201177 7feb10fff6c0 Manual compaction at level-0 from '!items!anomCommMorts001' @ 72057594037927935 : 1 .. '!items!null' @ 0 : 0; will stop at '!items!null' @ 133 : 1
2026/04/27-17:40:33.960357 7f57977fe6c0 Compacting 1@0 + 1@1 files 2026/04/27-22:29:30.201186 7feb10fff6c0 Compacting 1@0 + 1@1 files
2026/04/27-17:40:33.978560 7f57977fe6c0 Generated table #151@0: 9 keys, 6617 bytes 2026/04/27-22:29:30.204413 7feb10fff6c0 Generated table #161@0: 9 keys, 6617 bytes
2026/04/27-17:40:33.978605 7f57977fe6c0 Compacted 1@0 + 1@1 files => 6617 bytes 2026/04/27-22:29:30.204438 7feb10fff6c0 Compacted 1@0 + 1@1 files => 6617 bytes
2026/04/27-17:40:34.015833 7f57977fe6c0 compacted to: files[ 0 1 0 0 0 0 0 ] 2026/04/27-22:29:30.210527 7feb10fff6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
2026/04/27-17:40:34.015983 7f57977fe6c0 Delete type=2 #146 2026/04/27-22:29:30.210659 7feb10fff6c0 Delete type=2 #156
2026/04/27-17:40:34.016171 7f57977fe6c0 Delete type=2 #150 2026/04/27-22:29:30.210789 7feb10fff6c0 Delete type=2 #160
2026/04/27-17:40:34.016294 7f57977fe6c0 Manual compaction at level-0 from '!items!null' @ 125 : 1 .. '!items!null' @ 0 : 0; will stop at (end) 2026/04/27-22:29:30.210920 7feb10fff6c0 Manual compaction at level-0 from '!items!null' @ 133 : 1 .. '!items!null' @ 0 : 0; will stop at (end)
+14 -12
View File
@@ -1,12 +1,14 @@
2026/04/26-21:30:37.676414 7f57a4fed6c0 Delete type=3 #1 2026/04/27-22:04:32.549946 7fed937fe6c0 Recovering log #149
2026/04/26-22:44:03.490255 7f57977fe6c0 Level-0 table #145: started 2026/04/27-22:04:32.561235 7fed937fe6c0 Delete type=3 #147
2026/04/26-22:44:03.493705 7f57977fe6c0 Level-0 table #145: 3524 bytes OK 2026/04/27-22:04:32.561293 7fed937fe6c0 Delete type=0 #149
2026/04/26-22:44:03.500560 7f57977fe6c0 Delete type=0 #143 2026/04/27-22:06:50.330846 7feb10fff6c0 Level-0 table #155: started
2026/04/26-22:44:03.524721 7f57977fe6c0 Manual compaction at level-0 from '!items!anomCommMorts001' @ 72057594037927935 : 1 .. '!items!null' @ 0 : 0; will stop at '!items!null' @ 121 : 1 2026/04/27-22:06:50.333934 7feb10fff6c0 Level-0 table #155: 3524 bytes OK
2026/04/26-22:44:03.524743 7f57977fe6c0 Compacting 2@0 + 0@1 files 2026/04/27-22:06:50.339817 7feb10fff6c0 Delete type=0 #153
2026/04/26-22:44:03.528390 7f57977fe6c0 Generated table #146@0: 9 keys, 6617 bytes 2026/04/27-22:06:50.339951 7feb10fff6c0 Manual compaction at level-0 from '!items!anomCommMorts001' @ 72057594037927935 : 1 .. '!items!null' @ 0 : 0; will stop at '!items!null' @ 129 : 1
2026/04/26-22:44:03.528448 7f57977fe6c0 Compacted 2@0 + 0@1 files => 6617 bytes 2026/04/27-22:06:50.339958 7feb10fff6c0 Compacting 1@0 + 1@1 files
2026/04/26-22:44:03.534535 7f57977fe6c0 compacted to: files[ 0 1 0 0 0 0 0 ] 2026/04/27-22:06:50.343129 7feb10fff6c0 Generated table #156@0: 9 keys, 6617 bytes
2026/04/26-22:44:03.534696 7f57977fe6c0 Delete type=2 #140 2026/04/27-22:06:50.343143 7feb10fff6c0 Compacted 1@0 + 1@1 files => 6617 bytes
2026/04/26-22:44:03.534864 7f57977fe6c0 Delete type=2 #145 2026/04/27-22:06:50.349117 7feb10fff6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
2026/04/26-22:44:03.555737 7f57977fe6c0 Manual compaction at level-0 from '!items!null' @ 121 : 1 .. '!items!null' @ 0 : 0; will stop at (end) 2026/04/27-22:06:50.349224 7feb10fff6c0 Delete type=2 #151
2026/04/27-22:06:50.349379 7feb10fff6c0 Delete type=2 #155
2026/04/27-22:06:50.368353 7feb10fff6c0 Manual compaction at level-0 from '!items!null' @ 129 : 1 .. '!items!null' @ 0 : 0; will stop at (end)
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
MANIFEST-000050 MANIFEST-000058
+7 -7
View File
@@ -1,7 +1,7 @@
2026/04/27-17:34:57.956196 7f57a57ee6c0 Recovering log #47 2026/04/27-22:18:49.704865 7fed93fff6c0 Recovering log #56
2026/04/27-17:34:57.967031 7f57a57ee6c0 Delete type=3 #45 2026/04/27-22:18:49.714938 7fed93fff6c0 Delete type=3 #54
2026/04/27-17:34:57.967119 7f57a57ee6c0 Delete type=0 #47 2026/04/27-22:18:49.714987 7fed93fff6c0 Delete type=0 #56
2026/04/27-17:40:33.886478 7f57977fe6c0 Level-0 table #53: started 2026/04/27-22:29:30.194650 7feb10fff6c0 Level-0 table #61: started
2026/04/27-17:40:33.886512 7f57977fe6c0 Level-0 table #53: 0 bytes OK 2026/04/27-22:29:30.194677 7feb10fff6c0 Level-0 table #61: 0 bytes OK
2026/04/27-17:40:33.922981 7f57977fe6c0 Delete type=0 #51 2026/04/27-22:29:30.201065 7feb10fff6c0 Delete type=0 #59
2026/04/27-17:40:34.016271 7f57977fe6c0 Manual compaction at level-0 from '!actors!6RZ6IzJUHm4dB5Ut' @ 72057594037927935 : 1 .. '!folders!MbFQgPdF6Gtbj5AU' @ 0 : 0; will stop at (end) 2026/04/27-22:29:30.210910 7feb10fff6c0 Manual compaction at level-0 from '!actors!6RZ6IzJUHm4dB5Ut' @ 72057594037927935 : 1 .. '!folders!MbFQgPdF6Gtbj5AU' @ 0 : 0; will stop at (end)
+7 -11
View File
@@ -1,11 +1,7 @@
2026/04/26-21:30:37.703085 7f57a4fed6c0 Delete type=3 #1 2026/04/27-22:04:32.565909 7fed92ffd6c0 Recovering log #52
2026/04/26-22:44:03.483917 7f57977fe6c0 Level-0 table #48: started 2026/04/27-22:04:32.576099 7fed92ffd6c0 Delete type=3 #50
2026/04/26-22:44:03.483998 7f57977fe6c0 Level-0 table #48: 0 bytes OK 2026/04/27-22:04:32.576173 7fed92ffd6c0 Delete type=0 #52
2026/04/26-22:44:03.490106 7f57977fe6c0 Delete type=0 #46 2026/04/27-22:06:50.318454 7feb10fff6c0 Level-0 table #57: started
2026/04/26-22:44:03.513451 7f57977fe6c0 Manual compaction at level-0 from '!actors!6RZ6IzJUHm4dB5Ut' @ 72057594037927935 : 1 .. '!folders!MbFQgPdF6Gtbj5AU' @ 0 : 0; will stop at '!folders!MbFQgPdF6Gtbj5AU' @ 37 : 1 2026/04/27-22:06:50.318473 7feb10fff6c0 Level-0 table #57: 0 bytes OK
2026/04/26-22:44:03.513463 7f57977fe6c0 Compacting 1@0 + 0@1 files 2026/04/27-22:06:50.324288 7feb10fff6c0 Delete type=0 #55
2026/04/26-22:44:03.517217 7f57977fe6c0 Generated table #49@0: 36 keys, 35733 bytes 2026/04/27-22:06:50.339928 7feb10fff6c0 Manual compaction at level-0 from '!actors!6RZ6IzJUHm4dB5Ut' @ 72057594037927935 : 1 .. '!folders!MbFQgPdF6Gtbj5AU' @ 0 : 0; will stop at (end)
2026/04/26-22:44:03.517247 7f57977fe6c0 Compacted 1@0 + 0@1 files => 35733 bytes
2026/04/26-22:44:03.523835 7f57977fe6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
2026/04/26-22:44:03.523973 7f57977fe6c0 Delete type=2 #18
2026/04/26-22:44:03.555713 7f57977fe6c0 Manual compaction at level-0 from '!folders!MbFQgPdF6Gtbj5AU' @ 37 : 1 .. '!folders!MbFQgPdF6Gtbj5AU' @ 0 : 0; will stop at (end)
+1 -1
View File
@@ -1 +1 @@
MANIFEST-000092 MANIFEST-000100
+7 -7
View File
@@ -1,7 +1,7 @@
2026/04/27-17:34:57.986104 7f5797fff6c0 Recovering log #89 2026/04/27-22:18:49.731702 7fed93fff6c0 Recovering log #98
2026/04/27-17:34:57.996510 7f5797fff6c0 Delete type=3 #87 2026/04/27-22:18:49.741999 7fed93fff6c0 Delete type=3 #96
2026/04/27-17:34:57.996596 7f5797fff6c0 Delete type=0 #89 2026/04/27-22:18:49.742065 7fed93fff6c0 Delete type=0 #98
2026/04/27-17:40:33.849202 7f57977fe6c0 Level-0 table #95: started 2026/04/27-22:29:30.187494 7feb10fff6c0 Level-0 table #103: started
2026/04/27-17:40:33.849252 7f57977fe6c0 Level-0 table #95: 0 bytes OK 2026/04/27-22:29:30.187529 7feb10fff6c0 Level-0 table #103: 0 bytes OK
2026/04/27-17:40:33.886306 7f57977fe6c0 Delete type=0 #93 2026/04/27-22:29:30.194521 7feb10fff6c0 Delete type=0 #101
2026/04/27-17:40:34.016257 7f57977fe6c0 Manual compaction at level-0 from '!scenes!0iGCRqkdJKjmmbl4' @ 72057594037927935 : 1 .. '!scenes.levels!X3XJg7raEXtOFOtj.defaultLevel0000' @ 0 : 0; will stop at (end) 2026/04/27-22:29:30.210897 7feb10fff6c0 Manual compaction at level-0 from '!scenes!0iGCRqkdJKjmmbl4' @ 72057594037927935 : 1 .. '!scenes.levels!X3XJg7raEXtOFOtj.defaultLevel0000' @ 0 : 0; will stop at (end)
+7 -11
View File
@@ -1,11 +1,7 @@
2026/04/26-21:30:37.754039 7f5797fff6c0 Delete type=3 #1 2026/04/27-22:04:32.595481 7fed93fff6c0 Recovering log #94
2026/04/26-22:44:03.507044 7f57977fe6c0 Level-0 table #90: started 2026/04/27-22:04:32.606129 7fed93fff6c0 Delete type=3 #92
2026/04/26-22:44:03.507095 7f57977fe6c0 Level-0 table #90: 0 bytes OK 2026/04/27-22:04:32.606193 7fed93fff6c0 Delete type=0 #94
2026/04/26-22:44:03.513200 7f57977fe6c0 Delete type=0 #88 2026/04/27-22:06:50.312356 7feb10fff6c0 Level-0 table #99: started
2026/04/26-22:44:03.545324 7f57977fe6c0 Manual compaction at level-0 from '!scenes!0iGCRqkdJKjmmbl4' @ 72057594037927935 : 1 .. '!scenes.levels!X3XJg7raEXtOFOtj.defaultLevel0000' @ 0 : 0; will stop at '!scenes.levels!X3XJg7raEXtOFOtj.defaultLevel0000' @ 61 : 1 2026/04/27-22:06:50.312415 7feb10fff6c0 Level-0 table #99: 0 bytes OK
2026/04/26-22:44:03.545342 7f57977fe6c0 Compacting 1@0 + 0@1 files 2026/04/27-22:06:50.318377 7feb10fff6c0 Delete type=0 #97
2026/04/26-22:44:03.549127 7f57977fe6c0 Generated table #91@0: 4 keys, 1746 bytes 2026/04/27-22:06:50.339915 7feb10fff6c0 Manual compaction at level-0 from '!scenes!0iGCRqkdJKjmmbl4' @ 72057594037927935 : 1 .. '!scenes.levels!X3XJg7raEXtOFOtj.defaultLevel0000' @ 0 : 0; will stop at (end)
2026/04/26-22:44:03.549142 7f57977fe6c0 Compacted 1@0 + 0@1 files => 1746 bytes
2026/04/26-22:44:03.555374 7f57977fe6c0 compacted to: files[ 0 1 0 0 0 0 0 ]
2026/04/26-22:44:03.555539 7f57977fe6c0 Delete type=2 #85
2026/04/26-22:44:03.555771 7f57977fe6c0 Manual compaction at level-0 from '!scenes.levels!X3XJg7raEXtOFOtj.defaultLevel0000' @ 61 : 1 .. '!scenes.levels!X3XJg7raEXtOFOtj.defaultLevel0000' @ 0 : 0; will stop at (end)
+3
View File
@@ -7,6 +7,9 @@
<a class="faction-aspect-manage" data-action="manageFactionAspects"> <a class="faction-aspect-manage" data-action="manageFactionAspects">
<i class="fa-solid fa-sliders"></i> {{localize "CELESTOPOL.FactionAspect.manage"}} <i class="fa-solid fa-sliders"></i> {{localize "CELESTOPOL.FactionAspect.manage"}}
</a> </a>
<a class="faction-aspect-reset" data-action="resetFactionAspects">
<i class="fa-solid fa-rotate-left"></i> {{localize "CELESTOPOL.FactionAspect.resetButton"}}
</a>
{{/if}} {{/if}}
</div> </div>