-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDivers.txt
152 lines (144 loc) · 5.16 KB
/
Divers.txt
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
TEST
---------- ROLLS IN ROLLS ------------------------
Character Replacement
& & &
[ [
] ]
{ {
} }
| |
, ,
---------------- MULTIPLE ON CHANGE --------------
['estimation','forgea','apprentissagetechnologie','sensaiguise','force','acrobatie','diplomatie',
'constitution','mé','multitache', 'dex', 'connaissancecode'].forEach(function (stat) {
on("change:classe change:lv_" + stat.toLowerCase(), function () {
getAttrs(["classe", "b_" + stat, "lv_" + stat], function(values) {
const bonus = parseInt(values["b_" + stat])||0;
const C = values.classe;
const lv = parseInt(values["lv_" + stat])||0;
if(stat === "forgea"){
if(C === "Armurier"){
setAttrs({
["b_" + stat]: lv + 4
});
};
};
if(stat === "mé"){
if(C === "Guerrier"){
setAttrs({
["b_" + stat]: lv + 6
});
};
};
});
});
});
--------------------------------------------------
[i]Si vous aimez et utilisez [b][url=https://github.com/NathaTerrien/roll20-wip/blob/master/README.md]ma production[/url][/b] (*), vous pouvez me soutenir en faisant un [b][url=https://app.roll20.net/gift/forid/75857]petit don[/url][/b] sur Roll20, pour m'aider à payer l'abonnement pro :)
(*) : - créations : Antika, Les Cahiers du Vastemonde, Chroniques Galactiques, Chroniques Oubliées, Cypher System, Dungen World, INS/MV 5E, Numenéra, Portes Monstres Trésors, Savage Worlds / Deadlands Reloaded, Supersix
- traductions : L'Anneau Unique, Trail of Cthulhu
[/i]
//Inventory weight tallying
on("change:repeating_equipment:equipweight remove:repeating_equipment", function (e) {
getSectionIDs("repeating_equipment", function (idarr) {
var totalWeight = 0;
var weightTally = _.after(idarr.length, function () {
setAttrs({ invweight: Math.round(totalWeight) });
});
for (var i = 0; i < idarr.length; i++) {
getAttrs(["repeating_equipment_" + idarr[i] + "_equipweight"], function (v) {
totalWeight += parseFloat(v[Object.keys(v)[0]]);
weightTally();
});
}
});
});
If you set an attribute to an empty string, however, the default will be filled in by the sheet.
-------- MINIFY HTML ----------
Worker: /\*(.*?)\*/\n ==
Commentaires : <!--(.*?)--> ==
Sauts de lignes : \n == espace
Indentation : >\s+< == ><
Templates : >\s+{ == >{
}\s+< == }<
}\s+{ == }{
\s+ => \s
------- MINIFY CSS -----
\n == \s
\s\s+ == \s
\s{\s == {
{\s == {
;\s} == }
:\s == :
-------------- USER OPTIONS ------------------------------
"useroptions": [
{
"attribute": "variable1",
"displayname": "Variable 1",
"type": "text",
"default": "Default Text",
"description": "This is the first user option. Options will appear in the order they are placed inside the useroptions hash on their API page. This option is a text input that will accept any string."
},
{
"attribute": "variable2",
"displayname": "Variable 2",
"type": "number",
"default": "1",
"description": "The second user option is a number input and will only accept valid numbers."
},
{
"attribute": "selectoption",
"displayname": "Select Option",
"type": "select",
"options": ["one", "two", "three"],
"default": "three",
"description": "The third user option is a select, with both set options and a default option."
},
{
"attribute": "variable3",
"displayname": "Variable 3",
"type": "checkbox",
"value": "borkborkbork",
"checked" : "checked",
"description": "The fourth user option is a checkbox with a value for the checked box as well as whether or not the box is checked by default."
},
]
----------- AUTO EXPAND TEXTAREA -------------------------
<div class="autoex">
<span name="attr_name"></span>
<textarea spellcheck="false" name="attr_name"></textarea>
</div>
.sheet-autoex {
position: relative;
cursor: text;
}
.sheet-autoex span {
visibility: hidden;
white-space: pre-wrap;
display: block;
line-height: inherit;
}
.sheet-autoex textarea {
position: absolute;
z-index: 1;
top: 0;
left: 0;
margin: 0;
resize: none;
height: 100%;
width: 100%;
display: block;
box-sizing: border-box;
background: transparent;
border: none;
border-radius: 0;
box-shadow: none;
color: inherit;
font: inherit;
letter-spacing: inherit;
padding: inherit;
text-align: inherit;
text-transform: inherit;
line-height: inherit;
}
Important: In order for this to actually show up on the sheet, one specific CSS property is missing: you need to set a min-height for the .sheet-auto-expand element equal to the minimum height you want it to be (so at least 1 line-height + vertical padding, or more if you want to show more lines by default).