-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
1023 lines (909 loc) · 47.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Character Creator</title>
<link href="https://fonts.googleapis.com/css2?family=Bree+Serif&family=Play&family=Source+Sans+Pro&display=swap" rel="stylesheet">
<script src="https://kit.fontawesome.com/37eb526597.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link href="stylesheet.css" rel="stylesheet" type="text/css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://unpkg.com/unfetch/polyfill"></script>
<!-- Set up Namey -->
<script>
self.fetch||(self.fetch=function(e,n){return n=n||{},new Promise(function(t,s){var r=new XMLHttpRequest,o=[],u=[],i={},a=function(){return{ok:2==(r.status/100|0),statusText:r.statusText,status:r.status,url:r.responseURL,text:function(){return Promise.resolve(r.responseText)},json:function(){return Promise.resolve(JSON.parse(r.responseText))},blob:function(){return Promise.resolve(new Blob([r.response]))},clone:a,headers:{keys:function(){return o},entries:function(){return u},get:function(e){return i[e.toLowerCase()]},has:function(e){return e.toLowerCase()in i}}}};for(var c in r.open(n.method||"get",e,!0),r.onload=function(){r.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(e,n,t){o.push(n=n.toLowerCase()),u.push([n,t]),i[n]=i[n]?i[n]+","+t:t}),t(a())},r.onerror=s,r.withCredentials="include"==n.credentials,n.headers)r.setRequestHeader(c,n.headers[c]);r.send(n.body||null)})});
</script>
<script src="js/charactersheet.js"></script>
<script src="js/icon.js"></script>
<script src="js/readURL.js"></script>
<!-- Packages to support pdfform -->
<script src="js/pdfform.minipdf.dist.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.3/pako.min.js" integrity="sha256-X7u/eQo6oIgWqc5jOmTjQn3loM8Lse0ock76Gkkn/Ro=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.0.0/FileSaver.min.js"></script>
<link rel="icon" href="favicon-light.ico" id="light-scheme-icon">
<link rel="icon" href="favicon-dark.ico" id="dark-scheme-icon">
</head>
<body>
<div id="header" class="header">
<img src="assets/sky-star-atmosphere-constellation-aviation-space-1262201-pxhere.com_cropped.jpg" alt="nebula" class="headerbackground">
<img src="assets/title.png" alt="nebula" class="headertext">
</div>
<div class="bodyGrid">
<div class="sidebar">
</div>
<div style="padding:10px">
<div class="topRow" id="topRow">
<div class="topRowLeft" id="topRowLeft">
<div>
<label for="name_mirror" class="heading">Name:</label>
<input id="name_mirror" type="text" size="12" oninput="updateFromMirrors(this.id);updateStatus9();" style="width:168px;">
</div>
<div>
<label for="backgrounds_mirror" class="heading">Background:</label>
<select id="backgrounds_mirror" onchange="updateFromMirrors(this.id);updateStatus2();">
<option value=""></option>
</select>
</div>
<div>
<label for="class_mirror" class="heading">Class:</label>
<select id="class_mirror" onchange="updateFromMirrors(this.id);updateStatus4();updateStatus5();">
<option value=""></option>
<option value="expert">Expert</option>
<option value="psychic">Psychic</option>
<option value="warrior">Warrior</option>
<option value="adventurer" class="adventurerOption" disabled>Adventurer:</option>
<option value="exp_psy"> Expert/Psychic</option>
<option value="war_exp"> Expert/Warrior</option>
<option value="war_psy"> Psychic/Warrior</option>
</select>
</div>
<div style="display:grid;grid-template-columns:90px auto;column-gap:10px">
<div>
<label for="hp_mirror1" class="heading">HP:</label>
<span id="hp_mirror1" style="width:16px">1</span>/<span id="hp_mirror2" style="width:16px">1</span>
</div>
<div>
<label for="attack_bonus" class="heading">Attack Bonus:</label>
<span id="attack_bonus" class="mod">+0</span>
</div>
</div>
<div class="attrBlockWithSelects">
<div class="attrBlock">
<div class="heading">Attribute </div>
<div class="heading">Score </div>
<div class="heading">Mod </div>
<div class="item attr tooltip"> <span class="tooltip">Strength
<div class="tooltiptext attribute" style="width:435px;left:65px;"> Describes physical power, melee prowess, carrying capacity, etc.</div>
</span>
</div>
<div class="item val">
<span id="strength_attr"></span>
<input type="number" id="strength_attr_input" onchange="setAttr('strength',this.value);updateStatus1();" style="display:none">
</div>
<div class="item mod"><span id="strength_mod">+0 </span></div>
<div class="item attr tooltip"> <span class="tooltip"> Dexterity
<div class="tooltiptext attribute" style="width:325px;left:65px;"> Describes speed, evasiveness, coordination, etc.</div>
</span>
</div>
<div class="item val">
<span id="dexterity_attr"></span>
<input type="number" id="dexterity_attr_input" min="3" max="18" onchange="setAttr('dexterity',this.value);updateStatus1();" style="display:none">
</div>
<div class="item mod"><span id="dexterity_mod">+0 </span></div>
<div class="item attr tooltip"> <span class="tooltip"> Constitution
<div class="tooltiptext attribute" style="width:325px;left:90px;">Describes hardiness, fortitude, survivability, etc. </div>
</span>
</div>
<div class="item val">
<span id="constitution_attr"></span>
<input type="number" id="constitution_attr_input" min="3" max="18" onchange="setAttr('constitution',this.value);updateStatus1();" style="display:none">
</div>
<div class="item mod"><span id="constitution_mod">+0 </span></div>
<div class="item attr tooltip"> <span class="tooltip"> Intelligence
<div class="tooltiptext attribute" style="width:350px;left:87px;">Describes memory, critical thinking, education, etc. </div>
</span>
</div>
<div class="item val">
<span id="intelligence_attr"></span>
<input type="number" id="intelligence_attr_input" min="3" max="18" onchange="setAttr('intelligence',this.value);updateStatus1();" style="display:none">
</div>
<div class="item mod"><span id="intelligence_mod">+0 </span></div>
<div class="item attr tooltip"><span class="tooltip"> Wisdom
<div class="tooltiptext attribute" style="width:325px;left:60px;">Describes perception, intuition, judgement, etc.</div>
</span>
</div>
<div class="item val">
<span id="wisdom_attr"></span>
<input type="number" id="wisdom_attr_input" min="3" max="18" onchange="setAttr('wisdom',this.value);updateStatus1();" style="display:none">
</div>
<div class="item mod"><span id="wisdom_mod">+0 </span></div>
<div class="item attr"> <span class="tooltip">Charisma
<div class="tooltiptext attribute" style="width:315px;left:70px;">Describes leadership, charm, prominence, etc.</div>
</span>
</div>
<div class="item val">
<span id="charisma_attr"></span>
<input type="number" id="charisma_attr_input" min="3" max="18" onchange="setAttr('charisma',this.value);updateStatus1();" style="display:none">
</div>
<div class="item mod"><span id="charisma_mod">+0 </span></div>
</div>
<div class="attrSelects">
<div class="attrSelectsItem"> </div>
<div>
<select id="strength_select" class="attrSelectsItem" style="width: 38px" onchange="setAttr('strength',this.value); updateAttrSelects('strength',this.value);">
<option value=""></option>
<option value="14">14</option>
<option value="12">12</option>
<option value="11">11</option>
<option value="10">10</option>
<option value="9">9</option>
<option value="7">7</option>
</select>
</div>
<div>
<select id="dexterity_select" class="attrSelectsItem" style="width: 38px" onchange="setAttr('dexterity',this.value); updateAttrSelects('dexterity',this.value);">
<option value=""></option>
<option value="14">14</option>
<option value="12">12</option>
<option value="11">11</option>
<option value="10">10</option>
<option value="9">9</option>
<option value="7">7</option>
</select>
</div>
<div>
<select id="constitution_select" class="attrSelectsItem" style="width: 38px" onchange="setAttr('constitution',this.value); updateAttrSelects('constitution',this.value);">
<option value=""></option>
<option value="14">14</option>
<option value="12">12</option>
<option value="11">11</option>
<option value="10">10</option>
<option value="9">9</option>
<option value="7">7</option>
</select>
</div>
<div>
<select id="intelligence_select" class="attrSelectsItem" style="width: 38px" onchange="setAttr('intelligence',this.value); updateAttrSelects('intelligence',this.value);">
<option value=""></option>
<option value="14">14</option>
<option value="12">12</option>
<option value="11">11</option>
<option value="10">10</option>
<option value="9">9</option>
<option value="7">7</option>
</select>
</div>
<div>
<select id="wisdom_select" class="attrSelectsItem" style="width: 38px" onchange="setAttr('wisdom',this.value); updateAttrSelects('wisdom',this.value);">
<option value=""></option>
<option value="14">14</option>
<option value="12">12</option>
<option value="11">11</option>
<option value="10">10</option>
<option value="9">9</option>
<option value="7">7</option>
</select>
</div>
<div>
<select id="charisma_select" class="attrSelectsItem" style="width: 38px" onchange="setAttr('charisma',this.value); updateAttrSelects('charisma',this.value);">
<option value=""></option>
<option value="14">14</option>
<option value="12">12</option>
<option value="11">11</option>
<option value="10">10</option>
<option value="9">9</option>
<option value="7">7</option>
</select>
</div>
</div>
<div class="scoreSelects">
<div class="attrSelectsItem"> </div>
<div>
<select id="strength_score_select" class="attrSelectsItem" style="width: 38px" onchange="setAttr('strength',this.value); updateScoreSelects('strength',this.value);">
<option value=""></option>
<option value="14">14</option>
<option value="12">12</option>
<option value="11">11</option>
<option value="10">10</option>
<option value="9">9</option>
<option value="7">7</option>
</select>
</div>
<div>
<select id="dexterity_score_select" class="attrSelectsItem" style="width: 38px" onchange="setAttr('dexterity',this.value); updateScoreSelects('dexterity',this.value);">
<option value=""></option>
<option value="14">14</option>
<option value="12">12</option>
<option value="11">11</option>
<option value="10">10</option>
<option value="9">9</option>
<option value="7">7</option>
</select>
</div>
<div>
<select id="constitution_score_select" class="attrSelectsItem" style="width: 38px" onchange="setAttr('constitution',this.value); updateScoreSelects('constitution',this.value);">
<option value=""></option>
<option value="14">14</option>
<option value="12">12</option>
<option value="11">11</option>
<option value="10">10</option>
<option value="9">9</option>
<option value="7">7</option>
</select>
</div>
<div>
<select id="intelligence_score_select" class="attrSelectsItem" style="width: 38px" onchange="setAttr('intelligence',this.value); updateScoreSelects('intelligence',this.value);">
<option value=""></option>
<option value="14">14</option>
<option value="12">12</option>
<option value="11">11</option>
<option value="10">10</option>
<option value="9">9</option>
<option value="7">7</option>
</select>
</div>
<div>
<select id="wisdom_score_select" class="attrSelectsItem" style="width: 38px" onchange="setAttr('wisdom',this.value); updateScoreSelects('wisdom',this.value);">
<option value=""></option>
<option value="14">14</option>
<option value="12">12</option>
<option value="11">11</option>
<option value="10">10</option>
<option value="9">9</option>
<option value="7">7</option>
</select>
</div>
<div>
<select id="charisma_score_select" class="attrSelectsItem" style="width: 38px" onchange="setAttr('charisma',this.value); updateScoreSelects('charisma',this.value);">
<option value=""></option>
<option value="14">14</option>
<option value="12">12</option>
<option value="11">11</option>
<option value="10">10</option>
<option value="9">9</option>
<option value="7">7</option>
</select>
</div>
</div>
</div>
<div style="display:grid;grid-template-columns:60px 1fr 1fr 1fr;width:95%;height:1.5em">
<div class="heading"> Saving</div>
<div style="text-align:center;font-style:italic" class="tooltip"> Physical
<div class="tooltiptext savingthrow" style="width:285px;left:-70px;">Withstand poison, disease, or exhaustion</div>
</div>
<div style="text-align:center;font-style:italic" class="tooltip"> Evasion
<div class="tooltiptext savingthrow" style="width:240px;left:-85px;">Dodge sudden perils or explosions</div>
</div>
<div style="text-align:center;font-style:italic" class="tooltip"> Mental
<div class="tooltiptext savingthrow" style="width:360px;left:-140px;">Resist psychic influence or mind-bending technology</div>
</div>
<div class="heading"> Throws </div>
<div id="physical_saving_throw" style="text-align:center;"> 15 </div>
<div id="evasion_saving_throw" style="text-align:center;"> 15 </div>
<div id="mental_saving_throw" style="text-align:center;"> 15 </div>
</div>
</div>
<div id="topRowRightContainer" style="position:relative">
<div id="topRowRight" class="topRowRight">
<!-- <div style="width:100%;height:10px;"></div> -->
<div style="display:inline-grid; grid-template-columns: 90px 101px 70px 100px 105px 101px;">
<div style="font-size: 1.5em; padding-left: 8px;" class="heading"> Skill </div>
<div style="font-size:1.5em" class="heading">Rank</div>
<div style="font-size: 1.5em; padding-left: 8px" class="heading"> Skill </div>
<div style="font-size:1.5em" class="heading">Rank</div>
<div style="font-size: 1.5em; padding-left: 8px" class="heading"> Skill </div>
<div style="font-size:1.5em" class="heading">Rank</div>
</div>
<div id="skill_bank" class="skillBank" style="grid-template-columns: fit-content(200px) 1fr;">
<div class="heading">Available skills:</div>
<div id="bank_filler"></div>
</div>
</div>
<div style="position:absolute;right:5px;bottom:12px">
<span class="heading">Psionic Effort:</span> 0/<span id="effort">0</span>
</div>
</div>
</div>
<!-- <script> loadJSON(readURLParams); </script> -->
<!-- <script> loadBackgrounds(); </script> -->
<!-- <script> loadSkills(); </script> -->
<!-- <script> loadClasses(); </script> -->
<!-- <script> loadFoci(); </script> -->
<!-- <script> loadPsionics(); </script> -->
<!-- <script> loadPackages(); </script> -->
<br>
<div class="accordion">
<h3>1. Determine attributes <img src="assets/redx.png" alt="" class="statusicon" id="accordion1StatusIcon"></h3>
<div>
<p>Six attributes—<i>Strength, Dexterity, Constitution, Intelligence, Wisdom,</i> and <i>Charisma</i>—describe the raw potential of your hero. Select one of the methods below to assign your character's <strong>attribute scores</strong>. </p>
<div style="width:100%; display:grid ; grid-template-columns:1fr 1fr; column-gap:10px;">
<div class="collapsibleButton collapsibleButton-attr" id="rollAttrsButton">
<div class="topLayer" id="rollAttrsTopLayer">
<div class="persistentText-default persistentText-default-attr" id="rollAttrsHeader">
<strong>Random</strong>
</div>
<div class="topText topText-attr" id="rollAttrsText"> Roll 3d6 for each attribute. You may then change one attribute's score to 14. </div>
</div>
<div class="bottomLayer">
<div class="bottomText bottomText-attr" id="rollAttrsDescription">
<div id="14attr" style="">
<label for="14attrList">Select one attribute to set to 14</label>
<select id="14attrList">
<option value=""></option>
<option value="strength">Strength</option>
<option value="dexterity">Dexterity</option>
<option value="constitution">Constitution</option>
<option value="intelligence">Intelligence</option>
<option value="wisdom">Wisdom</option>
<option value="charisma">Charisma</option>
</select>
</div>
</div>
</div>
</div>
<div class="collapsibleButton collapsibleButton-attr" id="fixAttrsButton">
<div class="topLayer" id="fixAttrsTopLayer">
<div class="persistentText-default persistentText-default-attr" id="fixAttrsHeader">
<strong>Fixed</strong>
</div>
<div class="topText topText-attr" id="fixAttrsText">
Assign attribute scores from the following list:<br>14, 12 11, 10, 9, 7.
</div>
</div>
<div class="bottomLayer">
<div class="bottomText bottomText-attr" id="fixAttrsDescription">
Assign scores from dropdown menus right of the attribute block above.
</div>
</div>
</div>
</div>
<p>These attribute scores influence your hero's chances of success when employing their skills and abilities. When making a roll to perform a task, add the modifier <span class="heading">(Mod)</span> of the most applicable attribute to the result.<p>
<div class="accordion nestedAccordion">
<h3>Variant rules</h3>
<div>
<p>Some play groups prefer alternatives methods for generating attribute scores than those presented in the offical rules. Here are some possible variations</p>
<div style="width:100%; display:grid ; grid-template-columns:1fr 1fr; column-gap:10px;">
<div class="collapsibleButton collapsibleButton-attr" id="rollReorderAttrsButton">
<div class="topLayer" id="rollReorderAttrsTopLayer">
<div class="persistentText-default persistentText-default-attr" id="rollReorderAttrsHeader">
<strong>Random & Reorder</strong>
</div>
<div class="topText topText-attr" id="rollReorderAttrsText"> Roll 3d6 six times, then assign rolls to attributes in any order. You may then change one score to 14. </div>
</div>
<div class="bottomLayer">
<div class="bottomText bottomText-attr" id="rollReorderAttrsDescription">
<div id="14score" style="">
<label for="14scoreList">Select one roll to replace with a 14</label>
<select id="14scoreList">
<option value=""></option>
</select>
</div>
</div>
</div>
</div>
<div class="collapsibleButton collapsibleButton-attr" id="manualAttrsButton">
<div class="topLayer" id="manualAttrsTopLayer">
<div class="persistentText-default persistentText-default-attr" id="manualAttrsHeader">
<strong>Custom</strong>
</div>
<div class="topText topText-attr" id="manualAttrsText">
Assign attribute scores manually.
</div>
</div>
<div class="bottomLayer">
<div class="bottomText bottomText-attr" id="manualAttrsDescription">
Enter scores into the attribute block above.
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="accordion">
<h3>2. Choose background <img src="assets/redx.png" alt="" class="statusicon" id="accordion2StatusIcon"></h3>
<div>
<p>Pick the <strong>background</strong> from the list below that most closely reflects your hero’s past experiences. You gain rank-0 competency in the listed <strong> Free Skill </strong>, which equates to an ordinary working knowledge.</p>
<div style="display:grid; grid-template-columns:120px auto;" id="backgroundPanel">
<select id="backgrounds" style="height:327px;border:1px solid black;" size="15" onchange="displayBackground(this.value);removeSkillDots();updateSkills();populateLearning(this.value);populateGrowth(this.value);updateMirrors(this.id);updateStatus2();">
<option value="" disabled selected>Choose one</option>
</select>
<div>
<div id="background_description" class="descriptionBox" style="height:325px;overflow:hidden;"> </div>
</div>
</div>
</div>
</div>
<div class="accordion">
<h3>3. Determine skills <img src="assets/redx.png" alt="" class="statusicon" id="accordion3StatusIcon"></h3>
<div>
<div style="display:grid;grid-template-columns: auto 230px;column-gap:20px ">
<div>
<p>Once you pick a background, your hero gains several skills associated with their past. The <strong>Growth</strong> and <strong>Learning Tables</strong> to the right encapsulate the possible abilities their background can confer.</p>
<p>Select one of the methods below to determine these skills.</p>
<p>Your hero gains an additional non-psychic skill reflecting their natural talents or outside interests. Select this skill directly on the skill table at the top of the page.</p>
</div>
<div style="display:grid; grid-template-columns:1fr 1fr;column-gap:10px">
<div style="display:inline-block">
<label for="growth"><strong>Growth</strong></label><br>
<div class="bloc">
<select id="growth" size="6" style="width:140px" disabled="true" multiple>
</select>
</div>
</div>
<div style="display:inline-block">
<label for="learning"><strong>Learning</strong></label><br>
<div class="bloc">
<select id="learning" size="8" style="width:130px" disabled="true" onchange="updateStatus3();" multiple>
</select>
</div>
</div>
</div>
</div>
<br>
<div style="width:100%; display:grid ; grid-template-columns:1fr 1fr; column-gap:10px;">
<div class="collapsibleButton collapsibleButton-skill" id="rollSkillsButton">
<div class="topLayer" id="rollSkillsTopLayer">
<div class="persistentText-default persistentText-default-skill" id="rollSkillsHeader">
<strong>Random</strong>
</div>
<div class="topText topText-skill" id="rollSkillsText"> Roll three times between the Growth and Learning Tables.</div>
</div>
<div class="bottomLayer">
<div class="bottomText bottomText-skill" id="rollSkillsDescription">
<p> Roll up to three times, dividing your rolls between the Growth and Learning Tables as you wish.</p>
<p> Some entries in the Growth Table may read “+2 Physical” or “+2 Mental”; if these are selected, add two points to a physical (Strength, Dexterity, Constitution) or mental (Intelligence, Wisdom, Charisma) attribute, accordingly. Alternatively, you can add one point to two different physical or mental attributes.</p>
<div style="display:grid;grid-template-columns: 1fr 1fr; column-gap:6px;padding:6px;">
<div class="topLayer" id="growth_button" style="font-size:1.1em;width:100%;position:relative;"> <strong> Roll on Growth Table </strong></div>
<div class="topLayer" id="learning_button" style="font-size:1.1em;width:100%;position:relative;"> <strong> Roll on Learning Table </strong></div>
</div>
<!-- <button id="growth_button" onclick="rollGrowth();">Roll on Growth Table</button> -->
<!-- <button id="learning_button" onclick="rollLearning();">Roll on Learning Table </button> -->
</div>
</div>
</div>
<div class="collapsibleButton collapsibleButton-skill" id="pickSkillsButton">
<div class="topLayer" id="pickSkillsTopLayer">
<div class="persistentText-default persistentText-default-skill" id="pickSkillsHeader" >
<strong>Fixed</strong>
</div>
<div class="topText topText-skill" id="pickSkillsText">
Pick two skills from the Learning Table.
</div>
</div>
<div class="bottomLayer">
<div class="bottomText bottomText-skill" id="pickSkillsDescription">
<br>
<br>
<p>Select any two options from the Learning Table above except for "Any Skill." You cannot pick entries from the Growth Table.</p>
<p>If you’re not sure what to pick, just take the Quick Skills listed for your background, which include your background’s Free Skill.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="accordion">
<h3>4. Choose class <img src="assets/redx.png" alt="" class="statusicon" id="accordion4StatusIcon"></h3>
<div>
<p>Choose your hero's <strong>class</strong>, representing their talents most relevant to adventuring. If your hero isn’t well-described as a Warrior, Expert, or Psychic, you can mix class abilities by choosing one of the Adventurer varieties.</p>
<div style="display:grid; grid-template-columns:140px auto;" id="classPanel">
<select id="class" onchange="tabulateFoci(); displayClass(); updateSkills(); updateMirrors(this.id);updateStatus4();updateStatus5();" size="15" style="height:327px;border:1px solid black;overflow:hidden">
<option value="" disabled selected>Choose one</option>
<option value="expert">Expert</option>
<option value="psychic">Psychic</option>
<option value="warrior">Warrior</option>
<option value="adventurer" class="adventurerOption" disabled>Adventurer:</option>
<option value="exp_psy"> Expert/Psychic</option>
<option value="war_exp"> Expert/Warrior</option>
<option value="war_psy"> Psychic/Warrior</option>
</select>
<div id="class_description" class="descriptionBox" style="height:325px">
</div>
</div>
</div>
</div>
<div class="accordion">
<h3>5. Choose foci <img src="assets/redx.png" alt="" class="statusicon" id="accordion5StatusIcon"></h3>
<div>
<p>Choose your hero's <strong>foci</strong>, representing their side talents or particular specializations. All characters gain one focus of their choice at first level.</p>
<p>Characters with the Expert class or the Partial Expert feature of the Adventurer class get an additional non-psychic, non-combat focus; characters with the Warrior class or Partial Warrior feature of the Adventurer class can do the same with a non-psychic, combat focus.</p>
<p>Foci contain two levels of advancement, representing different degrees of expertise your hero can attain. Selecting a focus once confers the abilities described under <strong>Level 1</strong>. If your character's class allows for multiple selections, this focus can be chosen again to confer the additional benefits under <strong>Level 2</strong>. </p>
<div id="tabs">
<ul>
<li id="foci_tab">
<a href="#tab-1">
<div style="text-align:center">
<label for="foci">General Focus</label><br>
<select id="foci" onchange="tabulateFoci(); displayFoci(this.value); isolateFoci(); updateSkills(); updateStatus5();" style="width:200px;">
<option value=""></option>
</select>
</div>
</a>
</li>
<li id="combat_foci_tab" style="display:none">
<a href="#tab-1">
<div style="text-align:center">
<label for="combat_foci">Combat Focus</label><br>
<select id="combat_foci" onchange="tabulateFoci(); displayFoci(this.value); isolateFoci(); updateSkills(); updateStatus5();" style="width:200px;">
<option value=""></option>
</select>
</div>
</a>
</li>
<li id="noncombat_foci_tab" style="display:none">
<a href="#tab-1">
<div style="text-align:center">
<label for="noncombat_foci">Non-combat Focus</label><br>
<select id="noncombat_foci" onchange="tabulateFoci(); displayFoci(this.value); isolateFoci(); updateSkills(); updateStatus5();" style="width:200px;">
<option value=""></option>
</select>
</div>
</a>
</li>
</ul>
<div id="tab-1">
<div id="foci_description" class="descriptionBox" style="height:250px"> </div>
</div>
</div>
</div>
</div>
<div class="accordion">
<h3>6. Choose psionic techniques <img src="assets/checkmark.png" alt="" class="statusicon" id="accordion6StatusIcon"></h3>
<div>
<p>Characters with Psychic class or the Partial Psychic feature of the Adventurer class gain techniques associated with the psionic disciplines in which they are proficient.</p>
<p>Upon attaining rank-0 expertise in a psychic skill, your hero automatically learns the <strong>Core Technique</strong> for that discipline. The power of that technique is described under <strong>Level-0</strong>.</p>
<p>Heroes that reach rank-1 expertise in a psychic skill gain the benefits listed under <strong>Level-1</strong> of its <strong>Core Technique</strong>. Additionally, characters may select a level-1 technique from that discipline as well.</p>
<div id="psionics_tabs" style="display:none">
<ul>
<li id="biopsionics_tab" style="display:none">
<a href="#biopsionics_panel">
<div style="text-align:center">
Biopsionics
</div>
</a>
</li>
<li id="metapsionics_tab" style="display:none">
<a href="#metapsionics_panel">
<div style="text-align:center">
Metapsionics
</div>
</a>
</li>
<li id="precognition_tab" style="display:none">
<a href="#precognition_panel">
<div style="text-align:center">
Precognition
</div>
</a>
</li>
<li id="telekinesis_tab" style="display:none">
<a href="#telekinesis_panel">
<div style="text-align:center">
Telekinesis
</div>
</a>
</li>
<li id="telepathy_tab" style="display:none">
<a href="#telepathy_panel">
<div style="text-align:center">
Telepathy
</div>
</a>
</li>
<li id="teleportation_tab" style="display:none">
<a href="#teleportation_panel">
<div style="text-align:center">
Teleportation
</div>
</a>
</li>
</ul>
<div id="biopsionics_panel">
<div id="biopsionics_heading" style="display:none"><h2>Biopsionics</h2></div>
<label id="biopsionics_core_heading" for="biopsionics_core_description" class="techniqueLabel" style="display:none;">Core Technique</label>
<div id="biopsionics_core_description" class="descriptionBox" style="width:100%;height:200px;display:none;">
</div>
<br>
<label for="biopsionicsLevel1Panel" class="techniqueLabel" id="biopsionics_level1_heading" style="display:none">Level-1 Techniques</label><br>
<div style="display:grid; grid-template-columns:217px auto;" id="biopsionicsLevel1Panel">
<select id="biopsionics_level1" onchange="displayTechniqueInfo('biopsionics',this.value); updateStatus6();" style="display:none;overflow:hidden;height:152px;border:1px solid black;" size="6">
<option value="" selected disabled>Choose one</option>
</select>
<div id="biopsionics_level1_description" class="descriptionBox" style="width:100%;height:150px;display:none">
</div>
</div>
</div>
<div id="metapsionics_panel">
<div id="metapsionics_heading" style="display:none"><h2>Metapsionics</h2></div>
<label id="metapsionics_core_heading" for="metapsionics_core_description" class="techniqueLabel" style="display:none;">Core Technique</label>
<div id="metapsionics_core_description" class="descriptionBox" style="width:100%;height:200px;display:none;">
</div>
<br>
<label for="metapsionicsLevel1Panel" class="techniqueLabel" id="metapsionics_level1_heading" style="display:none">Level-1 Techniques</label><br>
<div style="display:grid; grid-template-columns:217px auto;" id="metapsionicsLevel1Panel">
<select id="metapsionics_level1" onchange="displayTechniqueInfo('metapsionics',this.value); updateStatus6();" style="display:none;overflow:hidden;height:152px;border:1px solid black;" size="6">
<option value="" selected disabled>Choose one</option>
</select>
<div id="metapsionics_level1_description" class="descriptionBox" style="width:100%;height:150px;display:none">
</div>
</div>
</div>
<div id="precognition_panel">
<div id="precognition_heading" style="display:none"><h2>Precognition</h2></div>
<label id="precognition_core_heading" for="precognition_core_description" class="techniqueLabel" style="display:none;">Core Technique</label>
<div id="precognition_core_description" class="descriptionBox" style="width:100%;height:200px;display:none;">
</div>
<br>
<label for="precognitionLevel1Panel" class="techniqueLabel" id="precognition_level1_heading" style="display:none">Level-1 Techniques</label><br>
<div style="display:grid; grid-template-columns:217px auto;" id="precognitionLevel1Panel">
<select id="precognition_level1" onchange="displayTechniqueInfo('precognition',this.value); updateStatus6();" style="display:none;overflow:hidden;" size="6">
<option value="" selected disabled>Choose one</option>
</select>
<div id="precognition_level1_description" class="descriptionBox" style="width:100%;height:150px;display:none">
</div>
</div>
</div>
<div id="telekinesis_panel">
<div id="telekinesis_heading" style="display:none"><h2>Telekinesis</h2></div>
<label id="telekinesis_core_heading" for="telekinesis_core_description" class="techniqueLabel" style="display:none;">Core Technique</label>
<div id="telekinesis_core_description" class="descriptionBox" style="width:100%;height:200px;display:none;">
</div>
<br>
<label for="telekinesisLevel1Panel" class="techniqueLabel" id="telekinesis_level1_heading" style="display:none">Level-1 Techniques</label><br>
<div style="display:grid; grid-template-columns:217px auto;" id="telekinesisLevel1Panel">
<select id="telekinesis_level1" onchange="displayTechniqueInfo('telekinesis',this.value); updateStatus6();" style="display:none;overflow:hidden;height:152px;border:1px solid black;" size="6">
<option value="" selected disabled>Choose one</option>
</select>
<div id="telekinesis_level1_description" class="descriptionBox" style="width:100%;height:150px;display:none">
</div>
</div>
</div>
<div id="telepathy_panel">
<div id="telepathy_heading" style="display:none"><h2>Telepathy</h2></div>
<label id="telepathy_core_heading" for="telepathy_core_description" class="techniqueLabel" style="display:none;">Core Technique</label>
<div id="telepathy_core_description" class="descriptionBox" style="width:100%;height:200px;display:none;">
</div>
<br>
<label for="telepathyLevel1Panel" class="techniqueLabel" id="telepathy_level1_heading" style="display:none">Level-1 Techniques</label><br>
<div style="display:grid; grid-template-columns:217px auto;" id="telepathyLevel1Panel">
<select id="telepathy_level1" onchange="displayTechniqueInfo('telepathy',this.value); updateStatus6();" style="display:none;overflow:hidden;height:152px;border:1px solid black;" size="6">
<option value="" selected disabled>Choose one</option>
</select>
<div id="telepathy_level1_description" class="descriptionBox" style="width:100%;height:150px;display:none">
</div>
</div>
</div>
<div id="teleportation_panel">
<div id="teleportation_heading" style="display:none"><h2>Teleportation</h2></div>
<label id="teleportation_core_heading" for="teleportation_core_description" class="techniqueLabel" style="display:none;">Core Technique</label>
<div id="teleportation_core_description" class="descriptionBox" style="width:100%;height:200px;display:none;">
</div>
<br>
<label for="teleportationLevel1Panel" class="techniqueLabel" id="teleportation_level1_heading" style="display:none">Level-1 Techniques</label><br>
<div style="display:grid; grid-template-columns:217px auto;" id="teleportationLevel1Panel">
<select id="teleportation_level1" onchange="displayTechniqueInfo('teleportation',this.value); updateStatus6();" style="display:none;overflow:hidden;height:152px;border:1px solid black;" size="6">
<option value="" selected disabled>Choose one</option>
</select>
<div id="teleportation_level1_description" class="descriptionBox" style="width:100%;height:150px;display:none">
</div>
</div>
</div>
</div>
<p id="psionics_instruction"> <i>Select psychic skills on the skill table above to gain psionic techniques.</i></p>
</div>
</div>
<div class="accordion">
<h3>7. Roll hit points <img src="assets/redx.png" alt="" class="statusicon" id="accordion7StatusIcon"></h3>
<div>
<p> Your hero's <strong>hit points</strong> represent their overall health, stamina, and luck. If brought to zero hit points, your hero is defeated; whether they are dead, dying, unconscious, or merely incapacitated depends on how their hit points are lost.</p>
<div style="display:grid;grid-template-columns:auto 370px;column-gap:15px">
<div>
To determine your hero's maximum hit points, roll 1d6 and add your Constitution modifer to the result. Warrior characters and Adventurers with the Partial Warrior class option add two points to this total.
<p>No penalty can reduce your maximum hit points below one.</p>
</div>
<div class="collapsibleButton collapsibleButton-hp" id="rollHPButton">
<div class="topLayer" id="rollHPTopLayer">
<div class="persistentText-default persistentText-default-hp" id="rollHPHeader">
<strong>Roll hit points</strong>
</div>
<div class="topText topText-hp" id="rollHPText">
</div>
</div>
<div class="bottomLayer">
<div class="bottomText bottomText-hp" id="rollHPDescription">
<div style="display:inline-block; text-align:center;">
<label for="hp_roll">Roll</label><br>
<input type="number" id="hp_roll" disabled="true">
</div>
+
<div style="display:inline-block; text-align:center;">
<label for="constitution_hp_bonus"> Con modifier</label><br>
<input type="number" id="constitution_hp_bonus" disabled="true">
</div>
+
<div style="display:inline-block; text-align:center;">
<label for="class_hp_bonus"> Class/Foci bonus </label><br>
<input type="number" id="class_hp_bonus" disabled="true">
</div>
= <input type="number" id="hp_total" disabled="true">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="accordion">
<h3>8. Choose equipment <img src="assets/redx.png" alt="" class="statusicon" id="accordion8StatusIcon"></h3>
<div>
<p>Your hero begins their adventure with some equipment and (modest) wealth.</p>
<p>Choose one of the equipment packages below. Selecting the "Custom" package provides your character with 2d6 x 100 starting credits with which to buy gear.</p>
<div style="display:grid; grid-template-columns:100px auto;" id="equipmentPanel">
<select id="equipment_packages" onchange="displayEquipmentPackage(this.value);updateStatus8();" size="10" style="overflow:hidden;height:272px;border:1px solid black;">
<option value="" selected disabled>Choose one</option>
</select>
<div class="descriptionBox" id="equipment_packages_description" style="height:270px;">
</div>
</div>
</div>
</div>
<div class="accordion">
<h3>9. Add finishing touches <img src="assets/warning.png" alt="" class="statusicon" id="accordion9StatusIcon"></h3>
<div>
<p>Your hero is more than just a block of stats. Flesh out your character by filling out the following information.</p>
<div style="display:grid; grid-template-columns:1fr 1fr">
<div>
<label for="name">Name</label>
<input id="name" type="text" oninput="updateMirrors(this.id);updateStatus9();" style="width:168px;">
</div>
<div>
<label for="homeworld">Homeworld</label>
<input id="homeworld" type="text" oninput="updateStatus9();">
</div>
<div>
<label for="employer">Employer</label>
<input id="employer" type="text" oninput="updateStatus9();">
</div>
<div>
<label for="species">Species</label>
<input id="species" type="text" oninput="updateStatus9();">
</div>
<br>
</div>
<!-- <div style="display:grid;text-align:left"> -->
<!-- <div> -->
<!-- <label for="portrait" style="width:170px;height:1.3em;padding:3px;z-index:0" class="topLayer">Upload character portrait</label> -->
<!-- <p><input type="file" accept="image/*" name="portrait" id="portrait" style="display: none;" onchange="loadFile(event);updateStatus9();" ></p> -->
<!-- </div> -->
<!-- <div> -->
<!-- <p><i>(Use a picture with aspect ratio close to 1:1 for best results)</i><p> -->
<!-- </div> -->
<!-- </div> -->
<!-- <p><img id="portrait_holder" style="display:none;"></p> -->
<!-- <script> -->
<!-- var loadFile = function(event) { -->
<!-- var image = document.getElementById('portrait_holder'); -->
<!-- image.src = URL.createObjectURL(event.target.files[0]); -->
<!-- }; -->
<!-- </script> -->
<br>
<div style="display:grid; grid-template-columns:1fr 1fr;column-gap:10px">
<div style="display:inline-block">
<label for="goals">Goals</label><br>
<textarea id="goals" style="width:100%;height:100px" oninput="updateStatus9();"></textarea>
</div>
<div style="display:inline-block">
<label for="notes">Notes</label><br>
<textarea id="notes" style="width:100%;height:100px" oninput="updateStatus9();"></textarea>
</div>
</div>
</div>
</div>
<script>hideAttrSelects();hideScoreSelects();hideGrowthButtons();</script>
<div class="dialog_window" id="anystat_dialog">
Choose an attribute bonus.
<fieldset>
<legend>Bonus</legend>
<label for="anystat_strength">+1 Strength </label>
<input type="radio" name="anystat" value="strength" id="anystat_strength">
<label for="anystat_dexterity">+1 Dexterity </label>
<input type="radio" name="anystat" value="dexterity" id="anystat_dexterity">
<label for="anystat_constitution">+1 Constitution </label>
<input type="radio" name="anystat" value="constitution" id="anystat_constitution">
<label for="anystat_intelligence">+1 Intelligence </label>
<input type="radio" name="anystat" value="intelligence" id="anystat_intelligence">
<label for="anystat_wisdom">+1 Wisdom </label>
<input type="radio" name="anystat" value="wisdom" id="anystat_wisdom">
<label for="anystat_charisma">+1 Charisma </label>
<input type="radio" name="anystat" value="charisma" id="anystat_charisma">
</fieldset>
</div>
<div class="dialog_window" id="physstat_dialog">
Choose two attribute bonuses (the same attribute can be increased twice).
<fieldset>
<legend>Bonus 1</legend>
<label for="physstat1_strength">+1 Strength </label>
<input type="radio" name="physstat1" value="strength" id="physstat1_strength">
<label for="physstat1_dexterity">+1 Dexterity </label>
<input type="radio" name="physstat1" value="dexterity" id="physstat1_dexterity">
<label for="physstat1_constitution">+1 Constitution </label>
<input type="radio" name="physstat1" value="constitution" id="physstat1_constitution">
</fieldset>
<br>
<fieldset>
<legend>Bonus 2</legend>
<label for="physstat2_strength">+1 Strength </label>
<input type="radio" name="physstat2" value="strength" id="physstat2_strength">
<label for="physstat2_dexterity">+1 Dexterity </label>
<input type="radio" name="physstat2" value="dexterity" id="physstat2_dexterity">
<label for="physstat2_constitution">+1 Constitution </label>
<input type="radio" name="physstat2" value="constitution" id="physstat2_constitution">
</fieldset>
</div>
<div class="dialog_window" id="mentstat_dialog">
Choose two attribute bonuses (the same attribute can be increased twice).
<fieldset>
<legend>Bonus 1</legend>
<label for="mentstat1_intelligence">+1 Intelligence </label>
<input type="radio" name="mentstat1" value="intelligence" id="mentstat1_intelligence">
<label for="mentstat1_wisdom">+1 Wisdom </label>
<input type="radio" name="mentstat1" value="wisdom" id="mentstat1_wisdom">
<label for="mentstat1_charisma">+1 Charisma </label>
<input type="radio" name="mentstat1" value="charisma" id="mentstat1_charisma">
</fieldset>
<br>
<fieldset>
<legend>Bonus 2</legend>
<label for="mentstat2_intelligence">+1 Intelligence </label>
<input type="radio" name="mentstat2" value="intelligence" id="mentstat2_intelligence">
<label for="mentstat2_wisdom">+1 Wisdom </label>
<input type="radio" name="mentstat2" value="wisdom" id="mentstat2_wisdom">
<label for="mentstat2_charisma">+1 Charisma </label>
<input type="radio" name="mentstat2" value="charisma" id="mentstat2_charisma">
</fieldset>
</div>
<div class="dialog_window" id="punchstab_dialog">
Choose one of the following skills.
<label for="punchstab_punch">Punch</label>
<input type="radio" name="punchstab" value="punch" id="punchstab_punch">
<label for="punchstab_stab">Stab</label>
<input type="radio" name="punchstab" value="stab" id="punchstab_stab">
</div>
<div class="dialog_window" id="stabshoot_dialog">
Choose one of the following skills.
<label for="stabshoot_stab">Stab</label>
<input type="radio" name="stabshoot" value="stab" id="stabshoot_stab">
<label for="stabshoot_shoot">Shoot</label>
<input type="radio" name="stabshoot" value="shoot" id="stabshoot_shoot">
</div>
<div id="url_dialog" class="shareDialog">
<h2>Share this character via the following link:</h2>
<div id="url_span"></div>
</div>
<div id="info_dialog" class="shareDialog">
<h3>What is this?</h3>
<p>Instructions and tools for creating player characters in the revised edition of <a href="https://www.drivethrurpg.com/product/230009/Stars-Without-Number-Revised-Edition-Free-Version?cPath=36869" target="_blank">Stars Without Number</a>, a tabletop roleplaying game by <i>Sine Nominee Publishing</i>. Generate a random character, download a completed character sheet, and share your creation with the buttons below.</p>
<p>Source code hosted on <a href="https://github.com/noah-sennett/swn-character-creator/">Github</a>; to add homebrew skills, foci, psionic techniques, or equipment, simply fork the repository and add to the appropriate JSON file.</p>
<h3>Feedback</h3>
<p> Bug reports, questions, and comments can be submitted through <a href="https://github.com/noah-sennett/swn-character-creator/issues">Github</a> or email <a href="mailto:swncharactercreator@gmail.com">swncharactercreator@gmail.com</a></p>