Compare commits
40 Commits
v1.9.5
...
dev_skills
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87fd300a22 | ||
|
|
fe2aa5dd25 | ||
|
|
6f7b00328e | ||
|
|
9a46cfb842 | ||
|
|
0658a6cbc4 | ||
|
|
c2cf927557 | ||
|
|
8817f390e4 | ||
|
|
b993914dcb | ||
|
|
9fa30444aa | ||
|
|
d607abe45d | ||
|
|
6e534d5bf3 | ||
|
|
848a54fa1e | ||
|
|
7740aed299 | ||
|
|
c1adae132b | ||
|
|
1662f59009 | ||
|
|
dc00657f84 | ||
|
|
503e4e365f | ||
|
|
69e08b6a33 | ||
|
|
723e7cd934 | ||
|
|
67b7601fa1 | ||
|
|
2cefd42c28 | ||
|
|
04bfe38136 | ||
|
|
87096ab286 | ||
|
|
20d2137a15 | ||
|
|
0916dab259 | ||
|
|
273531f522 | ||
|
|
8132a0b459 | ||
|
|
c1bf9644f8 | ||
|
|
1afa5d151d | ||
|
|
242d31438b | ||
|
|
1b68d33bd2 | ||
|
|
a24e775001 | ||
|
|
823b883d4e | ||
|
|
12c8a70f60 | ||
|
|
1d42d2970d | ||
|
|
b5def3fb93 | ||
|
|
0b3816587b | ||
|
|
710afd9804 | ||
|
|
1ec9e65ca5 | ||
|
|
5fbb34d882 |
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -1,3 +1,6 @@
|
|||||||
# Make .db files keep LF ending as Foundry rewrite in this format
|
# Make .db files keep LF ending as Foundry rewrite in this format
|
||||||
*.db text eol=lf
|
*.db text eol=lf
|
||||||
*.json 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
|
# Foundry Lock files
|
||||||
system/l5r5e.lock
|
system/l5r5e.lock
|
||||||
|
|
||||||
|
# v11 db files (will be added later)
|
||||||
|
system/packs/*/**
|
||||||
|
|||||||
34
CHANGELOG.md
34
CHANGELOG.md
@@ -1,6 +1,38 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
Date format : day/month/year
|
Date format : day/month/year
|
||||||
|
|
||||||
|
## 2.0.0 - xx/xx/2024 - Skill list
|
||||||
|
- Skills are now items, this can break things update with caution. Save before upgrading !
|
||||||
|
- Added a new dialog settings to configure default skills list.
|
||||||
|
|
||||||
|
## 1.11.0 - 13/12/2023 - Little fixes
|
||||||
|
- 20Q :
|
||||||
|
- Starting techniques now have a limit of 6 techniques instead of 5 (see Celestial Realms : `Moshi Sun Sentinel School`).
|
||||||
|
- Enable dropping on the 'drop here' label for 20Q (thk to Litasa !34).
|
||||||
|
- Compendiums : Added masteries and abilities from Deathly Turns.
|
||||||
|
|
||||||
|
## 1.10.1 - 22/08/2023 - Litasa's fixes
|
||||||
|
All these changes are thanks to Litasa.
|
||||||
|
- Roll-n-Keep dialog now waits for the DiceSoNice animation to finish before displaying the result when re-rolling or exploding dice (!28).
|
||||||
|
- Adding the ability to have a different name for the custom-compendium (needed to disable the system embedded ones).
|
||||||
|
- Fixes some CSS issues when the font size is not the default (#50, #51 and #52).
|
||||||
|
|
||||||
|
## 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
|
## 1.9.5 - 11/01/2023 - Adding Modifiers
|
||||||
- Characters can now have bonus endurance/composure/focus/vigilance from conditions (thx to Perkuns).
|
- Characters can now have bonus endurance/composure/focus/vigilance from conditions (thx to Perkuns).
|
||||||
|
|
||||||
@@ -18,7 +50,7 @@ Date format : day/month/year
|
|||||||
## 1.9.1 - 08/09/2022 - Advancements Bugfixes
|
## 1.9.1 - 08/09/2022 - Advancements Bugfixes
|
||||||
- Fix for advancements fail to add new items ("_id" readonly error. see #42).
|
- 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 !__
|
__! Be certain to carefully back up any critical user data before installing this update !__
|
||||||
- Updated the System to FoundryVTT v10.
|
- Updated the System to FoundryVTT v10.
|
||||||
- Updated the initiative behaviour, he now open the DicePicker for PC and Adversaries locally or remotely.
|
- Updated the initiative behaviour, he now open the DicePicker for PC and Adversaries locally or remotely.
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
# Copyright (c) CC BY-NC-SA 4.0 2020 - 2021 This System is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
# Copyright (c) CC BY-NC-SA 4.0 2020 - 2023 This System is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
|
||||||
|
|
||||||
By exercising the Licensed Rights (link below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
|
By exercising the Licensed Rights (link below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
|
||||||
|
|
||||||
https://creativecommons.org/licenses/by-nc-sa/4.0/
|
https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||||
|
|
||||||
|
# Copyright (c) 2018 - 2023 Fantasy Flight Games. Legend of the Five Rings est TM de Fantasy Flight Games.
|
||||||
# Copyright (c) 2018 - 2021 Fantasy Flight Games. Legend of the Five Rings est TM de Fantasy Flight Games.
|
|
||||||
|
|
||||||
All images, texts and contents are the property of their creator / legal owner.
|
All images, texts and contents are the property of their creator / legal owner.
|
||||||
|
|
||||||
|
# Copyright (c) 2020 - 2023 Foundry Network
|
||||||
# Copyright (c) 2020 - 2021 Foundry Network
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
# Legend of the Five Rings (5th Edition) authorized by [Edge Studio](https://edge-studio.net/)
|
# Legend of the Five Rings (5th Edition) authorized by [Edge Studio](https://edge-studio.net/)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
[](https://ko-fi.com/vlyan)
|
[](https://ko-fi.com/vlyan)
|
||||||
[](https://foundryvtt.com/)
|
[](https://foundryvtt.com/)
|
||||||
[](https://forge-vtt.com/bazaar#package=l5r5e)
|
[](https://forge-vtt.com/bazaar#package=l5r5e)
|
||||||
[](https://www.foundryvtt-hub.com/package/l5r5e/)
|
[](https://www.foundryvtt-hub.com/package/l5r5e/)
|
||||||
[](https://www.foundryvtt-hub.com/package/l5r5e/)
|
[](https://www.foundryvtt-hub.com/package/l5r5e/)
|
||||||
|
|||||||
8771
package-lock.json
generated
8771
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
26
system/assets/icons/items/skill.svg
Normal file
26
system/assets/icons/items/skill.svg
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 24.1.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="239.5px" height="239.5px" viewBox="0 0 239.5 239.5" style="enable-background:new 0 0 239.5 239.5;" xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:#FFFFCC;}
|
||||||
|
</style>
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<path class="st0" d="M173.2,103.1c0.8-4.9,1.4-9.8,1.4-14.9c0-48.2-39.1-87.3-87.3-87.3C39.1,0.9,0,40,0,88.2s39.1,87.3,87.3,87.3
|
||||||
|
c5.7,0,11.3-0.6,16.7-1.6c0-0.1,0-0.2,0-0.3c0-7.6,1.2-14.9,3.5-21.7c-6.4,2-13.1,3.1-20.1,3.1c-36.8,0-66.7-29.9-66.7-66.7
|
||||||
|
s29.9-66.7,66.7-66.7s66.7,29.9,66.7,66.7c0,6.5-1,12.9-2.8,18.8C158.2,104.6,165.5,103.2,173.2,103.1z"/>
|
||||||
|
<path class="st0" d="M87.3,26.8c-33.8,0-61.4,27.5-61.4,61.4c0,33.8,27.5,61.4,61.4,61.4c8,0,15.7-1.6,22.7-4.4
|
||||||
|
c6.9-15.6,19.3-28.2,34.7-35.4c2.5-6.7,4-13.9,4-21.5C148.6,54.3,121.1,26.8,87.3,26.8z M110.6,101.7c0,5.4-4.4,9.8-9.8,9.8H73.7
|
||||||
|
c-5.4,0-9.8-4.4-9.8-9.8v-27c0-5.4,4.4-9.8,9.8-9.8h27.1c5.4,0,9.8,4.4,9.8,9.8V101.7z"/>
|
||||||
|
<path class="st0" d="M174.4,108.4c-0.8,0-1.6,0.1-2.4,0.1c-8.2,0.3-16,2-23.1,5.1c-1.3,0.5-2.5,1.2-3.8,1.8
|
||||||
|
c-1.4,0.7-2.8,1.5-4.2,2.3c-9.5,5.7-17.5,13.8-23.1,23.5c-0.8,1.4-1.5,2.8-2.2,4.3c-0.6,1.2-1.2,2.5-1.7,3.8
|
||||||
|
c-2.9,7.2-4.6,15-4.7,23.2c0,0.3,0,0.7,0,1c0,35.9,29.2,65.1,65.1,65.1s65.1-29.2,65.1-65.1C239.5,137.6,210.3,108.4,174.4,108.4z
|
||||||
|
M174.4,226c-28.9,0-52.4-23.5-52.4-52.4c0-1.8,0.1-3.6,0.3-5.4c2.5-24.2,21.6-43.6,45.7-46.6c2.1-0.3,4.3-0.4,6.5-0.4
|
||||||
|
c28.9,0,52.4,23.5,52.4,52.4C226.9,202.4,203.3,226,174.4,226z"/>
|
||||||
|
<path class="st0" d="M174.4,126.5c-3.2,0-6.2,0.3-9.2,0.9c-18.9,3.8-33.7,18.9-37.1,37.9c-0.5,2.7-0.8,5.4-0.8,8.2
|
||||||
|
c0,26,21.1,47.1,47.1,47.1s47.1-21.1,47.1-47.1S200.4,126.5,174.4,126.5z M192.6,184c0,4.2-3.4,7.6-7.6,7.6h-21
|
||||||
|
c-4.2,0-7.6-3.4-7.6-7.6v-21c0-4.2,3.4-7.6,7.6-7.6h21c4.2,0,7.6,3.4,7.6,7.6V184z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.0 KiB |
153
system/babele/fr/l5r5e.core-skills.json
Normal file
153
system/babele/fr/l5r5e.core-skills.json
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
{
|
||||||
|
"label": "Compétences",
|
||||||
|
"mapping": {
|
||||||
|
"description": "system.description",
|
||||||
|
"book_reference": "system.book_reference"
|
||||||
|
},
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"id": "Composition",
|
||||||
|
"name": "Composition",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.146"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Aesthetics",
|
||||||
|
"name": "Esthétique",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.146"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Smithing",
|
||||||
|
"name": "Forge",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.149"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Design",
|
||||||
|
"name": "Stylisme",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.147"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Martial Arts [Melee]",
|
||||||
|
"name": "Arts martiaux (corps à corps)",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.162"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Martial Arts [Ranged]",
|
||||||
|
"name": "Arts martiaux (distance)",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.163"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Martial Arts [Unarmed]",
|
||||||
|
"name": "Arts martiaux (mains nues)",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.164"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Fitness",
|
||||||
|
"name": "Forme",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.162"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Meditation",
|
||||||
|
"name": "Méditation",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.164"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Tactics",
|
||||||
|
"name": "Tactique",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.165"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Commerce",
|
||||||
|
"name": "Commerce",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.167"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Skulduggery",
|
||||||
|
"name": "Magouilles",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.168"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Seafaring",
|
||||||
|
"name": "Navigation",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.168"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Survival",
|
||||||
|
"name": "Survie",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.169"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Labor",
|
||||||
|
"name": "Travail manuel",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.167"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Culture",
|
||||||
|
"name": "Culture",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.156"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Government",
|
||||||
|
"name": "Gouvernement",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.156"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Medicine",
|
||||||
|
"name": "Médecine",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.157"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Sentiment",
|
||||||
|
"name": "Sentiments",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.158"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Theology",
|
||||||
|
"name": "Théologie",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.158"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Command",
|
||||||
|
"name": "Commandement",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.151"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Courtesy",
|
||||||
|
"name": "Courtoisie",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.152"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Games",
|
||||||
|
"name": "Jeux",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.153"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Performance",
|
||||||
|
"name": "Représentations",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Livre de Règles p.154"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -592,6 +592,18 @@
|
|||||||
"name": "Born to Survive (WIP)",
|
"name": "Born to Survive (WIP)",
|
||||||
"description": "",
|
"description": "",
|
||||||
"book_reference": "Décret de la nature"
|
"book_reference": "Décret de la nature"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Hunter of the Supernatural",
|
||||||
|
"name": "Hunter of the Supernatural (WIP)",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Celestial Realms - Deathly Turns"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "An Arrow Loosed",
|
||||||
|
"name": "An Arrow Loosed (WIP)",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Celestial Realms - Deathly Turns"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -592,6 +592,18 @@
|
|||||||
"name": "Evolution of the Wilds (WIP)",
|
"name": "Evolution of the Wilds (WIP)",
|
||||||
"description": "",
|
"description": "",
|
||||||
"book_reference": "Décret de la nature"
|
"book_reference": "Décret de la nature"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Mazoku's Authority",
|
||||||
|
"name": "Mazoku's Authority (WIP)",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Celestial Realms - Deathly Turns"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Effortless Aim",
|
||||||
|
"name": "Effortless Aim (WIP)",
|
||||||
|
"description": "",
|
||||||
|
"book_reference": "Celestial Realms - Deathly Turns"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,30 +17,43 @@
|
|||||||
"CustomTechniques": {
|
"CustomTechniques": {
|
||||||
"Title": "Use custom techniques",
|
"Title": "Use custom techniques",
|
||||||
"Hint": "Add 'Specificity' technique type to serve as a catch-all."
|
"Hint": "Add 'Specificity' technique type to serve as a catch-all."
|
||||||
|
},
|
||||||
|
"CustomCompendiumName": {
|
||||||
|
"Title": "Custom Compendium Name",
|
||||||
|
"Hint": "For advanced users that want to change the name of the custom compendiums (Used to disables the embedded ones).",
|
||||||
|
"Notification": "Unable set Custom Compendium: '{name}'. Is it activated and registered with Babele?"
|
||||||
|
},
|
||||||
|
"DefaultSkillsList": {
|
||||||
|
"Title": "Skills",
|
||||||
|
"Label": "Set Default Skills",
|
||||||
|
"Hint": "Set default skills list for new characters."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ACTOR": {
|
"TYPES": {
|
||||||
"TypeCharacter": "Player Character",
|
"Actor": {
|
||||||
"TypeNpc": "Non-Player Character",
|
"character": "Player Character",
|
||||||
"TypeArmy": "Army"
|
"npc": "Non-Player Character",
|
||||||
},
|
"army": "Army"
|
||||||
"ITEM": {
|
},
|
||||||
"TypeItem": "Item",
|
"Item": {
|
||||||
"TypeArmor": "Armor",
|
"skill": "Skill",
|
||||||
"TypeWeapon": "Weapon",
|
"item": "Item",
|
||||||
"TypeTechnique": "Technique",
|
"armor": "Armor",
|
||||||
"TypeProperty": "Property",
|
"weapon": "Weapon",
|
||||||
"TypePeculiarity": "Peculiarity",
|
"technique": "Technique",
|
||||||
"TypeAdvancement": "Advancement",
|
"property": "Property",
|
||||||
"TypeTitle": "Title",
|
"peculiarity": "Peculiarity",
|
||||||
"TypeBond": "Bond",
|
"advancement": "Advancement",
|
||||||
"TypeSignature_scroll": "Signature Scroll",
|
"title": "Title",
|
||||||
"TypeItem_pattern": "Item Pattern",
|
"bond": "Bond",
|
||||||
"TypeArmy_fortification": "Fortification",
|
"signature_scroll": "Signature Scroll",
|
||||||
"TypeArmy_cohort": "Cohort"
|
"item_pattern": "Item Pattern",
|
||||||
},
|
"army_fortification": "Fortification",
|
||||||
"JOURNAL": {
|
"army_cohort": "Cohort"
|
||||||
"TypeJournal": "Journal"
|
},
|
||||||
|
"Journal": {
|
||||||
|
"journal": "Journal"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"l5r5e": {
|
"l5r5e": {
|
||||||
"global": {
|
"global": {
|
||||||
@@ -173,6 +186,7 @@
|
|||||||
"monitor": {
|
"monitor": {
|
||||||
"title": "GM Monitor",
|
"title": "GM Monitor",
|
||||||
"switch_view": "Switch View",
|
"switch_view": "Switch View",
|
||||||
|
"add_selected_tokens": "Add selected tokens",
|
||||||
"honor_glory_status": "H/G/S",
|
"honor_glory_status": "H/G/S",
|
||||||
"focus_vigilance": "Foc./Vig.",
|
"focus_vigilance": "Foc./Vig.",
|
||||||
"mouse_control": "Right click +1, left: -1, middle: reset to 0"
|
"mouse_control": "Right click +1, left: -1, middle: reset to 0"
|
||||||
@@ -277,6 +291,7 @@
|
|||||||
"skills": {
|
"skills": {
|
||||||
"title": "Skills",
|
"title": "Skills",
|
||||||
"label": "Skill",
|
"label": "Skill",
|
||||||
|
"category": "Category",
|
||||||
"artisan": {
|
"artisan": {
|
||||||
"title": "Artisan",
|
"title": "Artisan",
|
||||||
"aesthetics": "Aesthetics",
|
"aesthetics": "Aesthetics",
|
||||||
@@ -472,7 +487,7 @@
|
|||||||
"honor": "Honor",
|
"honor": "Honor",
|
||||||
"access": "Technique types available",
|
"access": "Technique types available",
|
||||||
"school_ability": "School ability",
|
"school_ability": "School ability",
|
||||||
"starting_techniques": "Starting techniques (2-5)",
|
"starting_techniques": "Starting techniques (2-6)",
|
||||||
"outfit": "Starting outfit",
|
"outfit": "Starting outfit",
|
||||||
"q4": "4. How does your character stand out within their school? (p. 88)",
|
"q4": "4. How does your character stand out within their school? (p. 88)",
|
||||||
"q4_pow": "4. What gets your character in and out of trouble? (p. 60)"
|
"q4_pow": "4. What gets your character in and out of trouble? (p. 60)"
|
||||||
|
|||||||
@@ -17,30 +17,37 @@
|
|||||||
"CustomTechniques": {
|
"CustomTechniques": {
|
||||||
"Title": "Use custom techniques",
|
"Title": "Use custom techniques",
|
||||||
"Hint": "Add 'Specificity' technique type to serve as a catch-all."
|
"Hint": "Add 'Specificity' technique type to serve as a catch-all."
|
||||||
|
},
|
||||||
|
"CustomCompendiumName": {
|
||||||
|
"Title": "Custom Compendium Name",
|
||||||
|
"Hint": "For advanced users that want to change the name of the custom compendiums (Used to disables the embedded ones).",
|
||||||
|
"Notification": "Unable set Custom Compendium: '{name}'. Is it activated and registered with Babele?"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ACTOR": {
|
"TYPES": {
|
||||||
"TypeCharacter": "Personaje jugador",
|
"Actor": {
|
||||||
"TypeNpc": "Personaje no jugador",
|
"character": "Personaje jugador",
|
||||||
"TypeArmy": "Ejército"
|
"npc": "Personaje no jugador",
|
||||||
},
|
"army": "Ejército"
|
||||||
"ITEM": {
|
},
|
||||||
"TypeItem": "Objeto",
|
"Item": {
|
||||||
"TypeArmor": "Armadura",
|
"item": "Objeto",
|
||||||
"TypeWeapon": "Arma",
|
"armor": "Armadura",
|
||||||
"TypeTechnique": "Técnica",
|
"weapon": "Arma",
|
||||||
"TypeProperty": "Propiedad",
|
"technique": "Técnica",
|
||||||
"TypePeculiarity": "Peculiaridad",
|
"property": "Propiedad",
|
||||||
"TypeAdvancement": "Mejora",
|
"peculiarity": "Peculiaridad",
|
||||||
"TypeTitle": "Título",
|
"advancement": "Mejora",
|
||||||
"TypeBond": "Vínculo",
|
"title": "Título",
|
||||||
"TypeSignature_scroll": "Pergamino especial",
|
"bond": "Vínculo",
|
||||||
"TypeItem_pattern": "Patrón de objeto",
|
"signature_scroll": "Pergamino especial",
|
||||||
"TypeArmy_fortification": "Fortificación",
|
"item_pattern": "Patrón de objeto",
|
||||||
"TypeArmy_cohort": "Cohorte"
|
"army_fortification": "Fortificación",
|
||||||
},
|
"army_cohort": "Cohorte"
|
||||||
"JOURNAL": {
|
},
|
||||||
"TypeJournal": "Diario"
|
"Journal": {
|
||||||
|
"journal": "Diario"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"l5r5e": {
|
"l5r5e": {
|
||||||
"global": {
|
"global": {
|
||||||
@@ -173,6 +180,7 @@
|
|||||||
"monitor": {
|
"monitor": {
|
||||||
"title": "Pantalla del DJ",
|
"title": "Pantalla del DJ",
|
||||||
"switch_view": "Cambiar vista",
|
"switch_view": "Cambiar vista",
|
||||||
|
"add_selected_tokens": "Add selected tokens",
|
||||||
"honor_glory_status": "H/G/E",
|
"honor_glory_status": "H/G/E",
|
||||||
"focus_vigilance": "Con./Ale.",
|
"focus_vigilance": "Con./Ale.",
|
||||||
"mouse_control": "Right click +1, left: -1, middle: reset to 0"
|
"mouse_control": "Right click +1, left: -1, middle: reset to 0"
|
||||||
@@ -277,6 +285,7 @@
|
|||||||
"skills": {
|
"skills": {
|
||||||
"title": "Habilidades",
|
"title": "Habilidades",
|
||||||
"label": "Habilidad",
|
"label": "Habilidad",
|
||||||
|
"category": "Categoría",
|
||||||
"artisan": {
|
"artisan": {
|
||||||
"title": "Artesanales",
|
"title": "Artesanales",
|
||||||
"aesthetics": "Estética",
|
"aesthetics": "Estética",
|
||||||
@@ -472,7 +481,7 @@
|
|||||||
"honor": "Honor",
|
"honor": "Honor",
|
||||||
"access": "Tipos de técnicas disponibles",
|
"access": "Tipos de técnicas disponibles",
|
||||||
"school_ability": "Capacidad de escuela",
|
"school_ability": "Capacidad de escuela",
|
||||||
"starting_techniques": "Técnicas iniciales (2-5)",
|
"starting_techniques": "Técnicas iniciales (2-6)",
|
||||||
"outfit": "Equipo inicial",
|
"outfit": "Equipo inicial",
|
||||||
"q4": "4. ¿De qué manera destaca tu personaje dentro de su escuela? (p. 88)",
|
"q4": "4. ¿De qué manera destaca tu personaje dentro de su escuela? (p. 88)",
|
||||||
"q4_pow": "4. What gets your character in and out of trouble? (p. 60)"
|
"q4_pow": "4. What gets your character in and out of trouble? (p. 60)"
|
||||||
|
|||||||
@@ -17,30 +17,43 @@
|
|||||||
"CustomTechniques": {
|
"CustomTechniques": {
|
||||||
"Title": "Utiliser les techniques personnalisées",
|
"Title": "Utiliser les techniques personnalisées",
|
||||||
"Hint": "Ajoute un type de technique 'Particularités' pour servir de fourre-tout."
|
"Hint": "Ajoute un type de technique 'Particularités' pour servir de fourre-tout."
|
||||||
|
},
|
||||||
|
"CustomCompendiumName": {
|
||||||
|
"Title": "Nom du CustomCompendium",
|
||||||
|
"Hint": "Pour les utilisateurs avancés qui souhaitent modifier le nom du compendium personnalisé (utilisé pour désactiver ceux intégrés).",
|
||||||
|
"Notification": "Impossible de définir le compendium personnalisé : '{name}'. Est-il activé et enregistré auprès de Babele ?"
|
||||||
|
},
|
||||||
|
"DefaultSkillsList": {
|
||||||
|
"Title": "Compétences",
|
||||||
|
"Label": "Définir les compétences par défaut",
|
||||||
|
"Hint": "Définie la liste des compétences par défaut pour les nouveaux personnages."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ACTOR": {
|
"TYPES": {
|
||||||
"TypeCharacter": "Personnage Joueur",
|
"Actor": {
|
||||||
"TypeNpc": "Personnage non Joueur",
|
"character": "Personnage Joueur",
|
||||||
"TypeArmy": "Armée"
|
"npc": "Personnage non Joueur",
|
||||||
},
|
"army": "Armée"
|
||||||
"ITEM": {
|
},
|
||||||
"TypeItem": "Objet",
|
"Item": {
|
||||||
"TypeArmor": "Armure",
|
"skill": "Compétence",
|
||||||
"TypeWeapon": "Arme",
|
"item": "Objet",
|
||||||
"TypeTechnique": "Technique",
|
"armor": "Armure",
|
||||||
"TypeProperty": "Propriété",
|
"weapon": "Arme",
|
||||||
"TypePeculiarity": "Particularité",
|
"technique": "Technique",
|
||||||
"TypeAdvancement": "Progression",
|
"property": "Propriété",
|
||||||
"TypeTitle": "Titre",
|
"peculiarity": "Particularité",
|
||||||
"TypeBond": "Lien",
|
"advancement": "Progression",
|
||||||
"TypeSignature_scroll": "Rouleau de marque",
|
"title": "Titre",
|
||||||
"TypeItem_pattern": "Procédé de fabrication",
|
"bond": "Lien",
|
||||||
"TypeArmy_fortification": "Fortification",
|
"signature_scroll": "Rouleau de marque",
|
||||||
"TypeArmy_cohort": "Régiment"
|
"item_pattern": "Procédé de fabrication",
|
||||||
},
|
"army_fortification": "Fortification",
|
||||||
"JOURNAL": {
|
"army_cohort": "Régiment"
|
||||||
"TypeJournal": "Journal"
|
},
|
||||||
|
"Journal": {
|
||||||
|
"journal": "Journal"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"l5r5e": {
|
"l5r5e": {
|
||||||
"global": {
|
"global": {
|
||||||
@@ -95,7 +108,7 @@
|
|||||||
"void": "Vide"
|
"void": "Vide"
|
||||||
},
|
},
|
||||||
"sheets": {
|
"sheets": {
|
||||||
"narrative": "Mode Narratif",
|
"narrative": "Narratif",
|
||||||
"experience": "Expérience",
|
"experience": "Expérience",
|
||||||
"family": "Famille",
|
"family": "Famille",
|
||||||
"region": "Région",
|
"region": "Région",
|
||||||
@@ -173,6 +186,7 @@
|
|||||||
"monitor": {
|
"monitor": {
|
||||||
"title": "GM Monitor",
|
"title": "GM Monitor",
|
||||||
"switch_view": "Switch View",
|
"switch_view": "Switch View",
|
||||||
|
"add_selected_tokens": "Ajouter les tokens sélectionnés",
|
||||||
"honor_glory_status": "H/G/S",
|
"honor_glory_status": "H/G/S",
|
||||||
"focus_vigilance": "Att./Vig.",
|
"focus_vigilance": "Att./Vig.",
|
||||||
"mouse_control": "Click Droit +1, Gauche: -1, Milieu: Remise à 0"
|
"mouse_control": "Click Droit +1, Gauche: -1, Milieu: Remise à 0"
|
||||||
@@ -277,6 +291,7 @@
|
|||||||
"skills": {
|
"skills": {
|
||||||
"title": "Compétences",
|
"title": "Compétences",
|
||||||
"label": "Compétence",
|
"label": "Compétence",
|
||||||
|
"category": "Catégorie",
|
||||||
"artisan": {
|
"artisan": {
|
||||||
"title": "Artisanales",
|
"title": "Artisanales",
|
||||||
"aesthetics": "Esthétique",
|
"aesthetics": "Esthétique",
|
||||||
@@ -472,7 +487,7 @@
|
|||||||
"honor": "Honneur",
|
"honor": "Honneur",
|
||||||
"access": "Types de techniques accessibles",
|
"access": "Types de techniques accessibles",
|
||||||
"school_ability": "Capacité d'école",
|
"school_ability": "Capacité d'école",
|
||||||
"starting_techniques": "Techniques de départ (2-5)",
|
"starting_techniques": "Techniques de départ (2-6)",
|
||||||
"outfit": "Équipement de départ",
|
"outfit": "Équipement de départ",
|
||||||
"q4": "4. De quelle manière votre personnage se démarque-t-il au sein de son école ? (p. 88)",
|
"q4": "4. De quelle manière votre personnage se démarque-t-il au sein de son école ? (p. 88)",
|
||||||
"q4_pow": "4. Qu'est-ce qui attire des ennuis à votre personnage dans ou l'en sort ? (p. 60)"
|
"q4_pow": "4. Qu'est-ce qui attire des ennuis à votre personnage dans ou l'en sort ? (p. 60)"
|
||||||
|
|||||||
@@ -17,30 +17,37 @@
|
|||||||
"CustomTechniques": {
|
"CustomTechniques": {
|
||||||
"Title": "Usa tecniche custom",
|
"Title": "Usa tecniche custom",
|
||||||
"Hint": "Aggiunge il tipo 'Speciale' come termine generale."
|
"Hint": "Aggiunge il tipo 'Speciale' come termine generale."
|
||||||
|
},
|
||||||
|
"CustomCompendiumName": {
|
||||||
|
"Title": "Custom Compendium Name",
|
||||||
|
"Hint": "For advanced users that want to change the name of the custom compendiums (Used to disables the embedded ones).",
|
||||||
|
"Notification": "Unable set Custom Compendium: '{name}'. Is it activated and registered with Babele?"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ACTOR": {
|
"TYPES": {
|
||||||
"TypeCharacter": "Personaggio Giocante",
|
"Actor": {
|
||||||
"TypeNpc": "Personaggio Non Giocante",
|
"character": "Personaggio Giocante",
|
||||||
"TypeArmy": "Esercito"
|
"npc": "Personaggio Non Giocante",
|
||||||
},
|
"army": "Esercito"
|
||||||
"ITEM": {
|
},
|
||||||
"TypeItem": "Oggetto",
|
"Item": {
|
||||||
"TypeArmor": "Armatura",
|
"item": "Oggetto",
|
||||||
"TypeWeapon": "Arma",
|
"armor": "Armatura",
|
||||||
"TypeTechnique": "Tecnica",
|
"weapon": "Arma",
|
||||||
"TypeProperty": "Proprietà",
|
"technique": "Tecnica",
|
||||||
"TypePeculiarity": "Peculiarità",
|
"property": "Proprietà",
|
||||||
"TypeAdvancement": "Avanzamento",
|
"peculiarity": "Peculiarità",
|
||||||
"TypeTitle": "Titolo",
|
"advancement": "Avanzamento",
|
||||||
"TypeBond": "Legame",
|
"title": "Titolo",
|
||||||
"TypeSignature_scroll": "Signature Scroll",
|
"bond": "Legame",
|
||||||
"TypeItem_pattern": "Item Pattern",
|
"signature_scroll": "Signature Scroll",
|
||||||
"TypeArmy_fortification": "Fortezza",
|
"item_pattern": "Item Pattern",
|
||||||
"TypeArmy_cohort": "Coorte"
|
"army_fortification": "Fortezza",
|
||||||
},
|
"army_cohort": "Coorte"
|
||||||
"JOURNAL": {
|
},
|
||||||
"TypeJournal": "Diario"
|
"Journal": {
|
||||||
|
"journal": "Diario"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"l5r5e": {
|
"l5r5e": {
|
||||||
"global": {
|
"global": {
|
||||||
@@ -173,6 +180,7 @@
|
|||||||
"monitor": {
|
"monitor": {
|
||||||
"title": "Schermo del GM",
|
"title": "Schermo del GM",
|
||||||
"switch_view": "Cambia vista",
|
"switch_view": "Cambia vista",
|
||||||
|
"add_selected_tokens": "Add selected tokens",
|
||||||
"honor_glory_status": "O/G/S",
|
"honor_glory_status": "O/G/S",
|
||||||
"focus_vigilance": "Foc./Vig.",
|
"focus_vigilance": "Foc./Vig.",
|
||||||
"mouse_control": "Click destro +1, sinistro: -1, centrale: resetta a 0"
|
"mouse_control": "Click destro +1, sinistro: -1, centrale: resetta a 0"
|
||||||
@@ -277,6 +285,7 @@
|
|||||||
"skills": {
|
"skills": {
|
||||||
"title": "Abilità",
|
"title": "Abilità",
|
||||||
"label": "Abilità",
|
"label": "Abilità",
|
||||||
|
"category": "Categoria",
|
||||||
"artisan": {
|
"artisan": {
|
||||||
"title": "Artigiane",
|
"title": "Artigiane",
|
||||||
"aesthetics": "Estetica",
|
"aesthetics": "Estetica",
|
||||||
@@ -472,7 +481,7 @@
|
|||||||
"honor": "Onore",
|
"honor": "Onore",
|
||||||
"access": "Tecniche Disponibili",
|
"access": "Tecniche Disponibili",
|
||||||
"school_ability": "Abilità di Scuola",
|
"school_ability": "Abilità di Scuola",
|
||||||
"starting_techniques": "Tecniche di Partenza (2-5)",
|
"starting_techniques": "Tecniche di Partenza (2-6)",
|
||||||
"outfit": "Dotazione di Partenza",
|
"outfit": "Dotazione di Partenza",
|
||||||
"q4": "4. Come si distingue il personaggio all’interno della sua scuola? (p. 88)",
|
"q4": "4. Come si distingue il personaggio all’interno della sua scuola? (p. 88)",
|
||||||
"q4_pow": "4. Che cosa mette nei guai il personaggio, e che cosa lo tira fuori dai guai? (p. 60)"
|
"q4_pow": "4. Che cosa mette nei guai il personaggio, e che cosa lo tira fuori dai guai? (p. 60)"
|
||||||
|
|||||||
@@ -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":"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":"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":"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":{}}
|
{"_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":{}}
|
||||||
|
|||||||
24
system/packs/core-skills.db
Normal file
24
system/packs/core-skills.db
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{"_id":"L5RCoreSkl000001","name":"Composition","permission":{"default":0},"type":"skill","data":{"category":"artisan","description":"","book_reference":"Core Rulebook p.146","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"composition"}},"img":"icons/sundries/scrolls/scroll-symbol-circle-white.webp","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000002","name":"Aesthetics","permission":{"default":0},"type":"skill","data":{"category":"artisan","description":"","book_reference":"Core Rulebook p.146","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"aesthetics"}},"img":"systems/l5r5e/assets/icons/techs/kiho.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000003","name":"Smithing","permission":{"default":0},"type":"skill","data":{"category":"artisan","description":"","book_reference":"Core Rulebook p.149","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"smithing"}},"img":"systems/l5r5e/assets/icons/items/item_pattern.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000004","name":"Design","permission":{"default":0},"type":"skill","data":{"category":"artisan","description":"","book_reference":"Core Rulebook p.147","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"design"}},"img":"systems/l5r5e/assets/icons/items/keikogi.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000005","name":"Martial Arts [Melee]","permission":{"default":0},"type":"skill","data":{"category":"martial","description":"","book_reference":"Core Rulebook p.162","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"melee"}},"img":"systems/l5r5e/assets/icons/weapons/katana.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000006","name":"Martial Arts [Ranged]","permission":{"default":0},"type":"skill","data":{"category":"martial","description":"","book_reference":"Core Rulebook p.163","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"ranged"}},"img":"systems/l5r5e/assets/icons/weapons/crossbow.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000007","name":"Martial Arts [Unarmed]","permission":{"default":0},"type":"skill","data":{"category":"martial","description":"","book_reference":"Core Rulebook p.164","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"unarmed"}},"img":"systems/l5r5e/assets/icons/weapons/unarmed.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000008","name":"Fitness","permission":{"default":0},"type":"skill","data":{"category":"martial","description":"","book_reference":"Core Rulebook p.162","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"fitness"}},"img":"icons/skills/melee/maneuver-daggers-paired-orange.webp","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000009","name":"Meditation","permission":{"default":0},"type":"skill","data":{"category":"martial","description":"","book_reference":"Core Rulebook p.164","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"meditation"}},"img":"systems/l5r5e/assets/icons/techs/ritual.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000010","name":"Tactics","permission":{"default":0},"type":"skill","data":{"category":"martial","description":"","book_reference":"Core Rulebook p.165","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"tactics"}},"img":"systems/l5r5e/assets/icons/items/armor.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000011","name":"Commerce","permission":{"default":0},"type":"skill","data":{"category":"trade","description":"","book_reference":"Core Rulebook p.167","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"commerce"}},"img":"icons/skills/trades/baking-bread-rolls-green.webp","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000012","name":"Skulduggery","permission":{"default":0},"type":"skill","data":{"category":"trade","description":"","book_reference":"Core Rulebook p.168","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"skulduggery"}},"img":"icons/skills/social/intimidation-impressing.webp","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000013","name":"Seafaring","permission":{"default":0},"type":"skill","data":{"category":"trade","description":"","book_reference":"Core Rulebook p.168","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"seafaring"}},"img":"icons/skills/trades/profession-sailing-ship.webp","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000014","name":"Survival","permission":{"default":0},"type":"skill","data":{"category":"trade","description":"","book_reference":"Core Rulebook p.169","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"survival"}},"img":"icons/environment/wilderness/camp-improvised.webp","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000015","name":"Labor","permission":{"default":0},"type":"skill","data":{"category":"trade","description":"","book_reference":"Core Rulebook p.167","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"labor"}},"img":"icons/tools/hand/hammer-and-nail.webp","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000016","name":"Culture","permission":{"default":0},"type":"skill","data":{"category":"scholar","description":"","book_reference":"Core Rulebook p.156","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"culture"}},"img":"icons/sundries/documents/document-sealed-signatures-red.webp","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000017","name":"Government","permission":{"default":0},"type":"skill","data":{"category":"scholar","description":"","book_reference":"Core Rulebook p.156","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"government"}},"img":"systems/l5r5e/assets/icons/items/army_fortification.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000018","name":"Medicine","permission":{"default":0},"type":"skill","data":{"category":"scholar","description":"","book_reference":"Core Rulebook p.157","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"medicine"}},"img":"icons/tools/laboratory/bowl-liquid-pink-yellow-green.webp","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000019","name":"Sentiment","permission":{"default":0},"type":"skill","data":{"category":"scholar","description":"","book_reference":"Core Rulebook p.158","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"sentiment"}},"img":"systems/l5r5e/assets/icons/actors/traditional-japanese-woman.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000020","name":"Theology","permission":{"default":0},"type":"skill","data":{"category":"scholar","description":"","book_reference":"Core Rulebook p.158","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"theology"}},"img":"systems/l5r5e/assets/icons/items/blessed.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000021","name":"Command","permission":{"default":0},"type":"skill","data":{"category":"social","description":"","book_reference":"Core Rulebook p.151","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"command"}},"img":"systems/l5r5e/assets/icons/items/army_cohort.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000022","name":"Courtesy","permission":{"default":0},"type":"skill","data":{"category":"social","description":"","book_reference":"Core Rulebook p.152","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"courtesy"}},"img":"systems/l5r5e/assets/icons/social.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000023","name":"Games","permission":{"default":0},"type":"skill","data":{"category":"social","description":"","book_reference":"Core Rulebook p.153","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"games"}},"img":"icons/sundries/gaming/dice-runed-tan.webp","effects":[]}
|
||||||
|
{"_id":"L5RCoreSkl000024","name":"Performance","permission":{"default":0},"type":"skill","data":{"category":"social","description":"","book_reference":"Core Rulebook p.154","rank":0,"modifier":0},"sort":100001,"flags":{"l5r5e":{"skillCoreId":"performance"}},"img":"icons/environment/people/group.webp","effects":[]}
|
||||||
@@ -96,3 +96,5 @@
|
|||||||
{"_id":"L5RCoreMas000096","name":"Reflexive Strike","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"6","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"mastery_ability","xp_cost":"0","description":"","book_reference":"Writ of the Wild p.99"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/mastery_ability.svg","effects":[]}
|
{"_id":"L5RCoreMas000096","name":"Reflexive Strike","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"6","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"mastery_ability","xp_cost":"0","description":"","book_reference":"Writ of the Wild p.99"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/mastery_ability.svg","effects":[]}
|
||||||
{"_id":"L5RCoreMas000097","name":"A Master of Study","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"6","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"mastery_ability","xp_cost":"0","description":"","book_reference":"Writ of the Wild p.100"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/mastery_ability.svg","effects":[]}
|
{"_id":"L5RCoreMas000097","name":"A Master of Study","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"6","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"mastery_ability","xp_cost":"0","description":"","book_reference":"Writ of the Wild p.100"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/mastery_ability.svg","effects":[]}
|
||||||
{"_id":"L5RCoreMas000098","name":"Born to Survive","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"6","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"mastery_ability","xp_cost":"0","description":"","book_reference":"Writ of the Wild p.101"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/mastery_ability.svg","effects":[]}
|
{"_id":"L5RCoreMas000098","name":"Born to Survive","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"6","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"mastery_ability","xp_cost":"0","description":"","book_reference":"Writ of the Wild p.101"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/mastery_ability.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreMas000099","name":"Hunter of the Supernatural","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"6","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"mastery_ability","xp_cost":"0","description":"","book_reference":"Celestial Realms - Deathly Turns p.24"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/mastery_ability.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreMas000100","name":"An Arrow Loosed","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"6","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"mastery_ability","xp_cost":"0","description":"","book_reference":"Celestial Realms - Deathly Turns p.25"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/mastery_ability.svg","effects":[]}
|
||||||
|
|||||||
@@ -96,3 +96,5 @@
|
|||||||
{"_id":"L5RCoreSch000096","name":"Keen Senses","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"1","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"school_ability","xp_cost":"0","description":"","book_reference":"Writ of the Wild p.99"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/school_ability.svg","effects":[]}
|
{"_id":"L5RCoreSch000096","name":"Keen Senses","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"1","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"school_ability","xp_cost":"0","description":"","book_reference":"Writ of the Wild p.99"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/school_ability.svg","effects":[]}
|
||||||
{"_id":"L5RCoreSch000097","name":"Mind of Calm","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"1","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"school_ability","xp_cost":"0","description":"","book_reference":"Writ of the Wild p.100"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/school_ability.svg","effects":[]}
|
{"_id":"L5RCoreSch000097","name":"Mind of Calm","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"1","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"school_ability","xp_cost":"0","description":"","book_reference":"Writ of the Wild p.100"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/school_ability.svg","effects":[]}
|
||||||
{"_id":"L5RCoreSch000098","name":"Evolution of the Wilds","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"1","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"school_ability","xp_cost":"0","description":"","book_reference":"Writ of the Wild p.101"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/school_ability.svg","effects":[]}
|
{"_id":"L5RCoreSch000098","name":"Evolution of the Wilds","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"1","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"school_ability","xp_cost":"0","description":"","book_reference":"Writ of the Wild p.101"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/school_ability.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreSch000099","name":"Mazoku's Authority","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"1","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"school_ability","xp_cost":"0","description":"","book_reference":"Celestial Realms - Deathly Turns p.24"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/school_ability.svg","effects":[]}
|
||||||
|
{"_id":"L5RCoreSch000100","name":"Effortless Aim","permission":{"default":0},"type":"technique","data":{"in_curriculum":false,"xp_used":0,"rank":"1","bought_at_rank":0,"ring":"void","skill":"","difficulty":"","technique_type":"school_ability","xp_cost":"0","description":"","book_reference":"Celestial Realms - Deathly Turns p.25"},"sort":100001,"flags":{},"img":"systems/l5r5e/assets/icons/techs/school_ability.svg","effects":[]}
|
||||||
|
|||||||
@@ -16,66 +16,92 @@ export class ActorL5r5e extends Actor {
|
|||||||
docData.img = `${CONFIG.l5r5e.paths.assets}icons/actors/${docData.type}.svg`;
|
docData.img = `${CONFIG.l5r5e.paths.assets}icons/actors/${docData.type}.svg`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Some tweak on actors prototypeToken
|
// Only for new actors (New actor has no items, duplicates does)
|
||||||
docData.prototypeToken = docData.prototypeToken || {};
|
if (!docData.items) {
|
||||||
switch (docData.type) {
|
// Some tweak on actors prototypeToken
|
||||||
case "character":
|
docData.prototypeToken = docData.prototypeToken || {};
|
||||||
foundry.utils.mergeObject(
|
switch (docData.type) {
|
||||||
docData.prototypeToken,
|
case "character":
|
||||||
{
|
// Load skills from core compendiums (only for pc character)
|
||||||
// vision: true,
|
docData.items = [];
|
||||||
// dimSight: 30,
|
await ActorL5r5e.addSkillsFromDefaultList(docData);
|
||||||
// brightSight: 0,
|
|
||||||
actorLink: true,
|
|
||||||
disposition: 1, // friendly
|
|
||||||
bar1: {
|
|
||||||
attribute: "fatigue",
|
|
||||||
},
|
|
||||||
bar2: {
|
|
||||||
attribute: "strife",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ overwrite: false }
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "npc":
|
// Set token properties
|
||||||
foundry.utils.mergeObject(
|
foundry.utils.mergeObject(
|
||||||
docData.prototypeToken,
|
docData.prototypeToken,
|
||||||
{
|
{
|
||||||
actorLink: true,
|
// vision: true,
|
||||||
disposition: 0, // neutral
|
// dimSight: 30,
|
||||||
bar1: {
|
// brightSight: 0,
|
||||||
attribute: "fatigue",
|
actorLink: true,
|
||||||
|
disposition: 1, // friendly
|
||||||
|
bar1: {
|
||||||
|
attribute: "fatigue",
|
||||||
|
},
|
||||||
|
bar2: {
|
||||||
|
attribute: "strife",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
bar2: {
|
{ overwrite: false }
|
||||||
attribute: "strife",
|
);
|
||||||
},
|
break;
|
||||||
},
|
|
||||||
{ overwrite: false }
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "army":
|
case "npc":
|
||||||
foundry.utils.mergeObject(
|
foundry.utils.mergeObject(
|
||||||
docData.prototypeToken,
|
docData.prototypeToken,
|
||||||
{
|
{
|
||||||
actorLink: true,
|
actorLink: true,
|
||||||
disposition: 0, // neutral
|
disposition: 0, // neutral
|
||||||
bar1: {
|
bar1: {
|
||||||
attribute: "battle_readiness.casualties_strength",
|
attribute: "fatigue",
|
||||||
|
},
|
||||||
|
bar2: {
|
||||||
|
attribute: "strife",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
bar2: {
|
{ overwrite: false }
|
||||||
attribute: "battle_readiness.panic_discipline",
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "army":
|
||||||
|
foundry.utils.mergeObject(
|
||||||
|
docData.prototypeToken,
|
||||||
|
{
|
||||||
|
actorLink: true,
|
||||||
|
disposition: 0, // neutral
|
||||||
|
bar1: {
|
||||||
|
attribute: "battle_readiness.casualties_strength",
|
||||||
|
},
|
||||||
|
bar2: {
|
||||||
|
attribute: "battle_readiness.panic_discipline",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
{ overwrite: false }
|
||||||
{ overwrite: false }
|
);
|
||||||
);
|
break;
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
await super.create(docData, options);
|
await super.create(docData, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add all the skills from compendiums to "items"
|
||||||
|
*/
|
||||||
|
static async addSkillsFromDefaultList(docData) {
|
||||||
|
console.log(`L5R5E | Adding default skills to ${docData.name}`);
|
||||||
|
|
||||||
|
const skillList = await game.l5r5e.HelpersL5r5e.getSkillsItemsList();
|
||||||
|
|
||||||
|
skillList.forEach(item => {
|
||||||
|
// Get the json data and replace the object id/rank
|
||||||
|
const tmpData = item.toObject();
|
||||||
|
tmpData._id = foundry.utils.randomID();
|
||||||
|
tmpData.system.rank = 0;
|
||||||
|
docData.items.push(tmpData);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entity-specific actions that should occur when the Entity is updated
|
* Entity-specific actions that should occur when the Entity is updated
|
||||||
* @override
|
* @override
|
||||||
@@ -94,7 +120,7 @@ export class ActorL5r5e extends Actor {
|
|||||||
context.pack = this.pack;
|
context.pack = this.pack;
|
||||||
|
|
||||||
// NPC switch between types : Linked actor for Adversary, unlinked for Minion
|
// NPC switch between types : Linked actor for Adversary, unlinked for Minion
|
||||||
if (!!docData["system.type"] && this.type === "npc" && docData["system.type"] !== this.system.type) {
|
if (!!docData["system.type"] && this.isNpc && docData["system.type"] !== this.system.type) {
|
||||||
docData["prototypeToken.actorLink"] = docData["system.type"] === "adversary";
|
docData["prototypeToken.actorLink"] = docData["system.type"] === "adversary";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,7 +146,7 @@ export class ActorL5r5e extends Actor {
|
|||||||
// Now using updateDocuments
|
// Now using updateDocuments
|
||||||
return Actor.updateDocuments([docData], context).then(() => {
|
return Actor.updateDocuments([docData], context).then(() => {
|
||||||
// Notify the "Gm Monitor" if this actor is watched
|
// 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");
|
game.l5r5e.HelpersL5r5e.refreshLocalAndSocket("l5r5e-gm-monitor");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -197,38 +223,51 @@ export class ActorL5r5e extends Actor {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
async _updateActorFromAdvancement(item, isAdd) {
|
async _updateActorFromAdvancement(item, isAdd) {
|
||||||
if (item && item.type === "advancement") {
|
if (!item || item.type !== "advancement") {
|
||||||
const actor = foundry.utils.duplicate(this.system);
|
return;
|
||||||
const itemData = item.system;
|
}
|
||||||
if (itemData.advancement_type === "ring") {
|
|
||||||
// Ring
|
const actorSystem = foundry.utils.duplicate(this.system);
|
||||||
if (isAdd) {
|
const itemData = item.system;
|
||||||
actor.rings[itemData.ring] = Math.min(9, actor.rings[itemData.ring] + 1);
|
if (itemData.advancement_type === "ring") {
|
||||||
} else {
|
// Ring
|
||||||
actor.rings[itemData.ring] = Math.max(1, actor.rings[itemData.ring] - 1);
|
if (isAdd) {
|
||||||
}
|
actorSystem.rings[itemData.ring] = Math.min(9, actorSystem.rings[itemData.ring] + 1);
|
||||||
} else {
|
} else {
|
||||||
// Skill
|
actorSystem.rings[itemData.ring] = Math.max(1, actorSystem.rings[itemData.ring] - 1);
|
||||||
const skillCatId = CONFIG.l5r5e.skills.get(itemData.skill);
|
|
||||||
if (skillCatId) {
|
|
||||||
if (isAdd) {
|
|
||||||
actor.skills[skillCatId][itemData.skill] = Math.min(
|
|
||||||
9,
|
|
||||||
actor.skills[skillCatId][itemData.skill] + 1
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
actor.skills[skillCatId][itemData.skill] = Math.max(
|
|
||||||
0,
|
|
||||||
actor.skills[skillCatId][itemData.skill] - 1
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Actor
|
// Update Actor
|
||||||
await this.update({
|
await this.update({
|
||||||
system: foundry.utils.diffObject(this.system, actor),
|
system: foundry.utils.diffObject(this.system, actorSystem),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// Skill
|
||||||
|
let skillItem = await fromUuid(itemData.skill); // Skill itemUuid
|
||||||
|
if (!skillItem) {
|
||||||
|
console.warn("L5R5E | Unknown skill item uuid", itemData.skill);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Out of actor item ?
|
||||||
|
if (!skillItem.actor || skillItem.actor._id !== this._id) {
|
||||||
|
const checkItem = this.items.getName(skillItem.name);
|
||||||
|
if (checkItem) {
|
||||||
|
skillItem = checkItem;
|
||||||
|
} else {
|
||||||
|
throw new Error(`Unable to find "${skillItem.name}" on this actor`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const newRank = isAdd
|
||||||
|
? Math.min(9, skillItem.system.rank + 1)
|
||||||
|
: Math.max(0, skillItem.system.rank - 1);
|
||||||
|
if (skillItem.system.rank === newRank) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update Item
|
||||||
|
await skillItem.update({ "system.rank": newRank });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,12 +300,20 @@ export class ActorL5r5e extends Actor {
|
|||||||
return this.type === "character";
|
return this.type === "character";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if this actor is a NPC
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
get isNpc() {
|
||||||
|
return this.type === "npc";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if this actor is an Adversary
|
* Return true if this actor is an Adversary
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
get isAdversary() {
|
get isAdversary() {
|
||||||
return this.type === "npc" && this.system.type === "adversary";
|
return this.isNpc && this.system.type === "adversary";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -274,7 +321,7 @@ export class ActorL5r5e extends Actor {
|
|||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
get isMinion() {
|
get isMinion() {
|
||||||
return this.type === "npc" && this.system.type === "minion";
|
return this.isNpc && this.system.type === "minion";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -337,9 +384,9 @@ export class ActorL5r5e extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
character: game.settings.get("l5r5e", "initiative-prepared-character"),
|
character: game.settings.get(CONFIG.l5r5e.namespace, "initiative-prepared-character"),
|
||||||
adversary: game.settings.get("l5r5e", "initiative-prepared-adversary"),
|
adversary: game.settings.get(CONFIG.l5r5e.namespace, "initiative-prepared-adversary"),
|
||||||
minion: game.settings.get("l5r5e", "initiative-prepared-minion"),
|
minion: game.settings.get(CONFIG.l5r5e.namespace, "initiative-prepared-minion"),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Prepared is a boolean or if null we get the info in the actor
|
// Prepared is a boolean or if null we get the info in the actor
|
||||||
@@ -370,7 +417,7 @@ export class ActorL5r5e extends Actor {
|
|||||||
if (!this.isCharacterType) {
|
if (!this.isCharacterType) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return this.type === "npc" ? this.system.conflict_rank.social : this.system.identity.school_rank;
|
return this.isNpc ? this.system.conflict_rank.social : this.system.identity.school_rank;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -381,6 +428,6 @@ export class ActorL5r5e extends Actor {
|
|||||||
if (!this.isCharacterType) {
|
if (!this.isCharacterType) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return this.type === "npc" ? this.system.conflict_rank.martial : this.system.identity.school_rank;
|
return this.isNpc ? this.system.conflict_rank.martial : this.system.identity.school_rank;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
if (!item || item.documentName !== "Item" || !["army_cohort", "army_fortification"].includes(item.type)) {
|
if (!item || item.documentName !== "Item" || !["army_cohort", "army_fortification"].includes(item.type)) {
|
||||||
// actor dual trigger...
|
// actor dual trigger...
|
||||||
if (item?.documentName !== "Actor") {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
@@ -221,7 +221,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
*/
|
*/
|
||||||
async _updateLinkedActorData(type, actor, isInit = false) {
|
async _updateLinkedActorData(type, actor, isInit = false) {
|
||||||
if (!actor || actor.documentName !== "Actor" || !actor.isCharacterType) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
console.warn("L5R5E | Unknown type", type);
|
console.warn("L5R5E | AS | Unknown type", type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return this.actor.update(actorData);
|
return this.actor.update(actorData);
|
||||||
@@ -276,7 +276,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
console.warn("L5R5E | Unknown type", type);
|
console.warn("L5R5E | AS | Unknown type", type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return this.actor.update({ system: actorData });
|
return this.actor.update({ system: actorData });
|
||||||
@@ -323,7 +323,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
console.warn("L5R5E | Unsupported type", type);
|
console.warn("L5R5E | AS | Unsupported type", type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
|
|
||||||
// Build the list order
|
// Build the list order
|
||||||
Array.from(CONFIG.l5r5e.techniques)
|
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]) => {
|
.forEach(([id, cfg]) => {
|
||||||
out[id] = [];
|
out[id] = [];
|
||||||
});
|
});
|
||||||
@@ -60,7 +60,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
case "technique":
|
case "technique":
|
||||||
if (!out[item.system.technique_type]) {
|
if (!out[item.system.technique_type]) {
|
||||||
console.warn(
|
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";
|
item.system.technique_type = "kata";
|
||||||
}
|
}
|
||||||
@@ -73,7 +73,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
if (embedItem.type === "technique") {
|
if (embedItem.type === "technique") {
|
||||||
if (!out[embedItem.system.technique_type]) {
|
if (!out[embedItem.system.technique_type]) {
|
||||||
console.warn(
|
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";
|
embedItem.system.technique_type = "kata";
|
||||||
}
|
}
|
||||||
@@ -133,141 +133,151 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
* @param {DragEvent} event
|
* @param {DragEvent} event
|
||||||
*/
|
*/
|
||||||
async _onDrop(event) {
|
async _onDrop(event) {
|
||||||
// *** Everything below here is only needed if the sheet is editable ***
|
try {
|
||||||
if (!this.isEditable || this.actor.system.soft_locked) {
|
// *** Everything below here is only needed if the sheet is editable ***
|
||||||
console.log("L5R5E | This sheet is not editable");
|
if (!this.isEditable || this.actor.system.soft_locked) {
|
||||||
return;
|
console.log("L5R5E | BCS | This sheet is not editable");
|
||||||
}
|
|
||||||
|
|
||||||
// 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);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Specific curriculum journal drop
|
|
||||||
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 :'(");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.actor.system.identity.school_curriculum_journal = {
|
|
||||||
id: item._id,
|
|
||||||
name: item.name,
|
|
||||||
pack: item.pack || null,
|
|
||||||
};
|
|
||||||
await this.actor.update({
|
|
||||||
system: {
|
|
||||||
identity: {
|
|
||||||
school_curriculum_journal: this.actor.system.identity.school_curriculum_journal,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Dropped an item with same "id" as one owned
|
|
||||||
if (this.actor.items) {
|
|
||||||
// Exit if we already owned exactly this id (drag a personal item on our own sheet)
|
|
||||||
if (
|
|
||||||
this.actor.items.some((embedItem) => {
|
|
||||||
// Search in children
|
|
||||||
if (embedItem.items instanceof Map && embedItem.items.has(item._id)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return embedItem._id === item._id;
|
|
||||||
})
|
|
||||||
) {
|
|
||||||
console.log("L5R5E | This element has been ignored because it already exists in this actor", item.uuid);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add quantity instead if they have (id is different so use type and name)
|
// Check item type and subtype
|
||||||
if (item.system.quantity) {
|
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||||
const tmpItem = this.actor.items.find(
|
if (!item || !["Item", "JournalEntry"].includes(item.documentName) || item.type === "property") {
|
||||||
(embedItem) => embedItem.name === item.name && embedItem.type === item.type
|
console.log(`L5R5E | BCS | Wrong subtype ${item?.type}`, item);
|
||||||
);
|
return;
|
||||||
if (tmpItem && this._modifyQuantity(tmpItem.id, 1)) {
|
}
|
||||||
|
|
||||||
|
// Specific curriculum journal drop
|
||||||
|
if (item.documentName === "JournalEntry") {
|
||||||
|
// npc does not have this
|
||||||
|
if (!this.actor.system.identity?.school_curriculum_journal) {
|
||||||
|
console.log("L5R5E | BCS | NPC won't go to school :'(");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
this.actor.system.identity.school_curriculum_journal = {
|
||||||
}
|
id: item._id,
|
||||||
|
name: item.name,
|
||||||
// Can add the item - Foundry override cause props
|
pack: item.pack || null,
|
||||||
const allowed = Hooks.call("dropActorSheetData", this.actor, this, item);
|
};
|
||||||
if (allowed === false) {
|
await this.actor.update({
|
||||||
return;
|
system: {
|
||||||
}
|
identity: {
|
||||||
|
school_curriculum_journal: this.actor.system.identity.school_curriculum_journal,
|
||||||
let itemData = item.toObject(true);
|
},
|
||||||
|
},
|
||||||
// Item subtype specific
|
});
|
||||||
switch (itemData.type) {
|
|
||||||
case "army_cohort":
|
|
||||||
case "army_fortification":
|
|
||||||
console.warn("L5R5E | Army items are not allowed", item?.type, item);
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
case "advancement":
|
// Dropped an item with same "id" as one owned
|
||||||
// Specific advancements, remove 1 to selected ring/skill
|
if (this.actor.items) {
|
||||||
await this.actor.addBonus(item);
|
// Exit if we already owned exactly this id (drag a personal item on our own sheet)
|
||||||
break;
|
if (
|
||||||
|
this.actor.items.some((embedItem) => {
|
||||||
case "title":
|
// Search in children
|
||||||
// Generate new Ids for the embed items
|
if (embedItem.items instanceof Map && embedItem.items.has(item._id)) {
|
||||||
await item.generateNewIdsForAllEmbedItems();
|
return true;
|
||||||
|
}
|
||||||
// Add embed advancements bonus
|
return embedItem._id === item._id;
|
||||||
for (let [embedId, embedItem] of item.system.items) {
|
})
|
||||||
if (embedItem.type === "advancement") {
|
) {
|
||||||
await this.actor.addBonus(embedItem);
|
console.log("L5R5E | BCS | This element has been ignored because it already exists in this actor", item.uuid);
|
||||||
}
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// refresh data
|
// Add quantity instead if they have (id is different so use type and name)
|
||||||
itemData = item.toObject(true);
|
if (item.system.quantity) {
|
||||||
break;
|
const tmpItem = this.actor.items.find(
|
||||||
|
(embedItem) => embedItem.name === item.name && embedItem.type === item.type
|
||||||
case "technique":
|
);
|
||||||
// School_ability and mastery_ability, allow only 1 per type
|
if (tmpItem && this._modifyQuantity(tmpItem.id, 1)) {
|
||||||
if (CONFIG.l5r5e.techniques.get(itemData.system.technique_type)?.type === "school") {
|
|
||||||
if (
|
|
||||||
Array.from(this.actor.items).some((e) => {
|
|
||||||
return e.type === "technique" && e.system.technique_type === itemData.system.technique_type;
|
|
||||||
})
|
|
||||||
) {
|
|
||||||
ui.notifications.info(game.i18n.localize("l5r5e.techniques.only_one"));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// No cost for schools
|
|
||||||
itemData.system.xp_cost = 0;
|
|
||||||
itemData.system.xp_used = 0;
|
|
||||||
itemData.system.in_curriculum = true;
|
|
||||||
} else {
|
|
||||||
// Check if technique is allowed for this character
|
|
||||||
// if (!game.user.isGM && !this.actor.system.techniques[itemData.system.technique_type]) {
|
|
||||||
// ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Verify cost
|
|
||||||
itemData.system.xp_cost =
|
|
||||||
itemData.system.xp_cost > 0 ? itemData.system.xp_cost : CONFIG.l5r5e.xp.techniqueCost;
|
|
||||||
itemData.system.xp_used = itemData.system.xp_cost;
|
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Modify the bought at rank to the current actor rank
|
// Can add the item - Foundry override cause props
|
||||||
if (itemData.system.bought_at_rank !== undefined && this.actor.system.identity?.school_rank) {
|
const allowed = Hooks.call("dropActorSheetData", this.actor, this, item);
|
||||||
itemData.system.bought_at_rank = this.actor.system.identity.school_rank;
|
if (allowed === false) {
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Finally create the embed
|
let itemData = item.toObject(true);
|
||||||
return this.actor.createEmbeddedDocuments("Item", [itemData]);
|
|
||||||
|
// Item subtype specific
|
||||||
|
switch (itemData.type) {
|
||||||
|
case "army_cohort":
|
||||||
|
case "army_fortification":
|
||||||
|
console.warn("L5R5E | BCS | Army items are not allowed", item?.type, item);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case "advancement":
|
||||||
|
// Specific advancements, add x to selected ring/skill
|
||||||
|
await this.actor.addBonus(item);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "title":
|
||||||
|
// Generate new Ids for the embed items
|
||||||
|
await item.generateNewIdsForAllEmbedItems();
|
||||||
|
|
||||||
|
// Add embed advancements bonus
|
||||||
|
for (let [embedId, embedItem] of item.system.items) {
|
||||||
|
if (embedItem.type === "advancement") {
|
||||||
|
await this.actor.addBonus(embedItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// refresh data
|
||||||
|
itemData = item.toObject(true);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "skill":
|
||||||
|
itemData.system.rank = 0;
|
||||||
|
itemData.system.modifier = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "technique":
|
||||||
|
// School_ability and mastery_ability, allow only 1 per type
|
||||||
|
if (CONFIG.l5r5e.techniques.get(itemData.system.technique_type)?.type === "school") {
|
||||||
|
if (
|
||||||
|
Array.from(this.actor.items).some((e) => {
|
||||||
|
return e.type === "technique" && e.system.technique_type === itemData.system.technique_type;
|
||||||
|
})
|
||||||
|
) {
|
||||||
|
ui.notifications.info(game.i18n.localize("l5r5e.techniques.only_one"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// No cost for schools
|
||||||
|
itemData.system.xp_cost = 0;
|
||||||
|
itemData.system.xp_used = 0;
|
||||||
|
itemData.system.in_curriculum = true;
|
||||||
|
} else {
|
||||||
|
// Check if technique is allowed for this character
|
||||||
|
// if (!game.user.isGM && !this.actor.system.techniques[itemData.system.technique_type]) {
|
||||||
|
// ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Verify cost
|
||||||
|
itemData.system.xp_cost =
|
||||||
|
itemData.system.xp_cost > 0 ? itemData.system.xp_cost : CONFIG.l5r5e.xp.techniqueCost;
|
||||||
|
itemData.system.xp_used = itemData.system.xp_cost;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Modify the bought at rank to the current actor rank
|
||||||
|
if (itemData.system.bought_at_rank !== undefined && this.actor.system.identity?.school_rank) {
|
||||||
|
itemData.system.bought_at_rank = this.actor.system.identity.school_rank;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Finally create the embed
|
||||||
|
return this.actor.createEmbeddedDocuments("Item", [itemData]);
|
||||||
|
|
||||||
|
} catch (ex) {
|
||||||
|
console.warn("L5R5E |", ex.message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** @inheritdoc */
|
||||||
@@ -354,7 +364,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
|
|
||||||
const created = await this.actor.createEmbeddedDocuments("Item", [
|
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,
|
type: type,
|
||||||
img: `${CONFIG.l5r5e.paths.assets}icons/items/${type}.svg`,
|
img: `${CONFIG.l5r5e.paths.assets}icons/items/${type}.svg`,
|
||||||
},
|
},
|
||||||
@@ -556,7 +566,7 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
console.warn("L5R5E | Unsupported type", type);
|
console.warn("L5R5E | BCS | Unsupported type", type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ export class BaseSheetL5r5e extends ActorSheet {
|
|||||||
|
|
||||||
const created = await this.actor.createEmbeddedDocuments("Item", [
|
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,
|
type: type,
|
||||||
img: `${CONFIG.l5r5e.paths.assets}icons/items/${type}.svg`,
|
img: `${CONFIG.l5r5e.paths.assets}icons/items/${type}.svg`,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ export class CharacterGeneratorDialog extends FormApplication {
|
|||||||
}));
|
}));
|
||||||
return {
|
return {
|
||||||
...(await super.getData(options)),
|
...(await super.getData(options)),
|
||||||
isNpc: this.actor.type === "npc",
|
isNpc: this.actor.isNpc,
|
||||||
clanList: [{ id: "random", label: game.i18n.localize("l5r5e.global.random") }, ...clans],
|
clanList: [{ id: "random", label: game.i18n.localize("l5r5e.global.random") }, ...clans],
|
||||||
genderList: [
|
genderList: [
|
||||||
{ id: "random", label: game.i18n.localize("l5r5e.global.random") },
|
{ id: "random", label: game.i18n.localize("l5r5e.global.random") },
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export class CharacterGenerator {
|
|||||||
static async _getItemFromPack(packName, id = null) {
|
static async _getItemFromPack(packName, id = null) {
|
||||||
const comp = await game.packs.get(packName);
|
const comp = await game.packs.get(packName);
|
||||||
if (!comp) {
|
if (!comp) {
|
||||||
console.log(`L5R5E | Pack not found[${packName}]`);
|
console.log(`L5R5E | CG | Pack not found[${packName}]`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let document;
|
let document;
|
||||||
@@ -292,7 +292,7 @@ export class CharacterGenerator {
|
|||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
const actorDatas = actor.system;
|
const actorDatas = actor.system;
|
||||||
const isNpc = actor.type === "npc";
|
const isNpc = actor.isNpc;
|
||||||
|
|
||||||
// Need to set some required values
|
// Need to set some required values
|
||||||
this.data.age = actorDatas.identity.age || CharacterGenerator.genAge(this.data.avgRingsValue);
|
this.data.age = actorDatas.identity.age || CharacterGenerator.genAge(this.data.avgRingsValue);
|
||||||
|
|||||||
@@ -47,8 +47,11 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
// Min rank = 1
|
// Min rank = 1
|
||||||
this.actor.system.identity.school_rank = Math.max(1, this.actor.system.identity.school_rank);
|
this.actor.system.identity.school_rank = Math.max(1, this.actor.system.identity.school_rank);
|
||||||
|
|
||||||
|
// Split Skills
|
||||||
|
sheetData.data.skillCategories = game.l5r5e.HelpersL5r5e.splitSkillByCategory(sheetData.items);
|
||||||
|
|
||||||
// Split Money
|
// Split Money
|
||||||
sheetData.data.system.money = this._zeniToMoney(this.actor.system.zeni);
|
sheetData.data.money = this._zeniToMoney(this.actor.system.zeni);
|
||||||
|
|
||||||
// Split school advancements by rank, and calculate xp spent and add it to total
|
// Split school advancements by rank, and calculate xp spent and add it to total
|
||||||
this._prepareSchoolAdvancement(sheetData);
|
this._prepareSchoolAdvancement(sheetData);
|
||||||
@@ -180,6 +183,12 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
* @param formData
|
* @param formData
|
||||||
*/
|
*/
|
||||||
_updateObject(event, formData) {
|
_updateObject(event, formData) {
|
||||||
|
// Update items ranks
|
||||||
|
const formDataObj = foundry.utils.expandObject(formData);
|
||||||
|
if (formDataObj.skillsValues) {
|
||||||
|
this._updateItemsRank(foundry.utils.expandObject(formDataObj.skillsValues));
|
||||||
|
}
|
||||||
|
|
||||||
// Clan tag trim if autocomplete in school name
|
// Clan tag trim if autocomplete in school name
|
||||||
if (
|
if (
|
||||||
formData["autoCompleteListName"] === "system.identity.school" &&
|
formData["autoCompleteListName"] === "system.identity.school" &&
|
||||||
@@ -194,16 +203,12 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Store money in Zeni
|
// Store money in Zeni
|
||||||
if (formData["system.money.koku"] || formData["system.money.bu"] || formData["system.money.zeni"]) {
|
if (formData["money.koku"] || formData["money.bu"] || formData["money.zeni"]) {
|
||||||
formData["system.zeni"] = this._moneyToZeni(
|
formData["system.zeni"] = this._moneyToZeni(
|
||||||
formData["system.money.koku"] || 0,
|
formData["money.koku"] || 0,
|
||||||
formData["system.money.bu"] || 0,
|
formData["money.bu"] || 0,
|
||||||
formData["system.money.zeni"] || 0
|
formData["money.zeni"] || 0
|
||||||
);
|
);
|
||||||
// Remove fake money object
|
|
||||||
delete formData["system.money.koku"];
|
|
||||||
delete formData["system.money.bu"];
|
|
||||||
delete formData["system.money.zeni"];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save computed values
|
// Save computed values
|
||||||
@@ -219,6 +224,20 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
return super._updateObject(event, formData);
|
return super._updateObject(event, formData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update embedded items ranks
|
||||||
|
* @param {Object<String:String>} itemsValues items new values "ids: rank"
|
||||||
|
*/
|
||||||
|
_updateItemsRank(itemsValues) {
|
||||||
|
Object.entries(itemsValues).forEach(([key, rank]) => {
|
||||||
|
const item = this.actor.items.get(key);
|
||||||
|
if (!item || item.system.rank === rank) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
item.update({ "system.rank": rank });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert a sum in Zeni to Zeni, Bu and Koku
|
* Convert a sum in Zeni to Zeni, Bu and Koku
|
||||||
* @param {number} zeni
|
* @param {number} zeni
|
||||||
|
|||||||
@@ -104,19 +104,19 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
new DragDrop({
|
new DragDrop({
|
||||||
dragSelector: ".item",
|
dragSelector: ".item",
|
||||||
dropSelector: ".items",
|
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") },
|
callbacks: { dragstart: this._onDragStart.bind(this), drop: this._onDropItem.bind(this, "item") },
|
||||||
}),
|
}),
|
||||||
new DragDrop({
|
new DragDrop({
|
||||||
dragSelector: ".technique",
|
dragSelector: ".technique",
|
||||||
dropSelector: ".techniques",
|
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") },
|
callbacks: { dragstart: this._onDragStart.bind(this), drop: this._onDropItem.bind(this, "technique") },
|
||||||
}),
|
}),
|
||||||
new DragDrop({
|
new DragDrop({
|
||||||
dragSelector: ".peculiarity",
|
dragSelector: ".peculiarity",
|
||||||
dropSelector: ".peculiarities",
|
dropSelector: ".peculiarities",
|
||||||
permissions: { dragstart: this._canDragStart.bind(this), drop: this._canDragDrop.bind(this) },
|
permissions: { dragstart: this.isEditable, drop: this.isEditable },
|
||||||
callbacks: {
|
callbacks: {
|
||||||
dragstart: this._onDragStart.bind(this),
|
dragstart: this._onDragStart.bind(this),
|
||||||
drop: this._onDropItem.bind(this, "peculiarity"),
|
drop: this._onDropItem.bind(this, "peculiarity"),
|
||||||
@@ -125,7 +125,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
new DragDrop({
|
new DragDrop({
|
||||||
dragSelector: ".bond",
|
dragSelector: ".bond",
|
||||||
dropSelector: ".bonds",
|
dropSelector: ".bonds",
|
||||||
permissions: { dragstart: this._canDragStart.bind(this), drop: this._canDragDrop.bind(this) },
|
permissions: { dragstart: this.isEditable, drop: this.isEditable },
|
||||||
callbacks: {
|
callbacks: {
|
||||||
dragstart: this._onDragStart.bind(this),
|
dragstart: this._onDragStart.bind(this),
|
||||||
drop: this._onDropItem.bind(this, "bond"),
|
drop: this._onDropItem.bind(this, "bond"),
|
||||||
@@ -251,16 +251,16 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
if (!["item", "technique", "peculiarity", "bond"].includes(type)) {
|
if (!["item", "technique", "peculiarity", "bond"].includes(type)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const stepKey = $(event.target).data("step");
|
const stepKey = $(event.currentTarget).data("step");
|
||||||
if (!stepKey) {
|
if (!stepKey) {
|
||||||
console.warn("L5R5E | Event stepKey is undefined");
|
console.warn("L5R5E | 20Q | Event stepKey is undefined");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
// Get item
|
// Get item
|
||||||
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||||
if (item.documentName !== "Item" || !item) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -273,7 +273,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
(type !== "item" && item.type !== type) ||
|
(type !== "item" && item.type !== type) ||
|
||||||
(type === "item" && !["item", "weapon", "armor"].includes(item.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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,7 +286,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
if (stepKey === "step3.school_ability") {
|
if (stepKey === "step3.school_ability") {
|
||||||
if (item.system.technique_type !== "school_ability") {
|
if (item.system.technique_type !== "school_ability") {
|
||||||
console.warn(
|
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;
|
return;
|
||||||
}
|
}
|
||||||
@@ -301,37 +301,37 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
switch (stepKey) {
|
switch (stepKey) {
|
||||||
case "step9.distinction":
|
case "step9.distinction":
|
||||||
if (item.system.peculiarity_type !== "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;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "step10.adversity":
|
case "step10.adversity":
|
||||||
if (item.system.peculiarity_type !== "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;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "step11.passion":
|
case "step11.passion":
|
||||||
if (item.system.peculiarity_type !== "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;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "step12.anxiety":
|
case "step12.anxiety":
|
||||||
if (item.system.peculiarity_type !== "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;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "step13.advantage":
|
case "step13.advantage":
|
||||||
if (!["distinction", "passion"].includes(item.system.peculiarity_type)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "step13.disadvantage":
|
case "step13.disadvantage":
|
||||||
if (!["adversity", "anxiety"].includes(item.system.peculiarity_type)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -344,7 +344,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
|
|
||||||
this.submit();
|
this.submit();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn("L5R5E | ", err);
|
console.warn("L5R5E | 20Q | ", err);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -430,7 +430,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
}
|
}
|
||||||
const item = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({ id: id, type: "Item" });
|
const item = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({ id: id, type: "Item" });
|
||||||
if (!item) {
|
if (!item) {
|
||||||
console.warn(`L5R5E | Unknown item id[${id}]`);
|
console.warn(`L5R5E | 20Q | Unknown item id[${id}]`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
newStep.push(id);
|
newStep.push(id);
|
||||||
|
|||||||
@@ -24,15 +24,15 @@ export class CombatL5r5e extends Combat {
|
|||||||
|
|
||||||
// Get global modifiers
|
// Get global modifiers
|
||||||
const cfg = {
|
const cfg = {
|
||||||
difficulty: game.settings.get("l5r5e", "initiative-difficulty-value"),
|
difficulty: game.settings.get(CONFIG.l5r5e.namespace, "initiative-difficulty-value"),
|
||||||
difficultyHidden: game.settings.get("l5r5e", "initiative-difficulty-hidden"),
|
difficultyHidden: game.settings.get(CONFIG.l5r5e.namespace, "initiative-difficulty-hidden"),
|
||||||
};
|
};
|
||||||
|
|
||||||
// SkillId from DicePicker or global
|
// SkillId from DicePicker or global
|
||||||
const skillId = messageOptions.skillId
|
const skillId = messageOptions.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);
|
const skillCat = CONFIG.l5r5e.skills.get(skillId); // TODO refacto with skill items
|
||||||
|
|
||||||
// Get score for each combatant
|
// Get score for each combatant
|
||||||
const networkActors = [];
|
const networkActors = [];
|
||||||
@@ -199,6 +199,6 @@ export class CombatL5r5e extends Combat {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
static _getWeightByActorType(actor) {
|
static _getWeightByActorType(actor) {
|
||||||
return actor.type === "npc" ? (actor.type === "minion" ? 3 : 2) : 1;
|
return actor.isNpc ? (actor.type === "minion" ? 3 : 2) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
export const L5R5E = {
|
export const L5R5E = {
|
||||||
|
namespace: "l5r5e",
|
||||||
paths: {
|
paths: {
|
||||||
assets: `systems/l5r5e/assets/`,
|
assets: "systems/l5r5e/assets/",
|
||||||
templates: `systems/l5r5e/templates/`,
|
templates: "systems/l5r5e/templates/",
|
||||||
},
|
},
|
||||||
money: [50, 10],
|
money: [50, 10],
|
||||||
stances: ["earth", "air", "water", "fire", "void"],
|
stances: ["earth", "air", "water", "fire", "void"],
|
||||||
roles: ["artisan", "bushi", "courtier", "monk", "sage", "shinobi", "shugenja"],
|
roles: ["artisan", "bushi", "courtier", "monk", "sage", "shinobi", "shugenja"],
|
||||||
|
skillCategories: ["artisan", "martial", "scholar", "social", "trade"],
|
||||||
xp: {
|
xp: {
|
||||||
costPerRank: [0, 20, 24, 32, 44, 60],
|
costPerRank: [0, 20, 24, 32, 44, 60],
|
||||||
bondCostPerRank: [0, 3, 4, 6, 8, 10],
|
bondCostPerRank: [0, 3, 4, 6, 8, 10],
|
||||||
@@ -45,6 +47,7 @@ L5R5E.techniques.set("title_ability", { type: "title", displayInTypes: false });
|
|||||||
L5R5E.techniques.set("specificity", { type: "custom", displayInTypes: false });
|
L5R5E.techniques.set("specificity", { type: "custom", displayInTypes: false });
|
||||||
|
|
||||||
// *** SkillId - CategoryId ***
|
// *** SkillId - CategoryId ***
|
||||||
|
// Hardcoded skills are still required for compatibility (migration & olds worlds)
|
||||||
L5R5E.skills = new Map();
|
L5R5E.skills = new Map();
|
||||||
L5R5E.skills.set("aesthetics", "artisan");
|
L5R5E.skills.set("aesthetics", "artisan");
|
||||||
L5R5E.skills.set("composition", "artisan");
|
L5R5E.skills.set("composition", "artisan");
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
* ex: new game.l5r5e.DicePickerDialog({skillId: 'aesthetics', ringId: 'water', actor: game.user.character}).render(true);
|
* ex: new game.l5r5e.DicePickerDialog({skillId: 'aesthetics', ringId: 'water', actor: game.user.character}).render(true);
|
||||||
*
|
*
|
||||||
* Options :
|
* Options :
|
||||||
* actor {Actor} Any `Actor` object instance. Ex : `game.user.character`, `canvas.tokens.controlled[0].actor`
|
* actor {ActorL5r5e} Any `Actor` object instance. Ex : `game.user.character`, `canvas.tokens.controlled[0].actor`
|
||||||
* actorId {string} This is the `id` not the `uuid` of an actor. Ex : "AbYgKrNwWeAxa9jT"
|
* actorId {string} This is the `id` not the `uuid` of an actor. Ex : "AbYgKrNwWeAxa9jT"
|
||||||
* actorName {string} Careful this is case-sensitive. Ex : "Isawa Aki"
|
* actorName {string} Careful this is case-sensitive. Ex : "Isawa Aki"
|
||||||
* difficulty {number} `1` to `9`
|
* difficulty {number} `1` to `9`
|
||||||
@@ -176,7 +176,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
|
|
||||||
// Difficulty
|
// Difficulty
|
||||||
if (!options.difficulty || !this.parseDifficulty(options.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
|
// DifficultyHidden
|
||||||
@@ -201,7 +201,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
*/
|
*/
|
||||||
async refresh() {
|
async refresh() {
|
||||||
if (this._difficultyHiddenIsLock.option) {
|
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.difficultyHidden = false;
|
||||||
}
|
}
|
||||||
this.render(false);
|
this.render(false);
|
||||||
@@ -246,11 +246,8 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
if (!targetToken) {
|
if (!targetToken) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!(targetToken instanceof TokenDocument) || !targetToken.isOwner) {
|
if (!(targetToken instanceof TokenDocument)) {
|
||||||
console.warn(
|
console.warn("L5R5E | DP | target rejected : Not a valid TokenDocument instance", targetToken);
|
||||||
"L5R5E | DP | target rejected : Not a valid TokenDocument instance or permission was denied",
|
|
||||||
targetToken
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._target = targetToken;
|
this._target = targetToken;
|
||||||
@@ -274,19 +271,21 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
if (!skillsList) {
|
if (!skillsList) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.object.skill.list = this.parseSkillsList(skillsList);
|
this.parseSkillsList(skillsList).then((list) => {
|
||||||
if (this.object.skill.list.length > 0) {
|
this.object.skill.list = list;
|
||||||
// Set 1st skill
|
if (this.object.skill.list.length > 0) {
|
||||||
if (this.useCategory) {
|
// Set 1st skill
|
||||||
this.skillCatId = this.object.skill.list[0].id;
|
if (this.useCategory) {
|
||||||
} else {
|
this.skillCatId = this.object.skill.list[0].id;
|
||||||
this.skillId = this.object.skill.list[0].id;
|
} else {
|
||||||
|
this.skillId = this.object.skill.list[0].id;
|
||||||
|
}
|
||||||
|
// Remove the list if only one item
|
||||||
|
if (this.object.skill.list.length === 1) {
|
||||||
|
this.object.skill.list = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Remove the list if only one item
|
});
|
||||||
if (this.object.skill.list.length === 1) {
|
|
||||||
this.object.skill.list = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -306,7 +305,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
name: "",
|
name: "",
|
||||||
};
|
};
|
||||||
|
|
||||||
this.skillCatId = CONFIG.l5r5e.skills.get(skillId);
|
this.skillCatId = CONFIG.l5r5e.skills.get(skillId); // TODO refacto with skill items
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -363,7 +362,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
*/
|
*/
|
||||||
set difficultyHidden(isHidden) {
|
set difficultyHidden(isHidden) {
|
||||||
// If GM hide, then player choice don't matter
|
// 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) {
|
if (this._difficultyHiddenIsLock.gm || this._difficultyHiddenIsLock.option) {
|
||||||
isHidden = true;
|
isHidden = true;
|
||||||
}
|
}
|
||||||
@@ -385,7 +384,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
get useCategory() {
|
get useCategory() {
|
||||||
return !!this._actor && this._actor.type === "npc";
|
return !!this._actor && this._actor.isNpc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -833,10 +832,10 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
* NPC : shrink to category names
|
* NPC : shrink to category names
|
||||||
*
|
*
|
||||||
* @param {string} skillList
|
* @param {string} skillList
|
||||||
* @return {string[]}
|
* @returns {Promise<{id: *, label: string}[]>}
|
||||||
*/
|
*/
|
||||||
parseSkillsList(skillList) {
|
async parseSkillsList(skillList) {
|
||||||
const categories = game.l5r5e.HelpersL5r5e.getCategoriesSkillsList();
|
const categories = await game.l5r5e.HelpersL5r5e.getCategoriesSkillsList();
|
||||||
|
|
||||||
// Sanitize and uniques values
|
// Sanitize and uniques values
|
||||||
const unqSkillList = new Set();
|
const unqSkillList = new Set();
|
||||||
|
|||||||
@@ -196,21 +196,12 @@ export class RollnKeepDialog extends FormApplication {
|
|||||||
new DragDrop({
|
new DragDrop({
|
||||||
dragSelector: ".dice.draggable",
|
dragSelector: ".dice.draggable",
|
||||||
dropSelector: ".dropbox",
|
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) },
|
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.
|
* Callback actions which occur at the beginning of a drag start workflow.
|
||||||
* @param {DragEvent} event The originating DragEvent
|
* @param {DragEvent} event The originating DragEvent
|
||||||
@@ -544,7 +535,7 @@ export class RollnKeepDialog extends FormApplication {
|
|||||||
|
|
||||||
// Show DsN dice for the new roll
|
// Show DsN dice for the new roll
|
||||||
if (game.dice3d !== undefined) {
|
if (game.dice3d !== undefined) {
|
||||||
game.dice3d.showForRoll(
|
await game.dice3d.showForRoll(
|
||||||
roll,
|
roll,
|
||||||
game.user,
|
game.user,
|
||||||
true,
|
true,
|
||||||
@@ -683,7 +674,7 @@ export class RollnKeepDialog extends FormApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete old chat message related to this series
|
// 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) {
|
if (game.user.isFirstGM) {
|
||||||
const message = game.messages.get(msgOldId);
|
const message = game.messages.get(msgOldId);
|
||||||
if (message) {
|
if (message) {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export class GmMonitor extends FormApplication {
|
|||||||
buttons.unshift({
|
buttons.unshift({
|
||||||
label: game.i18n.localize("l5r5e.gm.monitor.switch_view"),
|
label: game.i18n.localize("l5r5e.gm.monitor.switch_view"),
|
||||||
class: "switch-view",
|
class: "switch-view",
|
||||||
icon: "fas fa-users",
|
icon: "fas fa-repeat",
|
||||||
onclick: () =>
|
onclick: () =>
|
||||||
game.l5r5e.HelpersL5r5e.debounce(
|
game.l5r5e.HelpersL5r5e.debounce(
|
||||||
"SwitchView-" + this.object.id,
|
"SwitchView-" + this.object.id,
|
||||||
@@ -50,7 +50,21 @@ export class GmMonitor extends FormApplication {
|
|||||||
this.object.view = this.object.view === "armies" ? "characters" : "armies";
|
this.object.view = this.object.view === "armies" ? "characters" : "armies";
|
||||||
this.render(false);
|
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
|
true
|
||||||
)(),
|
)(),
|
||||||
});
|
});
|
||||||
@@ -84,14 +98,22 @@ export class GmMonitor extends FormApplication {
|
|||||||
*/
|
*/
|
||||||
_initialize() {
|
_initialize() {
|
||||||
let actors;
|
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 {
|
} else {
|
||||||
// If empty add pc with owner
|
// If empty add pc with owner
|
||||||
actors = game.actors.filter((actor) => actor.type === "character" && actor.hasPlayerOwnerActive);
|
actors = game.actors.filter((actor) => actor.isCharacter && actor.hasPlayerOwnerActive);
|
||||||
this._saveActorsIds();
|
this._saveActorsIds();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,6 +125,27 @@ export class GmMonitor extends FormApplication {
|
|||||||
this.object.actors = actors;
|
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
|
* Prevent non GM to render this windows
|
||||||
* @override
|
* @override
|
||||||
@@ -161,11 +204,11 @@ export class GmMonitor extends FormApplication {
|
|||||||
return $(event.currentTarget).data("text");
|
return $(event.currentTarget).data("text");
|
||||||
}
|
}
|
||||||
|
|
||||||
const id = $(event.currentTarget).data("actor-id");
|
const uuid = $(event.currentTarget).data("actor-uuid");
|
||||||
if (!id) {
|
if (!uuid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const actor = this.object.actors.find((e) => e.id === id);
|
const actor = this.object.actors.find((a) => a.uuid === uuid);
|
||||||
if (!actor) {
|
if (!actor) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -201,11 +244,14 @@ export class GmMonitor extends FormApplication {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const actor = game.actors.find((a) => a.uuid === data.uuid);
|
const actor = fromUuidSync(data.uuid);
|
||||||
if (!actor) {
|
if (!actor) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Switch view to current character type
|
||||||
|
this.object.view = actor.isArmy ? "armies" : "characters";
|
||||||
|
|
||||||
this.object.actors.push(actor);
|
this.object.actors.push(actor);
|
||||||
|
|
||||||
return this._saveActorsIds();
|
return this._saveActorsIds();
|
||||||
@@ -218,9 +264,9 @@ export class GmMonitor extends FormApplication {
|
|||||||
*/
|
*/
|
||||||
async _saveActorsIds() {
|
async _saveActorsIds() {
|
||||||
return game.settings.set(
|
return game.settings.set(
|
||||||
"l5r5e",
|
CONFIG.l5r5e.namespace,
|
||||||
"gm-monitor-actors",
|
"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.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
const id = $(event.currentTarget).data("actor-id");
|
const uuid = $(event.currentTarget).data("actor-uuid");
|
||||||
if (!id) {
|
if (!uuid) {
|
||||||
return;
|
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();
|
return this._saveActorsIds();
|
||||||
}
|
}
|
||||||
@@ -256,17 +302,17 @@ export class GmMonitor extends FormApplication {
|
|||||||
|
|
||||||
const type = $(event.currentTarget).data("type");
|
const type = $(event.currentTarget).data("type");
|
||||||
if (!type) {
|
if (!type) {
|
||||||
console.warn("L5R5E | type not set", type);
|
console.warn("L5R5E | GMM | type not set", type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const id = $(event.currentTarget).data("actor-id");
|
const uuid = $(event.currentTarget).data("actor-uuid");
|
||||||
if (!id) {
|
if (!uuid) {
|
||||||
console.warn("L5R5E | actor id not set", type);
|
console.warn("L5R5E | GMM | actor uuid not set", type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const actor = game.actors.get(id);
|
const actor = fromUuidSync(uuid);
|
||||||
if (!actor) {
|
if (!actor) {
|
||||||
console.warn("L5R5E | Actor not found", type);
|
console.warn("L5R5E | GMM | Actor not found", type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -323,7 +369,7 @@ export class GmMonitor extends FormApplication {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
console.warn("L5R5E | Unsupported type", type);
|
console.warn("L5R5E | GMM | Unsupported type", type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!foundry.utils.isEmpty(updateData)) {
|
if (!foundry.utils.isEmpty(updateData)) {
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ export class GmToolbox extends FormApplication {
|
|||||||
*/
|
*/
|
||||||
_initialize() {
|
_initialize() {
|
||||||
this.object = {
|
this.object = {
|
||||||
difficulty: game.settings.get("l5r5e", "initiative-difficulty-value"),
|
difficulty: game.settings.get(CONFIG.l5r5e.namespace, "initiative-difficulty-value"),
|
||||||
difficultyHidden: game.settings.get("l5r5e", "initiative-difficulty-hidden"),
|
difficultyHidden: game.settings.get(CONFIG.l5r5e.namespace, "initiative-difficulty-hidden"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ export class GmToolbox extends FormApplication {
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
this.object.difficultyHidden = !this.object.difficultyHidden;
|
this.object.difficultyHidden = !this.object.difficultyHidden;
|
||||||
game.settings
|
game.settings
|
||||||
.set("l5r5e", "initiative-difficulty-hidden", this.object.difficultyHidden)
|
.set(CONFIG.l5r5e.namespace, "initiative-difficulty-hidden", this.object.difficultyHidden)
|
||||||
.then(() => this.submit());
|
.then(() => this.submit());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ export class GmToolbox extends FormApplication {
|
|||||||
this.object.difficulty = Math.max(0, this.object.difficulty - 1);
|
this.object.difficulty = Math.max(0, this.object.difficulty - 1);
|
||||||
break;
|
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
|
// Scene End, Sleep, Void Pts
|
||||||
|
|||||||
@@ -64,6 +64,12 @@ export const RegisterHandlebars = function () {
|
|||||||
return objects.join("");
|
return objects.join("");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Make the sum of values
|
||||||
|
Handlebars.registerHelper('sum', function(...nb) {
|
||||||
|
nb.pop(); // remove this function call
|
||||||
|
return nb.reduce((acc, n) => acc + Number(n ?? 0), 0);
|
||||||
|
});
|
||||||
|
|
||||||
// Add a setter
|
// Add a setter
|
||||||
Handlebars.registerHelper("setVar", function (varName, varValue, options) {
|
Handlebars.registerHelper("setVar", function (varName, varValue, options) {
|
||||||
options.data.root[varName] = varValue;
|
options.data.root[varName] = varValue;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
export class HelpersL5r5e {
|
export class HelpersL5r5e {
|
||||||
/**
|
/**
|
||||||
* Get Rings/Element for List / Select
|
* Get Rings/Element for List / Select
|
||||||
* @param {Actor|null} actor
|
* @param {ActorL5r5e|null} actor
|
||||||
* @return {{id: string, label: *, value}[]}
|
* @return {{id: string, label: *, value}[]}
|
||||||
*/
|
*/
|
||||||
static getRingsList(actor = null) {
|
static getRingsList(actor = null) {
|
||||||
@@ -15,12 +15,83 @@ export class HelpersL5r5e {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the default skill list for settings
|
||||||
|
* @returns {string[]}
|
||||||
|
*/
|
||||||
|
static getDefaultSkillsUuidFromPack() {
|
||||||
|
return Array.from({length: 24}, (_, i) => "Compendium.l5r5e.core-skills.L5RCoreSkl" + ('' +(i + 1)).padStart(6, "0"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the skill items list for this actor or from the default (settings)
|
||||||
|
* @param {ActorL5r5e} actor If actor provided, get the skills preferably from it
|
||||||
|
* @returns {Promise<Item[]>}
|
||||||
|
*/
|
||||||
|
static async getSkillsItemsList(actor = null) {
|
||||||
|
const skillList = [];
|
||||||
|
|
||||||
|
// If actor provided, get the skills preferably from it
|
||||||
|
if (actor instanceof Actor && actor?.isCharacter) {
|
||||||
|
actor.items
|
||||||
|
.filter(item => item.type === "skill")
|
||||||
|
.forEach(item => skillList.push(item))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the default list from settings
|
||||||
|
let defaultList = game.settings.get(CONFIG.l5r5e.namespace, "defaultSkillsList") || [];
|
||||||
|
|
||||||
|
// If empty, refill with default values
|
||||||
|
if (foundry.utils.isEmpty(defaultList)) {
|
||||||
|
defaultList = HelpersL5r5e.getDefaultSkillsUuidFromPack();
|
||||||
|
await game.settings.set(CONFIG.l5r5e.namespace, "defaultSkillsList", defaultList);
|
||||||
|
}
|
||||||
|
|
||||||
|
defaultList = await Promise.all(defaultList.map(async uuid => await fromUuid(uuid)));
|
||||||
|
|
||||||
|
|
||||||
|
// Merge the two list by name
|
||||||
|
const namesList = skillList.map(item => item.name);
|
||||||
|
defaultList.forEach(item => {
|
||||||
|
if (item && !namesList.includes(item.name)) {
|
||||||
|
skillList.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return skillList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Split Skills item by categories, and sort them alphabetically
|
||||||
|
* @param {Item[]} itemsList
|
||||||
|
* @return {{catName: Item[]}}
|
||||||
|
*/
|
||||||
|
static splitSkillByCategory(itemsList) {
|
||||||
|
const skill = CONFIG.l5r5e.skillCategories.reduce((acc,curr) => (acc[curr] = [], acc), {});
|
||||||
|
|
||||||
|
itemsList.forEach((item) => {
|
||||||
|
if (item.type === "skill") {
|
||||||
|
const cat = item.system.category ?? "artisan";
|
||||||
|
skill[cat].push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Sort Items by name
|
||||||
|
Object.values(skill).forEach(section => {
|
||||||
|
section.sort((a, b) => a.name.localeCompare(b.name));
|
||||||
|
});
|
||||||
|
|
||||||
|
return skill;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Skills for List / Select with groups
|
* Get Skills for List / Select with groups
|
||||||
* @param {boolean} useGroup
|
* @param {boolean} useGroup
|
||||||
* @return {{cat: any, id: any, label: *}[]}
|
* @return {{cat: any, id: any, label: *}[]}
|
||||||
*/
|
*/
|
||||||
static getSkillsList(useGroup = false) {
|
static getSkillsList(useGroup = false) {
|
||||||
|
console.warn('@deprecated hardcoded skills - helpers.getSkillsList() - Use getSkillsItemsList() + splitSkillByCategory() instead'); // TODO @deprecated hardcoded skills
|
||||||
|
|
||||||
if (!useGroup) {
|
if (!useGroup) {
|
||||||
return Array.from(CONFIG.l5r5e.skills).map(([id, cat]) => ({
|
return Array.from(CONFIG.l5r5e.skills).map(([id, cat]) => ({
|
||||||
id: id,
|
id: id,
|
||||||
@@ -45,17 +116,25 @@ export class HelpersL5r5e {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return Categories and Skill names in it
|
* Return Categories and Skill names in it
|
||||||
* @return {Map}
|
* @param {ActorL5r5e} actor If actor provided, get the skills preferably from it
|
||||||
|
* @returns {Promise<Map>}
|
||||||
*/
|
*/
|
||||||
static getCategoriesSkillsList() {
|
static async getCategoriesSkillsList(actor = null) {
|
||||||
return Array.from(CONFIG.l5r5e.skills).reduce((acc, [id, cat]) => {
|
const skillList = await HelpersL5r5e.getSkillsItemsList(actor);
|
||||||
|
const acc = new Map();
|
||||||
|
|
||||||
|
skillList.forEach((item) => {
|
||||||
|
const id = item.name;
|
||||||
|
const cat = item.system.category;
|
||||||
|
|
||||||
if (acc.has(cat)) {
|
if (acc.has(cat)) {
|
||||||
acc.set(cat, [...acc.get(cat), id]);
|
acc.set(cat, [...acc.get(cat), id]);
|
||||||
} else {
|
} else {
|
||||||
acc.set(cat, [id]);
|
acc.set(cat, [id]);
|
||||||
}
|
}
|
||||||
return acc;
|
});
|
||||||
}, new Map());
|
|
||||||
|
return acc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -195,7 +274,7 @@ export class HelpersL5r5e {
|
|||||||
document.prepareData();
|
document.prepareData();
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn("L5R5E | ", err);
|
console.warn("L5R5E | Helpers | ", err);
|
||||||
}
|
}
|
||||||
return document;
|
return document;
|
||||||
}
|
}
|
||||||
@@ -227,7 +306,7 @@ export class HelpersL5r5e {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
console.log(`L5R5E | createObjectFromCompendium - Unmanaged type ${type}`);
|
console.log(`L5R5E | Helpers | createObjectFromCompendium - Unmanaged type ${type}`);
|
||||||
break;
|
break;
|
||||||
} // swi
|
} // swi
|
||||||
|
|
||||||
@@ -251,7 +330,7 @@ export class HelpersL5r5e {
|
|||||||
if (gameProp) {
|
if (gameProp) {
|
||||||
return { id: gameProp.id, name: gameProp.name };
|
return { id: gameProp.id, name: gameProp.name };
|
||||||
} else {
|
} else {
|
||||||
console.warn(`L5R5E | Unknown property id[${property.id}]`);
|
console.warn(`L5R5E | Helpers | Unknown property id[${property.id}]`);
|
||||||
}
|
}
|
||||||
return property;
|
return property;
|
||||||
})
|
})
|
||||||
@@ -297,6 +376,8 @@ export class HelpersL5r5e {
|
|||||||
static getPackNameForCoreItem(documentId) {
|
static getPackNameForCoreItem(documentId) {
|
||||||
const core = new Map();
|
const core = new Map();
|
||||||
|
|
||||||
|
core.set("Skl", "l5r5e.core-skills");
|
||||||
|
|
||||||
core.set("Arm", "l5r5e.core-armors");
|
core.set("Arm", "l5r5e.core-armors");
|
||||||
core.set("Bon", "l5r5e.core-bonds");
|
core.set("Bon", "l5r5e.core-bonds");
|
||||||
core.set("Boo", "l5r5e.core-celestial-implement-boons");
|
core.set("Boo", "l5r5e.core-celestial-implement-boons");
|
||||||
@@ -442,8 +523,8 @@ export class HelpersL5r5e {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to common events from the sheet.
|
* Subscribe to common events from the sheet.
|
||||||
* @param {jQuery} html HTML content of the sheet.
|
* @param {jQuery} html HTML content of the sheet.
|
||||||
* @param {Actor} actor Actor Object
|
* @param {ActorL5r5e} actor Actor Object
|
||||||
*/
|
*/
|
||||||
static commonListeners(html, actor = null) {
|
static commonListeners(html, actor = null) {
|
||||||
// Toggle
|
// Toggle
|
||||||
@@ -567,12 +648,15 @@ export class HelpersL5r5e {
|
|||||||
static async getEmbedItemByEvent(event, actor) {
|
static async getEmbedItemByEvent(event, actor) {
|
||||||
const current = $(event.currentTarget);
|
const current = $(event.currentTarget);
|
||||||
const itemId = current.data("item-id");
|
const itemId = current.data("item-id");
|
||||||
|
const itemUuid = current.data("item-uuid");
|
||||||
const propertyId = current.data("property-id");
|
const propertyId = current.data("property-id");
|
||||||
const itemParentId = current.data("item-parent-id");
|
const itemParentId = current.data("item-parent-id");
|
||||||
|
|
||||||
let item;
|
let item;
|
||||||
if (propertyId) {
|
if (propertyId) {
|
||||||
item = await HelpersL5r5e.getObjectGameOrPack({ id: propertyId, type: "Item" });
|
item = await HelpersL5r5e.getObjectGameOrPack({ id: propertyId, type: "Item" });
|
||||||
|
} else if (itemUuid) {
|
||||||
|
item = await fromUuid(itemUuid);
|
||||||
} else if (itemParentId) {
|
} else if (itemParentId) {
|
||||||
// Embed Item
|
// Embed Item
|
||||||
let parentItem;
|
let parentItem;
|
||||||
@@ -739,21 +823,38 @@ export class HelpersL5r5e {
|
|||||||
* @return {Promise<{RollTableDraw}>} The drawn results
|
* @return {Promise<{RollTableDraw}>} The drawn results
|
||||||
*/
|
*/
|
||||||
static async drawManyFromPack(pack, tableName, retrieve = 5, opt = { rollMode: "selfroll" }) {
|
static async drawManyFromPack(pack, tableName, retrieve = 5, opt = { rollMode: "selfroll" }) {
|
||||||
const comp = await game.packs.get(pack);
|
const comp = game.packs.get(pack);
|
||||||
if (!comp) {
|
if (!comp) {
|
||||||
console.log(`L5R5E | Pack not found[${pack}]`);
|
console.log(`L5R5E | Helpers | Pack not found[${pack}]`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await comp.getDocuments();
|
await comp.getDocuments();
|
||||||
|
|
||||||
const table = await (/^[a-zA-Z0-9]{16}$/.test(tableName) ? comp.get(tableName) : comp.getName(tableName));
|
const table = await (/^[a-zA-Z0-9]{16}$/.test(tableName) ? comp.get(tableName) : comp.getName(tableName));
|
||||||
if (!table) {
|
if (!table) {
|
||||||
console.log(`L5R5E | Table not found[${tableName}]`, comp, table);
|
console.log(`L5R5E | Helpers | Table not found[${tableName}]`, comp, table);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return await table.drawMany(retrieve, opt);
|
return await table.drawMany(retrieve, opt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load all compendium data from his id
|
||||||
|
*
|
||||||
|
* @param {String} compendium
|
||||||
|
* @param {Function} filter
|
||||||
|
* @returns {Promise<Item[]>}
|
||||||
|
*/
|
||||||
|
static async loadCompendium(compendium, filter = item => true) {
|
||||||
|
const pack = game.packs.get(compendium);
|
||||||
|
if (!pack) {
|
||||||
|
console.log(`L5R5E | Pack not found[${compendium}]`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const data = (await pack.getDocuments()) ?? [];
|
||||||
|
return data.filter(filter);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the string simplified for comparaison
|
* Return the string simplified for comparaison
|
||||||
* @param {string} str
|
* @param {string} str
|
||||||
@@ -852,7 +953,7 @@ export class HelpersL5r5e {
|
|||||||
)}`;
|
)}`;
|
||||||
|
|
||||||
choiceDiv.addEventListener("click", (clickEvent) => {
|
choiceDiv.addEventListener("click", (clickEvent) => {
|
||||||
const selectedIndex = clickEvent.target.attributes["data-id"].value;
|
const selectedIndex = clickEvent.target.attributes["data-id"]?.value;
|
||||||
if (!list[selectedIndex]) {
|
if (!list[selectedIndex]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export default class HooksL5r5e {
|
|||||||
// Enable embed Babele compendiums only if custom compendium is not found or disabled
|
// Enable embed Babele compendiums only if custom compendium is not found or disabled
|
||||||
if (
|
if (
|
||||||
typeof Babele !== "undefined" &&
|
typeof Babele !== "undefined" &&
|
||||||
Babele.get().modules.every((module) => module.module !== "l5r5e-custom-compendiums")
|
Babele.get().modules.every((module) => module.module !== game.settings.get(CONFIG.l5r5e.namespace, "custom-compendium-name"))
|
||||||
) {
|
) {
|
||||||
Babele.get().setSystemTranslationsDir("babele"); // Since Babele v2.0.7
|
Babele.get().setSystemTranslationsDir("babele"); // Since Babele v2.0.7
|
||||||
}
|
}
|
||||||
@@ -28,6 +28,14 @@ export default class HooksL5r5e {
|
|||||||
game.l5r5e.migrations.migrateWorld({ force: false }).then();
|
game.l5r5e.migrations.migrateWorld({ force: false }).then();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prepare values are sometimes null
|
||||||
|
["character", "adversary", "minion"].forEach(preparedId => {
|
||||||
|
const prepVal = game.settings.get(CONFIG.l5r5e.namespace, `initiative-prepared-${preparedId}`);
|
||||||
|
if (prepVal === null || prepVal === "null") {
|
||||||
|
game.settings.set(CONFIG.l5r5e.namespace, `initiative-prepared-${preparedId}`, "actor");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// For some reasons, not always really ready, so wait a little
|
// For some reasons, not always really ready, so wait a little
|
||||||
await new Promise((r) => setTimeout(r, 2000));
|
await new Promise((r) => setTimeout(r, 2000));
|
||||||
|
|
||||||
@@ -95,14 +103,10 @@ export default class HooksL5r5e {
|
|||||||
case "settings":
|
case "settings":
|
||||||
// Add Changelog link
|
// Add Changelog link
|
||||||
html.find("#game-details .system").append(
|
html.find("#game-details .system").append(
|
||||||
`<p><a href="${game.system.changelog}" target="_blank">Changelog</a>` +
|
`<span><a href="${game.system.changelog}" target="_blank">Changelog</a>`
|
||||||
` <a href="${game.i18n.localize(
|
+ ` <a href="${game.i18n.localize("l5r5e.settings.wiki.link")}" target="_blank">${game.i18n.localize("l5r5e.settings.wiki.title")}</a>`
|
||||||
"l5r5e.settings.wiki.link"
|
+ ` <a href="${game.i18n.localize("l5r5e.settings.custom-compendiums.link")}" target="_blank">${game.i18n.localize("l5r5e.settings.custom-compendiums.title")}</a>`
|
||||||
)}" target="_blank">${game.i18n.localize("l5r5e.settings.wiki.title")}</a>` +
|
+ `</span>`
|
||||||
` <a href="${game.i18n.localize(
|
|
||||||
"l5r5e.settings.custom-compendiums.link"
|
|
||||||
)}" target="_blank">${game.i18n.localize("l5r5e.settings.custom-compendiums.title")}</a>` +
|
|
||||||
`</p>`
|
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -158,14 +162,14 @@ export default class HooksL5r5e {
|
|||||||
// *** Conf ***
|
// *** Conf ***
|
||||||
const encounterTypeList = Object.keys(CONFIG.l5r5e.initiativeSkills);
|
const encounterTypeList = Object.keys(CONFIG.l5r5e.initiativeSkills);
|
||||||
const prepared = {
|
const prepared = {
|
||||||
character: game.settings.get("l5r5e", "initiative-prepared-character"),
|
character: game.settings.get(CONFIG.l5r5e.namespace, "initiative-prepared-character"),
|
||||||
adversary: game.settings.get("l5r5e", "initiative-prepared-adversary"),
|
adversary: game.settings.get(CONFIG.l5r5e.namespace, "initiative-prepared-adversary"),
|
||||||
minion: game.settings.get("l5r5e", "initiative-prepared-minion"),
|
minion: game.settings.get(CONFIG.l5r5e.namespace, "initiative-prepared-minion"),
|
||||||
};
|
};
|
||||||
|
|
||||||
// *** Template ***
|
// *** Template ***
|
||||||
const tpl = await renderTemplate(`${CONFIG.l5r5e.paths.templates}gm/combat-tracker-bar.html`, {
|
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,
|
encounterTypeList,
|
||||||
prepared,
|
prepared,
|
||||||
});
|
});
|
||||||
@@ -186,7 +190,7 @@ export default class HooksL5r5e {
|
|||||||
if (!encounterTypeList.includes(encounter)) {
|
if (!encounterTypeList.includes(encounter)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
game.settings.set("l5r5e", "initiative-encounter", encounter);
|
game.settings.set(CONFIG.l5r5e.namespace, "initiative-encounter", encounter);
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find(".prepared-control").on("mousedown", (event) => {
|
html.find(".prepared-control").on("mousedown", (event) => {
|
||||||
@@ -202,7 +206,7 @@ export default class HooksL5r5e {
|
|||||||
true: rev ? "actor" : "false",
|
true: rev ? "actor" : "false",
|
||||||
actor: rev ? "false" : "true",
|
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]]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export class ItemL5r5e extends Item {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the linked Actor instance if any (current or embed)
|
* Return the linked Actor instance if any (current or embed)
|
||||||
* @return {Actor|null}
|
* @return {ActorL5r5e|null}
|
||||||
*/
|
*/
|
||||||
get actor() {
|
get actor() {
|
||||||
return super.actor || game.actors.get(this.system.parent_id?.actor_id) || null;
|
return super.actor || game.actors.get(this.system.parent_id?.actor_id) || null;
|
||||||
@@ -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.
|
* 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
|
* @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) {
|
getEmbeddedCollection(embeddedName) {
|
||||||
const collectionName = embeddedName === "Item" ? "items" : this.constructor.metadata.embedded[embeddedName];
|
if (embeddedName === "Item") {
|
||||||
if (!collectionName) {
|
return this.items;
|
||||||
throw new Error(
|
|
||||||
`${embeddedName} is not a valid embedded Document within the ${this.documentName} Document`
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return this[collectionName];
|
return super.getEmbeddedCollection(embeddedName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -61,7 +58,11 @@ export class ItemL5r5e extends Item {
|
|||||||
*/
|
*/
|
||||||
static async create(data, context = {}) {
|
static async create(data, context = {}) {
|
||||||
if (data.img === undefined) {
|
if (data.img === undefined) {
|
||||||
data.img = `${CONFIG.l5r5e.paths.assets}icons/items/${data.type}.svg`;
|
if (data.type === 'technique') {
|
||||||
|
data.img = `${CONFIG.l5r5e.paths.assets}icons/techs/kata.svg`;
|
||||||
|
} else {
|
||||||
|
data.img = `${CONFIG.l5r5e.paths.assets}icons/items/${data.type}.svg`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return super.create(data, context);
|
return super.create(data, context);
|
||||||
}
|
}
|
||||||
@@ -82,7 +83,7 @@ export class ItemL5r5e extends Item {
|
|||||||
// **** Embed Items, need to get the parents ****
|
// **** Embed Items, need to get the parents ****
|
||||||
const parentItem = this.getItemFromParentId();
|
const parentItem = this.getItemFromParentId();
|
||||||
if (!parentItem) {
|
if (!parentItem) {
|
||||||
console.warn(`L5R5E | Embed parentItem not found`);
|
console.warn(`L5R5E | Helpers | Embed parentItem not found`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,7 +199,7 @@ export class ItemL5r5e extends Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a Embed Item
|
* Add an Embed Item
|
||||||
* @param {ItemL5r5e} item Object to add
|
* @param {ItemL5r5e} item Object to add
|
||||||
* @param {boolean} save if we save in db or not (used internally)
|
* @param {boolean} save if we save in db or not (used internally)
|
||||||
* @param {boolean} newId if we change the id
|
* @param {boolean} newId if we change the id
|
||||||
@@ -238,7 +239,11 @@ export class ItemL5r5e extends Item {
|
|||||||
if (addBonusToActor) {
|
if (addBonusToActor) {
|
||||||
const actor = this.actor;
|
const actor = this.actor;
|
||||||
if (item instanceof Item && actor instanceof Actor) {
|
if (item instanceof Item && actor instanceof Actor) {
|
||||||
actor.addBonus(item);
|
try {
|
||||||
|
await actor.addBonus(item);
|
||||||
|
} catch (ex) {
|
||||||
|
console.warn("L5R5E |", ex.message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,7 +254,7 @@ export class ItemL5r5e extends Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update a Embed Item
|
* Update an Embed Item
|
||||||
* @param {ItemL5r5e} item Object to add
|
* @param {ItemL5r5e} item Object to add
|
||||||
* @param {boolean} save if we save in db or not (used internally)
|
* @param {boolean} save if we save in db or not (used internally)
|
||||||
* @return {Promise<string>}
|
* @return {Promise<string>}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
const sheetData = await super.getData(options);
|
const sheetData = await super.getData(options);
|
||||||
|
|
||||||
sheetData.data.subTypesList = AdvancementSheetL5r5e.types;
|
sheetData.data.subTypesList = AdvancementSheetL5r5e.types;
|
||||||
sheetData.data.skillsList = game.l5r5e.HelpersL5r5e.getSkillsList(true);
|
sheetData.data.skillsList = game.l5r5e.HelpersL5r5e.splitSkillByCategory(await game.l5r5e.HelpersL5r5e.getSkillsItemsList(this.actor));
|
||||||
|
|
||||||
return sheetData;
|
return sheetData;
|
||||||
}
|
}
|
||||||
@@ -82,33 +82,45 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
let name = this.object.name;
|
let name = this.object.name;
|
||||||
let img = this.object.img;
|
let img = this.object.img;
|
||||||
|
|
||||||
|
const getLocalItemByUuid = async (uuid) => {
|
||||||
|
const item = await fromUuid(uuid);
|
||||||
|
if (!item) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (item?.actor?._id === this.actor._id) {
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
return this.items.getName(item.name);
|
||||||
|
}
|
||||||
|
const skillItemNew = newChoice.skill ? (await getLocalItemByUuid(newChoice.skill)) : null;
|
||||||
|
const skillItemOld = oldChoice.skill ? (await getLocalItemByUuid(oldChoice.skill)) : null;
|
||||||
|
|
||||||
// Modify image to reflect choice
|
// Modify image to reflect choice
|
||||||
if (newChoice.ring) {
|
if (newChoice.ring) {
|
||||||
name = game.i18n.localize(`l5r5e.rings.${newChoice.ring}`) + "+1";
|
name = game.i18n.localize(`l5r5e.rings.${newChoice.ring}`) + "+1";
|
||||||
img = `systems/l5r5e/assets/icons/rings/${newChoice.ring}.svg`;
|
img = `systems/l5r5e/assets/icons/rings/${newChoice.ring}.svg`;
|
||||||
} else if (newChoice.skill) {
|
|
||||||
name =
|
} else if (newChoice.skill && skillItemNew) {
|
||||||
game.i18n.localize(`l5r5e.skills.${CONFIG.l5r5e.skills.get(newChoice.skill)}.${newChoice.skill}`) +
|
name = skillItemNew.name +"+1";
|
||||||
"+1";
|
|
||||||
img = `systems/l5r5e/assets/dices/default/skill_blank.svg`;
|
img = `systems/l5r5e/assets/dices/default/skill_blank.svg`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Object embed in actor ?
|
// Object embed in actor ?
|
||||||
const actor = this.document.actor;
|
const actor = this.document.actor;
|
||||||
if (actor) {
|
if (actor) {
|
||||||
|
if (newChoice.skill && !skillItemNew.actor) {
|
||||||
|
ui.notifications.warn(`Unable to find "${skillItemNew?.name}" on this actor`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const actorData = foundry.utils.duplicate(actor.system);
|
const actorData = foundry.utils.duplicate(actor.system);
|
||||||
let skillCatId = null;
|
|
||||||
|
|
||||||
// Old choices
|
// Old choices
|
||||||
if (oldChoice.ring) {
|
if (oldChoice.ring) {
|
||||||
actorData.rings[oldChoice.ring] = Math.max(1, actorData.rings[oldChoice.ring] - 1);
|
actorData.rings[oldChoice.ring] = Math.max(1, actorData.rings[oldChoice.ring] - 1);
|
||||||
}
|
}
|
||||||
if (oldChoice.skill) {
|
if (oldChoice.skill && skillItemOld) {
|
||||||
skillCatId = CONFIG.l5r5e.skills.get(oldChoice.skill);
|
await skillItemOld.update({ "system.rank": Math.max(0, skillItemOld.system.rank - 1) });
|
||||||
actorData.skills[skillCatId][oldChoice.skill] = Math.max(
|
|
||||||
0,
|
|
||||||
actorData.skills[skillCatId][oldChoice.skill] - 1
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// new choices
|
// new choices
|
||||||
@@ -119,15 +131,11 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
game.i18n.localize(`l5r5e.rings.${newChoice.ring}`) +
|
game.i18n.localize(`l5r5e.rings.${newChoice.ring}`) +
|
||||||
` +1 (${actorData.rings[newChoice.ring] - 1} -> ${actorData.rings[newChoice.ring]})`;
|
` +1 (${actorData.rings[newChoice.ring] - 1} -> ${actorData.rings[newChoice.ring]})`;
|
||||||
}
|
}
|
||||||
if (newChoice.skill) {
|
if (newChoice.skill && skillItemNew) {
|
||||||
skillCatId = CONFIG.l5r5e.skills.get(newChoice.skill);
|
const newRank = Math.min(9, skillItemNew.system.rank + 1);
|
||||||
actorData.skills[skillCatId][newChoice.skill] = actorData.skills[skillCatId][newChoice.skill] + 1;
|
await skillItemNew.update({ "system.rank": newRank });
|
||||||
xp_used = actorData.skills[skillCatId][newChoice.skill] * CONFIG.l5r5e.xp.skillCostMultiplier;
|
xp_used = newRank * CONFIG.l5r5e.xp.skillCostMultiplier;
|
||||||
name =
|
name = `${skillItemNew.name} +1 (${newRank - 1} -> ${newRank})`;
|
||||||
game.i18n.localize(`l5r5e.skills.${skillCatId}.${newChoice.skill}`) +
|
|
||||||
` +1 (${actorData.skills[skillCatId][newChoice.skill] - 1} -> ${
|
|
||||||
actorData.skills[skillCatId][newChoice.skill]
|
|
||||||
})`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Actor
|
// Update Actor
|
||||||
@@ -141,7 +149,7 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
name: name,
|
name: name,
|
||||||
img: img,
|
img: img,
|
||||||
system: {
|
system: {
|
||||||
xp_used: xp_used,
|
xp_used,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ export class ArmyCohortSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
*/
|
*/
|
||||||
async _updateLinkedActorData(actor) {
|
async _updateLinkedActorData(actor) {
|
||||||
if (!actor || actor.documentName !== "Actor" || !actor.isCharacterType) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ export class BaseItemSheetL5r5e extends ItemSheet {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
const itemId = $(event.currentTarget).data("item-id");
|
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 });
|
props.push({ id: gameProp.id, name: gameProp.name });
|
||||||
} else {
|
} else {
|
||||||
// Item not found
|
// 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({
|
sheetData.data.propertiesList.push({
|
||||||
id: property.id,
|
id: property.id,
|
||||||
name: property.name,
|
name: property.name,
|
||||||
@@ -87,11 +87,13 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
|
|||||||
* @return {DragDrop[]} An array of DragDrop handlers
|
* @return {DragDrop[]} An array of DragDrop handlers
|
||||||
*/
|
*/
|
||||||
_createDragDropHandlers() {
|
_createDragDropHandlers() {
|
||||||
|
// "this.isEditable" fail for tooltips (undefined "this.document")
|
||||||
|
const isEditable = this.options.editable;
|
||||||
return [
|
return [
|
||||||
new DragDrop({
|
new DragDrop({
|
||||||
dragSelector: ".property",
|
dragSelector: ".property",
|
||||||
dropSelector: null,
|
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) },
|
callbacks: { dragstart: this._onDragStart.bind(this), drop: this._onDrop.bind(this) },
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
|
|||||||
28
system/scripts/items/skill-sheet.js
Normal file
28
system/scripts/items/skill-sheet.js
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
import { ItemSheetL5r5e } from "./item-sheet.js";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends {ItemSheet}
|
||||||
|
*/
|
||||||
|
export class SkillSheetL5r5e extends ItemSheetL5r5e {
|
||||||
|
/** @override */
|
||||||
|
static get defaultOptions() {
|
||||||
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
|
classes: ["l5r5e", "sheet", "skill"],
|
||||||
|
template: CONFIG.l5r5e.paths.templates + "items/skill/skill-sheet.html",
|
||||||
|
width: 520,
|
||||||
|
height: 480,
|
||||||
|
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {Object|Promise}
|
||||||
|
*/
|
||||||
|
async getData(options = {}) {
|
||||||
|
const sheetData = await super.getData(options);
|
||||||
|
|
||||||
|
sheetData.data.SkillCategoriesList = CONFIG.l5r5e.skillCategories;
|
||||||
|
|
||||||
|
return sheetData;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,7 +21,7 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
|
|
||||||
// List all available techniques type
|
// List all available techniques type
|
||||||
const types = ["core", "school", "title"];
|
const types = ["core", "school", "title"];
|
||||||
if (game.settings.get("l5r5e", "techniques-customs")) {
|
if (game.settings.get(CONFIG.l5r5e.namespace, "techniques-customs")) {
|
||||||
types.push("custom");
|
types.push("custom");
|
||||||
}
|
}
|
||||||
sheetData.data.techniquesList = game.l5r5e.HelpersL5r5e.getTechniquesList({ types });
|
sheetData.data.techniquesList = game.l5r5e.HelpersL5r5e.getTechniquesList({ types });
|
||||||
@@ -29,7 +29,7 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
// Sanitize Difficulty and Skill list
|
// Sanitize Difficulty and Skill list
|
||||||
sheetData.data.system.difficulty = TechniqueSheetL5r5e.formatDifficulty(sheetData.data.system.difficulty);
|
sheetData.data.system.difficulty = TechniqueSheetL5r5e.formatDifficulty(sheetData.data.system.difficulty);
|
||||||
sheetData.data.system.skill = TechniqueSheetL5r5e.translateSkillsList(
|
sheetData.data.system.skill = TechniqueSheetL5r5e.translateSkillsList(
|
||||||
TechniqueSheetL5r5e.formatSkillList(sheetData.data.system.skill.split(",")),
|
await TechniqueSheetL5r5e.formatSkillList(sheetData.data.system.skill.split(",")),
|
||||||
false
|
false
|
||||||
).join(", ");
|
).join(", ");
|
||||||
|
|
||||||
@@ -54,9 +54,9 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
|
|
||||||
// Sanitize Difficulty and Skill list
|
// Sanitize Difficulty and Skill list
|
||||||
formData["system.difficulty"] = TechniqueSheetL5r5e.formatDifficulty(formData["system.difficulty"]);
|
formData["system.difficulty"] = TechniqueSheetL5r5e.formatDifficulty(formData["system.difficulty"]);
|
||||||
formData["system.skill"] = TechniqueSheetL5r5e.formatSkillList(
|
formData["system.skill"] = (await TechniqueSheetL5r5e.formatSkillList(
|
||||||
TechniqueSheetL5r5e.translateSkillsList(formData["system.skill"].split(","), true)
|
TechniqueSheetL5r5e.translateSkillsList(formData["system.skill"].split(","), true)
|
||||||
).join(",");
|
)).join(",");
|
||||||
|
|
||||||
return super._updateObject(event, formData);
|
return super._updateObject(event, formData);
|
||||||
}
|
}
|
||||||
@@ -143,13 +143,13 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
/**
|
/**
|
||||||
* Sanitize the technique skill list
|
* Sanitize the technique skill list
|
||||||
* @param {string[]} skillList
|
* @param {string[]} skillList
|
||||||
* @return {string[]}
|
* @returns {Promise<string|*[]>}
|
||||||
*/
|
*/
|
||||||
static formatSkillList(skillList) {
|
static async formatSkillList(skillList) {
|
||||||
if (!skillList) {
|
if (!skillList) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
const categories = game.l5r5e.HelpersL5r5e.getCategoriesSkillsList();
|
const categories = await game.l5r5e.HelpersL5r5e.getCategoriesSkillsList(this.actor);
|
||||||
|
|
||||||
// List categories
|
// List categories
|
||||||
const unqCatList = new Set();
|
const unqCatList = new Set();
|
||||||
@@ -160,18 +160,6 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// List skill (not include in cat)
|
return [...unqCatList];
|
||||||
const unqSkillList = new Set();
|
|
||||||
skillList.forEach((s) => {
|
|
||||||
s = s?.trim();
|
|
||||||
if (!!s && CONFIG.l5r5e.skills.has(s)) {
|
|
||||||
const cat = CONFIG.l5r5e.skills.get(s);
|
|
||||||
if (!unqCatList.has(cat)) {
|
|
||||||
unqSkillList.add(s);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return [...unqCatList, ...unqSkillList];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ export class TitleSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
// Create the new Item
|
// Create the new Item
|
||||||
const itemId = await this.document.addEmbedItem(
|
const itemId = await this.document.addEmbedItem(
|
||||||
new game.l5r5e.ItemL5r5e({
|
new game.l5r5e.ItemL5r5e({
|
||||||
name: game.i18n.localize(`ITEM.Type${selectedType.capitalize()}`),
|
name: game.i18n.localize(`TYPES.Item.${selectedType.toLowerCase()}`),
|
||||||
type: selectedType,
|
type: selectedType,
|
||||||
img: `${CONFIG.l5r5e.paths.assets}icons/items/${selectedType}.svg`,
|
img: `${CONFIG.l5r5e.paths.assets}icons/items/${selectedType}.svg`,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ export class WeaponSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
|
|
||||||
async getData(options = {}) {
|
async getData(options = {}) {
|
||||||
const sheetData = await super.getData(options);
|
const sheetData = await super.getData(options);
|
||||||
|
const categories = await game.l5r5e.HelpersL5r5e.getCategoriesSkillsList(this.actor);
|
||||||
|
console.log(categories);
|
||||||
|
|
||||||
// Martial skills only
|
// Martial skills only
|
||||||
sheetData.data.skills = Array.from(CONFIG.l5r5e.skills)
|
sheetData.data.skills = Array.from(CONFIG.l5r5e.skills)
|
||||||
|
|||||||
@@ -3,16 +3,16 @@
|
|||||||
* @extends {JournalSheet}
|
* @extends {JournalSheet}
|
||||||
*/
|
*/
|
||||||
export class BaseJournalSheetL5r5e extends JournalSheet {
|
export class BaseJournalSheetL5r5e extends JournalSheet {
|
||||||
// /** @override */
|
/** @override */
|
||||||
// static get defaultOptions() {
|
static get defaultOptions() {
|
||||||
// return foundry.utils.mergeObject(super.defaultOptions, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
// classes: ["l5r5e", "sheet", "journal"], // app window-app sheet journal-sheet
|
classes: ["sheet", "journal-sheet", "journal-entry", "l5r5e", "sheet", "journal"], // sheet journal-sheet journal-entry
|
||||||
// template: CONFIG.l5r5e.paths.templates + "journal/journal-sheet.html",
|
// template: CONFIG.l5r5e.paths.templates + "journal/journal-sheet.html",
|
||||||
// width: 520,
|
// width: 520,
|
||||||
// height: 480,
|
// height: 480,
|
||||||
// tabs: [{ navSelector: ".journal-tabs", contentSelector: ".journal-body", initial: "description" }],
|
// tabs: [{ navSelector: ".journal-tabs", contentSelector: ".journal-body", initial: "description" }],
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the SendToChat button on top of sheet
|
* Add the SendToChat button on top of sheet
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import { CombatL5r5e } from "./combat.js";
|
|||||||
// Items
|
// Items
|
||||||
import { ItemL5r5e } from "./item.js";
|
import { ItemL5r5e } from "./item.js";
|
||||||
import { ItemSheetL5r5e } from "./items/item-sheet.js";
|
import { ItemSheetL5r5e } from "./items/item-sheet.js";
|
||||||
|
import { SkillSheetL5r5e } from "./items/skill-sheet.js";
|
||||||
import { ArmorSheetL5r5e } from "./items/armor-sheet.js";
|
import { ArmorSheetL5r5e } from "./items/armor-sheet.js";
|
||||||
import { WeaponSheetL5r5e } from "./items/weapon-sheet.js";
|
import { WeaponSheetL5r5e } from "./items/weapon-sheet.js";
|
||||||
import { TechniqueSheetL5r5e } from "./items/technique-sheet.js";
|
import { TechniqueSheetL5r5e } from "./items/technique-sheet.js";
|
||||||
@@ -43,6 +44,7 @@ import { MigrationL5r5e } from "./migration.js";
|
|||||||
import { GmToolbox } from "./gm/gm-toolbox.js";
|
import { GmToolbox } from "./gm/gm-toolbox.js";
|
||||||
import { GmMonitor } from "./gm/gm-monitor.js";
|
import { GmMonitor } from "./gm/gm-monitor.js";
|
||||||
import { Storage } from "./storage.js";
|
import { Storage } from "./storage.js";
|
||||||
|
import { DefaultSkillsDialogL5r5e } from "./settings/default-skills-dialog.js";
|
||||||
|
|
||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
/* Initialize system */
|
/* Initialize system */
|
||||||
@@ -92,6 +94,7 @@ Hooks.once("init", async () => {
|
|||||||
GmToolbox,
|
GmToolbox,
|
||||||
GmMonitor,
|
GmMonitor,
|
||||||
HelpDialog,
|
HelpDialog,
|
||||||
|
DefaultSkillsDialogL5r5e,
|
||||||
storage: new Storage(),
|
storage: new Storage(),
|
||||||
sockets: new SocketHandlerL5r5e(),
|
sockets: new SocketHandlerL5r5e(),
|
||||||
migrations: MigrationL5r5e,
|
migrations: MigrationL5r5e,
|
||||||
@@ -109,94 +112,99 @@ Hooks.once("init", async () => {
|
|||||||
// ***** Register custom sheets *****
|
// ***** Register custom sheets *****
|
||||||
// Actors
|
// Actors
|
||||||
Actors.unregisterSheet("core", ActorSheet);
|
Actors.unregisterSheet("core", ActorSheet);
|
||||||
Actors.registerSheet("l5r5e", CharacterSheetL5r5e, {
|
Actors.registerSheet(L5R5E.namespace, CharacterSheetL5r5e, {
|
||||||
types: ["character"],
|
types: ["character"],
|
||||||
label: "ACTOR.TypeCharacter",
|
label: "TYPES.Actor.character",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
Actors.registerSheet("l5r5e", NpcSheetL5r5e, {
|
Actors.registerSheet(L5R5E.namespace, NpcSheetL5r5e, {
|
||||||
types: ["npc"],
|
types: ["npc"],
|
||||||
label: "ACTOR.TypeNpc",
|
label: "TYPES.Actor.npc",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
Actors.registerSheet("l5r5e", ArmySheetL5r5e, {
|
Actors.registerSheet(L5R5E.namespace, ArmySheetL5r5e, {
|
||||||
types: ["army"],
|
types: ["army"],
|
||||||
label: "ACTOR.TypeArmy",
|
label: "TYPES.Actor.army",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Items
|
// Items
|
||||||
Items.unregisterSheet("core", ItemSheet);
|
Items.unregisterSheet("core", ItemSheet);
|
||||||
Items.registerSheet("l5r5e", ItemSheetL5r5e, {
|
Items.registerSheet(L5R5E.namespace, ItemSheetL5r5e, {
|
||||||
types: ["item"],
|
types: ["item"],
|
||||||
label: "ITEM.TypeItem",
|
label: "TYPES.Item.item",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
Items.registerSheet("l5r5e", ArmorSheetL5r5e, {
|
Items.registerSheet(L5R5E.namespace, SkillSheetL5r5e, {
|
||||||
|
types: ["skill"],
|
||||||
|
label: "ITEM.TypeSkill",
|
||||||
|
makeDefault: true,
|
||||||
|
});
|
||||||
|
Items.registerSheet(L5R5E.namespace, ArmorSheetL5r5e, {
|
||||||
types: ["armor"],
|
types: ["armor"],
|
||||||
label: "ITEM.TypeArmor",
|
label: "TYPES.Item.armor",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
Items.registerSheet("l5r5e", WeaponSheetL5r5e, {
|
Items.registerSheet(L5R5E.namespace, WeaponSheetL5r5e, {
|
||||||
types: ["weapon"],
|
types: ["weapon"],
|
||||||
label: "ITEM.TypeWeapon",
|
label: "TYPES.Item.weapon",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
Items.registerSheet("l5r5e", TechniqueSheetL5r5e, {
|
Items.registerSheet(L5R5E.namespace, TechniqueSheetL5r5e, {
|
||||||
types: ["technique"],
|
types: ["technique"],
|
||||||
label: "ITEM.TypeTechnique",
|
label: "TYPES.Item.technique",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
Items.registerSheet("l5r5e", PropertySheetL5r5e, {
|
Items.registerSheet(L5R5E.namespace, PropertySheetL5r5e, {
|
||||||
types: ["property"],
|
types: ["property"],
|
||||||
label: "ITEM.TypeProperty",
|
label: "TYPES.Item.property",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
Items.registerSheet("l5r5e", PeculiaritySheetL5r5e, {
|
Items.registerSheet(L5R5E.namespace, PeculiaritySheetL5r5e, {
|
||||||
types: ["peculiarity"],
|
types: ["peculiarity"],
|
||||||
label: "ITEM.TypePeculiarity",
|
label: "TYPES.Item.peculiarity",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
Items.registerSheet("l5r5e", AdvancementSheetL5r5e, {
|
Items.registerSheet(L5R5E.namespace, AdvancementSheetL5r5e, {
|
||||||
types: ["advancement"],
|
types: ["advancement"],
|
||||||
label: "ITEM.TypeAdvancement",
|
label: "TYPES.Item.advancement",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
Items.registerSheet("l5r5e", TitleSheetL5r5e, {
|
Items.registerSheet(L5R5E.namespace, TitleSheetL5r5e, {
|
||||||
types: ["title"],
|
types: ["title"],
|
||||||
label: "ITEM.TypeTitle",
|
label: "TYPES.Item.title",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
Items.registerSheet("l5r5e", BondSheetL5r5e, {
|
Items.registerSheet(L5R5E.namespace, BondSheetL5r5e, {
|
||||||
types: ["bond"],
|
types: ["bond"],
|
||||||
label: "ITEM.TypeBond",
|
label: "TYPES.Item.bond",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
Items.registerSheet("l5r5e", SignatureScrollSheetL5r5e, {
|
Items.registerSheet(L5R5E.namespace, SignatureScrollSheetL5r5e, {
|
||||||
types: ["signature_scroll"],
|
types: ["signature_scroll"],
|
||||||
label: "ITEM.TypeSignature_scroll",
|
label: "TYPES.Item.signature_scroll",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
Items.registerSheet("l5r5e", ItemPatternSheetL5r5e, {
|
Items.registerSheet(L5R5E.namespace, ItemPatternSheetL5r5e, {
|
||||||
types: ["item_pattern"],
|
types: ["item_pattern"],
|
||||||
label: "ITEM.TypeItem_pattern",
|
label: "TYPES.Item.item_pattern",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
Items.registerSheet("l5r5e", ArmyCohortSheetL5r5e, {
|
Items.registerSheet(L5R5E.namespace, ArmyCohortSheetL5r5e, {
|
||||||
types: ["army_cohort"],
|
types: ["army_cohort"],
|
||||||
label: "ITEM.TypeArmy_cohort",
|
label: "TYPES.Item.army_cohort",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
Items.registerSheet("l5r5e", ArmyFortificationSheetL5r5e, {
|
Items.registerSheet(L5R5E.namespace, ArmyFortificationSheetL5r5e, {
|
||||||
types: ["army_fortification"],
|
types: ["army_fortification"],
|
||||||
label: "ITEM.TypeArmy_fortification",
|
label: "TYPES.Item.army_fortification",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Journal
|
// Journal
|
||||||
Journal.unregisterSheet("core", JournalSheet);
|
Journal.unregisterSheet("core", JournalSheet);
|
||||||
Journal.registerSheet("l5r5e", BaseJournalSheetL5r5e, {
|
Journal.registerSheet(L5R5E.namespace, BaseJournalSheetL5r5e, {
|
||||||
label: "JOURNAL.TypeJournal",
|
label: "TYPES.Journal.journal",
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -208,7 +216,7 @@ Hooks.once("init", async () => {
|
|||||||
|
|
||||||
// Override the default Token _drawBar function to allow fatigue bar reversing.
|
// Override the default Token _drawBar function to allow fatigue bar reversing.
|
||||||
Token.prototype._drawBar = function (number, bar, data) {
|
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
|
// Bar value
|
||||||
const pct = Math.clamped(Number(data.value), 0, data.max) / data.max;
|
const pct = Math.clamped(Number(data.value), 0, data.max) / data.max;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export class MigrationL5r5e {
|
|||||||
* Minimum Version needed for migration stuff to trigger
|
* Minimum Version needed for migration stuff to trigger
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
static NEEDED_VERSION = "1.3.0";
|
static NEEDED_VERSION = "2.0.0";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if the version need some updates
|
* Return true if the version need some updates
|
||||||
@@ -14,7 +14,7 @@ export class MigrationL5r5e {
|
|||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
static needUpdate(version) {
|
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);
|
return !currentVersion || foundry.utils.isNewerVersion(version, currentVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,6 +28,11 @@ export class MigrationL5r5e {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wait for translation to load
|
||||||
|
if (!options.force && typeof Babele !== "undefined") {
|
||||||
|
await new Promise((r) => setTimeout(r, 5000));
|
||||||
|
}
|
||||||
|
|
||||||
// if (MigrationL5r5e.needUpdate("1.3.0")) {
|
// if (MigrationL5r5e.needUpdate("1.3.0")) {
|
||||||
// ChatMessage.create({"content": "<strong>L5R5E v1.3.0 :</strong><br>"});
|
// ChatMessage.create({"content": "<strong>L5R5E v1.3.0 :</strong><br>"});
|
||||||
// }
|
// }
|
||||||
@@ -42,13 +47,13 @@ export class MigrationL5r5e {
|
|||||||
// Migrate World Actors
|
// Migrate World Actors
|
||||||
for (let actor of game.actors.contents) {
|
for (let actor of game.actors.contents) {
|
||||||
try {
|
try {
|
||||||
const updateData = MigrationL5r5e._migrateActorData(actor, options);
|
const updateData = await MigrationL5r5e._migrateActorData(actor, options);
|
||||||
if (!foundry.utils.isEmpty(updateData)) {
|
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);
|
await actor.update(updateData);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} 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);
|
console.error(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -58,11 +63,11 @@ export class MigrationL5r5e {
|
|||||||
try {
|
try {
|
||||||
const updateData = MigrationL5r5e._migrateItemData(item, options);
|
const updateData = MigrationL5r5e._migrateItemData(item, options);
|
||||||
if (!foundry.utils.isEmpty(updateData)) {
|
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);
|
await item.update(updateData);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} 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);
|
console.error(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -72,14 +77,14 @@ export class MigrationL5r5e {
|
|||||||
try {
|
try {
|
||||||
const updateData = MigrationL5r5e._migrateSceneData(scene, options);
|
const updateData = MigrationL5r5e._migrateSceneData(scene, options);
|
||||||
if (!foundry.utils.isEmpty(updateData)) {
|
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);
|
await scene.update(updateData);
|
||||||
// If we do not do this, then synthetic token actors remain in cache
|
// If we do not do this, then synthetic token actors remain in cache
|
||||||
// with the un-updated actorData.
|
// with the un-updated actorData.
|
||||||
scene.tokens.contents.forEach((t) => (t._actor = null));
|
scene.tokens.contents.forEach((t) => (t._actor = null));
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} 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);
|
console.error(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -104,16 +109,16 @@ export class MigrationL5r5e {
|
|||||||
}
|
}
|
||||||
// Save all the modified entries at once
|
// Save all the modified entries at once
|
||||||
if (updatedChatList.length > 0) {
|
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);
|
await ChatMessage.updateDocuments(updatedChatList);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
err.message = `L5R5E | Failed L5R5e system migration for ChatMessage`;
|
err.message = `L5R5E | Migration | Failed L5R5e system migration for ChatMessage`;
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the migration as complete
|
// 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!`, {
|
ui.notifications.info(`L5R5e System Migration to version ${game.system.version} completed!`, {
|
||||||
permanent: true,
|
permanent: true,
|
||||||
});
|
});
|
||||||
@@ -160,9 +165,7 @@ export class MigrationL5r5e {
|
|||||||
updateData["_id"] = doc._id;
|
updateData["_id"] = doc._id;
|
||||||
updateDatasList.push(updateData);
|
updateDatasList.push(updateData);
|
||||||
|
|
||||||
console.log(
|
console.log(`L5R5E | Migration | Migrating ${docType} document ${doc.name}[${doc._id}] in Compendium ${pack.collection}`);
|
||||||
`L5R5E | Migrating ${docType} document ${doc.name}[${doc._id}] in Compendium ${pack.collection}`
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save the modified entries
|
// Save the modified entries
|
||||||
@@ -171,13 +174,13 @@ export class MigrationL5r5e {
|
|||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// Handle migration failures
|
// 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);
|
console.error(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply the original locked status for the pack
|
// Apply the original locked status for the pack
|
||||||
await pack.configure({ locked: wasLocked });
|
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 +194,12 @@ export class MigrationL5r5e {
|
|||||||
const tokens = scene.tokens.map((token) => {
|
const tokens = scene.tokens.map((token) => {
|
||||||
const t = token.toJSON();
|
const t = token.toJSON();
|
||||||
if (!t.actorId || t.actorLink) {
|
if (!t.actorId || t.actorLink) {
|
||||||
t.actorData = {};
|
t.delta = {};
|
||||||
} else if (!game.actors.has(t.actorId)) {
|
} else if (!game.actors.has(t.actorId)) {
|
||||||
t.actorId = null;
|
t.actorId = null;
|
||||||
t.actorData = {};
|
t.delta = {};
|
||||||
} else if (!t.actorLink) {
|
} else if (!t.actorLink) {
|
||||||
const actorData = foundry.utils.duplicate(t.actorData);
|
const actorData = foundry.utils.duplicate(t.delta);
|
||||||
actorData.type = token.actor?.type;
|
actorData.type = token.actor?.type;
|
||||||
const update = MigrationL5r5e._migrateActorData(actorData, options);
|
const update = MigrationL5r5e._migrateActorData(actorData, options);
|
||||||
["items", "effects"].forEach((embeddedName) => {
|
["items", "effects"].forEach((embeddedName) => {
|
||||||
@@ -204,7 +207,7 @@ export class MigrationL5r5e {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const updates = new Map(update[embeddedName].map((u) => [u._id, u]));
|
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);
|
const update = updates.get(original._id);
|
||||||
if (update) {
|
if (update) {
|
||||||
foundry.utils.mergeObject(original, update);
|
foundry.utils.mergeObject(original, update);
|
||||||
@@ -213,7 +216,7 @@ export class MigrationL5r5e {
|
|||||||
delete update[embeddedName];
|
delete update[embeddedName];
|
||||||
});
|
});
|
||||||
|
|
||||||
foundry.utils.mergeObject(t.actorData, update);
|
foundry.utils.mergeObject(t.delta, update);
|
||||||
}
|
}
|
||||||
return t;
|
return t;
|
||||||
});
|
});
|
||||||
@@ -223,11 +226,11 @@ export class MigrationL5r5e {
|
|||||||
/**
|
/**
|
||||||
* Migrate a single Actor document to incorporate latest data model changes
|
* Migrate a single Actor document to incorporate latest data model changes
|
||||||
* Return an Object of updateData to be applied
|
* 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
|
* @param options
|
||||||
* @return {Object} The updateData to apply
|
* @return {Object} The updateData to apply
|
||||||
*/
|
*/
|
||||||
static _migrateActorData(actor, options = { force: false }) {
|
static async _migrateActorData(actor, options = { force: false }) {
|
||||||
const updateData = {};
|
const updateData = {};
|
||||||
const system = actor.system;
|
const system = actor.system;
|
||||||
|
|
||||||
@@ -245,7 +248,7 @@ export class MigrationL5r5e {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NPC are now without autostats, we need to save the value
|
// NPC are now without autostats, we need to save the value
|
||||||
if (actor.type === "npc") {
|
if (actor.isNpc) {
|
||||||
if (system.endurance < 1) {
|
if (system.endurance < 1) {
|
||||||
updateData["system.endurance"] = (Number(system.rings.earth) + Number(system.rings.fire)) * 2;
|
updateData["system.endurance"] = (Number(system.rings.earth) + Number(system.rings.fire)) * 2;
|
||||||
updateData["system.composure"] = (Number(system.rings.earth) + Number(system.rings.water)) * 2;
|
updateData["system.composure"] = (Number(system.rings.earth) + Number(system.rings.water)) * 2;
|
||||||
@@ -266,7 +269,7 @@ export class MigrationL5r5e {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NPC have now more than a Strength and a Weakness
|
// NPC have now more than a Strength and a Weakness
|
||||||
if (actor.type === "npc" && system.rings_affinities?.strength) {
|
if (actor.isNpc && system.rings_affinities?.strength) {
|
||||||
const aff = system.rings_affinities;
|
const aff = system.rings_affinities;
|
||||||
updateData["system.rings_affinities." + aff.strength.ring] = aff.strength.value;
|
updateData["system.rings_affinities." + aff.strength.ring] = aff.strength.value;
|
||||||
updateData["system.rings_affinities." + aff.weakness.ring] = aff.weakness.value;
|
updateData["system.rings_affinities." + aff.weakness.ring] = aff.weakness.value;
|
||||||
@@ -278,6 +281,29 @@ export class MigrationL5r5e {
|
|||||||
}
|
}
|
||||||
// ***** End of 1.3.0 *****
|
// ***** End of 1.3.0 *****
|
||||||
|
|
||||||
|
// ***** Start of 2.0.0 *****
|
||||||
|
if (options?.force || MigrationL5r5e.needUpdate("2.0.0")) {
|
||||||
|
// Only PC : Convert fixed skills to items list
|
||||||
|
if (actor.isCharacter && Array.from(actor.items).every(i => i.type !== "skill")) {
|
||||||
|
// Add skills items
|
||||||
|
const update = {items: [], name: actor.name};
|
||||||
|
await game.l5r5e.ActorL5r5e.addSkillsFromDefaultList(update);
|
||||||
|
|
||||||
|
// Set actor value
|
||||||
|
update.items.forEach(item => {
|
||||||
|
const skillId = item.flags?.l5r5e?.skillCoreId;
|
||||||
|
const skillCatId = CONFIG.l5r5e.skills.get(skillId);
|
||||||
|
const skillValue = system.skills[skillCatId][skillId];
|
||||||
|
if (skillCatId && skillValue > 0) {
|
||||||
|
item.system.rank = skillValue;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
updateData.items = update.items;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ***** End of 2.0.0 *****
|
||||||
|
|
||||||
return updateData;
|
return updateData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export const PreloadTemplates = async function () {
|
|||||||
`${tpl}actors/character/inventory.html`,
|
`${tpl}actors/character/inventory.html`,
|
||||||
`${tpl}actors/character/narrative.html`,
|
`${tpl}actors/character/narrative.html`,
|
||||||
`${tpl}actors/character/rings.html`,
|
`${tpl}actors/character/rings.html`,
|
||||||
`${tpl}actors/character/skill.html`,
|
`${tpl}actors/character/effects.html`,
|
||||||
`${tpl}actors/character/social.html`,
|
`${tpl}actors/character/social.html`,
|
||||||
`${tpl}actors/character/stance.html`,
|
`${tpl}actors/character/stance.html`,
|
||||||
`${tpl}actors/character/techniques.html`,
|
`${tpl}actors/character/techniques.html`,
|
||||||
@@ -25,6 +25,7 @@ export const PreloadTemplates = async function () {
|
|||||||
`${tpl}actors/npc/inventory.html`,
|
`${tpl}actors/npc/inventory.html`,
|
||||||
`${tpl}actors/npc/narrative.html`,
|
`${tpl}actors/npc/narrative.html`,
|
||||||
`${tpl}actors/npc/rings.html`,
|
`${tpl}actors/npc/rings.html`,
|
||||||
|
`${tpl}actors/npc/effects.html`,
|
||||||
`${tpl}actors/npc/social.html`,
|
`${tpl}actors/npc/social.html`,
|
||||||
`${tpl}actors/npc/skill.html`,
|
`${tpl}actors/npc/skill.html`,
|
||||||
`${tpl}actors/npc/techniques.html`,
|
`${tpl}actors/npc/techniques.html`,
|
||||||
@@ -57,6 +58,9 @@ export const PreloadTemplates = async function () {
|
|||||||
`${tpl}items/property/properties.html`,
|
`${tpl}items/property/properties.html`,
|
||||||
`${tpl}items/property/property-entry.html`,
|
`${tpl}items/property/property-entry.html`,
|
||||||
`${tpl}items/property/property-sheet.html`,
|
`${tpl}items/property/property-sheet.html`,
|
||||||
|
`${tpl}items/skill/skill-entry.html`,
|
||||||
|
`${tpl}items/skill/skill-sheet.html`,
|
||||||
|
`${tpl}items/skill/skill-text.html`,
|
||||||
`${tpl}items/signature-scroll/signature-scroll-entry.html`,
|
`${tpl}items/signature-scroll/signature-scroll-entry.html`,
|
||||||
`${tpl}items/signature-scroll/signature-scroll-sheet.html`,
|
`${tpl}items/signature-scroll/signature-scroll-sheet.html`,
|
||||||
`${tpl}items/signature-scroll/signature-scroll-text.html`,
|
`${tpl}items/signature-scroll/signature-scroll-text.html`,
|
||||||
|
|||||||
@@ -2,10 +2,28 @@
|
|||||||
* Custom system settings register
|
* Custom system settings register
|
||||||
*/
|
*/
|
||||||
export const RegisterSettings = function () {
|
export const RegisterSettings = function () {
|
||||||
|
const isBabeleRegistered = (typeof Babele !== "undefined");
|
||||||
|
|
||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
/* User settings */
|
/* User settings */
|
||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
game.settings.register("l5r5e", "rnk-deleteOldMessage", {
|
game.settings.registerMenu(CONFIG.l5r5e.namespace, "defaultSkillsListMenu", {
|
||||||
|
name: "SETTINGS.DefaultSkillsList.Title",
|
||||||
|
label: "SETTINGS.DefaultSkillsList.Label",
|
||||||
|
hint: "SETTINGS.DefaultSkillsList.Hint",
|
||||||
|
icon: "fas fa-bars",
|
||||||
|
type: game.l5r5e.DefaultSkillsDialogL5r5e,
|
||||||
|
restricted: true, // GameMaster only
|
||||||
|
});
|
||||||
|
game.settings.register(CONFIG.l5r5e.namespace, "defaultSkillsList", {
|
||||||
|
name: "System Migration Version",
|
||||||
|
scope: "world",
|
||||||
|
config: false,
|
||||||
|
type: Array,
|
||||||
|
default: game.l5r5e.HelpersL5r5e.getDefaultSkillsUuidFromPack(),
|
||||||
|
});
|
||||||
|
|
||||||
|
game.settings.register(CONFIG.l5r5e.namespace, "rnk-deleteOldMessage", {
|
||||||
name: "SETTINGS.RollNKeep.DeleteOldMessage",
|
name: "SETTINGS.RollNKeep.DeleteOldMessage",
|
||||||
hint: "SETTINGS.RollNKeep.DeleteOldMessageHint",
|
hint: "SETTINGS.RollNKeep.DeleteOldMessageHint",
|
||||||
scope: "world",
|
scope: "world",
|
||||||
@@ -13,7 +31,7 @@ export const RegisterSettings = function () {
|
|||||||
default: true,
|
default: true,
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
});
|
});
|
||||||
game.settings.register("l5r5e", "initiative-setTn1OnTypeChange", {
|
game.settings.register(CONFIG.l5r5e.namespace, "initiative-setTn1OnTypeChange", {
|
||||||
name: "SETTINGS.Initiative.SetTn1OnTypeChange",
|
name: "SETTINGS.Initiative.SetTn1OnTypeChange",
|
||||||
hint: "SETTINGS.Initiative.SetTn1OnTypeChangeHint",
|
hint: "SETTINGS.Initiative.SetTn1OnTypeChangeHint",
|
||||||
scope: "world",
|
scope: "world",
|
||||||
@@ -21,14 +39,14 @@ export const RegisterSettings = function () {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
});
|
});
|
||||||
game.settings.register("l5r5e", "token-reverseFatigueBar", {
|
game.settings.register(CONFIG.l5r5e.namespace, "token-reverseFatigueBar", {
|
||||||
name: "SETTINGS.ReverseFatigueBar",
|
name: "SETTINGS.ReverseFatigueBar",
|
||||||
scope: "world",
|
scope: "world",
|
||||||
config: true,
|
config: true,
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
});
|
});
|
||||||
game.settings.register("l5r5e", "techniques-customs", {
|
game.settings.register(CONFIG.l5r5e.namespace, "techniques-customs", {
|
||||||
name: "SETTINGS.CustomTechniques.Title",
|
name: "SETTINGS.CustomTechniques.Title",
|
||||||
hint: "SETTINGS.CustomTechniques.Hint",
|
hint: "SETTINGS.CustomTechniques.Hint",
|
||||||
scope: "world",
|
scope: "world",
|
||||||
@@ -36,11 +54,25 @@ export const RegisterSettings = function () {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
});
|
});
|
||||||
|
game.settings.register(CONFIG.l5r5e.namespace, "custom-compendium-name", {
|
||||||
|
name: "SETTINGS.CustomCompendiumName.Title",
|
||||||
|
hint: "SETTINGS.CustomCompendiumName.Hint",
|
||||||
|
scope: "world",
|
||||||
|
config: isBabeleRegistered,
|
||||||
|
requiresReload: true,
|
||||||
|
type: String,
|
||||||
|
default: "l5r5e-custom-compendiums",
|
||||||
|
onChange: (name) => {
|
||||||
|
if (!Babele.get().modules.find((module) => module.module === name)) {
|
||||||
|
ui.notifications.warn(game.i18n.format("SETTINGS.CustomCompendiumName.Notification", { name }), { permanent: true });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
/* Update */
|
/* Update */
|
||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
game.settings.register("l5r5e", "systemMigrationVersion", {
|
game.settings.register(CONFIG.l5r5e.namespace, "systemMigrationVersion", {
|
||||||
name: "System Migration Version",
|
name: "System Migration Version",
|
||||||
scope: "world",
|
scope: "world",
|
||||||
config: false,
|
config: false,
|
||||||
@@ -51,7 +83,7 @@ export const RegisterSettings = function () {
|
|||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
/* Initiative Roll Dialog (GM only) */
|
/* 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",
|
name: "Initiative difficulty is hidden",
|
||||||
scope: "world",
|
scope: "world",
|
||||||
config: false,
|
config: false,
|
||||||
@@ -59,7 +91,7 @@ export const RegisterSettings = function () {
|
|||||||
default: false,
|
default: false,
|
||||||
onChange: () => game.l5r5e.HelpersL5r5e.notifyDifficultyChange(),
|
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",
|
name: "Initiative difficulty value",
|
||||||
scope: "world",
|
scope: "world",
|
||||||
config: false,
|
config: false,
|
||||||
@@ -67,20 +99,20 @@ export const RegisterSettings = function () {
|
|||||||
default: 2,
|
default: 2,
|
||||||
onChange: () => game.l5r5e.HelpersL5r5e.notifyDifficultyChange(),
|
onChange: () => game.l5r5e.HelpersL5r5e.notifyDifficultyChange(),
|
||||||
});
|
});
|
||||||
game.settings.register("l5r5e", "initiative-encounter", {
|
game.settings.register(CONFIG.l5r5e.namespace, "initiative-encounter", {
|
||||||
name: "Initiative encounter type",
|
name: "Initiative encounter type",
|
||||||
scope: "world",
|
scope: "world",
|
||||||
config: false,
|
config: false,
|
||||||
type: String,
|
type: String,
|
||||||
default: "skirmish",
|
default: "skirmish",
|
||||||
onChange: () => {
|
onChange: () => {
|
||||||
if (game.settings.get("l5r5e", "initiative-setTn1OnTypeChange")) {
|
if (game.settings.get(CONFIG.l5r5e.namespace, "initiative-setTn1OnTypeChange")) {
|
||||||
game.settings.set("l5r5e", "initiative-difficulty-value", 1);
|
game.settings.set(CONFIG.l5r5e.namespace, "initiative-difficulty-value", 1);
|
||||||
}
|
}
|
||||||
ui.combat.render(true);
|
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",
|
name: "Initiative PC prepared or not",
|
||||||
scope: "world",
|
scope: "world",
|
||||||
config: false,
|
config: false,
|
||||||
@@ -91,7 +123,7 @@ export const RegisterSettings = function () {
|
|||||||
ui.combat.render(true);
|
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",
|
name: "Initiative NPC adversary are prepared or not",
|
||||||
scope: "world",
|
scope: "world",
|
||||||
config: false,
|
config: false,
|
||||||
@@ -102,7 +134,7 @@ export const RegisterSettings = function () {
|
|||||||
ui.combat.render(true);
|
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",
|
name: "Initiative NPC minion are prepared or not",
|
||||||
scope: "world",
|
scope: "world",
|
||||||
config: false,
|
config: false,
|
||||||
@@ -117,7 +149,7 @@ export const RegisterSettings = function () {
|
|||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
/* GM Monitor windows (GM only) */
|
/* GM Monitor windows (GM only) */
|
||||||
/* ------------------------------------ */
|
/* ------------------------------------ */
|
||||||
game.settings.register("l5r5e", "gm-monitor-actors", {
|
game.settings.register(CONFIG.l5r5e.namespace, "gm-monitor-actors", {
|
||||||
name: "Gm Monitor",
|
name: "Gm Monitor",
|
||||||
scope: "world",
|
scope: "world",
|
||||||
config: false,
|
config: false,
|
||||||
|
|||||||
148
system/scripts/settings/default-skills-dialog.js
Normal file
148
system/scripts/settings/default-skills-dialog.js
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
/**
|
||||||
|
* L5R Settings dialog for default skills list
|
||||||
|
* @extends {FormApplication}
|
||||||
|
*/
|
||||||
|
export class DefaultSkillsDialogL5r5e extends FormApplication {
|
||||||
|
/**
|
||||||
|
* Key for skills list in Settings
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
static skillsLisKey = "defaultSkillsList";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assign the default options
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
static get defaultOptions() {
|
||||||
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
|
id: "l5r5e-settings-default-skills-dialog",
|
||||||
|
classes: ["l5r5e", "settings", "default-skills"],
|
||||||
|
template: CONFIG.l5r5e.paths.templates + "settings/default-skills-dialog.html",
|
||||||
|
title: game.i18n.localize("SETTINGS.DefaultSkillsList.Label"),
|
||||||
|
width: 500,
|
||||||
|
height: 680,
|
||||||
|
resizable: true,
|
||||||
|
closeOnSubmit: false,
|
||||||
|
submitOnClose: false,
|
||||||
|
submitOnChange: false,
|
||||||
|
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prevent non GM to render this windows
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
render(force = false, options = {}) {
|
||||||
|
if (!this.isEditable) {
|
||||||
|
console.log("L5R5E | You don't have the rights to display this application");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return super.render(force, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is the Form Application currently editable?
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
get isEditable() {
|
||||||
|
return game.user.isGM;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct and return the data object used to render the HTML template for this form application.
|
||||||
|
* @param options
|
||||||
|
* @return {Object}
|
||||||
|
*/
|
||||||
|
async getData(options = null) {
|
||||||
|
// Transform skills uuids to items by categories
|
||||||
|
let skillList = await game.l5r5e.HelpersL5r5e.getSkillsItemsList();
|
||||||
|
skillList = game.l5r5e.HelpersL5r5e.splitSkillByCategory(skillList);
|
||||||
|
|
||||||
|
return {
|
||||||
|
...(await super.getData(options)),
|
||||||
|
skillList,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle dropped data on the Actor sheet
|
||||||
|
* @param {DragEvent} event
|
||||||
|
*/
|
||||||
|
async _onDrop(event) {
|
||||||
|
// *** Everything below here is only needed if the sheet is editable ***
|
||||||
|
if (!this.isEditable) {
|
||||||
|
console.log("L5R5E | This sheet is not editable");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check item type and subtype
|
||||||
|
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||||
|
if (!item || item.documentName !== "Item" || item?.type !== "skill") {
|
||||||
|
console.log(`L5R5E | Item dropped must be a Skill Item : ${item?.type}`, item);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// EmbedItem actor item ?
|
||||||
|
if (item.uuid.startsWith('Actor.')) {
|
||||||
|
console.log("L5R5E | This element has been ignored because it's a EmbedItem actor item", item.uuid);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const skillListUuids = game.settings.get(CONFIG.l5r5e.namespace, DefaultSkillsDialogL5r5e.skillsLisKey) || [];
|
||||||
|
|
||||||
|
// Dropped an item with same "id" as one owned
|
||||||
|
if (skillListUuids.some((embedItem) => embedItem.uuid === item.uuid)) {
|
||||||
|
console.log("L5R5E | This element has been ignored because it already exists", item.uuid);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add the uuid and save
|
||||||
|
skillListUuids.push(item.uuid);
|
||||||
|
await game.settings.set(CONFIG.l5r5e.namespace, DefaultSkillsDialogL5r5e.skillsLisKey, skillListUuids);
|
||||||
|
|
||||||
|
// Refresh
|
||||||
|
this.render(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Subscribe to events from the sheet.
|
||||||
|
* @param {jQuery} html HTML content of the sheet.
|
||||||
|
*/
|
||||||
|
activateListeners(html) {
|
||||||
|
super.activateListeners(html);
|
||||||
|
|
||||||
|
// Commons
|
||||||
|
game.l5r5e.HelpersL5r5e.commonListeners(html);
|
||||||
|
|
||||||
|
// *** Everything below here is only needed if the sheet is editable ***
|
||||||
|
if (!this.isEditable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete an item
|
||||||
|
html.find(`.item-delete`).on("click", this._removeSkill.bind(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove an item from it's uuid
|
||||||
|
* @param {Event} event
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
async _removeSkill(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
|
||||||
|
const itemUuid = $(event.currentTarget).data("item-uuid");
|
||||||
|
if (!itemUuid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove and save
|
||||||
|
const skillListUuids = game.settings.get(CONFIG.l5r5e.namespace, DefaultSkillsDialogL5r5e.skillsLisKey) || [];
|
||||||
|
await game.settings.set(CONFIG.l5r5e.namespace, DefaultSkillsDialogL5r5e.skillsLisKey, skillListUuids.filter((uuid) => uuid !== itemUuid));
|
||||||
|
|
||||||
|
// Refresh
|
||||||
|
this.render(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -34,7 +34,7 @@ export class SocketHandlerL5r5e {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -54,7 +54,7 @@ export class SocketHandlerL5r5e {
|
|||||||
_onDeleteChatMessage(payload) {
|
_onDeleteChatMessage(payload) {
|
||||||
// Only delete the message if the user is a GM (otherwise it has no real effect)
|
// Only delete the message if the user is a GM (otherwise it has no real effect)
|
||||||
// Currently only used in RnK
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
game.messages.get(payload.messageId)?.delete();
|
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 {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 reduce to uuid 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
|
* @param {Object} dpOptions Any DicePickerDialog.options
|
||||||
*/
|
*/
|
||||||
openDicePicker({ users = [], actors = [], dpOptions = {} }) {
|
openDicePicker({ users = [], actors = [], dpOptions = {} }) {
|
||||||
// At least one user or one actor
|
// At least one user or one actor
|
||||||
if (foundry.utils.isEmpty(users) && foundry.utils.isEmpty(actors)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
// Fail if dpOptions.actor* provided
|
// Fail if dpOptions.actor* provided
|
||||||
if (!foundry.utils.isEmpty(dpOptions?.actorName)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (!foundry.utils.isEmpty(dpOptions?.actorId)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (!foundry.utils.isEmpty(dpOptions?.actor)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -118,7 +118,7 @@
|
|||||||
|
|
||||||
// Dice Picker
|
// Dice Picker
|
||||||
.dice-picker-dialog {
|
.dice-picker-dialog {
|
||||||
min-width: 600px;
|
min-width: 35rem;
|
||||||
min-height: auto;
|
min-height: auto;
|
||||||
// Utility
|
// Utility
|
||||||
* {
|
* {
|
||||||
@@ -225,6 +225,7 @@
|
|||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
font-size: large;
|
font-size: large;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
&-ring {
|
&-ring {
|
||||||
color: #f0f0e0;
|
color: #f0f0e0;
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
.item {
|
.item {
|
||||||
.item-header {
|
.item-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
.item-img {
|
.item-img {
|
||||||
flex: 0 0 32px;
|
flex: 0 0 32px;
|
||||||
padding-right: 0.25rem;
|
padding-right: 0.25rem;
|
||||||
@@ -110,6 +112,7 @@
|
|||||||
&.peculiarity,
|
&.peculiarity,
|
||||||
&.property,
|
&.property,
|
||||||
&.signature-scroll,
|
&.signature-scroll,
|
||||||
|
&.skill,
|
||||||
&.technique,
|
&.technique,
|
||||||
&.title,
|
&.title,
|
||||||
&.weapon {
|
&.weapon {
|
||||||
@@ -356,6 +359,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&.skill {
|
||||||
|
article {
|
||||||
|
&.attributes {
|
||||||
|
height: 4rem;
|
||||||
|
}
|
||||||
|
&.infos {
|
||||||
|
height: calc(100% - 5rem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
&.weapon {
|
&.weapon {
|
||||||
article {
|
article {
|
||||||
&.attributes {
|
&.attributes {
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: 2rem;
|
line-height: 2rem;
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
margin: 0 0 0.5rem;
|
margin: 0.5rem 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
li {
|
li {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|||||||
@@ -29,7 +29,9 @@
|
|||||||
line-height: 0;
|
line-height: 0;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
label.stance-active strong {
|
||||||
|
text-decoration: underline 2px;
|
||||||
|
}
|
||||||
input {
|
input {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
/** Sheets **/
|
/** Sheets **/
|
||||||
&.sheet {
|
&.sheet {
|
||||||
min-width: 600px;
|
min-width: 37rem;
|
||||||
|
|
||||||
label {
|
label {
|
||||||
&:hover {
|
&:hover {
|
||||||
text-shadow: 0 0 2px $red;
|
text-shadow: 0 0 2px $red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.l5r-buttons-bar {
|
.l5r-buttons-bar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 0 0 100%;
|
flex: 0 0 100%;
|
||||||
@@ -21,9 +23,9 @@
|
|||||||
margin: 0 0 0 8px;
|
margin: 0 0 0 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.actor {
|
&.actor {
|
||||||
.sheet-header {
|
.sheet-header {
|
||||||
height: 26rem;
|
|
||||||
h1 {
|
h1 {
|
||||||
flex: auto;
|
flex: auto;
|
||||||
margin: 0 0 0.25rem 0.5rem;
|
margin: 0 0 0.25rem 0.5rem;
|
||||||
@@ -45,15 +47,49 @@
|
|||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
form {
|
form {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-content: flex-start;
|
align-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sheet-body {
|
.sheet-body {
|
||||||
flex: 0 0 100%;
|
flex: 0 0 100%;
|
||||||
align-items: flex-start;
|
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,
|
section,
|
||||||
article {
|
article {
|
||||||
&.tab[data-tab] {
|
&.tab[data-tab] {
|
||||||
@@ -63,6 +99,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.sheet-header {
|
.sheet-header {
|
||||||
flex: 0 0 100%;
|
flex: 0 0 100%;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
@@ -127,13 +164,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.header-fields {
|
.header-fields {
|
||||||
position: relative;
|
|
||||||
flex: 0 0 100%;
|
|
||||||
h2 {
|
h2 {
|
||||||
font-family: $font-secondary;
|
font-family: $font-secondary;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
float: left;
|
|
||||||
width: 30%;
|
|
||||||
padding: 0.25rem 0.25rem 0;
|
padding: 0.25rem 0.25rem 0;
|
||||||
margin: 1rem 20% 0 0;
|
margin: 1rem 20% 0 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -234,18 +267,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.rings {
|
.mid-wrapper {
|
||||||
float: left;
|
display: flex;
|
||||||
|
}
|
||||||
|
.side-col {
|
||||||
|
width: 30%;
|
||||||
|
}
|
||||||
|
.central-col {
|
||||||
width: 40%;
|
width: 40%;
|
||||||
|
}
|
||||||
|
.rings {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
position: relative;
|
margin-top: 1rem;
|
||||||
top: -1.5rem;
|
|
||||||
}
|
}
|
||||||
.social-content,
|
.social-content,
|
||||||
.attributes-wrapper {
|
.attributes-wrapper {
|
||||||
flex: none;
|
flex: none;
|
||||||
float: left;
|
|
||||||
width: 30%;
|
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0.5rem 0 0 0.25rem;
|
padding: 0.5rem 0 0 0.25rem;
|
||||||
@@ -545,8 +582,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
article {
|
article {
|
||||||
background: $l5r5e-white;
|
background: $l5r5e-white-light;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
min-height: calc(100% - 3.25rem);
|
min-height: calc(100% - 3.25rem);
|
||||||
@@ -710,6 +748,7 @@
|
|||||||
flex: 0 0 calc(50% - 0.5rem);
|
flex: 0 0 calc(50% - 0.5rem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.xp,
|
.xp,
|
||||||
.money-wrapper {
|
.money-wrapper {
|
||||||
flex: 100%;
|
flex: 100%;
|
||||||
@@ -728,6 +767,7 @@
|
|||||||
line-height: 13px;
|
line-height: 13px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: $black-light;
|
color: $black-light;
|
||||||
@@ -794,6 +834,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.inventory {
|
.inventory {
|
||||||
.items-wrapper {
|
.items-wrapper {
|
||||||
h3 {
|
h3 {
|
||||||
@@ -888,11 +929,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
&.sheet-tabs {
|
&.sheet-tabs {
|
||||||
flex: 100%;
|
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.
|
// Lang Adjust.
|
||||||
&.sheet {
|
&.sheet {
|
||||||
|
|||||||
@@ -41,29 +41,63 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
ul {
|
ul {
|
||||||
flex: 50%;
|
flex: 100%;
|
||||||
padding: 0.25rem 0.5rem 0.25rem 0;
|
padding: 0 0.15rem;
|
||||||
li {
|
li {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
line-height: 2rem;
|
line-height: 2rem;
|
||||||
margin: 0.25rem 0;
|
margin: 0.25rem 0;
|
||||||
&.skill {
|
}
|
||||||
text-align: right;
|
&.skill-category-skills-list {
|
||||||
span {
|
img {
|
||||||
color: $l5r5e-black;
|
width: 32px;
|
||||||
&[data-skill="melee"],
|
height: 32px;
|
||||||
&[data-skill="ranged"],
|
object-fit: contain;
|
||||||
&[data-skill="unarmed"] {
|
object-position: 50% 0;
|
||||||
float: left;
|
border: none;
|
||||||
line-height: 1rem;
|
padding: 2px 0;
|
||||||
width: calc(100% - 2rem);
|
}
|
||||||
}
|
|
||||||
|
input {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-header {
|
||||||
|
flex: 4;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.item-img {
|
||||||
|
height: 32px;
|
||||||
|
margin: 0;
|
||||||
|
flex: 0 0 32px;
|
||||||
|
}
|
||||||
|
.item-rank {
|
||||||
|
flex: 0 0 32px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.item-edit,
|
||||||
|
.item-delete {
|
||||||
|
text-align: center;
|
||||||
|
line-height: 1rem;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
flex: 0 0 1rem;
|
||||||
|
padding: 0 0.1rem;
|
||||||
|
color: $black-light;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.skill-category-ring-actions {
|
&.skill-category-ring-actions {
|
||||||
padding: 0.25rem 0 0.25rem 0.5rem;
|
padding: 0.25rem 0 0.25rem 0.5rem;
|
||||||
|
border-top: 1px dashed $l5r5e-title;
|
||||||
border-left: 1px solid $l5r5e-title;
|
border-left: 1px solid $l5r5e-title;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-content: center;
|
||||||
|
justify-content: space-evenly;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
input {
|
input {
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ button {
|
|||||||
.system {
|
.system {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
border-bottom: 1px solid var(--color-border-light-highlight);
|
border-bottom: 1px solid var(--color-border-light-highlight);
|
||||||
|
|
||||||
|
.system-title {
|
||||||
|
white-space: break-spaces;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,8 +32,7 @@ button {
|
|||||||
overflow: initial;
|
overflow: initial;
|
||||||
height: calc(100% - 1.1rem);
|
height: calc(100% - 1.1rem);
|
||||||
top: 0.2rem;
|
top: 0.2rem;
|
||||||
width: 320px;
|
min-width: 20rem;
|
||||||
min-width: 40px;
|
|
||||||
letter-spacing: 0.1rem;
|
letter-spacing: 0.1rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-right: 0.5rem;
|
margin-right: 0.5rem;
|
||||||
@@ -168,6 +171,9 @@ button {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.collapsed {
|
&.collapsed {
|
||||||
|
min-width: 0;
|
||||||
|
width: 3rem !important;
|
||||||
|
|
||||||
#sidebar-tabs {
|
#sidebar-tabs {
|
||||||
> .item {
|
> .item {
|
||||||
&.active {
|
&.active {
|
||||||
@@ -927,6 +933,41 @@ button {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#l5r5e-settings-default-skills-dialog {
|
||||||
|
.item-header {
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.item-img {
|
||||||
|
flex: 0 0 32px;
|
||||||
|
padding-right: 0.25rem;
|
||||||
|
|
||||||
|
img {
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-name {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1rem;
|
||||||
|
color: $l5r5e-bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-source {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-delete {
|
||||||
|
text-align: center;
|
||||||
|
line-height: 1rem;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
flex: 0 0 1rem;
|
||||||
|
padding: 0 0.1rem;
|
||||||
|
color: $black-light;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.autocomplete-wrapper {
|
.autocomplete-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
"changelog": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md",
|
"changelog": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md",
|
||||||
"license": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/LICENSE.md",
|
"license": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/LICENSE.md",
|
||||||
"manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json",
|
"manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json",
|
||||||
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.9.5/raw/l5r5e.zip?job=build",
|
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v2.0.0/raw/l5r5e.zip?job=build",
|
||||||
"version": "1.9.5",
|
"version": "2.0.0",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": 10,
|
"minimum": 11,
|
||||||
"verified": "10.291"
|
"verified": "11"
|
||||||
},
|
},
|
||||||
"manifestPlusVersion": "1.2.0",
|
"manifestPlusVersion": "1.2.0",
|
||||||
"socket": true,
|
"socket": true,
|
||||||
@@ -33,9 +33,96 @@
|
|||||||
],
|
],
|
||||||
"background": "systems/l5r5e/assets/l5r-header.webp",
|
"background": "systems/l5r5e/assets/l5r-header.webp",
|
||||||
"scripts": [],
|
"scripts": [],
|
||||||
"esmodules": ["./scripts/main-l5r5e.js"],
|
"esmodules": [
|
||||||
"styles": ["./styles/l5r5e.css"],
|
"./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-skills",
|
||||||
|
"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": [
|
"packs": [
|
||||||
|
{
|
||||||
|
"name": "core-skills",
|
||||||
|
"label": "Skills",
|
||||||
|
"path": "packs/core-skills.db",
|
||||||
|
"type": "Item",
|
||||||
|
"system": "l5r5e"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "core-properties",
|
"name": "core-properties",
|
||||||
"label": "Properties",
|
"label": "Properties",
|
||||||
|
|||||||
@@ -194,7 +194,8 @@
|
|||||||
"signature_scroll",
|
"signature_scroll",
|
||||||
"item_pattern",
|
"item_pattern",
|
||||||
"army_cohort",
|
"army_cohort",
|
||||||
"army_fortification"
|
"army_fortification",
|
||||||
|
"skill"
|
||||||
],
|
],
|
||||||
"templates": {
|
"templates": {
|
||||||
"basics": {
|
"basics": {
|
||||||
@@ -220,6 +221,12 @@
|
|||||||
"properties": []
|
"properties": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"skill": {
|
||||||
|
"templates": ["basics"],
|
||||||
|
"category": "artisan",
|
||||||
|
"rank": 0,
|
||||||
|
"modifier": 0
|
||||||
|
},
|
||||||
"item": {
|
"item": {
|
||||||
"templates": ["basics", "item"]
|
"templates": ["basics", "item"]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -127,7 +127,7 @@
|
|||||||
{{!-- items list --}}
|
{{!-- items list --}}
|
||||||
<h2>{{localize 'l5r5e.sheets.equipment'}}</h2>
|
<h2>{{localize 'l5r5e.sheets.equipment'}}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>{{localize 'l5r5e.money.title'}} : {{data.system.money.koku}} {{localize 'l5r5e.money.koku'}} / {{data.system.money.bu}} {{localize 'l5r5e.money.bu'}} / {{data.system.money.zeni}} {{localize 'l5r5e.money.zeni'}}</li>
|
<li>{{localize 'l5r5e.money.title'}} : {{data.money.koku}} {{localize 'l5r5e.money.koku'}} / {{data.money.bu}} {{localize 'l5r5e.money.bu'}} / {{data.money.zeni}} {{localize 'l5r5e.money.zeni'}}</li>
|
||||||
{{#each data.splitItemsList as |cat type|}}
|
{{#each data.splitItemsList as |cat type|}}
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize (localize 'l5r5e.{type}s.title' type=type)}} ({{cat.length}})</strong>
|
<strong>{{localize (localize 'l5r5e.{type}s.title' type=type)}} ({{cat.length}})</strong>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
{{!-- Sheet Tab Navigation --}}
|
{{!-- Sheet Tab Navigation --}}
|
||||||
<nav class="sheet-tabs tabs" data-group="primary">
|
<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="cohort">{{localize 'l5r5e.army.cohort.tab'}}</a>
|
||||||
<a class="item" data-tab="fortification">{{localize 'l5r5e.army.fortification.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>
|
<a class="item" data-tab="others">{{localize 'l5r5e.sheets.notes'}}</a>
|
||||||
|
|||||||
@@ -1,27 +1,39 @@
|
|||||||
<form class="{{cssClass}}" data-lang="{{localize 'I18N.Language'}}" autocomplete="off">
|
<form class="{{cssClass}}" data-lang="{{localize 'I18N.Language'}}" autocomplete="off">
|
||||||
{{!-- L5R Button bar --}}
|
{{!-- L5R Button bar --}}
|
||||||
<div class="l5r-buttons-bar">
|
<div class="l5r-buttons-bar">
|
||||||
{{#each l5rHeaderButtons}}
|
{{#each l5rHeaderButtons}}
|
||||||
<a class="l5r-header-button {{this.class}}"><i class="{{this.icon}}"></i>{{localize this.label}}</a>
|
<a class="l5r-header-button {{this.class}}"><i class="{{this.icon}}"></i>{{localize this.label}}</a>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
{{!-- Sheet Header --}}
|
{{!-- Sheet Header --}}
|
||||||
<header class="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">
|
<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'}}
|
{{> 'systems/l5r5e/templates/actors/character/identity.html'}}
|
||||||
</div>
|
</div>
|
||||||
<div class="header-fields">
|
<div class="header-fields mid-wrapper">
|
||||||
<h2>{{localize 'l5r5e.social.title'}}</h2>
|
<div class="side-col">
|
||||||
<h2 class="right">{{localize 'l5r5e.attributes.title'}}</h2>
|
<h2>{{localize 'l5r5e.social.title'}}</h2>
|
||||||
{{> 'systems/l5r5e/templates/actors/character/social.html'}}
|
{{> 'systems/l5r5e/templates/actors/character/social.html'}}
|
||||||
{{> 'systems/l5r5e/templates/actors/character/rings.html'}}
|
</div>
|
||||||
{{> 'systems/l5r5e/templates/actors/character/attributes.html'}}
|
<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>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
|
{{!-- Active effects --}}
|
||||||
|
{{> 'systems/l5r5e/templates/actors/character/effects.html'}}
|
||||||
|
|
||||||
{{!-- Sheet Tab Navigation --}}
|
{{!-- Sheet Tab Navigation --}}
|
||||||
<nav class="sheet-tabs tabs" data-group="primary">
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
<a class="item" data-tab="skills">{{localize 'l5r5e.skills.title'}}</a>
|
<a class="item" data-tab="skills">{{localize 'l5r5e.skills.title'}}</a>
|
||||||
@@ -34,8 +46,8 @@
|
|||||||
{{!-- Skills Tab --}}
|
{{!-- Skills Tab --}}
|
||||||
<article class="tab skills" data-group="primary" data-tab="skills">
|
<article class="tab skills" data-group="primary" data-tab="skills">
|
||||||
<ul class="skills-wrapper">
|
<ul class="skills-wrapper">
|
||||||
{{#each data.system.skills as |category id|}}
|
{{#each data.skillCategories as |itemsInCategory id|}}
|
||||||
{{> 'systems/l5r5e/templates/actors/character/category.html' category=category categoryId=id data=../data}}
|
{{> 'systems/l5r5e/templates/actors/character/category.html' itemsInCategory=itemsInCategory categoryId=id data=../data}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
{{> 'systems/l5r5e/templates/actors/character/techniques.html'}}
|
{{> 'systems/l5r5e/templates/actors/character/techniques.html'}}
|
||||||
@@ -61,4 +73,4 @@
|
|||||||
{{> 'systems/l5r5e/templates/actors/character/experience.html'}}
|
{{> 'systems/l5r5e/templates/actors/character/experience.html'}}
|
||||||
</article>
|
</article>
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<li class="skill-category-wrapper skill-category-content">
|
<li class="skill-category-wrapper skill-category-content">
|
||||||
<h4 class="section-header toggle-on-click" data-toggle="toggle-skill-category-{{categoryId}}">{{localizeSkill categoryId 'title'}}</h4>
|
<h4 class="section-header toggle-on-click" data-toggle="toggle-skill-category-{{categoryId}}">{{localizeSkill categoryId 'title'}}</h4>
|
||||||
<ul class="skill-category-skills-list toggle-skill-category-{{categoryId}} {{#ifCond data.storeInfos 'includes' (concat 'toggle-skill-category-' categoryId)}}toggle-hidden{{/ifCond}}">
|
<ul class="skill-category-skills-list toggle-skill-category-{{categoryId}} {{#ifCond data.storeInfos 'includes' (concat 'toggle-skill-category-' categoryId)}}toggle-hidden{{/ifCond}}">
|
||||||
{{#each category as |skill id|}}
|
{{#each itemsInCategory as |skill|}}
|
||||||
{{> 'systems/l5r5e/templates/actors/character/skill.html' categoryId=../categoryId skill=skill skillId=id data=../data}}
|
{{> 'systems/l5r5e/templates/items/skill/skill-entry.html' skill=skill data=../data}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="skill-category-ring-actions toggle-skill-category-{{categoryId}} {{#ifCond data.storeInfos 'includes' (concat 'toggle-skill-category-' categoryId)}}toggle-hidden{{/ifCond}}">
|
<ul class="skill-category-ring-actions toggle-skill-category-{{categoryId}} {{#ifCond data.storeInfos 'includes' (concat 'toggle-skill-category-' categoryId)}}toggle-hidden{{/ifCond}}">
|
||||||
|
|||||||
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>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<legend class="section-header">{{localize 'l5r5e.money.title'}}</legend>
|
<legend class="section-header">{{localize 'l5r5e.money.title'}}</legend>
|
||||||
<label>
|
<label>
|
||||||
{{localize 'l5r5e.money.koku'}}
|
{{localize 'l5r5e.money.koku'}}
|
||||||
<input name="system.money.koku" type="number" value="{{data.system.money.koku}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input name="money.koku" type="number" value="{{data.money.koku}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
<span class="money-buttons">
|
<span class="money-buttons">
|
||||||
<i class="money-control pointer-choice fa fa-plus-square" data-type="koku" data-value="1"></i>
|
<i class="money-control pointer-choice fa fa-plus-square" data-type="koku" data-value="1"></i>
|
||||||
<i class="money-control pointer-choice fa fa-minus-square" data-type="koku" data-value="-1"></i>
|
<i class="money-control pointer-choice fa fa-minus-square" data-type="koku" data-value="-1"></i>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
{{localize 'l5r5e.money.bu'}}
|
{{localize 'l5r5e.money.bu'}}
|
||||||
<input name="system.money.bu" type="number" value="{{data.system.money.bu}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input name="money.bu" type="number" value="{{data.money.bu}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
<span class="money-buttons">
|
<span class="money-buttons">
|
||||||
<i class="money-control pointer-choice fa fa-plus-square" data-type="bu" data-value="1"></i>
|
<i class="money-control pointer-choice fa fa-plus-square" data-type="bu" data-value="1"></i>
|
||||||
<i class="money-control pointer-choice fa fa-minus-square" data-type="bu" data-value="-1"></i>
|
<i class="money-control pointer-choice fa fa-minus-square" data-type="bu" data-value="-1"></i>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
{{localize 'l5r5e.money.zeni'}}
|
{{localize 'l5r5e.money.zeni'}}
|
||||||
<input name="system.money.zeni" type="number" value="{{data.system.money.zeni}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input name="money.zeni" type="number" value="{{data.money.zeni}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
<span class="money-buttons">
|
<span class="money-buttons">
|
||||||
<i class="money-control pointer-choice fa fa-plus-square" data-type="zeni" data-value="1"></i>
|
<i class="money-control pointer-choice fa fa-plus-square" data-type="zeni" data-value="1"></i>
|
||||||
<i class="money-control pointer-choice fa fa-minus-square" data-type="zeni" data-value="-1"></i>
|
<i class="money-control pointer-choice fa fa-minus-square" data-type="zeni" data-value="-1"></i>
|
||||||
|
|||||||
@@ -1,34 +1,34 @@
|
|||||||
<ul class="rings">
|
<ul class="rings">
|
||||||
<li id="earth">
|
<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>
|
<i class="i_earth dice-picker rollable" data-ring="earth"></i>
|
||||||
<strong>{{localizeRing 'earth'}}</strong>
|
<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}}/>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="air">
|
<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>
|
<i class="i_air dice-picker rollable" data-ring="air"></i>
|
||||||
<strong>{{localizeRing 'air'}}</strong>
|
<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}}/>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="water">
|
<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>
|
<i class="i_water dice-picker rollable" data-ring="water"></i>
|
||||||
<strong>{{localizeRing 'water'}}</strong>
|
<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}}/>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="fire">
|
<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>
|
<i class="i_fire dice-picker rollable" data-ring="fire"></i>
|
||||||
<strong>{{localizeRing 'fire'}}</strong>
|
<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}}/>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="void">
|
<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>
|
<i class="i_void dice-picker rollable" data-ring="void"></i>
|
||||||
<strong>{{localizeRing 'void'}}</strong>
|
<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}}/>
|
<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}}/>
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
<li class="skill skill-wrapper">
|
|
||||||
<label class="skill-content">
|
|
||||||
<span class="dice-picker attribute-label rollable" data-skill="{{skillId}}">{{localizeSkill categoryId skillId}}</span>
|
|
||||||
<input
|
|
||||||
class="centered-input select-on-focus"
|
|
||||||
type="number"
|
|
||||||
name="system.skills.{{categoryId}}.{{skillId}}"
|
|
||||||
value="{{skill}}"
|
|
||||||
data-dtype="Number"
|
|
||||||
min="0"
|
|
||||||
max="9"
|
|
||||||
placeholder="0"
|
|
||||||
{{^if data.editable_not_soft_locked}}disabled{{/if}}
|
|
||||||
/>
|
|
||||||
</label>
|
|
||||||
</li>
|
|
||||||
@@ -1,27 +1,39 @@
|
|||||||
<form class="{{cssClass}}" data-lang="{{localize 'I18N.Language'}}" autocomplete="off">
|
<form class="{{cssClass}}" data-lang="{{localize 'I18N.Language'}}" autocomplete="off">
|
||||||
{{!-- L5R Button bar --}}
|
{{!-- L5R Button bar --}}
|
||||||
<div class="l5r-buttons-bar">
|
<div class="l5r-buttons-bar">
|
||||||
{{#each l5rHeaderButtons}}
|
{{#each l5rHeaderButtons}}
|
||||||
<a class="l5r-header-button {{this.class}}"><i class="{{this.icon}}"></i>{{localize this.label}}</a>
|
<a class="l5r-header-button {{this.class}}"><i class="{{this.icon}}"></i>{{localize this.label}}</a>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
{{!-- Sheet Header --}}
|
{{!-- Sheet Header --}}
|
||||||
<header class="sheet-header">
|
<header class="sheet-header">
|
||||||
<div class="header-fields identity-wrapper">
|
<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}}"/>
|
<img class="profile-img dragndrop-actor-uuid pointer" src="{{data.img}}" {{#if
|
||||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name" {{^if data.editable_not_soft_locked}}disabled{{/if}}/></h1>
|
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'}}
|
{{> 'systems/l5r5e/templates/actors/npc/identity.html'}}
|
||||||
</div>
|
</div>
|
||||||
<div class="header-fields">
|
<div class="header-fields mid-wrapper">
|
||||||
<h2>{{localize 'l5r5e.social.title'}}</h2>
|
<div class="side-col">
|
||||||
<h2 class="right">{{localize 'l5r5e.attributes.title'}}</h2>
|
<h2>{{localize 'l5r5e.social.title'}}</h2>
|
||||||
{{> 'systems/l5r5e/templates/actors/npc/social.html'}}
|
{{> 'systems/l5r5e/templates/actors/npc/social.html'}}
|
||||||
{{> 'systems/l5r5e/templates/actors/npc/rings.html'}}
|
</div>
|
||||||
{{> 'systems/l5r5e/templates/actors/npc/attributes.html'}}
|
<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>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
|
{{!-- Active effects --}}
|
||||||
|
{{> 'systems/l5r5e/templates/actors/npc/effects.html'}}
|
||||||
|
|
||||||
{{!-- Skills No Tab --}}
|
{{!-- Skills No Tab --}}
|
||||||
{{> 'systems/l5r5e/templates/actors/npc/skill.html'}}
|
{{> 'systems/l5r5e/templates/actors/npc/skill.html'}}
|
||||||
|
|
||||||
@@ -45,9 +57,9 @@
|
|||||||
|
|
||||||
{{!-- Conflict Tab --}}
|
{{!-- Conflict Tab --}}
|
||||||
<article class="tab conflict" data-group="primary" data-tab="conflict">
|
<article class="tab conflict" data-group="primary" data-tab="conflict">
|
||||||
{{> 'systems/l5r5e/templates/actors/npc/conflict.html'}}
|
{{> 'systems/l5r5e/templates/actors/npc/conflict.html'}} {{>
|
||||||
{{> 'systems/l5r5e/templates/items/weapon/weapons.html'}}
|
'systems/l5r5e/templates/items/weapon/weapons.html'}} {{>
|
||||||
{{> 'systems/l5r5e/templates/items/armor/armors.html'}}
|
'systems/l5r5e/templates/items/armor/armors.html'}}
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
{{!-- Inventory Tab --}}
|
{{!-- Inventory Tab --}}
|
||||||
@@ -55,4 +67,4 @@
|
|||||||
{{> 'systems/l5r5e/templates/actors/npc/inventory.html'}}
|
{{> 'systems/l5r5e/templates/actors/npc/inventory.html'}}
|
||||||
</article>
|
</article>
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
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">
|
<ul class="rings">
|
||||||
<li id="earth">
|
<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>
|
<i class="i_earth dice-picker rollable" data-ring="earth"></i>
|
||||||
<strong>{{localizeRing 'earth'}}</strong>
|
<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}}/>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="air">
|
<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>
|
<i class="i_air dice-picker rollable" data-ring="air"></i>
|
||||||
<strong>{{localizeRing 'air'}}</strong>
|
<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}}/>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="water">
|
<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>
|
<i class="i_water dice-picker rollable" data-ring="water"></i>
|
||||||
<strong>{{localizeRing 'water'}}</strong>
|
<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}}/>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="fire">
|
<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>
|
<i class="i_fire dice-picker rollable" data-ring="fire"></i>
|
||||||
<strong>{{localizeRing 'fire'}}</strong>
|
<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}}/>
|
<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>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="void">
|
<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>
|
<i class="i_void dice-picker rollable" data-ring="void"></i>
|
||||||
<strong>{{localizeRing 'void'}}</strong>
|
<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}}/>
|
<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}}/>
|
||||||
|
|||||||
@@ -258,7 +258,7 @@
|
|||||||
{{localize 'l5r5e.twenty_questions.part2.school_ability'}}
|
{{localize 'l5r5e.twenty_questions.part2.school_ability'}}
|
||||||
{{> 'systems/l5r5e/templates/actors/character/twenty-questions-item.html' itemsList=cache.step3.school_ability stepName='step3.school_ability' itemType='techniques' hideDndAt=1}}
|
{{> 'systems/l5r5e/templates/actors/character/twenty-questions-item.html' itemsList=cache.step3.school_ability stepName='step3.school_ability' itemType='techniques' hideDndAt=1}}
|
||||||
{{localize 'l5r5e.twenty_questions.part2.starting_techniques'}}
|
{{localize 'l5r5e.twenty_questions.part2.starting_techniques'}}
|
||||||
{{> 'systems/l5r5e/templates/actors/character/twenty-questions-item.html' itemsList=cache.step3.techniques stepName='step3.techniques' itemType='techniques' hideDndAt=5}}
|
{{> 'systems/l5r5e/templates/actors/character/twenty-questions-item.html' itemsList=cache.step3.techniques stepName='step3.techniques' itemType='techniques' hideDndAt=6}}
|
||||||
</td>
|
</td>
|
||||||
<td class="fifty">
|
<td class="fifty">
|
||||||
{{localize 'l5r5e.twenty_questions.part2.outfit'}}
|
{{localize 'l5r5e.twenty_questions.part2.outfit'}}
|
||||||
|
|||||||
@@ -26,17 +26,17 @@
|
|||||||
{{#if actor.system.attitude}}<p>({{actor.system.attitude}})</p>{{/if}}
|
{{#if actor.system.attitude}}<p>({{actor.system.attitude}})</p>{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<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>
|
<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>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<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>
|
<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>
|
</a>
|
||||||
</td>
|
</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.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-id="{{actor.id}}" class="fas fa-user-shield actor-infos-control"></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>
|
<td>
|
||||||
<p>
|
<p>
|
||||||
{{#if actor.system.identity.school_rank}}
|
{{#if actor.system.identity.school_rank}}
|
||||||
@@ -56,13 +56,13 @@
|
|||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
<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>
|
<span class="{{#ifCond actor.system.fatigue.value '>' actor.system.fatigue.max}}badvalue{{/ifCond}}">{{actor.system.fatigue.value}}</span>
|
||||||
/ {{actor.system.fatigue.max}}
|
/ {{actor.system.fatigue.max}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<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>
|
<span class="{{#ifCond actor.system.strife.value '>' actor.system.strife.max}}badvalue{{/ifCond}}">{{actor.system.strife.value}}</span>
|
||||||
/ {{actor.system.strife.max}}
|
/ {{actor.system.strife.max}}
|
||||||
</a>
|
</a>
|
||||||
@@ -72,13 +72,13 @@
|
|||||||
/ {{#if actor.system.is_compromised}}<span class="badvalue">1</span>{{else}}{{actor.system.vigilance}}{{/if}}
|
/ {{#if actor.system.is_compromised}}<span class="badvalue">1</span>{{else}}{{actor.system.vigilance}}{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<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.value}}
|
||||||
/ {{actor.system.void_points.max}}
|
/ {{actor.system.void_points.max}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td><i data-actor-id="{{actor.id}}" data-type="global" class="fas fa-question-circle actor-infos-control"></i></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-id="{{actor.id}}" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span></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>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -109,13 +109,13 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<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>
|
<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}}
|
/ {{actor.system.battle_readiness.casualties_strength.max}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<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>
|
<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}}
|
/ {{actor.system.battle_readiness.panic_discipline.max}}
|
||||||
</a>
|
</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>
|
/ <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}}
|
/ {{actor.system.commander_standing.status}}
|
||||||
</td>
|
</td>
|
||||||
<td><i data-actor-id="{{actor.id}}" data-type="global" class="fas fa-question-circle actor-infos-control"></i></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-id="{{actor.id}}" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span></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>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<section>
|
<section>
|
||||||
<h2>{{localize 'ACTOR.TypeArmy'}}</h2>
|
<h2>{{localize 'TYPES.Actor.army'}}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{{!-- warlord --}}
|
{{!-- warlord --}}
|
||||||
<li><b>{{localize 'l5r5e.army.allies_backers'}}</b> : {{actorData.system.allies_backers}}</li>
|
<li><b>{{localize 'l5r5e.army.allies_backers'}}</b> : {{actorData.system.allies_backers}}</li>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
{{#each data.skillsList as |skills catId|}}
|
{{#each data.skillsList as |skills catId|}}
|
||||||
<optgroup label="{{localizeSkill catId 'title'}}">
|
<optgroup label="{{localizeSkill catId 'title'}}">
|
||||||
{{#each skills as |obj|}}
|
{{#each skills as |obj|}}
|
||||||
<option value="{{obj.id}}">{{obj.label}}</option>
|
<option value="{{obj.uuid}}">{{obj.name}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</optgroup>
|
</optgroup>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
26
system/templates/items/skill/skill-entry.html
Normal file
26
system/templates/items/skill/skill-entry.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<li class="item skill flexcol" data-item-id="{{skill.id}}">
|
||||||
|
<ul class="item-header skill-controls flexrow">
|
||||||
|
<li class="item-img"><img src="{{skill.img}}" title="{{skill.name}}" width="32px" height="32px"/></li>
|
||||||
|
<li class="item-name dice-picker attribute-label rollable l5r5e-tooltip" data-item-id="{{skill._id}}" data-skill="{{skill._id}}">{{skill.name}}</li>
|
||||||
|
<li class="item-rank">
|
||||||
|
{{#if data.editable_not_soft_locked}}
|
||||||
|
<input
|
||||||
|
class="centered-input select-on-focus"
|
||||||
|
type="number"
|
||||||
|
name="skillsValues.{{skill._id}}"
|
||||||
|
value="{{skill.system.rank}}"
|
||||||
|
data-dtype="Number"
|
||||||
|
min="0"
|
||||||
|
max="9"
|
||||||
|
placeholder="0"
|
||||||
|
/>
|
||||||
|
{{else}}
|
||||||
|
{{sum skill.system.rank skill.system.modifier}}
|
||||||
|
{{/if}}
|
||||||
|
</li>
|
||||||
|
{{#if data.editable_not_soft_locked}}
|
||||||
|
<li data-item-id="{{skill._id}}" class="item-control item-edit" title="{{localize 'l5r5e.global.edit'}}"><i class="fas fa-edit"></i></li>
|
||||||
|
<li data-item-id="{{skill._id}}" class="item-control item-delete" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></li>
|
||||||
|
{{/if}}
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
27
system/templates/items/skill/skill-sheet.html
Normal file
27
system/templates/items/skill/skill-sheet.html
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
|
<header class="sheet-header">
|
||||||
|
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||||
|
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||||
|
</header>
|
||||||
|
{{!-- Sheet Body --}}
|
||||||
|
<section class="sheet-body">
|
||||||
|
{{!-- Attributes Tab --}}
|
||||||
|
<article class="attributes" data-group="primary" data-tab="attributes">
|
||||||
|
<label class="attribute">
|
||||||
|
{{localize 'l5r5e.skills.category'}}
|
||||||
|
<select name="system.category">
|
||||||
|
{{#select data.system.category}}
|
||||||
|
{{#each data.SkillCategoriesList as |id|}}
|
||||||
|
<option value="{{id}}">{{localizeSkill id 'title'}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
<label class="attribute">
|
||||||
|
{{localize 'l5r5e.sheets.rank'}}
|
||||||
|
<input class="select-on-focus" type="number" name="system.rank" value="{{data.system.rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
|
</label>
|
||||||
|
</article>
|
||||||
|
{{> 'systems/l5r5e/templates/items/item/item-infos.html'}}
|
||||||
|
</section>
|
||||||
|
</form>
|
||||||
18
system/templates/items/skill/skill-text.html
Normal file
18
system/templates/items/skill/skill-text.html
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<div class="{{cssClass}}" data-actor-id="{{actor._id}}" data-item-id="{{data._id}}">
|
||||||
|
<header class="card-header">
|
||||||
|
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||||
|
</header>
|
||||||
|
<section class="sheet-body">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<strong>{{localize 'l5r5e.skills.category'}}</strong> : {{localizeSkill data.system.category 'title'}}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.system.rank}}{{#if data.system.modifier}} ({{data.system.modifier}}){{/if}}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{{!--item-infos--}}
|
||||||
|
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||||
|
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
19
system/templates/settings/default-skills-dialog.html
Normal file
19
system/templates/settings/default-skills-dialog.html
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<form autocomplete="off">
|
||||||
|
{{#each skillList as |category name|}}
|
||||||
|
<h2>{{localizeSkill name 'title'}}</h2>
|
||||||
|
<div class="form-group">
|
||||||
|
<ul>
|
||||||
|
{{#each category as |skill|}}
|
||||||
|
<li class="item skill flexcol">
|
||||||
|
<ul class="item-header skill-controls flexrow">
|
||||||
|
<li class="item-img"><img src="{{skill.img}}" title="{{skill.name}}" width="32px" height="32px"/></li>
|
||||||
|
<li class="item-name attribute-label l5r5e-tooltip" data-item-uuid="{{skill.uuid}}">{{skill.name}}</li>
|
||||||
|
<li class="item-source">{{#if skill.pack}}{{skill.pack}}{{else}}world{{/if}}</li>
|
||||||
|
<li data-item-uuid="{{skill.uuid}}" class="item-control item-delete" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</form>
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
- [Symbols replacement list](users/symbols.md)
|
- [Symbols replacement list](users/symbols.md)
|
||||||
- [Advanced : Techniques skill and difficulty syntaxe](users/techniques-syntaxe.md)
|
- [Advanced : Techniques skill and difficulty syntaxe](users/techniques-syntaxe.md)
|
||||||
- [Advanced : Custom Compendiums](users/custom-compendiums.md)
|
- [Advanced : Custom Compendiums](users/custom-compendiums.md)
|
||||||
|
- [Advanced : Using CUB for modifiers](users/cub-modifiers.md)
|
||||||
|
|
||||||
## For developers
|
## For developers
|
||||||
- [System helping (Contribute)](dev/system-helping.md)
|
- [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