Skip to content

Commit b06eaaa

Browse files
authored
Merge pull request #106 from Cussa/master
Chargen links + Headquarter member statistics
2 parents 4c2d756 + 36b8ad5 commit b06eaaa

13 files changed

+291
-72
lines changed

Diff for: README.md

+7
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ This system provides character sheets and items for your play, if you would lik
3131
## Release Notes
3232
=======
3333

34+
v4.4.0
35+
- ✨ link archetypes, talents and items in Chargen to their journal pages and items
36+
![Chargen improvements](asset/chargen_links.png?raw=true)
37+
- 💄 use default UI settings for player sheet
38+
- ✨ Headquater members' statistics: a non-meta-gaming way to check who is the best to do some roll
39+
![Member Statistics](asset/member_statistics.png?raw=true)
40+
3441
v4.3.1
3542
- 🐛 Fix: get weapon icon when dragging to macro bar
3643
- 🐛 Fix: Vagabond start equipment should be "Quarterstaff" (fix #104)

Diff for: asset/chargen_links.png

333 KB
Loading

Diff for: asset/member_statistics.png

778 KB
Loading

Diff for: lang/en.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
"TAB.CONTACT": "CONTACT",
170170
"TAB.PERSONNEL": "PERSONNEL",
171171
"TAB.UPGRADES" : "UPGRADES",
172+
"TAB.MEMBERS" : "MEMBER STATISTICS",
172173

173174
"TALENT.ICON": "Icon",
174175
"TALENT.NAME": "Talent",
@@ -266,5 +267,8 @@
266267
"GENERATOR.APPLIED": "APPLIED",
267268
"GENERATOR.DISCARDED": "DISCARDED",
268269
"GENERATOR.REROLL": "Reroll",
269-
"GENERATOR.LIFE": "LIfe Path"
270+
"GENERATOR.LIFE": "LIfe Path",
271+
272+
"HEADQUARTER.MEMBER_RANKING": "MEMBER RANKINGS",
273+
"HEADQUARTER.MEMBER_RANKING_EXPLANATION": "When determining who is best suited for a particular attribute or skill roll, this allows you to take a non-meta-gaming approach. Rather than relying on specific numbers, you consider who is the most skilled in that area. For skills, this is determined by the combined value of the relevant attribute and the skill itself. If multiple characters are listed, it means they roll the same number of dice for that task."
270274
}

Diff for: model/headquarter.hbs

+4-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<div class="sheet-tabs tabs flex row" data-group="primary">
4040
<b class="item" data-tab="upgrades">{{localize "TAB.UPGRADES"}}</b>
4141
<b class="item" data-tab="history">{{localize "TAB.NOTES"}}</b>
42-
42+
<b class="item" data-tab="members">{{localize "TAB.MEMBERS"}}</b>
4343
</div>
4444

4545
<div class="sheet-body flex row">
@@ -49,8 +49,9 @@
4949
<div class="tab history" data-group="primary" data-tab="history">
5050
{{> systems/vaesen/model/tab/headquarter-history.hbs}}
5151
</div>
52-
53-
52+
<div class="tab members" data-group="primary" data-tab="members">
53+
{{> systems/vaesen/model/tab/headquarter-members.hbs}}
54+
</div>
5455
</div>
5556
</div>
5657
</div>

Diff for: model/tab/headquarter-members.hbs

+162
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
<div class="flex-col w-100 min-w-600">
2+
<div class="flex-col heavy-border margin-b-sm padding-sm min-h-500">
3+
<b class="title dark" style="width: 100%; margin-left: 0px;">{{localize "HEADQUARTER.MEMBER_RANKING"}}</b>
4+
<div class="info-box flex row fancy-border">
5+
<p>{{ localize "HEADQUARTER.MEMBER_RANKING_EXPLANATION" }}</p>
6+
</div>
7+
<div class="vaesen char-gen m-1 pi-1 flex-col">
8+
<div class="flex column player headquarter">
9+
<div>
10+
<div class="skills flex column physique">
11+
<b class="header"> {{ localize "ATTRIBUTE.PHYSIQUE"}}:
12+
<ul>
13+
{{#each actor.flags.vaesen.bestPlayers.physique as | value | }}
14+
<li>{{value}}</li>
15+
{{/each}}
16+
</ul>
17+
</b>
18+
<div class="skill-group">
19+
<div class="skill flex row align-center"><b>{{ localize "SKILL.AGILITY"}}:</b>
20+
<ul>
21+
{{#each actor.flags.vaesen.bestPlayers.agility as | value | }}
22+
<li>{{value}}</li>
23+
{{/each}}
24+
</ul>
25+
</div>
26+
<div class="skill flex row align-center"><b>{{ localize "SKILL.CLOSE_COMBAT"}}:</b>
27+
<ul>
28+
{{#each actor.flags.vaesen.bestPlayers.closeCombat as | value | }}
29+
<li>{{value}}</li>
30+
{{/each}}
31+
</ul>
32+
</div>
33+
<div class="skill flex row align-center"><b>{{ localize "SKILL.FORCE"}}:</b>
34+
<ul>
35+
{{#each actor.flags.vaesen.bestPlayers.force as | value | }}
36+
<li>{{value}}</li>
37+
{{/each}}
38+
</ul>
39+
</div>
40+
</div>
41+
</div>
42+
</div>
43+
<div>
44+
<div class="skills flex column logic">
45+
<b class="header"> {{ localize "ATTRIBUTE.LOGIC"}}:
46+
<ul>
47+
{{#each actor.flags.vaesen.bestPlayers.logic as | value | }}
48+
<li>{{value}}</li>
49+
{{/each}}
50+
</ul>
51+
</b>
52+
<div class="skill-group">
53+
<div class="skill flex row align-center"><b>{{ localize "SKILL.INVESTIGATION"}}:</b>
54+
<ul>
55+
{{#each actor.flags.vaesen.bestPlayers.investigation as | value | }}
56+
<li>{{value}}</li>
57+
{{/each}}
58+
</ul>
59+
</div>
60+
<div class="skill flex row align-center"><b>{{ localize "SKILL.LEARNING"}}:</b>
61+
<ul>
62+
{{#each actor.flags.vaesen.bestPlayers.learning as | value | }}
63+
<li>{{value}}</li>
64+
{{/each}}
65+
</ul>
66+
</div>
67+
<div class="skill flex row align-center"><b>{{ localize "SKILL.VIGILANCE"}}:</b>
68+
<ul>
69+
{{#each actor.flags.vaesen.bestPlayers.vigilance as | value | }}
70+
<li>{{value}}</li>
71+
{{/each}}
72+
</ul>
73+
</div>
74+
</div>
75+
</div>
76+
</div>
77+
78+
<div>
79+
<div class="skills flex column precision">
80+
<b class="header"> {{ localize "ATTRIBUTE.PRECISION"}}:
81+
<ul>
82+
{{#each actor.flags.vaesen.bestPlayers.precision as | value | }}
83+
<li>{{value}}</li>
84+
{{/each}}
85+
</ul>
86+
</b>
87+
<div class="skill-group">
88+
<div class="skill flex row align-center"><b>{{ localize "SKILL.MEDICINE"}}:</b>
89+
90+
<ul>
91+
{{#each actor.flags.vaesen.bestPlayers.medicine as | value | }}
92+
<li>{{value}}</li>
93+
{{/each}}
94+
</ul>
95+
96+
</div>
97+
<div class="skill flex row align-center"><b>{{ localize "SKILL.RANGED_COMBAT"}}:</b>
98+
99+
<ul>
100+
{{#each actor.flags.vaesen.bestPlayers.rangedCombat as | value | }}
101+
<li>{{value}}</li>
102+
{{/each}}
103+
</ul>
104+
105+
</div>
106+
<div class="skill flex row align-center"><b>{{ localize "SKILL.STEALTH"}}:</b>
107+
108+
<ul>
109+
{{#each actor.flags.vaesen.bestPlayers.stealth as | value | }}
110+
<li>{{value}}</li>
111+
{{/each}}
112+
</ul>
113+
114+
</div>
115+
</div>
116+
</div>
117+
</div>
118+
<div>
119+
<div class="skills flex column empathy">
120+
121+
<b class="header"> {{ localize "ATTRIBUTE.EMPATHY"}}:
122+
<ul>
123+
{{#each actor.flags.vaesen.bestPlayers.empathy as | value | }}
124+
<li>{{value}}</li>
125+
{{/each}}
126+
</ul>
127+
</b>
128+
<div class="skill-group">
129+
<div class="skill flex row align-center"><b>{{ localize "SKILL.INSPIRATION"}}:</b>
130+
131+
<ul>
132+
{{#each actor.flags.vaesen.bestPlayers.inspiration as | value | }}
133+
<li>{{value}}</li>
134+
{{/each}}
135+
</ul>
136+
137+
</div>
138+
<div class="skill flex row align-center"><b>{{ localize "SKILL.MANIPULATION"}}:</b>
139+
140+
<ul>
141+
{{#each actor.flags.vaesen.bestPlayers.manipulation as | value | }}
142+
<li>{{value}}</li>
143+
{{/each}}
144+
</ul>
145+
146+
</div>
147+
<div class="skill flex row align-center"><b>{{ localize "SKILL.OBSERVATION"}}:</b>
148+
149+
<ul>
150+
{{#each actor.flags.vaesen.bestPlayers.observation as | value | }}
151+
<li>{{value}}</li>
152+
{{/each}}
153+
</ul>
154+
155+
</div>
156+
</div>
157+
</div>
158+
</div>
159+
</div>
160+
</div>
161+
</div>
162+
</div>

Diff for: script/hooks.js

+1
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ function preloadHandlebarsTemplates() {
272272
"systems/vaesen/model/headquarter.hbs",
273273
"systems/vaesen/model/tab/headquarter-history.hbs",
274274
"systems/vaesen/model/tab/headquarter-upgrades.hbs",
275+
"systems/vaesen/model/tab/headquarter-members.hbs",
275276
"systems/vaesen/model/items/criticalInjury.hbs",
276277
"systems/vaesen/model/items/weapon.hbs",
277278
"systems/vaesen/model/items/armor.hbs",

Diff for: script/sheet/headquarter.js

+51-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,57 @@ export class HeadquarterCharacterSheet extends VaesenActorSheet {
1818
});
1919
}
2020

21-
21+
async getData() {
22+
const actors = game.actors.filter(it => it.type == "player" && it.system.headquarter == this.actor.id);
23+
let best = {};
24+
let bestPlayers = {};
25+
let members = {};
26+
27+
actors.forEach(player => {
28+
members[player.name] = player.id;
29+
30+
Object.keys(player.system.attribute).forEach(element => {
31+
if (element == "magic")
32+
return;
33+
if (best[element] == undefined) {
34+
best[element] = 0;
35+
bestPlayers[element] = [];
36+
}
37+
38+
if (best[element] < player.system.attribute[element].value){
39+
best[element] = player.system.attribute[element].value;
40+
bestPlayers[element] = [player.name];
41+
}
42+
else if (best[element] == player.system.attribute[element].value) {
43+
bestPlayers[element].push(player.name);
44+
}
45+
});
46+
47+
Object.keys(player.system.skill).forEach(element => {
48+
const skillItem = player.system.skill[element];
49+
if (skillItem.value == null)
50+
return;
51+
52+
if (best[element] == undefined) {
53+
best[element] = 0;
54+
bestPlayers[element] = [];
55+
}
56+
const currentValue = skillItem.value + player.system.attribute[skillItem.attribute].value;
57+
58+
if (best[element] < currentValue) {
59+
best[element] = currentValue ;
60+
bestPlayers[element] = [player.name];
61+
}
62+
else if (best[element] == currentValue) {
63+
bestPlayers[element].push(player.name);
64+
}
65+
});
66+
});
67+
68+
this.actor.setFlag("vaesen", "bestPlayers", bestPlayers);
69+
70+
return super.getData();
71+
}
2272

2373
activateListeners(html) {
2474
super.activateListeners(html);

Diff for: script/sheet/player.js

-17
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,6 @@ import { VaesenActorSheet } from "../actor/vaesen-actor-sheet.js";
33
import { generator } from "../util/generator.js";
44

55
export class PlayerCharacterSheet extends VaesenActorSheet {
6-
7-
static get defaultOptions() {
8-
return mergeObject(super.defaultOptions, {
9-
classes: ["vaesen", "sheet", "actor"],
10-
width: 750,
11-
height: 930,
12-
resizable: true,
13-
tabs: [
14-
{
15-
navSelector: ".sheet-tabs",
16-
contentSelector: ".sheet-body",
17-
initial: "main",
18-
},
19-
],
20-
});
21-
}
22-
236
async getData() {
247
const headquarter = game.actors.get(this.actor.system.headquarter);
258
if (headquarter)

0 commit comments

Comments
 (0)