Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1662f59009 | ||
|
|
dc00657f84 | ||
|
|
503e4e365f | ||
|
|
69e08b6a33 | ||
|
|
723e7cd934 | ||
|
|
2cefd42c28 | ||
|
|
04bfe38136 | ||
|
|
20d2137a15 | ||
|
|
0916dab259 | ||
|
|
8132a0b459 | ||
|
|
1afa5d151d | ||
|
|
242d31438b | ||
|
|
b5def3fb93 | ||
|
|
71c03b8a5d | ||
|
|
d6ba994ae6 | ||
|
|
cab98451cd | ||
|
|
ac43982f24 | ||
|
|
c5c5d173db | ||
|
|
9446e08433 | ||
|
|
14e18fdc8e | ||
|
|
b219f4aee6 | ||
|
|
5b573a5ed0 |
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -1,3 +1,6 @@
|
||||
# Make .db files keep LF ending as Foundry rewrite in this format
|
||||
*.db text eol=lf
|
||||
*.json text eol=lf
|
||||
|
||||
# Foundry pack v11 as binaries
|
||||
system/packs/*/** binary
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -10,3 +10,6 @@ node_modules
|
||||
|
||||
# Foundry Lock files
|
||||
system/l5r5e.lock
|
||||
|
||||
# v11 db files (will be added later)
|
||||
system/packs/*/**
|
||||
|
||||
29
CHANGELOG.md
29
CHANGELOG.md
@@ -1,13 +1,40 @@
|
||||
# Changelog
|
||||
Date format : day/month/year
|
||||
|
||||
## 1.10.0 - 11/06/2023 - FoundryVTT v11 Compatibility
|
||||
__! Be certain to carefully back up any critical user data before installing this update !__
|
||||
- Updated the System to FoundryVTT v11.
|
||||
- GM Monitor :
|
||||
- Added ability to add unlinked token to GM monitor. Drag and drop from actor's toolbar, or select tokens in scene and click on "Add selected tokens".
|
||||
- Now automatically switch to the corresponding type of the dropped character (Army/Character).
|
||||
- Using the new `packFolders` in system manifest.
|
||||
- System compendiums are now in folders for more readability with others modules/worlds compendiums (ex: `L5R5e System` > `Techniques` > `Techniques Kata`).
|
||||
- Please note this is only by default, and you are free to move or rename it after the initial loading.
|
||||
|
||||
## 1.9.6 - 14/05/2023 - Bragma's QoL
|
||||
All these changes are thanks to Bragma.
|
||||
- Added effects panel to both pc and npc (!26).
|
||||
- Added a underline on rings to show current stance (!25).
|
||||
- Fix Lists not showing correctly in journal (#44).
|
||||
|
||||
## 1.9.5 - 11/01/2023 - Adding Modifiers
|
||||
- Characters can now have bonus endurance/composure/focus/vigilance from conditions (thx to Perkuns).
|
||||
|
||||
## 1.9.4 - 31/12/2022 - Last bugfixes of the Year !
|
||||
- Fix prepared settings bugs (trackers icons sometimes disappears).
|
||||
- GM Toolbox : Left clic do only actors with an active player as owner.
|
||||
- Compendiums : Added Celestial Realms missing Titles : `Bond with a spirit` and `Moon cultist`.
|
||||
|
||||
## 1.9.3 - 29/09/2022 - Combat Tracker
|
||||
- Fix for L5R combat tracker bar who have disappeared.
|
||||
|
||||
## 1.9.2 - 09/09/2022 - Advancements Again
|
||||
- Fix for advancements ownership (items in items).
|
||||
|
||||
## 1.9.1 - 08/09/2022 - Advancements Bugfixes
|
||||
- Fix for advancements fail to add new items ("_id" readonly error. see #42).
|
||||
|
||||
## 1.9.0 - 01/09/2022 - Foundry v10 Compatibility
|
||||
## 1.9.0 - 01/09/2022 - FoundryVTT v10 Compatibility
|
||||
__! Be certain to carefully back up any critical user data before installing this update !__
|
||||
- Updated the System to FoundryVTT v10.
|
||||
- Updated the initiative behaviour, he now open the DicePicker for PC and Adversaries locally or remotely.
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Legend of the Five Rings (5th Edition) authorized by [Edge Studio](https://edge-studio.net/)
|
||||
|
||||

|
||||
|
||||
[](https://ko-fi.com/vlyan)
|
||||
[](https://foundryvtt.com/)
|
||||
[](https://foundryvtt.com/)
|
||||
[](https://forge-vtt.com/bazaar#package=l5r5e)
|
||||
[](https://www.foundryvtt-hub.com/package/l5r5e/)
|
||||
[](https://www.foundryvtt-hub.com/package/l5r5e/)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Requires
|
||||
const gulp = require("gulp");
|
||||
const prefix = require("gulp-autoprefixer");
|
||||
const sass = require("gulp-sass");
|
||||
const sass = require("gulp-sass")(require('sass'));
|
||||
const browserSync = require("browser-sync");
|
||||
|
||||
/* ----------------------------------------- */
|
||||
|
||||
11928
package-lock.json
generated
11928
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@@ -20,22 +20,16 @@
|
||||
"homepage": "https://gitlab.com/teaml5r/l5r5e#readme",
|
||||
"devDependencies": {
|
||||
"babel-eslint": "^10.1.0",
|
||||
"browser-sync": "^2.23.7",
|
||||
"eslint": "^7.15.0",
|
||||
"eslint-config-prettier": "^6.15.0",
|
||||
"eslint-plugin-prettier": "^3.1.4",
|
||||
"browser-sync": "^2.27.10",
|
||||
"eslint": "^8.27.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-autoprefixer": "^7.0.1",
|
||||
"gulp-sass": "^4.1.0",
|
||||
"husky": "^4.3.0",
|
||||
"gulp-autoprefixer": "^8.0.0",
|
||||
"gulp-sass": "^5.1.0",
|
||||
"lint-staged": "^10.5.1",
|
||||
"node-sass": "^4.14.1",
|
||||
"prettier": "^2.1.2"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
"sass": "^1.56.1",
|
||||
"prettier": "^2.7.1"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.js": "eslint --cache --fix",
|
||||
|
||||
@@ -274,6 +274,18 @@
|
||||
"name": "Yōkai Hunter (WIP)",
|
||||
"description": "<h2>Cursus</h2><table><tr><td>Compétences Savantes</td><td>Grp. de comp.</td></tr><tr><td>Compétences Martiales</td><td>Grp. de comp.</td></tr><tr><td>Commandement</td><td>Compétence</td></tr><tr><td>Courtoisie</td><td>Compétence</td></tr><tr><td>Survie</td><td>Compétence</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-kiho.L5RCoreKih000030\" data-pack=\"l5r5e.core-techniques-kiho\" data-id=\"L5RCoreKih000030\">(kiho) Blistering Retribution (WIP)</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-kata.L5RCoreKat000070\" data-pack=\"l5r5e.core-techniques-kata\" data-id=\"L5RCoreKat000070\">(kata) Swallow’s Dart Style (WIP)</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-kata.L5RCoreKat000071\" data-pack=\"l5r5e.core-techniques-kata\" data-id=\"L5RCoreKat000071\">(kata) Tiger’s Lunge Style (WIP)</a> (prereq)</td><td>Technique</td></tr></table>",
|
||||
"book_reference": "Décret de la nature"
|
||||
},
|
||||
{
|
||||
"id": "Bond with a spirit",
|
||||
"name": "Bond with a spirit (WIP)",
|
||||
"description": "<h2>Cursus</h2><table><tr><td>Compétences Savantes</td><td>Grp. de comp.</td></tr><tr><td>Esthétique</td><td>Compétence</td></tr><tr><td>Jeux</td><td>Compétence</td></tr><tr><td>Méditation</td><td>Compétence</td></tr><tr><td><a class=\"compendium-link\" data-pack=\"l5r5e.core-techniques-invocations\">(invocation) Invocations (Eléments de l'esprit) de rang 1</a> (prereq)</td><td>Tech. Grp.</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-rituals.L5RCoreRit000002\" data-pack=\"l5r5e.core-techniques-rituals\" data-id=\"L5RCoreRit000002\">(ritual) Communier avec les esprits</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-rituals.L5RCoreRit000022\" data-pack=\"l5r5e.core-techniques-rituals\" data-id=\"L5RCoreRit000022\">(ritual) Blessing of Fertile Fields (WIP)</a> (prereq)</td><td>Technique</td></tr></table>",
|
||||
"book_reference": "Les Royaumes Célestes"
|
||||
},
|
||||
{
|
||||
"id": "Moon cultist",
|
||||
"name": "Moon cultist (WIP)",
|
||||
"description": "<h2>Cursus</h2><table><tr><td>Compétences Savantes</td><td>Grp. de comp.</td></tr><tr><td>Composition</td><td>Compétence</td></tr><tr><td>Courtoisie</td><td>Compétence</td></tr><tr><td>Forme</td><td>Compétence</td></tr><tr><td><a class=\"compendium-link\" data-pack=\"l5r5e.core-techniques-invocations\">(invocation) Invocations de l’Eau de rang 1-2</a></td><td>Tech. Grp.</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-invocations.L5RCoreInv000052\" data-pack=\"l5r5e.core-techniques-invocations\" data-id=\"L5RCoreInv000052\">(invocation) Mains des marées</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-rituals.L5RCoreRit000010\" data-pack=\"l5r5e.core-techniques-rituals\" data-id=\"L5RCoreRit000010\">(ritual) Whispers to the Moon (Moon Cultist) (WIP)</a> (prereq)</td><td>Technique</td></tr></table>",
|
||||
"book_reference": "Les Royaumes Célestes"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -19,28 +19,30 @@
|
||||
"Hint": "Add 'Specificity' technique type to serve as a catch-all."
|
||||
}
|
||||
},
|
||||
"ACTOR": {
|
||||
"TypeCharacter": "Player Character",
|
||||
"TypeNpc": "Non-Player Character",
|
||||
"TypeArmy": "Army"
|
||||
"TYPES": {
|
||||
"Actor": {
|
||||
"character": "Player Character",
|
||||
"npc": "Non-Player Character",
|
||||
"army": "Army"
|
||||
},
|
||||
"ITEM": {
|
||||
"TypeItem": "Item",
|
||||
"TypeArmor": "Armor",
|
||||
"TypeWeapon": "Weapon",
|
||||
"TypeTechnique": "Technique",
|
||||
"TypeProperty": "Property",
|
||||
"TypePeculiarity": "Peculiarity",
|
||||
"TypeAdvancement": "Advancement",
|
||||
"TypeTitle": "Title",
|
||||
"TypeBond": "Bond",
|
||||
"TypeSignature_scroll": "Signature Scroll",
|
||||
"TypeItem_pattern": "Item Pattern",
|
||||
"TypeArmy_fortification": "Fortification",
|
||||
"TypeArmy_cohort": "Cohort"
|
||||
"Item": {
|
||||
"item": "Item",
|
||||
"armor": "Armor",
|
||||
"weapon": "Weapon",
|
||||
"technique": "Technique",
|
||||
"property": "Property",
|
||||
"peculiarity": "Peculiarity",
|
||||
"advancement": "Advancement",
|
||||
"title": "Title",
|
||||
"bond": "Bond",
|
||||
"signature_scroll": "Signature Scroll",
|
||||
"item_pattern": "Item Pattern",
|
||||
"army_fortification": "Fortification",
|
||||
"army_cohort": "Cohort"
|
||||
},
|
||||
"JOURNAL": {
|
||||
"TypeJournal": "Journal"
|
||||
"Journal": {
|
||||
"journal": "Journal"
|
||||
}
|
||||
},
|
||||
"l5r5e": {
|
||||
"global": {
|
||||
@@ -173,6 +175,7 @@
|
||||
"monitor": {
|
||||
"title": "GM Monitor",
|
||||
"switch_view": "Switch View",
|
||||
"add_selected_tokens": "Add selected tokens",
|
||||
"honor_glory_status": "H/G/S",
|
||||
"focus_vigilance": "Foc./Vig.",
|
||||
"mouse_control": "Right click +1, left: -1, middle: reset to 0"
|
||||
@@ -374,7 +377,7 @@
|
||||
"mass_battle": "Mass Battle",
|
||||
"prepared_true": "Prepared",
|
||||
"prepared_false": "Surprised",
|
||||
"prepared_null": "Defined in the character sheet (default)",
|
||||
"prepared_actor": "Defined in the character sheet (default)",
|
||||
"already_set": "Your initiative has already been determined"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -19,28 +19,30 @@
|
||||
"Hint": "Add 'Specificity' technique type to serve as a catch-all."
|
||||
}
|
||||
},
|
||||
"ACTOR": {
|
||||
"TypeCharacter": "Personaje jugador",
|
||||
"TypeNpc": "Personaje no jugador",
|
||||
"TypeArmy": "Ejército"
|
||||
"TYPES": {
|
||||
"Actor": {
|
||||
"character": "Personaje jugador",
|
||||
"npc": "Personaje no jugador",
|
||||
"army": "Ejército"
|
||||
},
|
||||
"ITEM": {
|
||||
"TypeItem": "Objeto",
|
||||
"TypeArmor": "Armadura",
|
||||
"TypeWeapon": "Arma",
|
||||
"TypeTechnique": "Técnica",
|
||||
"TypeProperty": "Propiedad",
|
||||
"TypePeculiarity": "Peculiaridad",
|
||||
"TypeAdvancement": "Mejora",
|
||||
"TypeTitle": "Título",
|
||||
"TypeBond": "Vínculo",
|
||||
"TypeSignature_scroll": "Pergamino especial",
|
||||
"TypeItem_pattern": "Patrón de objeto",
|
||||
"TypeArmy_fortification": "Fortificación",
|
||||
"TypeArmy_cohort": "Cohorte"
|
||||
"Item": {
|
||||
"item": "Objeto",
|
||||
"armor": "Armadura",
|
||||
"weapon": "Arma",
|
||||
"technique": "Técnica",
|
||||
"property": "Propiedad",
|
||||
"peculiarity": "Peculiaridad",
|
||||
"advancement": "Mejora",
|
||||
"title": "Título",
|
||||
"bond": "Vínculo",
|
||||
"signature_scroll": "Pergamino especial",
|
||||
"item_pattern": "Patrón de objeto",
|
||||
"army_fortification": "Fortificación",
|
||||
"army_cohort": "Cohorte"
|
||||
},
|
||||
"JOURNAL": {
|
||||
"TypeJournal": "Diario"
|
||||
"Journal": {
|
||||
"journal": "Diario"
|
||||
}
|
||||
},
|
||||
"l5r5e": {
|
||||
"global": {
|
||||
@@ -173,6 +175,7 @@
|
||||
"monitor": {
|
||||
"title": "Pantalla del DJ",
|
||||
"switch_view": "Cambiar vista",
|
||||
"add_selected_tokens": "Add selected tokens",
|
||||
"honor_glory_status": "H/G/E",
|
||||
"focus_vigilance": "Con./Ale.",
|
||||
"mouse_control": "Right click +1, left: -1, middle: reset to 0"
|
||||
@@ -374,7 +377,7 @@
|
||||
"mass_battle": "Batalla a gran escala",
|
||||
"prepared_true": "Preparado",
|
||||
"prepared_false": "Sorprendido",
|
||||
"prepared_null": "Definido en la hoja de personaje (por defecto)",
|
||||
"prepared_actor": "Definido en la hoja de personaje (por defecto)",
|
||||
"already_set": "Tu iniciativa ya ha sido establecida."
|
||||
}
|
||||
},
|
||||
|
||||
@@ -19,28 +19,30 @@
|
||||
"Hint": "Ajoute un type de technique 'Particularités' pour servir de fourre-tout."
|
||||
}
|
||||
},
|
||||
"ACTOR": {
|
||||
"TypeCharacter": "Personnage Joueur",
|
||||
"TypeNpc": "Personnage non Joueur",
|
||||
"TypeArmy": "Armée"
|
||||
"TYPES": {
|
||||
"Actor": {
|
||||
"character": "Personnage Joueur",
|
||||
"npc": "Personnage non Joueur",
|
||||
"army": "Armée"
|
||||
},
|
||||
"ITEM": {
|
||||
"TypeItem": "Objet",
|
||||
"TypeArmor": "Armure",
|
||||
"TypeWeapon": "Arme",
|
||||
"TypeTechnique": "Technique",
|
||||
"TypeProperty": "Propriété",
|
||||
"TypePeculiarity": "Particularité",
|
||||
"TypeAdvancement": "Progression",
|
||||
"TypeTitle": "Titre",
|
||||
"TypeBond": "Lien",
|
||||
"TypeSignature_scroll": "Rouleau de marque",
|
||||
"TypeItem_pattern": "Procédé de fabrication",
|
||||
"TypeArmy_fortification": "Fortification",
|
||||
"TypeArmy_cohort": "Régiment"
|
||||
"Item": {
|
||||
"item": "Objet",
|
||||
"armor": "Armure",
|
||||
"weapon": "Arme",
|
||||
"technique": "Technique",
|
||||
"property": "Propriété",
|
||||
"peculiarity": "Particularité",
|
||||
"advancement": "Progression",
|
||||
"title": "Titre",
|
||||
"bond": "Lien",
|
||||
"signature_scroll": "Rouleau de marque",
|
||||
"item_pattern": "Procédé de fabrication",
|
||||
"army_fortification": "Fortification",
|
||||
"army_cohort": "Régiment"
|
||||
},
|
||||
"JOURNAL": {
|
||||
"TypeJournal": "Journal"
|
||||
"Journal": {
|
||||
"journal": "Journal"
|
||||
}
|
||||
},
|
||||
"l5r5e": {
|
||||
"global": {
|
||||
@@ -95,7 +97,7 @@
|
||||
"void": "Vide"
|
||||
},
|
||||
"sheets": {
|
||||
"narrative": "Mode Narratif",
|
||||
"narrative": "Narratif",
|
||||
"experience": "Expérience",
|
||||
"family": "Famille",
|
||||
"region": "Région",
|
||||
@@ -173,6 +175,7 @@
|
||||
"monitor": {
|
||||
"title": "GM Monitor",
|
||||
"switch_view": "Switch View",
|
||||
"add_selected_tokens": "Ajouter les tokens sélectionnés",
|
||||
"honor_glory_status": "H/G/S",
|
||||
"focus_vigilance": "Att./Vig.",
|
||||
"mouse_control": "Click Droit +1, Gauche: -1, Milieu: Remise à 0"
|
||||
@@ -374,7 +377,7 @@
|
||||
"mass_battle": "Bataille rangée",
|
||||
"prepared_true": "Prêt(e)",
|
||||
"prepared_false": "Surpris(e)",
|
||||
"prepared_null": "Défini par la fiche de personnage (défaut)",
|
||||
"prepared_actor": "Défini par la fiche de personnage (défaut)",
|
||||
"already_set": "Votre initiative a déjà été tirée"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -19,28 +19,30 @@
|
||||
"Hint": "Aggiunge il tipo 'Speciale' come termine generale."
|
||||
}
|
||||
},
|
||||
"ACTOR": {
|
||||
"TypeCharacter": "Personaggio Giocante",
|
||||
"TypeNpc": "Personaggio Non Giocante",
|
||||
"TypeArmy": "Esercito"
|
||||
"TYPES": {
|
||||
"Actor": {
|
||||
"character": "Personaggio Giocante",
|
||||
"npc": "Personaggio Non Giocante",
|
||||
"army": "Esercito"
|
||||
},
|
||||
"ITEM": {
|
||||
"TypeItem": "Oggetto",
|
||||
"TypeArmor": "Armatura",
|
||||
"TypeWeapon": "Arma",
|
||||
"TypeTechnique": "Tecnica",
|
||||
"TypeProperty": "Proprietà",
|
||||
"TypePeculiarity": "Peculiarità",
|
||||
"TypeAdvancement": "Avanzamento",
|
||||
"TypeTitle": "Titolo",
|
||||
"TypeBond": "Legame",
|
||||
"TypeSignature_scroll": "Signature Scroll",
|
||||
"TypeItem_pattern": "Item Pattern",
|
||||
"TypeArmy_fortification": "Fortezza",
|
||||
"TypeArmy_cohort": "Coorte"
|
||||
"Item": {
|
||||
"item": "Oggetto",
|
||||
"armor": "Armatura",
|
||||
"weapon": "Arma",
|
||||
"technique": "Tecnica",
|
||||
"property": "Proprietà",
|
||||
"peculiarity": "Peculiarità",
|
||||
"advancement": "Avanzamento",
|
||||
"title": "Titolo",
|
||||
"bond": "Legame",
|
||||
"signature_scroll": "Signature Scroll",
|
||||
"item_pattern": "Item Pattern",
|
||||
"army_fortification": "Fortezza",
|
||||
"army_cohort": "Coorte"
|
||||
},
|
||||
"JOURNAL": {
|
||||
"TypeJournal": "Diario"
|
||||
"Journal": {
|
||||
"journal": "Diario"
|
||||
}
|
||||
},
|
||||
"l5r5e": {
|
||||
"global": {
|
||||
@@ -173,6 +175,7 @@
|
||||
"monitor": {
|
||||
"title": "Schermo del GM",
|
||||
"switch_view": "Cambia vista",
|
||||
"add_selected_tokens": "Add selected tokens",
|
||||
"honor_glory_status": "O/G/S",
|
||||
"focus_vigilance": "Foc./Vig.",
|
||||
"mouse_control": "Click destro +1, sinistro: -1, centrale: resetta a 0"
|
||||
@@ -374,7 +377,7 @@
|
||||
"mass_battle": "Battaglia Campale",
|
||||
"prepared_true": "Preparato",
|
||||
"prepared_false": "Sorpreso",
|
||||
"prepared_null": "Definito nella scheda del personaggio (default)",
|
||||
"prepared_actor": "Definito nella scheda del personaggio (default)",
|
||||
"already_set": "La tua Iniziativa è già stata determinata."
|
||||
}
|
||||
},
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
{"_id":"dz61B4h3iJwOC0Ob","name":"Draw 5 Ujik names","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"d9lU98NE8G2YuN48\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}}
|
||||
{"_id":"ed0HRLOWSKm6YTUS","name":"Draw 5 Japanese names (male)","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/traditional-japanese-man.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"L5RCoreTblJpNamM\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}}
|
||||
{"_id":"fk2naBrDnz8ZAVHR","name":"Draw 5 Japanese names (female)","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/traditional-japanese-woman.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"L5RCoreTblJpNamF\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}}
|
||||
{"_id":"ggs1eiqkfVWlm5JM","name":"Draw Names Dialog","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/army.svg","scope":"global","command":"const pack = \"l5r5e.core-name-tables\";\nconst comp = await game.packs.get(pack);\nif (!comp) { console.log(`L5R5E | Pack not found[${pack}]`); return; }\nawait comp.getDocuments();\n\nlet radioTablesHtml = \"\";\ncomp.index.forEach(obj => { radioTablesHtml += `<label><input type=\"radio\" id=\"${obj._id}\" name=\"tableName\" value=\"${obj.name}\" ${radioTablesHtml === \"\" ? 'checked' : ''}> ${obj.name}</label>`; });\n\nnew Dialog({\n title: \"L5R5E Draw Names\",\n content: `\n <form class=\"noflex\" autocomplete=\"off\">\n <div class=\"form-group\">\n <label>${game.i18n.localize('DOCUMENT.RollTable')}:</label>\n <div class=\"form-fields\" style=\"flex-direction: column;align-items: flex-start\">\n ${radioTablesHtml}\n </div>\n </div>\n <hr>\n <div class=\"form-group\">\n <label><i class=\"d6\"></i> ${game.i18n.localize('l5r5e.sheets.quantity')}:</label>\n <div class=\"form-fields\">\n <input type=\"number\" name=\"drawNumber\" value=\"5\" min=\"0\" max=\"99\"/>\n </div>\n </div>\n </form>\n `,\n buttons: {\n no: {\n icon: \"<i class='fas fa-times'></i>\",\n label: game.i18n.localize('Cancel')\n },\n yes: {\n icon: \"<i class='fas fa-check'></i>\",\n label: game.i18n.localize('TABLE.Roll'),\n callback: (html) => {\n const tableName = html.find('input[name=\"tableName\"]:checked')[0]?.value || null;\n const drawNumber = html.find('input[name=\"drawNumber\"]')[0]?.value || null;\n if (!tableName || !drawNumber || drawNumber < 1) {return;}\n game.l5r5e.HelpersL5r5e.drawManyFromPack(pack, tableName, drawNumber);\n }\n },\n },\n default: \"no\"\n}).render(true);","folder":null,"sort":0,"permission":{"default":0},"flags":{}}
|
||||
{"_id":"ggs1eiqkfVWlm5JM","name":"Draw Names Dialog","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/army.svg","scope":"global","command":"const pack = \"l5r5e.core-name-tables\";\nconst comp = await game.packs.get(pack);\nif (!comp) { console.log(`L5R5E | Macro | Pack not found[${pack}]`); return; }\nawait comp.getDocuments();\n\nlet radioTablesHtml = \"\";\ncomp.index.forEach(obj => { radioTablesHtml += `<label><input type=\"radio\" id=\"${obj._id}\" name=\"tableName\" value=\"${obj.name}\" ${radioTablesHtml === \"\" ? 'checked' : ''}> ${obj.name}</label>`; });\n\nnew Dialog({\n title: \"L5R5E Draw Names\",\n content: `\n <form class=\"noflex\" autocomplete=\"off\">\n <div class=\"form-group\">\n <label>${game.i18n.localize('DOCUMENT.RollTable')}:</label>\n <div class=\"form-fields\" style=\"flex-direction: column;align-items: flex-start\">\n ${radioTablesHtml}\n </div>\n </div>\n <hr>\n <div class=\"form-group\">\n <label><i class=\"d6\"></i> ${game.i18n.localize('l5r5e.sheets.quantity')}:</label>\n <div class=\"form-fields\">\n <input type=\"number\" name=\"drawNumber\" value=\"5\" min=\"0\" max=\"99\"/>\n </div>\n </div>\n </form>\n `,\n buttons: {\n no: {\n icon: \"<i class='fas fa-times'></i>\",\n label: game.i18n.localize('Cancel')\n },\n yes: {\n icon: \"<i class='fas fa-check'></i>\",\n label: game.i18n.localize('TABLE.Roll'),\n callback: (html) => {\n const tableName = html.find('input[name=\"tableName\"]:checked')[0]?.value || null;\n const drawNumber = html.find('input[name=\"drawNumber\"]')[0]?.value || null;\n if (!tableName || !drawNumber || drawNumber < 1) {return;}\n game.l5r5e.HelpersL5r5e.drawManyFromPack(pack, tableName, drawNumber);\n }\n },\n },\n default: \"no\"\n}).render(true);","folder":null,"sort":0,"permission":{"default":0},"flags":{}}
|
||||
{"_id":"hpfDGUS48dA2pkUB","name":"Open Character Sheet (linked actor)","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.user.character?.sheet.render(true);","folder":null,"sort":0,"permission":{"default":0},"flags":{}}
|
||||
|
||||
@@ -43,3 +43,5 @@
|
||||
{"_id":"L5RCoreTit000043","name":"Forester","permission":{"default":0},"type":"title","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"24","description":"<h2>Curriculum</h2><table><tr><td>Social Skills</td><td>Skill Group</td></tr><tr><td>Scholar Skills</td><td>Skill Group</td></tr><tr><td>Courtesy</td><td>Skill</td></tr><tr><td>Sentiment</td><td>Skill</td></tr><tr><td>Survival</td><td>Skill</td></tr><tr><td>Theology</td><td>Skill</td></tr><tr><td><a class=\"compendium-link\" data-pack=\"l5r5e.core-techniques-invocations\">(invocation) Rank 1-2 Earth & Water Invocations</a> (prereq)</td><td>Tech. Grp.</td></tr><tr><td><a class=\"compendium-link\" data-pack=\"l5r5e.core-techniques-shuji\">(shuji) Rank 1-3 Shūji</a> (prereq)</td><td>Tech. Grp.</td></tr></table>","book_reference":"Writ of the Wild p.142"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/items/title.svg","effects":[]}
|
||||
{"_id":"L5RCoreTit000044","name":"Temple Abbot","permission":{"default":0},"type":"title","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"36","description":"<h2>Curriculum</h2><table><tr><td>Social Skills</td><td>Skill Group</td></tr><tr><td>Scholar Skills</td><td>Skill Group</td></tr><tr><td>Culture</td><td>Skill</td></tr><tr><td>Meditation</td><td>Skill</td></tr><tr><td>Theology</td><td>Skill</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-rituals.L5RCoreRit000004\" data-pack=\"l5r5e.core-techniques-rituals\" data-id=\"L5RCoreRit000004\">(ritual) Cleansing Rite</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-kiho.L5RCoreKih000025\" data-pack=\"l5r5e.core-techniques-kiho\" data-id=\"L5RCoreKih000025\">(kiho) Rejuvenating Breath</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-shuji.L5RCoreShu000011\" data-pack=\"l5r5e.core-techniques-shuji\" data-id=\"L5RCoreShu000011\">(shuji) Touchstone of Courage</a> (prereq)</td><td>Technique</td></tr></table>","book_reference":"Writ of the Wild p.143"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/items/title.svg","effects":[]}
|
||||
{"_id":"L5RCoreTit000045","name":"Yōkai Hunter","permission":{"default":0},"type":"title","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"36","description":"<h2>Curriculum</h2><table><tr><td>Scholar Skills</td><td>Skill Group</td></tr><tr><td>Martial Skills</td><td>Skill Group</td></tr><tr><td>Command</td><td>Skill</td></tr><tr><td>Courtesy</td><td>Skill</td></tr><tr><td>Survival</td><td>Skill</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-kiho.L5RCoreKih000030\" data-pack=\"l5r5e.core-techniques-kiho\" data-id=\"L5RCoreKih000030\">(kiho) Blistering Retribution</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-kata.L5RCoreKat000070\" data-pack=\"l5r5e.core-techniques-kata\" data-id=\"L5RCoreKat000070\">(kata) Swallow’s Dart Style</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-kata.L5RCoreKat000071\" data-pack=\"l5r5e.core-techniques-kata\" data-id=\"L5RCoreKat000071\">(kata) Tiger’s Lunge Style</a> (prereq)</td><td>Technique</td></tr></table>","book_reference":"Writ of the Wild p.143"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/items/title.svg","effects":[]}
|
||||
{"_id":"L5RCoreTit000046","name":"Bond with a spirit","permission":{"default":0},"type":"title","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"25","description":"<h2>Curriculum</h2><table><tr><td>Scholar Skills</td><td>Skill Group</td></tr><tr><td>Aesthetics</td><td>Skill</td></tr><tr><td>Games</td><td>Skill</td></tr><tr><td>Meditation</td><td>Skill</td></tr><tr><td><a class=\"compendium-link\" data-pack=\"l5r5e.core-techniques-invocations\">(invocation) Rank 1 Spirit's Elements Invocations</a> (prereq)</td><td>Tech. Grp.</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-rituals.L5RCoreRit000002\" data-pack=\"l5r5e.core-techniques-rituals\" data-id=\"L5RCoreRit000002\">(ritual) Commune with the Spirits</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-rituals.L5RCoreRit000022\" data-pack=\"l5r5e.core-techniques-rituals\" data-id=\"L5RCoreRit000022\">(ritual) Blessing of Fertile Fields</a> (prereq)</td><td>Technique</td></tr></table>","book_reference":"Celestial Realms p.140"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/items/title.svg","effects":[]}
|
||||
{"_id":"L5RCoreTit000047","name":"Moon cultist","permission":{"default":0},"type":"title","data":{"in_curriculum":false,"xp_used":0,"rank":1,"bought_at_rank":0,"ring":"void","xp_cost":"30","description":"<h2>Curriculum</h2><table><tr><td>Scholar Skills</td><td>Skill Group</td></tr><tr><td>Composition</td><td>Skill</td></tr><tr><td>Courtesy</td><td>Skill</td></tr><tr><td>Fitness</td><td>Skill</td></tr><tr><td><a class=\"compendium-link\" data-pack=\"l5r5e.core-techniques-invocations\">(invocation) Rank 1-2 Water Invocations</a></td><td>Tech. Grp.</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-invocations.L5RCoreInv000052\" data-pack=\"l5r5e.core-techniques-invocations\" data-id=\"L5RCoreInv000052\">(invocation) Hands of the Tides</a> (prereq)</td><td>Technique</td></tr><tr><td><a class=\"entity-link content-link\" draggable=\"true\" data-uuid=\"Compendium.l5r5e.core-techniques-rituals.L5RCoreRit000010\" data-pack=\"l5r5e.core-techniques-rituals\" data-id=\"L5RCoreRit000010\">(ritual) Whispers to the Moon (Moon Cultist)</a> (prereq)</td><td>Technique</td></tr></table>","book_reference":"Celestial Realms p.140"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/items/title.svg","effects":[]}
|
||||
|
||||
@@ -120,7 +120,7 @@ export class ActorL5r5e extends Actor {
|
||||
// Now using updateDocuments
|
||||
return Actor.updateDocuments([docData], context).then(() => {
|
||||
// Notify the "Gm Monitor" if this actor is watched
|
||||
if (game.settings.get("l5r5e", "gm-monitor-actors").find((e) => e === this.id)) {
|
||||
if (game.settings.get(CONFIG.l5r5e.namespace, "gm-monitor-actors").some((uuid) => uuid === this.uuid)) {
|
||||
game.l5r5e.HelpersL5r5e.refreshLocalAndSocket("l5r5e-gm-monitor");
|
||||
}
|
||||
});
|
||||
@@ -162,6 +162,13 @@ export class ActorL5r5e extends Actor {
|
||||
system.composure = (Number(system.rings.earth) + Number(system.rings.water)) * 2;
|
||||
system.focus = Number(system.rings.air) + Number(system.rings.fire);
|
||||
system.vigilance = Math.ceil((Number(system.rings.air) + Number(system.rings.water)) / 2);
|
||||
|
||||
// Modifiers from conditions
|
||||
const modifiers = system.modifiers?.character;
|
||||
system.endurance = system.endurance + (Number(modifiers?.endurance) || 0);
|
||||
system.composure = system.composure + (Number(modifiers?.composure) || 0);
|
||||
system.focus = system.focus + (Number(modifiers?.focus) || 0);
|
||||
system.vigilance = system.vigilance + (Number(modifiers?.vigilance) || 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -278,6 +285,14 @@ export class ActorL5r5e extends Actor {
|
||||
return this.type === "army";
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if this actor have an active player as owner
|
||||
* @returns {boolean}
|
||||
*/
|
||||
get hasPlayerOwnerActive() {
|
||||
return game.users.find((u) => !!u.active && u.character?.id === this.id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if this actor can do a initiative roll
|
||||
* @returns {boolean}
|
||||
@@ -322,14 +337,14 @@ export class ActorL5r5e extends Actor {
|
||||
}
|
||||
|
||||
const cfg = {
|
||||
character: game.settings.get("l5r5e", "initiative-prepared-character"),
|
||||
adversary: game.settings.get("l5r5e", "initiative-prepared-adversary"),
|
||||
minion: game.settings.get("l5r5e", "initiative-prepared-minion"),
|
||||
character: game.settings.get(CONFIG.l5r5e.namespace, "initiative-prepared-character"),
|
||||
adversary: game.settings.get(CONFIG.l5r5e.namespace, "initiative-prepared-adversary"),
|
||||
minion: game.settings.get(CONFIG.l5r5e.namespace, "initiative-prepared-minion"),
|
||||
};
|
||||
|
||||
// Prepared is a boolean or if null we get the info in the actor
|
||||
let isPrepared = this.isCharacter ? cfg.character : cfg[this.system.type];
|
||||
if (isPrepared === "null") {
|
||||
if (isPrepared === "actor") {
|
||||
isPrepared = this.system.prepared ? "true" : "false";
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
if (!item || item.documentName !== "Item" || !["army_cohort", "army_fortification"].includes(item.type)) {
|
||||
// actor dual trigger...
|
||||
if (item?.documentName !== "Actor") {
|
||||
console.warn("L5R5E | Characters items are not allowed", item?.type, item);
|
||||
console.warn("L5R5E | AS | Characters items are not allowed", item?.type, item);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -221,7 +221,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
*/
|
||||
async _updateLinkedActorData(type, actor, isInit = false) {
|
||||
if (!actor || actor.documentName !== "Actor" || !actor.isCharacterType) {
|
||||
console.warn("L5R5E | Wrong actor type", actor?.type, actor);
|
||||
console.warn("L5R5E | AS | Wrong actor type", actor?.type, actor);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
break;
|
||||
|
||||
default:
|
||||
console.warn("L5R5E | Unknown type", type);
|
||||
console.warn("L5R5E | AS | Unknown type", type);
|
||||
return;
|
||||
}
|
||||
return this.actor.update(actorData);
|
||||
@@ -276,7 +276,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
break;
|
||||
|
||||
default:
|
||||
console.warn("L5R5E | Unknown type", type);
|
||||
console.warn("L5R5E | AS | Unknown type", type);
|
||||
return;
|
||||
}
|
||||
return this.actor.update({ system: actorData });
|
||||
@@ -323,7 +323,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
break;
|
||||
|
||||
default:
|
||||
console.warn("L5R5E | Unsupported type", type);
|
||||
console.warn("L5R5E | AS | Unsupported type", type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
|
||||
// Build the list order
|
||||
Array.from(CONFIG.l5r5e.techniques)
|
||||
.filter(([id, cfg]) => cfg.type !== "custom" || game.settings.get("l5r5e", "techniques-customs"))
|
||||
.filter(([id, cfg]) => cfg.type !== "custom" || game.settings.get(CONFIG.l5r5e.namespace, "techniques-customs"))
|
||||
.forEach(([id, cfg]) => {
|
||||
out[id] = [];
|
||||
});
|
||||
@@ -60,7 +60,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
case "technique":
|
||||
if (!out[item.system.technique_type]) {
|
||||
console.warn(
|
||||
`L5R5E | Empty or unknown technique type[${item.system.technique_type}] forced to "kata" in item id[${item._id}], name[${item.name}]`
|
||||
`L5R5E | BCS | Empty or unknown technique type[${item.system.technique_type}] forced to "kata" in item id[${item._id}], name[${item.name}]`
|
||||
);
|
||||
item.system.technique_type = "kata";
|
||||
}
|
||||
@@ -73,7 +73,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
if (embedItem.type === "technique") {
|
||||
if (!out[embedItem.system.technique_type]) {
|
||||
console.warn(
|
||||
`L5R5E | Empty or unknown technique type[${embedItem.system.technique_type}] forced to "kata" in item id[${id}], name[${embedItem.name}], parent: id[${item._id}], name[${item.name}]`
|
||||
`L5R5E | BCS | Empty or unknown technique type[${embedItem.system.technique_type}] forced to "kata" in item id[${id}], name[${embedItem.name}], parent: id[${item._id}], name[${item.name}]`
|
||||
);
|
||||
embedItem.system.technique_type = "kata";
|
||||
}
|
||||
@@ -135,14 +135,14 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
async _onDrop(event) {
|
||||
// *** Everything below here is only needed if the sheet is editable ***
|
||||
if (!this.isEditable || this.actor.system.soft_locked) {
|
||||
console.log("L5R5E | This sheet is not editable");
|
||||
console.log("L5R5E | BCS | This sheet is not editable");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check item type and subtype
|
||||
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||
if (!item || !["Item", "JournalEntry"].includes(item.documentName) || item.type === "property") {
|
||||
console.log(`L5R5E | Wrong subtype ${item?.type}`, item);
|
||||
console.log(`L5R5E | BCS | Wrong subtype ${item?.type}`, item);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
if (item.documentName === "JournalEntry") {
|
||||
// npc does not have this
|
||||
if (!this.actor.system.identity?.school_curriculum_journal) {
|
||||
console.log("L5R5E | NPC won't go to school :'(");
|
||||
console.log("L5R5E | BCS | NPC won't go to school :'(");
|
||||
return;
|
||||
}
|
||||
this.actor.system.identity.school_curriculum_journal = {
|
||||
@@ -180,7 +180,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
return embedItem._id === item._id;
|
||||
})
|
||||
) {
|
||||
console.log("L5R5E | This element has been ignored because it already exists in this actor", item.uuid);
|
||||
console.log("L5R5E | BCS | This element has been ignored because it already exists in this actor", item.uuid);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
switch (itemData.type) {
|
||||
case "army_cohort":
|
||||
case "army_fortification":
|
||||
console.warn("L5R5E | Army items are not allowed", item?.type, item);
|
||||
console.warn("L5R5E | BCS | Army items are not allowed", item?.type, item);
|
||||
return;
|
||||
|
||||
case "advancement":
|
||||
@@ -354,7 +354,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
|
||||
const created = await this.actor.createEmbeddedDocuments("Item", [
|
||||
{
|
||||
name: game.i18n.localize(`ITEM.Type${type.capitalize()}`),
|
||||
name: game.i18n.localize(`TYPES.Item.${type.toLowerCase()}`),
|
||||
type: type,
|
||||
img: `${CONFIG.l5r5e.paths.assets}icons/items/${type}.svg`,
|
||||
},
|
||||
@@ -556,7 +556,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
break;
|
||||
|
||||
default:
|
||||
console.warn("L5R5E | Unsupported type", type);
|
||||
console.warn("L5R5E | BCS | Unsupported type", type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ export class BaseSheetL5r5e extends ActorSheet {
|
||||
|
||||
const created = await this.actor.createEmbeddedDocuments("Item", [
|
||||
{
|
||||
name: game.i18n.localize(`ITEM.Type${type.capitalize()}`),
|
||||
name: game.i18n.localize(`TYPES.Item.${type.toLowerCase()}`),
|
||||
type: type,
|
||||
img: `${CONFIG.l5r5e.paths.assets}icons/items/${type}.svg`,
|
||||
},
|
||||
|
||||
@@ -90,7 +90,7 @@ export class CharacterGenerator {
|
||||
static async _getItemFromPack(packName, id = null) {
|
||||
const comp = await game.packs.get(packName);
|
||||
if (!comp) {
|
||||
console.log(`L5R5E | Pack not found[${packName}]`);
|
||||
console.log(`L5R5E | CG | Pack not found[${packName}]`);
|
||||
return;
|
||||
}
|
||||
let document;
|
||||
|
||||
@@ -104,19 +104,19 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
new DragDrop({
|
||||
dragSelector: ".item",
|
||||
dropSelector: ".items",
|
||||
permissions: { dragstart: this._canDragStart.bind(this), drop: this._canDragDrop.bind(this) },
|
||||
permissions: { dragstart: this.isEditable, drop: this.isEditable },
|
||||
callbacks: { dragstart: this._onDragStart.bind(this), drop: this._onDropItem.bind(this, "item") },
|
||||
}),
|
||||
new DragDrop({
|
||||
dragSelector: ".technique",
|
||||
dropSelector: ".techniques",
|
||||
permissions: { dragstart: this._canDragStart.bind(this), drop: this._canDragDrop.bind(this) },
|
||||
permissions: { dragstart: this.isEditable, drop: this.isEditable },
|
||||
callbacks: { dragstart: this._onDragStart.bind(this), drop: this._onDropItem.bind(this, "technique") },
|
||||
}),
|
||||
new DragDrop({
|
||||
dragSelector: ".peculiarity",
|
||||
dropSelector: ".peculiarities",
|
||||
permissions: { dragstart: this._canDragStart.bind(this), drop: this._canDragDrop.bind(this) },
|
||||
permissions: { dragstart: this.isEditable, drop: this.isEditable },
|
||||
callbacks: {
|
||||
dragstart: this._onDragStart.bind(this),
|
||||
drop: this._onDropItem.bind(this, "peculiarity"),
|
||||
@@ -125,7 +125,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
new DragDrop({
|
||||
dragSelector: ".bond",
|
||||
dropSelector: ".bonds",
|
||||
permissions: { dragstart: this._canDragStart.bind(this), drop: this._canDragDrop.bind(this) },
|
||||
permissions: { dragstart: this.isEditable, drop: this.isEditable },
|
||||
callbacks: {
|
||||
dragstart: this._onDragStart.bind(this),
|
||||
drop: this._onDropItem.bind(this, "bond"),
|
||||
@@ -253,14 +253,14 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
}
|
||||
const stepKey = $(event.target).data("step");
|
||||
if (!stepKey) {
|
||||
console.warn("L5R5E | Event stepKey is undefined");
|
||||
console.warn("L5R5E | 20Q | Event stepKey is undefined");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// Get item
|
||||
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||
if (item.documentName !== "Item" || !item) {
|
||||
console.warn(`L5R5E | Forbidden item for this drop zone ${type} : ${item.type}`);
|
||||
console.warn(`L5R5E | 20Q | Forbidden item for this drop zone ${type} : ${item.type}`);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
(type !== "item" && item.type !== type) ||
|
||||
(type === "item" && !["item", "weapon", "armor"].includes(item.type))
|
||||
) {
|
||||
console.warn(`L5R5E | Forbidden item for this drop zone ${type} : ${item.type}`);
|
||||
console.warn(`L5R5E | 20Q | Forbidden item for this drop zone ${type} : ${item.type}`);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
if (stepKey === "step3.school_ability") {
|
||||
if (item.system.technique_type !== "school_ability") {
|
||||
console.warn(
|
||||
`L5R5E | This technique is not a school ability : ${item.system.technique_type}`
|
||||
`L5R5E | 20Q | This technique is not a school ability : ${item.system.technique_type}`
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -301,37 +301,37 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
switch (stepKey) {
|
||||
case "step9.distinction":
|
||||
if (item.system.peculiarity_type !== "distinction") {
|
||||
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||
console.warn(`L5R5E | 20Q | Wrong type given "${item.system.peculiarity_type}" instead of "distinction"`);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "step10.adversity":
|
||||
if (item.system.peculiarity_type !== "adversity") {
|
||||
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||
console.warn(`L5R5E | 20Q | Wrong type given "${item.system.peculiarity_type}" instead of "adversity"`);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "step11.passion":
|
||||
if (item.system.peculiarity_type !== "passion") {
|
||||
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||
console.warn(`L5R5E | 20Q | Wrong type given "${item.system.peculiarity_type}" instead of "passion"`);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "step12.anxiety":
|
||||
if (item.system.peculiarity_type !== "anxiety") {
|
||||
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||
console.warn(`L5R5E | 20Q | Wrong type given "${item.system.peculiarity_type}" instead of "anxiety"`);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "step13.advantage":
|
||||
if (!["distinction", "passion"].includes(item.system.peculiarity_type)) {
|
||||
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||
console.warn(`L5R5E | 20Q | Wrong type given "${item.system.peculiarity_type}" instead of "distinction" or "passion"`);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "step13.disadvantage":
|
||||
if (!["adversity", "anxiety"].includes(item.system.peculiarity_type)) {
|
||||
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||
console.warn(`L5R5E | 20Q | Wrong type given "${item.system.peculiarity_type}" instead of "adversity" or "anxiety"`);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -344,7 +344,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
|
||||
this.submit();
|
||||
} catch (err) {
|
||||
console.warn("L5R5E | ", err);
|
||||
console.warn("L5R5E | 20Q | ", err);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -430,7 +430,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
}
|
||||
const item = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({ id: id, type: "Item" });
|
||||
if (!item) {
|
||||
console.warn(`L5R5E | Unknown item id[${id}]`);
|
||||
console.warn(`L5R5E | 20Q | Unknown item id[${id}]`);
|
||||
continue;
|
||||
}
|
||||
newStep.push(id);
|
||||
|
||||
@@ -24,14 +24,14 @@ export class CombatL5r5e extends Combat {
|
||||
|
||||
// Get global modifiers
|
||||
const cfg = {
|
||||
difficulty: game.settings.get("l5r5e", "initiative-difficulty-value"),
|
||||
difficultyHidden: game.settings.get("l5r5e", "initiative-difficulty-hidden"),
|
||||
difficulty: game.settings.get(CONFIG.l5r5e.namespace, "initiative-difficulty-value"),
|
||||
difficultyHidden: game.settings.get(CONFIG.l5r5e.namespace, "initiative-difficulty-hidden"),
|
||||
};
|
||||
|
||||
// SkillId from DicePicker or global
|
||||
const skillId = messageOptions.skillId
|
||||
? messageOptions.skillId
|
||||
: CONFIG.l5r5e.initiativeSkills[game.settings.get("l5r5e", "initiative-encounter")];
|
||||
: CONFIG.l5r5e.initiativeSkills[game.settings.get(CONFIG.l5r5e.namespace, "initiative-encounter")];
|
||||
const skillCat = CONFIG.l5r5e.skills.get(skillId);
|
||||
|
||||
// Get score for each combatant
|
||||
|
||||
@@ -1,31 +1,28 @@
|
||||
export const L5R5E = {};
|
||||
|
||||
L5R5E.paths = {
|
||||
assets: `systems/l5r5e/assets/`,
|
||||
templates: `systems/l5r5e/templates/`,
|
||||
};
|
||||
|
||||
L5R5E.money = [50, 10];
|
||||
L5R5E.stances = ["earth", "air", "water", "fire", "void"];
|
||||
L5R5E.roles = ["artisan", "bushi", "courtier", "monk", "sage", "shinobi", "shugenja"];
|
||||
|
||||
L5R5E.xp = {
|
||||
export const L5R5E = {
|
||||
namespace: "l5r5e",
|
||||
paths: {
|
||||
assets: "systems/l5r5e/assets/",
|
||||
templates: "systems/l5r5e/templates/",
|
||||
},
|
||||
money: [50, 10],
|
||||
stances: ["earth", "air", "water", "fire", "void"],
|
||||
roles: ["artisan", "bushi", "courtier", "monk", "sage", "shinobi", "shugenja"],
|
||||
xp: {
|
||||
costPerRank: [0, 20, 24, 32, 44, 60],
|
||||
bondCostPerRank: [0, 3, 4, 6, 8, 10],
|
||||
ringCostMultiplier: 3,
|
||||
skillCostMultiplier: 2,
|
||||
techniqueCost: 3,
|
||||
};
|
||||
|
||||
L5R5E.regex = {
|
||||
},
|
||||
regex: {
|
||||
techniqueDifficulty: /^@([TS]):([^|]+?)(?:\|(min|max)(?:\(([^)]+?)\))?)?$/,
|
||||
};
|
||||
|
||||
L5R5E.initiativeSkills = {
|
||||
},
|
||||
initiativeSkills: {
|
||||
intrigue: "sentiment",
|
||||
duel: "meditation",
|
||||
skirmish: "tactics",
|
||||
mass_battle: "command",
|
||||
},
|
||||
};
|
||||
|
||||
// *** Techniques ***
|
||||
|
||||
@@ -176,7 +176,7 @@ export class DicePickerDialog extends FormApplication {
|
||||
|
||||
// Difficulty
|
||||
if (!options.difficulty || !this.parseDifficulty(options.difficulty)) {
|
||||
this.difficulty = game.settings.get("l5r5e", "initiative-difficulty-value");
|
||||
this.difficulty = game.settings.get(CONFIG.l5r5e.namespace, "initiative-difficulty-value");
|
||||
}
|
||||
|
||||
// DifficultyHidden
|
||||
@@ -201,7 +201,7 @@ export class DicePickerDialog extends FormApplication {
|
||||
*/
|
||||
async refresh() {
|
||||
if (this._difficultyHiddenIsLock.option) {
|
||||
this.difficulty = game.settings.get("l5r5e", "initiative-difficulty-value");
|
||||
this.difficulty = game.settings.get(CONFIG.l5r5e.namespace, "initiative-difficulty-value");
|
||||
this.difficultyHidden = false;
|
||||
}
|
||||
this.render(false);
|
||||
@@ -246,11 +246,8 @@ export class DicePickerDialog extends FormApplication {
|
||||
if (!targetToken) {
|
||||
return;
|
||||
}
|
||||
if (!(targetToken instanceof TokenDocument) || !targetToken.isOwner) {
|
||||
console.warn(
|
||||
"L5R5E | DP | target rejected : Not a valid TokenDocument instance or permission was denied",
|
||||
targetToken
|
||||
);
|
||||
if (!(targetToken instanceof TokenDocument)) {
|
||||
console.warn("L5R5E | DP | target rejected : Not a valid TokenDocument instance", targetToken);
|
||||
return;
|
||||
}
|
||||
this._target = targetToken;
|
||||
@@ -363,7 +360,7 @@ export class DicePickerDialog extends FormApplication {
|
||||
*/
|
||||
set difficultyHidden(isHidden) {
|
||||
// If GM hide, then player choice don't matter
|
||||
this._difficultyHiddenIsLock.gm = game.settings.get("l5r5e", "initiative-difficulty-hidden");
|
||||
this._difficultyHiddenIsLock.gm = game.settings.get(CONFIG.l5r5e.namespace, "initiative-difficulty-hidden");
|
||||
if (this._difficultyHiddenIsLock.gm || this._difficultyHiddenIsLock.option) {
|
||||
isHidden = true;
|
||||
}
|
||||
|
||||
@@ -196,21 +196,12 @@ export class RollnKeepDialog extends FormApplication {
|
||||
new DragDrop({
|
||||
dragSelector: ".dice.draggable",
|
||||
dropSelector: ".dropbox",
|
||||
permissions: { dragstart: this._canDragStart.bind(this), drop: this._canDragDrop.bind(this) },
|
||||
permissions: { dragstart: this.isEditable, drop: this.isEditable },
|
||||
callbacks: { dragstart: this._onDragStart.bind(this), drop: this._onDropItem.bind(this) },
|
||||
}),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Define whether a user is able to begin a dragstart workflow for a given drag selector
|
||||
* @param selector The candidate HTML selector for dragging
|
||||
* @return Can the current user drag this selector?
|
||||
*/
|
||||
_canDragStart(selector) {
|
||||
return this.options.editable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback actions which occur at the beginning of a drag start workflow.
|
||||
* @param {DragEvent} event The originating DragEvent
|
||||
@@ -683,7 +674,7 @@ export class RollnKeepDialog extends FormApplication {
|
||||
}
|
||||
|
||||
// Delete old chat message related to this series
|
||||
if (game.settings.get("l5r5e", "rnk-deleteOldMessage")) {
|
||||
if (game.settings.get(CONFIG.l5r5e.namespace, "rnk-deleteOldMessage")) {
|
||||
if (game.user.isFirstGM) {
|
||||
const message = game.messages.get(msgOldId);
|
||||
if (message) {
|
||||
|
||||
@@ -42,7 +42,7 @@ export class GmMonitor extends FormApplication {
|
||||
buttons.unshift({
|
||||
label: game.i18n.localize("l5r5e.gm.monitor.switch_view"),
|
||||
class: "switch-view",
|
||||
icon: "fas fa-users",
|
||||
icon: "fas fa-repeat",
|
||||
onclick: () =>
|
||||
game.l5r5e.HelpersL5r5e.debounce(
|
||||
"SwitchView-" + this.object.id,
|
||||
@@ -50,7 +50,21 @@ export class GmMonitor extends FormApplication {
|
||||
this.object.view = this.object.view === "armies" ? "characters" : "armies";
|
||||
this.render(false);
|
||||
},
|
||||
1000,
|
||||
500,
|
||||
true
|
||||
)(),
|
||||
});
|
||||
|
||||
// Add selected tokens
|
||||
buttons.unshift({
|
||||
label: game.i18n.localize("l5r5e.gm.monitor.add_selected_tokens"),
|
||||
class: "add-selected-token",
|
||||
icon: "fas fa-users",
|
||||
onclick: () =>
|
||||
game.l5r5e.HelpersL5r5e.debounce(
|
||||
"AddSelectedToken-" + this.object.id,
|
||||
() => this.#addSelectedTokens(),
|
||||
500,
|
||||
true
|
||||
)(),
|
||||
});
|
||||
@@ -84,14 +98,22 @@ export class GmMonitor extends FormApplication {
|
||||
*/
|
||||
_initialize() {
|
||||
let actors;
|
||||
const ids = game.settings.get("l5r5e", "gm-monitor-actors");
|
||||
const uuidList = game.settings.get(CONFIG.l5r5e.namespace, "gm-monitor-actors");
|
||||
if (uuidList.length > 0) {
|
||||
// Get actors from stored uuids
|
||||
actors = uuidList
|
||||
.map(uuid => {
|
||||
const doc = fromUuidSync(uuid);
|
||||
if (doc instanceof TokenDocument) {
|
||||
return doc.actor;
|
||||
}
|
||||
return doc;
|
||||
})
|
||||
.filter(a => !!a); // skip null
|
||||
|
||||
if (ids.length > 0) {
|
||||
// get actors with stored ids
|
||||
actors = game.actors.filter((e) => ids.includes(e.id));
|
||||
} else {
|
||||
// If empty add pc with owner
|
||||
actors = game.actors.filter((actor) => actor.type === "character" && actor.hasPlayerOwner);
|
||||
actors = game.actors.filter((actor) => actor.type === "character" && actor.hasPlayerOwnerActive);
|
||||
this._saveActorsIds();
|
||||
}
|
||||
|
||||
@@ -103,6 +125,27 @@ export class GmMonitor extends FormApplication {
|
||||
this.object.actors = actors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add selected token on monitor if not already present
|
||||
*/
|
||||
#addSelectedTokens() {
|
||||
if (canvas.tokens.controlled.length > 0) {
|
||||
const actors2Add = canvas.tokens.controlled
|
||||
.map(t => t.actor)
|
||||
.filter(t => !!t && !this.object.actors.find((a) => a.uuid === t.uuid));
|
||||
|
||||
if (actors2Add.length < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.object.actors = [
|
||||
...this.object.actors,
|
||||
...actors2Add
|
||||
];
|
||||
this._saveActorsIds().then(() => this.render(false));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent non GM to render this windows
|
||||
* @override
|
||||
@@ -161,11 +204,11 @@ export class GmMonitor extends FormApplication {
|
||||
return $(event.currentTarget).data("text");
|
||||
}
|
||||
|
||||
const id = $(event.currentTarget).data("actor-id");
|
||||
if (!id) {
|
||||
const uuid = $(event.currentTarget).data("actor-uuid");
|
||||
if (!uuid) {
|
||||
return;
|
||||
}
|
||||
const actor = this.object.actors.find((e) => e.id === id);
|
||||
const actor = this.object.actors.find((a) => a.uuid === uuid);
|
||||
if (!actor) {
|
||||
return;
|
||||
}
|
||||
@@ -201,11 +244,14 @@ export class GmMonitor extends FormApplication {
|
||||
return;
|
||||
}
|
||||
|
||||
const actor = game.actors.find((a) => a.uuid === data.uuid);
|
||||
const actor = fromUuidSync(data.uuid);
|
||||
if (!actor) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Switch view to current character type
|
||||
this.object.view = actor.isArmy ? "armies" : "characters";
|
||||
|
||||
this.object.actors.push(actor);
|
||||
|
||||
return this._saveActorsIds();
|
||||
@@ -218,9 +264,9 @@ export class GmMonitor extends FormApplication {
|
||||
*/
|
||||
async _saveActorsIds() {
|
||||
return game.settings.set(
|
||||
"l5r5e",
|
||||
CONFIG.l5r5e.namespace,
|
||||
"gm-monitor-actors",
|
||||
this.object.actors.map((e) => e.id)
|
||||
this.object.actors.map((a) => a.uuid)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -234,12 +280,12 @@ export class GmMonitor extends FormApplication {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
const id = $(event.currentTarget).data("actor-id");
|
||||
if (!id) {
|
||||
const uuid = $(event.currentTarget).data("actor-uuid");
|
||||
if (!uuid) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.object.actors = this.object.actors.filter((e) => e.id !== id);
|
||||
this.object.actors = this.object.actors.filter((a) => a.uuid !== uuid);
|
||||
|
||||
return this._saveActorsIds();
|
||||
}
|
||||
@@ -256,17 +302,17 @@ export class GmMonitor extends FormApplication {
|
||||
|
||||
const type = $(event.currentTarget).data("type");
|
||||
if (!type) {
|
||||
console.warn("L5R5E | type not set", type);
|
||||
console.warn("L5R5E | GMM | type not set", type);
|
||||
return;
|
||||
}
|
||||
const id = $(event.currentTarget).data("actor-id");
|
||||
if (!id) {
|
||||
console.warn("L5R5E | actor id not set", type);
|
||||
const uuid = $(event.currentTarget).data("actor-uuid");
|
||||
if (!uuid) {
|
||||
console.warn("L5R5E | GMM | actor uuid not set", type);
|
||||
return;
|
||||
}
|
||||
const actor = game.actors.get(id);
|
||||
const actor = fromUuidSync(uuid);
|
||||
if (!actor) {
|
||||
console.warn("L5R5E | Actor not found", type);
|
||||
console.warn("L5R5E | GMM | Actor not found", type);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -323,7 +369,7 @@ export class GmMonitor extends FormApplication {
|
||||
break;
|
||||
|
||||
default:
|
||||
console.warn("L5R5E | Unsupported type", type);
|
||||
console.warn("L5R5E | GMM | Unsupported type", type);
|
||||
break;
|
||||
}
|
||||
if (!foundry.utils.isEmpty(updateData)) {
|
||||
|
||||
@@ -55,8 +55,8 @@ export class GmToolbox extends FormApplication {
|
||||
*/
|
||||
_initialize() {
|
||||
this.object = {
|
||||
difficulty: game.settings.get("l5r5e", "initiative-difficulty-value"),
|
||||
difficultyHidden: game.settings.get("l5r5e", "initiative-difficulty-hidden"),
|
||||
difficulty: game.settings.get(CONFIG.l5r5e.namespace, "initiative-difficulty-value"),
|
||||
difficultyHidden: game.settings.get(CONFIG.l5r5e.namespace, "initiative-difficulty-hidden"),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ export class GmToolbox extends FormApplication {
|
||||
event.stopPropagation();
|
||||
this.object.difficultyHidden = !this.object.difficultyHidden;
|
||||
game.settings
|
||||
.set("l5r5e", "initiative-difficulty-hidden", this.object.difficultyHidden)
|
||||
.set(CONFIG.l5r5e.namespace, "initiative-difficulty-hidden", this.object.difficultyHidden)
|
||||
.then(() => this.submit());
|
||||
});
|
||||
|
||||
@@ -150,7 +150,7 @@ export class GmToolbox extends FormApplication {
|
||||
this.object.difficulty = Math.max(0, this.object.difficulty - 1);
|
||||
break;
|
||||
}
|
||||
game.settings.set("l5r5e", "initiative-difficulty-value", this.object.difficulty).then(() => this.submit());
|
||||
game.settings.set(CONFIG.l5r5e.namespace, "initiative-difficulty-value", this.object.difficulty).then(() => this.submit());
|
||||
});
|
||||
|
||||
// Scene End, Sleep, Void Pts
|
||||
@@ -202,7 +202,7 @@ export class GmToolbox extends FormApplication {
|
||||
}
|
||||
|
||||
// Manage left/right button
|
||||
if (!isAll && (!actor.isCharacter || !actor.hasPlayerOwner)) {
|
||||
if (!isAll && (!actor.isCharacter || !actor.hasPlayerOwnerActive)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ export class HelpersL5r5e {
|
||||
document.prepareData();
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn("L5R5E | ", err);
|
||||
console.warn("L5R5E | Helpers | ", err);
|
||||
}
|
||||
return document;
|
||||
}
|
||||
@@ -227,7 +227,7 @@ export class HelpersL5r5e {
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(`L5R5E | createObjectFromCompendium - Unmanaged type ${type}`);
|
||||
console.log(`L5R5E | Helpers | createObjectFromCompendium - Unmanaged type ${type}`);
|
||||
break;
|
||||
} // swi
|
||||
|
||||
@@ -251,7 +251,7 @@ export class HelpersL5r5e {
|
||||
if (gameProp) {
|
||||
return { id: gameProp.id, name: gameProp.name };
|
||||
} else {
|
||||
console.warn(`L5R5E | Unknown property id[${property.id}]`);
|
||||
console.warn(`L5R5E | Helpers | Unknown property id[${property.id}]`);
|
||||
}
|
||||
return property;
|
||||
})
|
||||
@@ -741,14 +741,14 @@ export class HelpersL5r5e {
|
||||
static async drawManyFromPack(pack, tableName, retrieve = 5, opt = { rollMode: "selfroll" }) {
|
||||
const comp = await game.packs.get(pack);
|
||||
if (!comp) {
|
||||
console.log(`L5R5E | Pack not found[${pack}]`);
|
||||
console.log(`L5R5E | Helpers | Pack not found[${pack}]`);
|
||||
return;
|
||||
}
|
||||
await comp.getDocuments();
|
||||
|
||||
const table = await (/^[a-zA-Z0-9]{16}$/.test(tableName) ? comp.get(tableName) : comp.getName(tableName));
|
||||
if (!table) {
|
||||
console.log(`L5R5E | Table not found[${tableName}]`, comp, table);
|
||||
console.log(`L5R5E | Helpers | Table not found[${tableName}]`, comp, table);
|
||||
return;
|
||||
}
|
||||
return await table.drawMany(retrieve, opt);
|
||||
@@ -852,7 +852,7 @@ export class HelpersL5r5e {
|
||||
)}`;
|
||||
|
||||
choiceDiv.addEventListener("click", (clickEvent) => {
|
||||
const selectedIndex = clickEvent.target.attributes["data-id"].value;
|
||||
const selectedIndex = clickEvent.target.attributes["data-id"]?.value;
|
||||
if (!list[selectedIndex]) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -95,14 +95,10 @@ export default class HooksL5r5e {
|
||||
case "settings":
|
||||
// Add Changelog link
|
||||
html.find("#game-details .system").append(
|
||||
`<p><a href="${game.system.changelog}" target="_blank">Changelog</a>` +
|
||||
` <a href="${game.i18n.localize(
|
||||
"l5r5e.settings.wiki.link"
|
||||
)}" target="_blank">${game.i18n.localize("l5r5e.settings.wiki.title")}</a>` +
|
||||
` <a href="${game.i18n.localize(
|
||||
"l5r5e.settings.custom-compendiums.link"
|
||||
)}" target="_blank">${game.i18n.localize("l5r5e.settings.custom-compendiums.title")}</a>` +
|
||||
`</p>`
|
||||
`<span><a href="${game.system.changelog}" target="_blank">Changelog</a>`
|
||||
+ ` <a href="${game.i18n.localize("l5r5e.settings.wiki.link")}" target="_blank">${game.i18n.localize("l5r5e.settings.wiki.title")}</a>`
|
||||
+ ` <a href="${game.i18n.localize("l5r5e.settings.custom-compendiums.link")}" target="_blank">${game.i18n.localize("l5r5e.settings.custom-compendiums.title")}</a>`
|
||||
+ `</span>`
|
||||
);
|
||||
break;
|
||||
}
|
||||
@@ -158,14 +154,14 @@ export default class HooksL5r5e {
|
||||
// *** Conf ***
|
||||
const encounterTypeList = Object.keys(CONFIG.l5r5e.initiativeSkills);
|
||||
const prepared = {
|
||||
character: game.settings.get("l5r5e", "initiative-prepared-character"),
|
||||
adversary: game.settings.get("l5r5e", "initiative-prepared-adversary"),
|
||||
minion: game.settings.get("l5r5e", "initiative-prepared-minion"),
|
||||
character: game.settings.get(CONFIG.l5r5e.namespace, "initiative-prepared-character"),
|
||||
adversary: game.settings.get(CONFIG.l5r5e.namespace, "initiative-prepared-adversary"),
|
||||
minion: game.settings.get(CONFIG.l5r5e.namespace, "initiative-prepared-minion"),
|
||||
};
|
||||
|
||||
// *** Template ***
|
||||
const tpl = await renderTemplate(`${CONFIG.l5r5e.paths.templates}gm/combat-tracker-bar.html`, {
|
||||
encounterType: game.settings.get("l5r5e", "initiative-encounter"),
|
||||
encounterType: game.settings.get(CONFIG.l5r5e.namespace, "initiative-encounter"),
|
||||
encounterTypeList,
|
||||
prepared,
|
||||
});
|
||||
@@ -175,7 +171,7 @@ export default class HooksL5r5e {
|
||||
if (elmt.length > 0) {
|
||||
elmt.replaceWith(tpl);
|
||||
} else {
|
||||
html.find("#combat-round").append(tpl);
|
||||
html.find(".combat-tracker-header").append(tpl);
|
||||
}
|
||||
|
||||
// Buttons Listeners
|
||||
@@ -186,7 +182,7 @@ export default class HooksL5r5e {
|
||||
if (!encounterTypeList.includes(encounter)) {
|
||||
return;
|
||||
}
|
||||
game.settings.set("l5r5e", "initiative-encounter", encounter);
|
||||
game.settings.set(CONFIG.l5r5e.namespace, "initiative-encounter", encounter);
|
||||
});
|
||||
|
||||
html.find(".prepared-control").on("mousedown", (event) => {
|
||||
@@ -198,11 +194,11 @@ export default class HooksL5r5e {
|
||||
}
|
||||
const rev = event.which === 3;
|
||||
const nextValue = {
|
||||
false: rev ? "true" : "null",
|
||||
true: rev ? "null" : "false",
|
||||
null: rev ? "false" : "true",
|
||||
false: rev ? "true" : "actor",
|
||||
true: rev ? "actor" : "false",
|
||||
actor: rev ? "false" : "true",
|
||||
};
|
||||
game.settings.set("l5r5e", `initiative-prepared-${preparedId}`, nextValue[prepared[preparedId]]);
|
||||
game.settings.set(CONFIG.l5r5e.namespace, `initiative-prepared-${preparedId}`, nextValue[prepared[preparedId]]);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -43,16 +43,13 @@ export class ItemL5r5e extends Item {
|
||||
* TODO probably useless if we can add "items" in metadata.embedded, but no clue how to.
|
||||
*
|
||||
* @param {string} embeddedName The name of the embedded Document type
|
||||
* @return {Collection} The Collection instance of embedded Documents of the requested type
|
||||
* @return {DocumentCollection} The Collection instance of embedded Documents of the requested type
|
||||
*/
|
||||
getEmbeddedCollection(embeddedName) {
|
||||
const collectionName = embeddedName === "Item" ? "items" : this.constructor.metadata.embedded[embeddedName];
|
||||
if (!collectionName) {
|
||||
throw new Error(
|
||||
`${embeddedName} is not a valid embedded Document within the ${this.documentName} Document`
|
||||
);
|
||||
if (embeddedName === "Item") {
|
||||
return this.items;
|
||||
}
|
||||
return this[collectionName];
|
||||
return super.getEmbeddedCollection(embeddedName);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -82,7 +79,7 @@ export class ItemL5r5e extends Item {
|
||||
// **** Embed Items, need to get the parents ****
|
||||
const parentItem = this.getItemFromParentId();
|
||||
if (!parentItem) {
|
||||
console.warn(`L5R5E | Embed parentItem not found`);
|
||||
console.warn(`L5R5E | Helpers | Embed parentItem not found`);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -198,7 +195,7 @@ export class ItemL5r5e extends Item {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Embed Item
|
||||
* Add an Embed Item
|
||||
* @param {ItemL5r5e} item Object to add
|
||||
* @param {boolean} save if we save in db or not (used internally)
|
||||
* @param {boolean} newId if we change the id
|
||||
@@ -249,7 +246,7 @@ export class ItemL5r5e extends Item {
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a Embed Item
|
||||
* Update an Embed Item
|
||||
* @param {ItemL5r5e} item Object to add
|
||||
* @param {boolean} save if we save in db or not (used internally)
|
||||
* @return {Promise<string>}
|
||||
|
||||
@@ -111,7 +111,7 @@ export class ArmyCohortSheetL5r5e extends ItemSheetL5r5e {
|
||||
*/
|
||||
async _updateLinkedActorData(actor) {
|
||||
if (!actor || actor.documentName !== "Actor" || !actor.isCharacterType) {
|
||||
console.warn("L5R5E | Wrong actor type", actor?.type, actor);
|
||||
console.warn("L5R5E | Army Cohort | Wrong actor type", actor?.type, actor);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ export class BaseItemSheetL5r5e extends ItemSheet {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
const itemId = $(event.currentTarget).data("item-id");
|
||||
console.warn("L5R5E | TODO ItemSheetL5r5e._addSubItem()", itemId); // TODO _addSubItem Currently not used, title override it
|
||||
console.warn("L5R5E | BIS | TODO ItemSheetL5r5e._addSubItem()", itemId); // TODO _addSubItem Currently not used, title override it
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -51,7 +51,7 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
|
||||
props.push({ id: gameProp.id, name: gameProp.name });
|
||||
} else {
|
||||
// Item not found
|
||||
console.warn(`L5R5E | Unknown property id[${property.id}], name[${property.name}]`);
|
||||
console.warn(`L5R5E | IS | Unknown property id[${property.id}], name[${property.name}]`);
|
||||
sheetData.data.propertiesList.push({
|
||||
id: property.id,
|
||||
name: property.name,
|
||||
@@ -87,11 +87,13 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
|
||||
* @return {DragDrop[]} An array of DragDrop handlers
|
||||
*/
|
||||
_createDragDropHandlers() {
|
||||
// "this.isEditable" fail for tooltips (undefined "this.document")
|
||||
const isEditable = this.options.editable;
|
||||
return [
|
||||
new DragDrop({
|
||||
dragSelector: ".property",
|
||||
dropSelector: null,
|
||||
permissions: { dragstart: this._canDragStart.bind(this), drop: this._canDragDrop.bind(this) },
|
||||
permissions: { dragstart: isEditable, drop: isEditable },
|
||||
callbacks: { dragstart: this._onDragStart.bind(this), drop: this._onDrop.bind(this) },
|
||||
}),
|
||||
];
|
||||
|
||||
@@ -21,7 +21,7 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
||||
|
||||
// List all available techniques type
|
||||
const types = ["core", "school", "title"];
|
||||
if (game.settings.get("l5r5e", "techniques-customs")) {
|
||||
if (game.settings.get(CONFIG.l5r5e.namespace, "techniques-customs")) {
|
||||
types.push("custom");
|
||||
}
|
||||
sheetData.data.techniquesList = game.l5r5e.HelpersL5r5e.getTechniquesList({ types });
|
||||
|
||||
@@ -116,7 +116,7 @@ export class TitleSheetL5r5e extends ItemSheetL5r5e {
|
||||
// Create the new Item
|
||||
const itemId = await this.document.addEmbedItem(
|
||||
new game.l5r5e.ItemL5r5e({
|
||||
name: game.i18n.localize(`ITEM.Type${selectedType.capitalize()}`),
|
||||
name: game.i18n.localize(`TYPES.Item.${selectedType.toLowerCase()}`),
|
||||
type: selectedType,
|
||||
img: `${CONFIG.l5r5e.paths.assets}icons/items/${selectedType}.svg`,
|
||||
})
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
* @extends {JournalSheet}
|
||||
*/
|
||||
export class BaseJournalSheetL5r5e extends JournalSheet {
|
||||
// /** @override */
|
||||
// static get defaultOptions() {
|
||||
// return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
// classes: ["l5r5e", "sheet", "journal"], // app window-app sheet journal-sheet
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: ["sheet", "journal-sheet", "journal-entry", "l5r5e", "sheet", "journal"], // sheet journal-sheet journal-entry
|
||||
// template: CONFIG.l5r5e.paths.templates + "journal/journal-sheet.html",
|
||||
// width: 520,
|
||||
// height: 480,
|
||||
// tabs: [{ navSelector: ".journal-tabs", contentSelector: ".journal-body", initial: "description" }],
|
||||
// });
|
||||
// }
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the SendToChat button on top of sheet
|
||||
|
||||
@@ -109,94 +109,94 @@ Hooks.once("init", async () => {
|
||||
// ***** Register custom sheets *****
|
||||
// Actors
|
||||
Actors.unregisterSheet("core", ActorSheet);
|
||||
Actors.registerSheet("l5r5e", CharacterSheetL5r5e, {
|
||||
Actors.registerSheet(L5R5E.namespace, CharacterSheetL5r5e, {
|
||||
types: ["character"],
|
||||
label: "ACTOR.TypeCharacter",
|
||||
label: "TYPES.Actor.character",
|
||||
makeDefault: true,
|
||||
});
|
||||
Actors.registerSheet("l5r5e", NpcSheetL5r5e, {
|
||||
Actors.registerSheet(L5R5E.namespace, NpcSheetL5r5e, {
|
||||
types: ["npc"],
|
||||
label: "ACTOR.TypeNpc",
|
||||
label: "TYPES.Actor.npc",
|
||||
makeDefault: true,
|
||||
});
|
||||
Actors.registerSheet("l5r5e", ArmySheetL5r5e, {
|
||||
Actors.registerSheet(L5R5E.namespace, ArmySheetL5r5e, {
|
||||
types: ["army"],
|
||||
label: "ACTOR.TypeArmy",
|
||||
label: "TYPES.Actor.army",
|
||||
makeDefault: true,
|
||||
});
|
||||
|
||||
// Items
|
||||
Items.unregisterSheet("core", ItemSheet);
|
||||
Items.registerSheet("l5r5e", ItemSheetL5r5e, {
|
||||
Items.registerSheet(L5R5E.namespace, ItemSheetL5r5e, {
|
||||
types: ["item"],
|
||||
label: "ITEM.TypeItem",
|
||||
label: "TYPES.Item.item",
|
||||
makeDefault: true,
|
||||
});
|
||||
Items.registerSheet("l5r5e", ArmorSheetL5r5e, {
|
||||
Items.registerSheet(L5R5E.namespace, ArmorSheetL5r5e, {
|
||||
types: ["armor"],
|
||||
label: "ITEM.TypeArmor",
|
||||
label: "TYPES.Item.armor",
|
||||
makeDefault: true,
|
||||
});
|
||||
Items.registerSheet("l5r5e", WeaponSheetL5r5e, {
|
||||
Items.registerSheet(L5R5E.namespace, WeaponSheetL5r5e, {
|
||||
types: ["weapon"],
|
||||
label: "ITEM.TypeWeapon",
|
||||
label: "TYPES.Item.weapon",
|
||||
makeDefault: true,
|
||||
});
|
||||
Items.registerSheet("l5r5e", TechniqueSheetL5r5e, {
|
||||
Items.registerSheet(L5R5E.namespace, TechniqueSheetL5r5e, {
|
||||
types: ["technique"],
|
||||
label: "ITEM.TypeTechnique",
|
||||
label: "TYPES.Item.technique",
|
||||
makeDefault: true,
|
||||
});
|
||||
Items.registerSheet("l5r5e", PropertySheetL5r5e, {
|
||||
Items.registerSheet(L5R5E.namespace, PropertySheetL5r5e, {
|
||||
types: ["property"],
|
||||
label: "ITEM.TypeProperty",
|
||||
label: "TYPES.Item.property",
|
||||
makeDefault: true,
|
||||
});
|
||||
Items.registerSheet("l5r5e", PeculiaritySheetL5r5e, {
|
||||
Items.registerSheet(L5R5E.namespace, PeculiaritySheetL5r5e, {
|
||||
types: ["peculiarity"],
|
||||
label: "ITEM.TypePeculiarity",
|
||||
label: "TYPES.Item.peculiarity",
|
||||
makeDefault: true,
|
||||
});
|
||||
Items.registerSheet("l5r5e", AdvancementSheetL5r5e, {
|
||||
Items.registerSheet(L5R5E.namespace, AdvancementSheetL5r5e, {
|
||||
types: ["advancement"],
|
||||
label: "ITEM.TypeAdvancement",
|
||||
label: "TYPES.Item.advancement",
|
||||
makeDefault: true,
|
||||
});
|
||||
Items.registerSheet("l5r5e", TitleSheetL5r5e, {
|
||||
Items.registerSheet(L5R5E.namespace, TitleSheetL5r5e, {
|
||||
types: ["title"],
|
||||
label: "ITEM.TypeTitle",
|
||||
label: "TYPES.Item.title",
|
||||
makeDefault: true,
|
||||
});
|
||||
Items.registerSheet("l5r5e", BondSheetL5r5e, {
|
||||
Items.registerSheet(L5R5E.namespace, BondSheetL5r5e, {
|
||||
types: ["bond"],
|
||||
label: "ITEM.TypeBond",
|
||||
label: "TYPES.Item.bond",
|
||||
makeDefault: true,
|
||||
});
|
||||
Items.registerSheet("l5r5e", SignatureScrollSheetL5r5e, {
|
||||
Items.registerSheet(L5R5E.namespace, SignatureScrollSheetL5r5e, {
|
||||
types: ["signature_scroll"],
|
||||
label: "ITEM.TypeSignature_scroll",
|
||||
label: "TYPES.Item.signature_scroll",
|
||||
makeDefault: true,
|
||||
});
|
||||
Items.registerSheet("l5r5e", ItemPatternSheetL5r5e, {
|
||||
Items.registerSheet(L5R5E.namespace, ItemPatternSheetL5r5e, {
|
||||
types: ["item_pattern"],
|
||||
label: "ITEM.TypeItem_pattern",
|
||||
label: "TYPES.Item.item_pattern",
|
||||
makeDefault: true,
|
||||
});
|
||||
Items.registerSheet("l5r5e", ArmyCohortSheetL5r5e, {
|
||||
Items.registerSheet(L5R5E.namespace, ArmyCohortSheetL5r5e, {
|
||||
types: ["army_cohort"],
|
||||
label: "ITEM.TypeArmy_cohort",
|
||||
label: "TYPES.Item.army_cohort",
|
||||
makeDefault: true,
|
||||
});
|
||||
Items.registerSheet("l5r5e", ArmyFortificationSheetL5r5e, {
|
||||
Items.registerSheet(L5R5E.namespace, ArmyFortificationSheetL5r5e, {
|
||||
types: ["army_fortification"],
|
||||
label: "ITEM.TypeArmy_fortification",
|
||||
label: "TYPES.Item.army_fortification",
|
||||
makeDefault: true,
|
||||
});
|
||||
|
||||
// Journal
|
||||
Journal.unregisterSheet("core", JournalSheet);
|
||||
Journal.registerSheet("l5r5e", BaseJournalSheetL5r5e, {
|
||||
label: "JOURNAL.TypeJournal",
|
||||
Journal.registerSheet(L5R5E.namespace, BaseJournalSheetL5r5e, {
|
||||
label: "TYPES.Journal.journal",
|
||||
makeDefault: true,
|
||||
});
|
||||
|
||||
@@ -208,7 +208,7 @@ Hooks.once("init", async () => {
|
||||
|
||||
// Override the default Token _drawBar function to allow fatigue bar reversing.
|
||||
Token.prototype._drawBar = function (number, bar, data) {
|
||||
const reverseBar = data.attribute === "fatigue" && game.settings.get("l5r5e", "token-reverseFatigueBar");
|
||||
const reverseBar = data.attribute === "fatigue" && game.settings.get(L5R5E.namespace, "token-reverseFatigueBar");
|
||||
|
||||
// Bar value
|
||||
const pct = Math.clamped(Number(data.value), 0, data.max) / data.max;
|
||||
|
||||
@@ -14,7 +14,7 @@ export class MigrationL5r5e {
|
||||
* @return {boolean}
|
||||
*/
|
||||
static needUpdate(version) {
|
||||
const currentVersion = game.settings.get("l5r5e", "systemMigrationVersion");
|
||||
const currentVersion = game.settings.get(CONFIG.l5r5e.namespace, "systemMigrationVersion");
|
||||
return !currentVersion || foundry.utils.isNewerVersion(version, currentVersion);
|
||||
}
|
||||
|
||||
@@ -44,11 +44,11 @@ export class MigrationL5r5e {
|
||||
try {
|
||||
const updateData = MigrationL5r5e._migrateActorData(actor, options);
|
||||
if (!foundry.utils.isEmpty(updateData)) {
|
||||
console.log(`L5R5E | Migrating Actor document ${actor.name}[${actor._id}]`);
|
||||
console.log(`L5R5E | Migration | Migrating Actor document ${actor.name}[${actor._id}]`);
|
||||
await actor.update(updateData);
|
||||
}
|
||||
} catch (err) {
|
||||
err.message = `L5R5E | Failed L5R5e system migration for Actor ${actor.name}[${actor._id}]: ${err.message}`;
|
||||
err.message = `L5R5E | Migration | Failed L5R5e system migration for Actor ${actor.name}[${actor._id}]: ${err.message}`;
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
@@ -58,11 +58,11 @@ export class MigrationL5r5e {
|
||||
try {
|
||||
const updateData = MigrationL5r5e._migrateItemData(item, options);
|
||||
if (!foundry.utils.isEmpty(updateData)) {
|
||||
console.log(`L5R5E | Migrating Item document ${item.name}[${item._id}]`);
|
||||
console.log(`L5R5E | Migration | Migrating Item document ${item.name}[${item._id}]`);
|
||||
await item.update(updateData);
|
||||
}
|
||||
} catch (err) {
|
||||
err.message = `L5R5E | Failed L5R5e system migration for Item ${item.name}[${item._id}]: ${err.message}`;
|
||||
err.message = `L5R5E | Migration | Failed L5R5e system migration for Item ${item.name}[${item._id}]: ${err.message}`;
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
@@ -72,14 +72,14 @@ export class MigrationL5r5e {
|
||||
try {
|
||||
const updateData = MigrationL5r5e._migrateSceneData(scene, options);
|
||||
if (!foundry.utils.isEmpty(updateData)) {
|
||||
console.log(`L5R5E | Migrating Scene document ${scene.name}[${scene._id}]`);
|
||||
console.log(`L5R5E | Migration | Migrating Scene document ${scene.name}[${scene._id}]`);
|
||||
await scene.update(updateData);
|
||||
// If we do not do this, then synthetic token actors remain in cache
|
||||
// with the un-updated actorData.
|
||||
scene.tokens.contents.forEach((t) => (t._actor = null));
|
||||
}
|
||||
} catch (err) {
|
||||
err.message = `L5R5E | Failed L5R5e system migration for Scene ${scene.name}[${scene._id}]: ${err.message}`;
|
||||
err.message = `L5R5E | Migration | Failed L5R5e system migration for Scene ${scene.name}[${scene._id}]: ${err.message}`;
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
@@ -104,16 +104,16 @@ export class MigrationL5r5e {
|
||||
}
|
||||
// Save all the modified entries at once
|
||||
if (updatedChatList.length > 0) {
|
||||
console.log(`L5R5E | Migrating ${updatedChatList.length} ChatMessage documents`);
|
||||
console.log(`L5R5E | Migration | Migrating ${updatedChatList.length} ChatMessage documents`);
|
||||
await ChatMessage.updateDocuments(updatedChatList);
|
||||
}
|
||||
} catch (err) {
|
||||
err.message = `L5R5E | Failed L5R5e system migration for ChatMessage`;
|
||||
err.message = `L5R5E | Migration | Failed L5R5e system migration for ChatMessage`;
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
// Set the migration as complete
|
||||
await game.settings.set("l5r5e", "systemMigrationVersion", game.system.version);
|
||||
await game.settings.set(CONFIG.l5r5e.namespace, "systemMigrationVersion", game.system.version);
|
||||
ui.notifications.info(`L5R5e System Migration to version ${game.system.version} completed!`, {
|
||||
permanent: true,
|
||||
});
|
||||
@@ -160,9 +160,7 @@ export class MigrationL5r5e {
|
||||
updateData["_id"] = doc._id;
|
||||
updateDatasList.push(updateData);
|
||||
|
||||
console.log(
|
||||
`L5R5E | Migrating ${docType} document ${doc.name}[${doc._id}] in Compendium ${pack.collection}`
|
||||
);
|
||||
console.log(`L5R5E | Migration | Migrating ${docType} document ${doc.name}[${doc._id}] in Compendium ${pack.collection}`);
|
||||
}
|
||||
|
||||
// Save the modified entries
|
||||
@@ -171,13 +169,13 @@ export class MigrationL5r5e {
|
||||
}
|
||||
} catch (err) {
|
||||
// Handle migration failures
|
||||
err.message = `L5R5E | Failed system migration for documents ${docType} in pack ${pack.collection}: ${err.message}`;
|
||||
err.message = `L5R5E | Migration | Failed system migration for documents ${docType} in pack ${pack.collection}: ${err.message}`;
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
// Apply the original locked status for the pack
|
||||
await pack.configure({ locked: wasLocked });
|
||||
console.log(`L5R5E | Migrated all ${docType} contents from Compendium ${pack.collection}`);
|
||||
console.log(`L5R5E | Migration | Migrated all ${docType} contents from Compendium ${pack.collection}`);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -191,12 +189,12 @@ export class MigrationL5r5e {
|
||||
const tokens = scene.tokens.map((token) => {
|
||||
const t = token.toJSON();
|
||||
if (!t.actorId || t.actorLink) {
|
||||
t.actorData = {};
|
||||
t.delta = {};
|
||||
} else if (!game.actors.has(t.actorId)) {
|
||||
t.actorId = null;
|
||||
t.actorData = {};
|
||||
t.delta = {};
|
||||
} else if (!t.actorLink) {
|
||||
const actorData = foundry.utils.duplicate(t.actorData);
|
||||
const actorData = foundry.utils.duplicate(t.delta);
|
||||
actorData.type = token.actor?.type;
|
||||
const update = MigrationL5r5e._migrateActorData(actorData, options);
|
||||
["items", "effects"].forEach((embeddedName) => {
|
||||
@@ -204,7 +202,7 @@ export class MigrationL5r5e {
|
||||
return;
|
||||
}
|
||||
const updates = new Map(update[embeddedName].map((u) => [u._id, u]));
|
||||
t.actorData[embeddedName].forEach((original) => {
|
||||
t.delta[embeddedName].forEach((original) => {
|
||||
const update = updates.get(original._id);
|
||||
if (update) {
|
||||
foundry.utils.mergeObject(original, update);
|
||||
@@ -213,7 +211,7 @@ export class MigrationL5r5e {
|
||||
delete update[embeddedName];
|
||||
});
|
||||
|
||||
foundry.utils.mergeObject(t.actorData, update);
|
||||
foundry.utils.mergeObject(t.delta, update);
|
||||
}
|
||||
return t;
|
||||
});
|
||||
@@ -223,7 +221,7 @@ export class MigrationL5r5e {
|
||||
/**
|
||||
* Migrate a single Actor document to incorporate latest data model changes
|
||||
* Return an Object of updateData to be applied
|
||||
* @param {ActorL5r5e|Object} actor The actor, or the TokenDocument.actorData to Update
|
||||
* @param {ActorL5r5e|Object} actor The actor, or the TokenDocument.delta to Update
|
||||
* @param options
|
||||
* @return {Object} The updateData to apply
|
||||
*/
|
||||
|
||||
@@ -13,6 +13,7 @@ export const PreloadTemplates = async function () {
|
||||
`${tpl}actors/character/inventory.html`,
|
||||
`${tpl}actors/character/narrative.html`,
|
||||
`${tpl}actors/character/rings.html`,
|
||||
`${tpl}actors/character/effects.html`,
|
||||
`${tpl}actors/character/skill.html`,
|
||||
`${tpl}actors/character/social.html`,
|
||||
`${tpl}actors/character/stance.html`,
|
||||
@@ -25,6 +26,7 @@ export const PreloadTemplates = async function () {
|
||||
`${tpl}actors/npc/inventory.html`,
|
||||
`${tpl}actors/npc/narrative.html`,
|
||||
`${tpl}actors/npc/rings.html`,
|
||||
`${tpl}actors/npc/effects.html`,
|
||||
`${tpl}actors/npc/social.html`,
|
||||
`${tpl}actors/npc/skill.html`,
|
||||
`${tpl}actors/npc/techniques.html`,
|
||||
|
||||
@@ -5,7 +5,7 @@ export const RegisterSettings = function () {
|
||||
/* ------------------------------------ */
|
||||
/* User settings */
|
||||
/* ------------------------------------ */
|
||||
game.settings.register("l5r5e", "rnk-deleteOldMessage", {
|
||||
game.settings.register(CONFIG.l5r5e.namespace, "rnk-deleteOldMessage", {
|
||||
name: "SETTINGS.RollNKeep.DeleteOldMessage",
|
||||
hint: "SETTINGS.RollNKeep.DeleteOldMessageHint",
|
||||
scope: "world",
|
||||
@@ -13,7 +13,7 @@ export const RegisterSettings = function () {
|
||||
default: true,
|
||||
type: Boolean,
|
||||
});
|
||||
game.settings.register("l5r5e", "initiative-setTn1OnTypeChange", {
|
||||
game.settings.register(CONFIG.l5r5e.namespace, "initiative-setTn1OnTypeChange", {
|
||||
name: "SETTINGS.Initiative.SetTn1OnTypeChange",
|
||||
hint: "SETTINGS.Initiative.SetTn1OnTypeChangeHint",
|
||||
scope: "world",
|
||||
@@ -21,14 +21,14 @@ export const RegisterSettings = function () {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
});
|
||||
game.settings.register("l5r5e", "token-reverseFatigueBar", {
|
||||
game.settings.register(CONFIG.l5r5e.namespace, "token-reverseFatigueBar", {
|
||||
name: "SETTINGS.ReverseFatigueBar",
|
||||
scope: "world",
|
||||
config: true,
|
||||
type: Boolean,
|
||||
default: false,
|
||||
});
|
||||
game.settings.register("l5r5e", "techniques-customs", {
|
||||
game.settings.register(CONFIG.l5r5e.namespace, "techniques-customs", {
|
||||
name: "SETTINGS.CustomTechniques.Title",
|
||||
hint: "SETTINGS.CustomTechniques.Hint",
|
||||
scope: "world",
|
||||
@@ -40,7 +40,7 @@ export const RegisterSettings = function () {
|
||||
/* ------------------------------------ */
|
||||
/* Update */
|
||||
/* ------------------------------------ */
|
||||
game.settings.register("l5r5e", "systemMigrationVersion", {
|
||||
game.settings.register(CONFIG.l5r5e.namespace, "systemMigrationVersion", {
|
||||
name: "System Migration Version",
|
||||
scope: "world",
|
||||
config: false,
|
||||
@@ -51,7 +51,7 @@ export const RegisterSettings = function () {
|
||||
/* ------------------------------------ */
|
||||
/* Initiative Roll Dialog (GM only) */
|
||||
/* ------------------------------------ */
|
||||
game.settings.register("l5r5e", "initiative-difficulty-hidden", {
|
||||
game.settings.register(CONFIG.l5r5e.namespace, "initiative-difficulty-hidden", {
|
||||
name: "Initiative difficulty is hidden",
|
||||
scope: "world",
|
||||
config: false,
|
||||
@@ -59,7 +59,7 @@ export const RegisterSettings = function () {
|
||||
default: false,
|
||||
onChange: () => game.l5r5e.HelpersL5r5e.notifyDifficultyChange(),
|
||||
});
|
||||
game.settings.register("l5r5e", "initiative-difficulty-value", {
|
||||
game.settings.register(CONFIG.l5r5e.namespace, "initiative-difficulty-value", {
|
||||
name: "Initiative difficulty value",
|
||||
scope: "world",
|
||||
config: false,
|
||||
@@ -67,47 +67,47 @@ export const RegisterSettings = function () {
|
||||
default: 2,
|
||||
onChange: () => game.l5r5e.HelpersL5r5e.notifyDifficultyChange(),
|
||||
});
|
||||
game.settings.register("l5r5e", "initiative-encounter", {
|
||||
game.settings.register(CONFIG.l5r5e.namespace, "initiative-encounter", {
|
||||
name: "Initiative encounter type",
|
||||
scope: "world",
|
||||
config: false,
|
||||
type: String,
|
||||
default: "skirmish",
|
||||
onChange: () => {
|
||||
if (game.settings.get("l5r5e", "initiative-setTn1OnTypeChange")) {
|
||||
game.settings.set("l5r5e", "initiative-difficulty-value", 1);
|
||||
if (game.settings.get(CONFIG.l5r5e.namespace, "initiative-setTn1OnTypeChange")) {
|
||||
game.settings.set(CONFIG.l5r5e.namespace, "initiative-difficulty-value", 1);
|
||||
}
|
||||
ui.combat.render(true);
|
||||
},
|
||||
});
|
||||
game.settings.register("l5r5e", "initiative-prepared-character", {
|
||||
game.settings.register(CONFIG.l5r5e.namespace, "initiative-prepared-character", {
|
||||
name: "Initiative PC prepared or not",
|
||||
scope: "world",
|
||||
config: false,
|
||||
type: String,
|
||||
default: "null",
|
||||
default: "actor",
|
||||
onChange: () => {
|
||||
game.l5r5e.HelpersL5r5e.refreshLocalAndSocket("l5r5e-gm-monitor");
|
||||
ui.combat.render(true);
|
||||
},
|
||||
});
|
||||
game.settings.register("l5r5e", "initiative-prepared-adversary", {
|
||||
game.settings.register(CONFIG.l5r5e.namespace, "initiative-prepared-adversary", {
|
||||
name: "Initiative NPC adversary are prepared or not",
|
||||
scope: "world",
|
||||
config: false,
|
||||
type: String,
|
||||
default: "null",
|
||||
default: "actor",
|
||||
onChange: () => {
|
||||
game.l5r5e.HelpersL5r5e.refreshLocalAndSocket("l5r5e-gm-monitor");
|
||||
ui.combat.render(true);
|
||||
},
|
||||
});
|
||||
game.settings.register("l5r5e", "initiative-prepared-minion", {
|
||||
game.settings.register(CONFIG.l5r5e.namespace, "initiative-prepared-minion", {
|
||||
name: "Initiative NPC minion are prepared or not",
|
||||
scope: "world",
|
||||
config: false,
|
||||
type: String,
|
||||
default: "null",
|
||||
default: "actor",
|
||||
onChange: () => {
|
||||
game.l5r5e.HelpersL5r5e.refreshLocalAndSocket("l5r5e-gm-monitor");
|
||||
ui.combat.render(true);
|
||||
@@ -117,7 +117,7 @@ export const RegisterSettings = function () {
|
||||
/* ------------------------------------ */
|
||||
/* GM Monitor windows (GM only) */
|
||||
/* ------------------------------------ */
|
||||
game.settings.register("l5r5e", "gm-monitor-actors", {
|
||||
game.settings.register(CONFIG.l5r5e.namespace, "gm-monitor-actors", {
|
||||
name: "Gm Monitor",
|
||||
scope: "world",
|
||||
config: false,
|
||||
|
||||
@@ -34,7 +34,7 @@ export class SocketHandlerL5r5e {
|
||||
break;
|
||||
|
||||
default:
|
||||
console.warn(new Error("L5R5E | This socket event is not supported"), payload);
|
||||
console.warn(new Error("L5R5E | SH | This socket event is not supported"), payload);
|
||||
break;
|
||||
}
|
||||
});
|
||||
@@ -54,7 +54,7 @@ export class SocketHandlerL5r5e {
|
||||
_onDeleteChatMessage(payload) {
|
||||
// Only delete the message if the user is a GM (otherwise it has no real effect)
|
||||
// Currently only used in RnK
|
||||
if (!game.user.isFirstGM || !game.settings.get("l5r5e", "rnk-deleteOldMessage")) {
|
||||
if (!game.user.isFirstGM || !game.settings.get(CONFIG.l5r5e.namespace, "rnk-deleteOldMessage")) {
|
||||
return;
|
||||
}
|
||||
game.messages.get(payload.messageId)?.delete();
|
||||
@@ -118,27 +118,27 @@ export class SocketHandlerL5r5e {
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* @param {User[]} users Users list to trigger the DP (will be reduce to id for network perf.)
|
||||
* @param {Actor[]} actors Actors list to trigger the DP (will be reduce to uuid for network perf.)
|
||||
* @param {User[]} users Users list to trigger the DP (will be reduced to id for network perf.)
|
||||
* @param {Actor[]} actors Actors list to trigger the DP (will be reduced to uuid for network perf.)
|
||||
* @param {Object} dpOptions Any DicePickerDialog.options
|
||||
*/
|
||||
openDicePicker({ users = [], actors = [], dpOptions = {} }) {
|
||||
// At least one user or one actor
|
||||
if (foundry.utils.isEmpty(users) && foundry.utils.isEmpty(actors)) {
|
||||
console.error("L5R5E | openDicePicker - 'users' and 'actors' are both empty, use at least one.");
|
||||
console.error("L5R5E | SH | openDicePicker - 'users' and 'actors' are both empty, use at least one.");
|
||||
return;
|
||||
}
|
||||
// Fail if dpOptions.actor* provided
|
||||
if (!foundry.utils.isEmpty(dpOptions?.actorName)) {
|
||||
console.error("L5R5E | openDicePicker - Do not use 'dpOptions.actorName', use 'actors' list instead.");
|
||||
console.error("L5R5E | SH | openDicePicker - Do not use 'dpOptions.actorName', use 'actors' list instead.");
|
||||
return;
|
||||
}
|
||||
if (!foundry.utils.isEmpty(dpOptions?.actorId)) {
|
||||
console.error("L5R5E | openDicePicker - Do not use 'dpOptions.actorId', use 'actors' list instead.");
|
||||
console.error("L5R5E | SH | openDicePicker - Do not use 'dpOptions.actorId', use 'actors' list instead.");
|
||||
return;
|
||||
}
|
||||
if (!foundry.utils.isEmpty(dpOptions?.actor)) {
|
||||
console.error("L5R5E | openDicePicker - Do not use 'dpOptions.actor', use 'actors' list instead.");
|
||||
console.error("L5R5E | SH | openDicePicker - Do not use 'dpOptions.actor', use 'actors' list instead.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -323,7 +323,7 @@ sup {
|
||||
&-false:before {
|
||||
content: "\f070";
|
||||
}
|
||||
&-null:before {
|
||||
&-actor:before {
|
||||
content: "\f2a8";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
width: 100%;
|
||||
line-height: 2rem;
|
||||
font-size: 0.75rem;
|
||||
margin: 0 0 0.5rem;
|
||||
margin: 0.5rem 0;
|
||||
text-align: center;
|
||||
li {
|
||||
flex: 1;
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
line-height: 0;
|
||||
float: right;
|
||||
}
|
||||
|
||||
label.stance-active strong {
|
||||
text-decoration: underline 2px;
|
||||
}
|
||||
input {
|
||||
position: absolute;
|
||||
height: 2rem;
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
}
|
||||
&.actor {
|
||||
.sheet-header {
|
||||
height: 26rem;
|
||||
h1 {
|
||||
flex: auto;
|
||||
margin: 0 0 0.25rem 0.5rem;
|
||||
@@ -53,6 +52,37 @@
|
||||
.sheet-body {
|
||||
flex: 0 0 100%;
|
||||
align-items: flex-start;
|
||||
.effects {
|
||||
clear: both;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 2px 4px;
|
||||
.effect-container {
|
||||
border: 1px solid #5a6e5a;
|
||||
border-radius: 4px;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
padding: 3px;
|
||||
}
|
||||
.effect-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
float: left;
|
||||
}
|
||||
.effect-name {
|
||||
vertical-align: top;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: $white;
|
||||
float: right;
|
||||
margin-left: 4px;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
max-width: 140px;
|
||||
}
|
||||
}
|
||||
}
|
||||
section,
|
||||
article {
|
||||
@@ -127,13 +157,9 @@
|
||||
}
|
||||
}
|
||||
.header-fields {
|
||||
position: relative;
|
||||
flex: 0 0 100%;
|
||||
h2 {
|
||||
font-family: $font-secondary;
|
||||
font-size: 1rem;
|
||||
float: left;
|
||||
width: 30%;
|
||||
padding: 0.25rem 0.25rem 0;
|
||||
margin: 1rem 20% 0 0;
|
||||
text-align: center;
|
||||
@@ -234,18 +260,22 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.rings {
|
||||
float: left;
|
||||
.mid-wrapper {
|
||||
display: flex;
|
||||
}
|
||||
.side-col {
|
||||
width: 30%;
|
||||
}
|
||||
.central-col {
|
||||
width: 40%;
|
||||
}
|
||||
.rings {
|
||||
padding: 0;
|
||||
position: relative;
|
||||
top: -1.5rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
.social-content,
|
||||
.attributes-wrapper {
|
||||
flex: none;
|
||||
float: left;
|
||||
width: 30%;
|
||||
flex-wrap: wrap;
|
||||
display: flex;
|
||||
padding: 0.5rem 0 0 0.25rem;
|
||||
@@ -546,7 +576,7 @@
|
||||
}
|
||||
}
|
||||
article {
|
||||
background: $l5r5e-white;
|
||||
background: $l5r5e-white-light;
|
||||
padding: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
min-height: calc(100% - 3.25rem);
|
||||
@@ -893,6 +923,18 @@
|
||||
flex: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
// Restore list style
|
||||
&.journal .journal-page-content {
|
||||
ul {
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
li {
|
||||
list-style-type: initial;
|
||||
margin: 0.5rem 0 0.5rem 1.5rem;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Lang Adjust.
|
||||
&.sheet {
|
||||
|
||||
@@ -14,6 +14,10 @@ button {
|
||||
.system {
|
||||
overflow: auto;
|
||||
border-bottom: 1px solid var(--color-border-light-highlight);
|
||||
|
||||
.system-title {
|
||||
white-space: break-spaces;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -602,8 +606,9 @@ button {
|
||||
}
|
||||
|
||||
// Combat
|
||||
#combat {
|
||||
#combat-round {
|
||||
#combat,
|
||||
#combat-popout {
|
||||
.combat-tracker-header {
|
||||
.encounters {
|
||||
h3 {
|
||||
font-size: 0.85rem;
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
"changelog": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md",
|
||||
"license": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/LICENSE.md",
|
||||
"manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json",
|
||||
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.9.2/raw/l5r5e.zip?job=build",
|
||||
"version": "1.9.2",
|
||||
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.10.0/raw/l5r5e.zip?job=build",
|
||||
"version": "1.10.0",
|
||||
"compatibility": {
|
||||
"minimum": 10,
|
||||
"verified": "10.284"
|
||||
"minimum": 11,
|
||||
"verified": "11.301"
|
||||
},
|
||||
"manifestPlusVersion": "1.2.0",
|
||||
"socket": true,
|
||||
@@ -33,8 +33,87 @@
|
||||
],
|
||||
"background": "systems/l5r5e/assets/l5r-header.webp",
|
||||
"scripts": [],
|
||||
"esmodules": ["./scripts/main-l5r5e.js"],
|
||||
"styles": ["./styles/l5r5e.css"],
|
||||
"esmodules": [
|
||||
"./scripts/main-l5r5e.js"
|
||||
],
|
||||
"styles": [
|
||||
"./styles/l5r5e.css"
|
||||
],
|
||||
"packFolders": [
|
||||
{
|
||||
"name": "L5R5e System",
|
||||
"color": "#9a0909",
|
||||
"sorting": "m",
|
||||
"folders": [
|
||||
{
|
||||
"name": "Character related",
|
||||
"color": "#019806",
|
||||
"sorting": "m",
|
||||
"packs": [
|
||||
"core-peculiarities-distinctions",
|
||||
"core-peculiarities-passions",
|
||||
"core-peculiarities-adversities",
|
||||
"core-peculiarities-anxieties",
|
||||
"core-bonds",
|
||||
"core-titles",
|
||||
"core-journal-school-curriculum",
|
||||
"core-journal-great-clans-presentation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Techniques",
|
||||
"color": "#4b1eb3",
|
||||
"sorting": "m",
|
||||
"packs": [
|
||||
"core-techniques-kata",
|
||||
"core-techniques-kiho",
|
||||
"core-techniques-inversions",
|
||||
"core-techniques-invocations",
|
||||
"core-techniques-rituals",
|
||||
"core-techniques-shuji",
|
||||
"core-techniques-maho",
|
||||
"core-techniques-ninjutsu",
|
||||
"core-techniques-mantra",
|
||||
"core-techniques-school",
|
||||
"core-techniques-mastery"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Objects related",
|
||||
"color": "#0985ae",
|
||||
"sorting": "m",
|
||||
"packs": [
|
||||
"core-properties",
|
||||
"core-item-patterns",
|
||||
"core-items",
|
||||
"core-armors",
|
||||
"core-weapons",
|
||||
"core-signature-scrolls",
|
||||
"core-celestial-implement-boons"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Helpers",
|
||||
"color": "#6b3d1f",
|
||||
"sorting": "m",
|
||||
"packs": [
|
||||
"core-journal-conditions",
|
||||
"core-journal-terrain-qualities",
|
||||
"core-journal-opportunities"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Tools",
|
||||
"color": "#834949",
|
||||
"sorting": "m",
|
||||
"packs": [
|
||||
"core-name-tables",
|
||||
"core-macros"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"packs": [
|
||||
{
|
||||
"name": "core-properties",
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<section class="sheet-body">
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="army">{{localize 'ACTOR.TypeArmy'}}</a>
|
||||
<a class="item" data-tab="army">{{localize 'TYPES.Actor.army'}}</a>
|
||||
<a class="item" data-tab="cohort">{{localize 'l5r5e.army.cohort.tab'}}</a>
|
||||
<a class="item" data-tab="fortification">{{localize 'l5r5e.army.fortification.tab'}}</a>
|
||||
<a class="item" data-tab="others">{{localize 'l5r5e.sheets.notes'}}</a>
|
||||
|
||||
@@ -7,21 +7,33 @@
|
||||
</div>
|
||||
{{!-- Sheet Header --}}
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img dragndrop-actor-uuid pointer" src="{{data.img}}" {{#if data.editable_not_soft_locked}}data-edit="img"{{/if}} data-actor-uuid="{{actor.uuid}}" draggable="true" title="{{data.name}}"/>
|
||||
<img class="profile-img dragndrop-actor-uuid pointer" src="{{data.img}}" {{#if
|
||||
data.editable_not_soft_locked}}data-edit="img" {{/if}} data-actor-uuid="{{actor.uuid}}" draggable="true"
|
||||
title="{{data.name}}" />
|
||||
<div class="header-fields identity-wrapper">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name" {{^if data.editable_not_soft_locked}}disabled{{/if}}/></h1>
|
||||
<h1 class="charname">
|
||||
<input name="name" type="text" value="{{data.name}}" placeholder="Name" {{^if
|
||||
data.editable_not_soft_locked}}disabled{{/if}} />
|
||||
</h1>
|
||||
{{> 'systems/l5r5e/templates/actors/character/identity.html'}}
|
||||
</div>
|
||||
<div class="header-fields">
|
||||
<div class="header-fields mid-wrapper">
|
||||
<div class="side-col">
|
||||
<h2>{{localize 'l5r5e.social.title'}}</h2>
|
||||
<h2 class="right">{{localize 'l5r5e.attributes.title'}}</h2>
|
||||
{{> 'systems/l5r5e/templates/actors/character/social.html'}}
|
||||
{{> 'systems/l5r5e/templates/actors/character/rings.html'}}
|
||||
</div>
|
||||
<div class="central-col">{{> 'systems/l5r5e/templates/actors/character/rings.html'}}</div>
|
||||
<div class="side-col">
|
||||
<h2 class="right">{{localize 'l5r5e.attributes.title'}}</h2>
|
||||
{{> 'systems/l5r5e/templates/actors/character/attributes.html'}}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{!-- Active effects --}}
|
||||
{{> 'systems/l5r5e/templates/actors/character/effects.html'}}
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="skills">{{localize 'l5r5e.skills.title'}}</a>
|
||||
@@ -34,8 +46,8 @@
|
||||
{{!-- Skills Tab --}}
|
||||
<article class="tab skills" data-group="primary" data-tab="skills">
|
||||
<ul class="skills-wrapper">
|
||||
{{#each data.system.skills as |category id|}}
|
||||
{{> 'systems/l5r5e/templates/actors/character/category.html' category=category categoryId=id data=../data}}
|
||||
{{#each data.system.skills as |category id|}} {{>
|
||||
'systems/l5r5e/templates/actors/character/category.html' category=category categoryId=id data=../data}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{> 'systems/l5r5e/templates/actors/character/techniques.html'}}
|
||||
|
||||
8
system/templates/actors/character/effects.html
Normal file
8
system/templates/actors/character/effects.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<ul class="effects">
|
||||
{{#each actor.effects as |effect|}}
|
||||
<li class="effect-container" title="{{name}}">
|
||||
<div class="effect-icon" style="background-image: url({{effect.icon}})"></div>
|
||||
<div class="effect-name"><label>{{name}}</label></div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
@@ -1,34 +1,34 @@
|
||||
<ul class="rings">
|
||||
<li id="earth">
|
||||
<label class="earth">
|
||||
<label class="earth {{#ifCond 'earth' '==' data.system.stance}}stance-active{{/ifCond}}">
|
||||
<i class="i_earth dice-picker rollable" data-ring="earth"></i>
|
||||
<strong>{{localizeRing 'earth'}}</strong>
|
||||
<input class="centered-input select-on-focus" type="number" name="system.rings.earth" value="{{data.system.rings.earth}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||
</label>
|
||||
</li>
|
||||
<li id="air">
|
||||
<label class="air">
|
||||
<label class="air {{#ifCond 'air' '==' data.system.stance}}stance-active{{/ifCond}}">
|
||||
<i class="i_air dice-picker rollable" data-ring="air"></i>
|
||||
<strong>{{localizeRing 'air'}}</strong>
|
||||
<input class="centered-input select-on-focus" type="number" name="system.rings.air" value="{{data.system.rings.air}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||
</label>
|
||||
</li>
|
||||
<li id="water">
|
||||
<label class="water">
|
||||
<label class="water {{#ifCond 'water' '==' data.system.stance}}stance-active{{/ifCond}}">
|
||||
<i class="i_water dice-picker rollable" data-ring="water"></i>
|
||||
<strong>{{localizeRing 'water'}}</strong>
|
||||
<input class="centered-input select-on-focus" type="number" name="system.rings.water" value="{{data.system.rings.water}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||
</label>
|
||||
</li>
|
||||
<li id="fire">
|
||||
<label class="fire">
|
||||
<label class="fire {{#ifCond 'fire' '==' data.system.stance}}stance-active{{/ifCond}}">
|
||||
<i class="i_fire dice-picker rollable" data-ring="fire"></i>
|
||||
<strong>{{localizeRing 'fire'}}</strong>
|
||||
<input class="centered-input select-on-focus" type="number" name="system.rings.fire" value="{{data.system.rings.fire}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||
</label>
|
||||
</li>
|
||||
<li id="void">
|
||||
<label class="void">
|
||||
<label class="void {{#ifCond 'void' '==' data.system.stance}}stance-active{{/ifCond}}">
|
||||
<i class="i_void dice-picker rollable" data-ring="void"></i>
|
||||
<strong>{{localizeRing 'void'}}</strong>
|
||||
<input class="centered-input select-on-focus" type="number" name="system.rings.void" value="{{data.system.rings.void}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||
|
||||
@@ -8,20 +8,32 @@
|
||||
{{!-- Sheet Header --}}
|
||||
<header class="sheet-header">
|
||||
<div class="header-fields identity-wrapper">
|
||||
<img class="profile-img dragndrop-actor-uuid pointer" src="{{data.img}}" {{#if data.editable_not_soft_locked}}data-edit="img"{{/if}} data-actor-uuid="{{actor.uuid}}" draggable="true" title="{{data.name}}"/>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name" {{^if data.editable_not_soft_locked}}disabled{{/if}}/></h1>
|
||||
<img class="profile-img dragndrop-actor-uuid pointer" src="{{data.img}}" {{#if
|
||||
data.editable_not_soft_locked}}data-edit="img" {{/if}} data-actor-uuid="{{actor.uuid}}" draggable="true"
|
||||
title="{{data.name}}" />
|
||||
<h1 class="charname">
|
||||
<input name="name" type="text" value="{{data.name}}" placeholder="Name" {{^if
|
||||
data.editable_not_soft_locked}}disabled{{/if}} />
|
||||
</h1>
|
||||
{{> 'systems/l5r5e/templates/actors/npc/identity.html'}}
|
||||
</div>
|
||||
<div class="header-fields">
|
||||
<div class="header-fields mid-wrapper">
|
||||
<div class="side-col">
|
||||
<h2>{{localize 'l5r5e.social.title'}}</h2>
|
||||
<h2 class="right">{{localize 'l5r5e.attributes.title'}}</h2>
|
||||
{{> 'systems/l5r5e/templates/actors/npc/social.html'}}
|
||||
{{> 'systems/l5r5e/templates/actors/npc/rings.html'}}
|
||||
</div>
|
||||
<div class="central-col">{{> 'systems/l5r5e/templates/actors/npc/rings.html'}}</div>
|
||||
<div class="side-col">
|
||||
<h2 class="right">{{localize 'l5r5e.attributes.title'}}</h2>
|
||||
{{> 'systems/l5r5e/templates/actors/npc/attributes.html'}}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{!-- Active effects --}}
|
||||
{{> 'systems/l5r5e/templates/actors/npc/effects.html'}}
|
||||
|
||||
{{!-- Skills No Tab --}}
|
||||
{{> 'systems/l5r5e/templates/actors/npc/skill.html'}}
|
||||
|
||||
@@ -45,9 +57,9 @@
|
||||
|
||||
{{!-- Conflict Tab --}}
|
||||
<article class="tab conflict" data-group="primary" data-tab="conflict">
|
||||
{{> 'systems/l5r5e/templates/actors/npc/conflict.html'}}
|
||||
{{> 'systems/l5r5e/templates/items/weapon/weapons.html'}}
|
||||
{{> 'systems/l5r5e/templates/items/armor/armors.html'}}
|
||||
{{> 'systems/l5r5e/templates/actors/npc/conflict.html'}} {{>
|
||||
'systems/l5r5e/templates/items/weapon/weapons.html'}} {{>
|
||||
'systems/l5r5e/templates/items/armor/armors.html'}}
|
||||
</article>
|
||||
|
||||
{{!-- Inventory Tab --}}
|
||||
|
||||
8
system/templates/actors/npc/effects.html
Normal file
8
system/templates/actors/npc/effects.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<ul class="effects">
|
||||
{{#each actor.effects as |effect|}}
|
||||
<li class="effect-container" title="{{name}}">
|
||||
<div class="effect-icon" style="background-image: url({{effect.icon}})"></div>
|
||||
<div class="effect-name"><label>{{name}}</label></div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
@@ -1,34 +1,34 @@
|
||||
<ul class="rings">
|
||||
<li id="earth">
|
||||
<label class="earth">
|
||||
<label class="earth {{#ifCond 'earth' '==' data.system.stance}}stance-active{{/ifCond}}">
|
||||
<i class="i_earth dice-picker rollable" data-ring="earth"></i>
|
||||
<strong>{{localizeRing 'earth'}}</strong>
|
||||
<input class="centered-input select-on-focus" type="number" name="system.rings.earth" value="{{data.system.rings.earth}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||
</label>
|
||||
</li>
|
||||
<li id="air">
|
||||
<label class="air">
|
||||
<label class="air {{#ifCond 'air' '==' data.system.stance}}stance-active{{/ifCond}}">
|
||||
<i class="i_air dice-picker rollable" data-ring="air"></i>
|
||||
<strong>{{localizeRing 'air'}}</strong>
|
||||
<input class="centered-input select-on-focus" type="number" name="system.rings.air" value="{{data.system.rings.air}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||
</label>
|
||||
</li>
|
||||
<li id="water">
|
||||
<label class="water">
|
||||
<label class="water {{#ifCond 'water' '==' data.system.stance}}stance-active{{/ifCond}}">
|
||||
<i class="i_water dice-picker rollable" data-ring="water"></i>
|
||||
<strong>{{localizeRing 'water'}}</strong>
|
||||
<input class="centered-input select-on-focus" type="number" name="system.rings.water" value="{{data.system.rings.water}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||
</label>
|
||||
</li>
|
||||
<li id="fire">
|
||||
<label class="fire">
|
||||
<label class="fire {{#ifCond 'fire' '==' data.system.stance}}stance-active{{/ifCond}}">
|
||||
<i class="i_fire dice-picker rollable" data-ring="fire"></i>
|
||||
<strong>{{localizeRing 'fire'}}</strong>
|
||||
<input class="centered-input select-on-focus" type="number" name="system.rings.fire" value="{{data.system.rings.fire}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||
</label>
|
||||
</li>
|
||||
<li id="void">
|
||||
<label class="void">
|
||||
<label class="void {{#ifCond 'void' '==' data.system.stance}}stance-active{{/ifCond}}">
|
||||
<i class="i_void dice-picker rollable" data-ring="void"></i>
|
||||
<strong>{{localizeRing 'void'}}</strong>
|
||||
<input class="centered-input select-on-focus" type="number" name="system.rings.void" value="{{data.system.rings.void}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||
|
||||
@@ -26,17 +26,17 @@
|
||||
{{#if actor.system.attitude}}<p>({{actor.system.attitude}})</p>{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
<a data-actor-id="{{actor.id}}" data-type="stance" class="actor-modify-control">
|
||||
<a data-actor-uuid="{{actor.uuid}}" data-type="stance" class="actor-modify-control">
|
||||
<i data-type="text" data-text="<h2>{{localize 'l5r5e.conflict.stance'}} ({{localizeRing actor.system.stance}} - {{lookup actor.system.rings actor.system.stance}})</h2>{{localizeStanceTip actor.system.stance}}" class="i_{{actor.system.stance}} actor-infos-control"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a data-actor-id="{{actor.id}}" data-type="prepared" class="actor-modify-control">
|
||||
<a data-actor-uuid="{{actor.uuid}}" data-type="prepared" class="actor-modify-control">
|
||||
<i data-type="text" data-text="<h2>{{localize 'l5r5e.conflict.initiative.title'}} : {{localize (localize 'l5r5e.conflict.initiative.prepared_{value}' value=actor.isPrepared)}}</h2>" class="fa fas prepared-icon-{{actor.isPrepared}} {{#ifCond actor.isPrepared '==' 'false'}}badvalue{{/ifCond}} actor-infos-control"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{#if actor.haveWeaponEquipped}}<i data-type="weapons" data-actor-id="{{actor.id}}" class="fas fa-fan actor-infos-control {{#if actor.haveWeaponReadied}}badvalue{{/if}}"></i>{{/if}}</td>
|
||||
<td>{{#if actor.haveArmorEquipped}}<i data-type="armors" data-actor-id="{{actor.id}}" class="fas fa-user-shield actor-infos-control"></i>{{/if}}</td>
|
||||
<td>{{#if actor.haveWeaponEquipped}}<i data-type="weapons" data-actor-uuid="{{actor.uuid}}" class="fas fa-fan actor-infos-control {{#if actor.haveWeaponReadied}}badvalue{{/if}}"></i>{{/if}}</td>
|
||||
<td>{{#if actor.haveArmorEquipped}}<i data-type="armors" data-actor-uuid="{{actor.uuid}}" class="fas fa-user-shield actor-infos-control"></i>{{/if}}</td>
|
||||
<td>
|
||||
<p>
|
||||
{{#if actor.system.identity.school_rank}}
|
||||
@@ -56,13 +56,13 @@
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="fatigue" class="actor-modify-control">
|
||||
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-uuid="{{actor.uuid}}" data-type="fatigue" class="actor-modify-control">
|
||||
<span class="{{#ifCond actor.system.fatigue.value '>' actor.system.fatigue.max}}badvalue{{/ifCond}}">{{actor.system.fatigue.value}}</span>
|
||||
/ {{actor.system.fatigue.max}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="strife" class="actor-modify-control">
|
||||
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-uuid="{{actor.uuid}}" data-type="strife" class="actor-modify-control">
|
||||
<span class="{{#ifCond actor.system.strife.value '>' actor.system.strife.max}}badvalue{{/ifCond}}">{{actor.system.strife.value}}</span>
|
||||
/ {{actor.system.strife.max}}
|
||||
</a>
|
||||
@@ -72,13 +72,13 @@
|
||||
/ {{#if actor.system.is_compromised}}<span class="badvalue">1</span>{{else}}{{actor.system.vigilance}}{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="void_points" class="actor-modify-control">
|
||||
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-uuid="{{actor.uuid}}" data-type="void_points" class="actor-modify-control">
|
||||
{{actor.system.void_points.value}}
|
||||
/ {{actor.system.void_points.max}}
|
||||
</a>
|
||||
</td>
|
||||
<td><i data-actor-id="{{actor.id}}" data-type="global" class="fas fa-question-circle actor-infos-control"></i></td>
|
||||
<td><span data-actor-id="{{actor.id}}" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span></td>
|
||||
<td><i data-actor-uuid="{{actor.uuid}}" data-type="global" class="fas fa-question-circle actor-infos-control"></i></td>
|
||||
<td><span data-actor-uuid="{{actor.uuid}}" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span></td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
@@ -109,13 +109,13 @@
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="casualties" class="actor-modify-control">
|
||||
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-uuid="{{actor.uuid}}" data-type="casualties" class="actor-modify-control">
|
||||
<span class="{{#ifCond actor.system.battle_readiness.casualties_strength.value '>' actor.system.battle_readiness.casualties_strength.max}}badvalue{{/ifCond}}">{{actor.system.battle_readiness.casualties_strength.value}}</span>
|
||||
/ {{actor.system.battle_readiness.casualties_strength.max}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="panic" class="actor-modify-control">
|
||||
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-uuid="{{actor.uuid}}" data-type="panic" class="actor-modify-control">
|
||||
<span class="{{#ifCond actor.system.battle_readiness.panic_discipline.value '>' actor.system.battle_readiness.panic_discipline.max}}badvalue{{/ifCond}}">{{actor.system.battle_readiness.panic_discipline.value}}</span>
|
||||
/ {{actor.system.battle_readiness.panic_discipline.max}}
|
||||
</a>
|
||||
@@ -131,8 +131,8 @@
|
||||
/ <span class="{{#ifCond actor.system.commander_standing.glory '>' 64}}goodvalue{{/ifCond}}{{#ifCond actor.system.commander_standing.glory '<' 20}}badvalue{{/ifCond}}">{{actor.system.commander_standing.glory}}</span>
|
||||
/ {{actor.system.commander_standing.status}}
|
||||
</td>
|
||||
<td><i data-actor-id="{{actor.id}}" data-type="global" class="fas fa-question-circle actor-infos-control"></i></td>
|
||||
<td><span data-actor-id="{{actor.id}}" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span></td>
|
||||
<td><i data-actor-uuid="{{actor.uuid}}" data-type="global" class="fas fa-question-circle actor-infos-control"></i></td>
|
||||
<td><span data-actor-uuid="{{actor.uuid}}" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span></td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<section>
|
||||
<h2>{{localize 'ACTOR.TypeArmy'}}</h2>
|
||||
<h2>{{localize 'TYPES.Actor.army'}}</h2>
|
||||
<ul>
|
||||
{{!-- warlord --}}
|
||||
<li><b>{{localize 'l5r5e.army.allies_backers'}}</b> : {{actorData.system.allies_backers}}</li>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
- [Symbols replacement list](users/symbols.md)
|
||||
- [Advanced : Techniques skill and difficulty syntaxe](users/techniques-syntaxe.md)
|
||||
- [Advanced : Custom Compendiums](users/custom-compendiums.md)
|
||||
- [Advanced : Using CUB for modifiers](users/cub-modifiers.md)
|
||||
|
||||
## For developers
|
||||
- [System helping (Contribute)](dev/system-helping.md)
|
||||
|
||||
49
wiki/users/cub-modifiers.md
Normal file
49
wiki/users/cub-modifiers.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Using CUB for Modifiers
|
||||
|
||||
> ⚠ The module [Combat Utility Belt](https://foundryvtt.com/packages/combat-utility-belt) is required.
|
||||
|
||||
|
||||
## Attributes modifiers
|
||||
Replace `<attribute>` with actual attribute (i.e. `endurance`, `vigilance`, `focus`, `composure`) and `<number>` with actual number to be added.
|
||||
|
||||
When setup in CUB this would modify PC derived attributes to increase or reduce them by the number given.
|
||||
|
||||
Allows automating certain invocations and item effects (such as the cursed Kama from Sins of Regret supplement).
|
||||
|
||||
|
||||
### For `character` type
|
||||
Syntaxe:
|
||||
> system.modifiers.character.`<attribute>` += `<number>`
|
||||
|
||||
Examples:
|
||||
> system.modifiers.character.endurance += 1 // add 1
|
||||
> <br>system.modifiers.character.focus += -2 // remove 2
|
||||
|
||||
|
||||
### For `adversary` or `minion` types
|
||||
Syntaxe:
|
||||
> system.`<attribute>` += `<number>`
|
||||
|
||||
Exemples:
|
||||
> system.vigilance += 1 // add 1
|
||||
> <br>system.composure += -2 // remove 2
|
||||
|
||||
|
||||
|
||||
## Rings/Skills modifiers
|
||||
Both PCs and NPCs can have their skills and rings increased as well by conditions (should you wish to ignore some of the RAW).
|
||||
|
||||
Syntaxe:
|
||||
> system.rings.`<ring>` += `<number>`
|
||||
> <br>system.skills.`<skillGroup>`.`<skill>` += `<number>` // for PCs
|
||||
> <br>system.skills.`<skillGroup>` += `<number>` // for NPCs
|
||||
|
||||
Exemples:
|
||||
> system.rings.earth += 1
|
||||
> <br>system.skills.artisan.aesthetics += 1 // for PCs
|
||||
> <br>system.skills.martial += -1 // for NPCs
|
||||
|
||||
|
||||
The above need to be setup as conditions using CUB at the moment so that they can be added/removed as required.
|
||||
|
||||
Regarding skills and rings modifiers, I believe you would need to remove them temporarily for advancements as it might cause extra XP to be spent, but yet to test it fully.
|
||||
Reference in New Issue
Block a user