Skip to content

Commit c9df1c3

Browse files
committed
Multiple trackers, Advanced options, Commenting
- Multiple trackers: Support multiple trackers at the same time - Advanced options: Optional array parameter on open() method to pass advanced options - Commenting: Comment code
1 parent 1200001 commit c9df1c3

File tree

6 files changed

+463
-303
lines changed

6 files changed

+463
-303
lines changed

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,20 @@ An interactive aid to track successes and failures in challenges.
1010
- **Player View:** Click **Show** on the header to show the tracker to your players and click **Hide** to hide it from your players.
1111

1212
## How to Use
13-
1. Create a macro with a Type of 'script' and enter: `ChallengeTracker.open(successes, failures, {show: true/false})` where `successes` is the number of successes required, `failures` is the number of failures required, and `{show: true/false}` equals `{show: true}` to show the tracker to your players or `{show: false}` to hide it from your players. `{show: true/false}` is optional and is set to false by default.
13+
1. Create a macro with a Type of 'script' and enter: `ChallengeTracker.open(outer, inner)` where `outer` is the number of segments required on the outer ring (successes) and `inner` is the number of segments required on the inner circle (failures).
1414
2. Execute the macro to open the Challenge Tracker.
1515

16-
![challenge-tracker-macro](https://user-images.githubusercontent.com/105953297/174798982-53b25513-5aca-464d-9556-1ab7ee543856.png)
16+
## Advanced Options
17+
More options can be set using an optional array parameter: `ChallengeTracker.open(successes failures, {options})` where options is a comma-separated list of any of the following parameters in the format `option: value`:
18+
- **show:** Set to `true` to show the Challenge Tracker to your players. Default is `false`. Example: `show: true`
19+
- **outerCurrent:** Set the number of completed segments on the outer ring (successes). Default is `0`. Example: `outerCurrent: 3`
20+
- **innerCurrent:** Set the number of completed segments on the inner circle (failures). Default is `0`. Example: `innerCurrent: 3`
21+
- **outerColor:** Set the hex color of the outer ring (successes). The 'Outer Color' module setting will be ignored. Example: `outerColor: '#0000FF'`
22+
- **innerColor:** Set the hex color of the inner circle (failures). The 'Inner Color' module setting will be ignored. Example: `outerColor: '#0000FF'`
23+
- **frameColor:** Set the hex color of the frame. The 'Frame Color' module setting will be ignored. Example: `outerColor: '#0000FF'`
24+
- **size:** Set the size of the Challenge Tracker in pixels between 200 to 600. The 'Size' module setting will be ignored. Example: `size: 400`
25+
- **title:** Set the title of the Challenge Tracker in the window header. Default is `Challenge Tracker`. Example: `title: 'Skill Challenge 1'`
1726

18-
By default, successes are tracked on the outer ring while failures are tracked on the inner circle.
27+
**Example:** `ChallengeTracker.open(10, 5, {show: true, outerCurrent: 10, innerCurrent: 5, outerColor: '#FF3232', innerColor: '#2180FF', title: 'Health & Mana'})`
1928

20-
Currently, only the GM can open, control and close the Challenge Tracker. In a future release, I'll add the functionality to hand over the Challenge Tracker to a player.
29+
![challenge-tracker-macro](https://user-images.githubusercontent.com/105953297/174798982-53b25513-5aca-464d-9556-1ab7ee543856.png)

languages/en.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"settings": {
3-
"successColor" : {
4-
"name": "Success Color",
5-
"hint": "Set the color for successes",
3+
"outerColor" : {
4+
"name": "Outer Color",
5+
"hint": "Set the color for the outer ring",
66
"label": "Color Picker"
77
},
8-
"failureColor" : {
9-
"name": "Failure Color",
10-
"hint": "Set the color for failures",
8+
"innerColor" : {
9+
"name": "Inner Color",
10+
"hint": "Set the color for the inner circle",
1111
"label": "Color Picker"
1212
},
1313
"frameColor" : {
@@ -21,7 +21,7 @@
2121
},
2222
"scroll" : {
2323
"name": "Scroll",
24-
"hint": "Enable the scroll wheel for increasing/decreasing successes and failures"
24+
"hint": "Enable the scroll wheel for increasing/decreasing segments"
2525
}
2626
}
2727
}

0 commit comments

Comments
 (0)