Last active
May 21, 2021 21:28
-
-
Save n1ru4l/00b47676b45318a6bfdc448b22c7d16b to your computer and use it in GitHub Desktop.
dungeon-revealer dsa dice macro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Template | |
id="skillCheck" | |
var-skill={{"type":"select","label":"Skills","options":[{"label":"Fliegen","value":{"score":0,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Intuition","value":11},"attr3":{"name":"Gewandheit","value":13}}},{"label":"Gaukeleien","value":{"score":10,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Charisma","value":12},"attr3":{"name":"Fingerfertigkeit","value":13}}},{"label":"Klettern","value":{"score":9,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Gewandheit","value":13},"attr3":{"name":"Körperkraft","value":16}}},{"label":"Körperbeherrschung","value":{"score":10,"attr1":{"name":"Gewandheit","value":13},"attr2":{"name":"Gewandheit","value":13},"attr3":{"name":"Konstitution","value":14}}},{"label":"Kraftakt","value":{"score":10,"attr1":{"name":"Konstitution","value":14},"attr2":{"name":"Körperkraft","value":16},"attr3":{"name":"Körperkraft","value":16}}},{"label":"Reiten","value":{"score":10,"attr1":{"name":"Charisma","value":12},"attr2":{"name":"Gewandheit","value":13},"attr3":{"name":"Körperkraft","value":16}}},{"label":"Schwimmen","value":{"score":7,"attr1":{"name":"Gewandheit","value":13},"attr2":{"name":"Konstitution","value":14},"attr3":{"name":"Körperkraft","value":16}}},{"label":"Selbstbeherrschung","value":{"score":3,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Mut","value":16},"attr3":{"name":"Konstitution","value":14}}},{"label":"Singen","value":{"score":10,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Charisma","value":12},"attr3":{"name":"Konstitution","value":14}}},{"label":"Sinnesschärfe","value":{"score":7,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Intuition","value":11},"attr3":{"name":"Intuition","value":11}}},{"label":"Tanzen","value":{"score":0,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Charisma","value":12},"attr3":{"name":"Gewandheit","value":13}}},{"label":"Taschendiebstahl","value":{"score":0,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Fingerfertigkeit","value":13},"attr3":{"name":"Gewandheit","value":13}}},{"label":"Verbergen","value":{"score":4,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Intuition","value":11},"attr3":{"name":"Gewandheit","value":13}}},{"label":"Zechen","value":{"score":10,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Konstitution","value":14},"attr3":{"name":"Körperkraft","value":16}}},{"label":"Bekehren & Überzeugen","value":{"score":0,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Klugheit","value":10},"attr3":{"name":"Charisma","value":12}}},{"label":"Betören","value":{"score":3,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Charisma","value":12},"attr3":{"name":"Charisma","value":12}}},{"label":"Einschüchtern","value":{"score":7,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Intuition","value":11},"attr3":{"name":"Charisma","value":12}}},{"label":"Etikette","value":{"score":0,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Intuition","value":11},"attr3":{"name":"Charisma","value":12}}},{"label":"Gassenwissen","value":{"score":0,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Intuition","value":11},"attr3":{"name":"Charisma","value":12}}},{"label":"Menschenkenntnis","value":{"score":1,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Intuition","value":11},"attr3":{"name":"Charisma","value":12}}},{"label":"Überreden","value":{"score":2,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Intuition","value":11},"attr3":{"name":"Charisma","value":12}}},{"label":"Verkleiden","value":{"score":0,"attr1":{"name":"Intuition","value":11},"attr2":{"name":"Charisma","value":12},"attr3":{"name":"Gewandheit","value":13}}},{"label":"Willenskraft","value":{"score":3,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Intuition","value":11},"attr3":{"name":"Charisma","value":12}}},{"label":"Fährtensuchen","value":{"score":3,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Intuition","value":11},"attr3":{"name":"Gewandheit","value":13}}},{"label":"Fesseln","value":{"score":0,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Fingerfertigkeit","value":13},"attr3":{"name":"Körperkraft","value":16}}},{"label":"Fischen & Angeln","value":{"score":4,"attr1":{"name":"Fingerfertigkeit","value":13},"attr2":{"name":"Gewandheit","value":13},"attr3":{"name":"Konstitution","value":14}}},{"label":"Orientierung","value":{"score":7,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Intuition","value":11},"attr3":{"name":"Intuition","value":11}}},{"label":"Pflanzenkunde","value":{"score":10,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Fingerfertigkeit","value":13},"attr3":{"name":"Konstitution","value":14}}},{"label":"Tierkunde","value":{"score":5,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Mut","value":16},"attr3":{"name":"Charisma","value":12}}},{"label":"Wildnisleben","value":{"score":10,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Gewandheit","value":13},"attr3":{"name":"Konstitution","value":14}}},{"label":"Brett- & Glücksspiel","value":{"score":10,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Klugheit","value":10},"attr3":{"name":"Intuition","value":11}}},{"label":"Geographie","value":{"score":0,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Klugheit","value":10},"attr3":{"name":"Intuition","value":11}}},{"label":"Geschichtswissen","value":{"score":0,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Klugheit","value":10},"attr3":{"name":"Intuition","value":11}}},{"label":"Götter & Kulte","value":{"score":3,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Klugheit","value":10},"attr3":{"name":"Intuition","value":11}}},{"label":"Kriegskunst","value":{"score":0,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Klugheit","value":10},"attr3":{"name":"Intuition","value":11}}},{"label":"Magiekunde","value":{"score":0,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Klugheit","value":10},"attr3":{"name":"Intuition","value":11}}},{"label":"Mechanik","value":{"score":0,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Klugheit","value":10},"attr3":{"name":"Fingerfertigkeit","value":13}}},{"label":"Rechnen","value":{"score":1,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Klugheit","value":10},"attr3":{"name":"Intuition","value":11}}},{"label":"Rechtskunde","value":{"score":0,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Klugheit","value":10},"attr3":{"name":"Intuition","value":11}}},{"label":"Sagen & Legenden","value":{"score":5,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Klugheit","value":10},"attr3":{"name":"Intuition","value":11}}},{"label":"Sphärenkunde","value":{"score":0,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Klugheit","value":10},"attr3":{"name":"Intuition","value":11}}},{"label":"Sternkunde","value":{"score":0,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Klugheit","value":10},"attr3":{"name":"Intuition","value":11}}},{"label":"Alchimie","value":{"score":0,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Klugheit","value":10},"attr3":{"name":"Fingerfertigkeit","value":13}}},{"label":"Boote & Schiffe","value":{"score":3,"attr1":{"name":"Fingerfertigkeit","value":13},"attr2":{"name":"Gewandheit","value":13},"attr3":{"name":"Körperkraft","value":16}}},{"label":"Fahrzeuge","value":{"score":5,"attr1":{"name":"Charisma","value":12},"attr2":{"name":"Fingerfertigkeit","value":13},"attr3":{"name":"Konstitution","value":14}}},{"label":"Handel","value":{"score":5,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Intuition","value":11},"attr3":{"name":"Charisma","value":12}}},{"label":"Heilkunde Gift","value":{"score":0,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Klugheit","value":10},"attr3":{"name":"Intuition","value":11}}},{"label":"Heilkunde Krankheiten","value":{"score":0,"attr1":{"name":"Mut","value":16},"attr2":{"name":"Intuition","value":11},"attr3":{"name":"Konstitution","value":14}}},{"label":"Heilkunde Seele","value":{"score":0,"attr1":{"name":"Intuition","value":11},"attr2":{"name":"Charisma","value":12},"attr3":{"name":"Konstitution","value":14}}},{"label":"Heilkunde Wunden","value":{"score":3,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Fingerfertigkeit","value":13},"attr3":{"name":"Fingerfertigkeit","value":13}}},{"label":"Holzbearbeitung","value":{"score":10,"attr1":{"name":"Fingerfertigkeit","value":13},"attr2":{"name":"Gewandheit","value":13},"attr3":{"name":"Körperkraft","value":16}}},{"label":"Lebensmittelbearbeitung","value":{"score":5,"attr1":{"name":"Intuition","value":11},"attr2":{"name":"Fingerfertigkeit","value":13},"attr3":{"name":"Fingerfertigkeit","value":13}}},{"label":"Lederbearbeitung","value":{"score":5,"attr1":{"name":"Fingerfertigkeit","value":13},"attr2":{"name":"Gewandheit","value":13},"attr3":{"name":"Konstitution","value":14}}},{"label":"Malen & Zeichnen","value":{"score":5,"attr1":{"name":"Intuition","value":11},"attr2":{"name":"Fingerfertigkeit","value":13},"attr3":{"name":"Fingerfertigkeit","value":13}}},{"label":"Metallbearbeitung","value":{"score":0,"attr1":{"name":"Fingerfertigkeit","value":13},"attr2":{"name":"Konstitution","value":14},"attr3":{"name":"Körperkraft","value":16}}},{"label":"Musizieren","value":{"score":0,"attr1":{"name":"Charisma","value":12},"attr2":{"name":"Fingerfertigkeit","value":13},"attr3":{"name":"Konstitution","value":14}}},{"label":"Schlösserknacken","value":{"score":0,"attr1":{"name":"Intuition","value":11},"attr2":{"name":"Fingerfertigkeit","value":13},"attr3":{"name":"Fingerfertigkeit","value":13}}},{"label":"Steinbearbeitung","value":{"score":3,"attr1":{"name":"Fingerfertigkeit","value":13},"attr2":{"name":"Fingerfertigkeit","value":13},"attr3":{"name":"Körperkraft","value":16}}},{"label":"Stoffbearbeitung","value":{"score":5,"attr1":{"name":"Klugheit","value":10},"attr2":{"name":"Fingerfertigkeit","value":13},"attr3":{"name":"Fingerfertigkeit","value":13}}}]}} | |
var-handicap={{ | |
"type": "number", | |
"label": "Erschwernis", | |
"value": 0, | |
"min": -20, | |
"max": 20, | |
"step": 1 | |
}} | |
> | |
{% assign skillScore = vars.skill.value.score %} | |
{% assign attr1Roll = "1d20" | diceRoll %} | |
{% assign attr2Roll = "1d20" | diceRoll %} | |
{% assign attr3Roll = "1d20" | diceRoll %} | |
{% assign attr1Score = vars.skill.value.attr1.value %} | |
{% assign attr2Score = vars.skill.value.attr2.value %} | |
{% assign attr3Score = vars.skill.value.attr3.value %} | |
{% assign attr1ScoreFinal = attr1Score | minus: vars.handicap | at_least: 0 %} | |
{% assign attr2ScoreFinal = attr2Score | minus: vars.handicap | at_least: 0 %} | |
{% assign attr3ScoreFinal = attr3Score | minus: vars.handicap | at_least: 0 %} | |
{% assign attr1Mod = attr1ScoreFinal | minus: attr1Roll.result | at_most: 0 %} | |
{% assign attr2Mod = attr2ScoreFinal | minus: attr2Roll.result | at_most: 0 %} | |
{% assign attr3Mod = attr3ScoreFinal | minus: attr3Roll.result | at_most: 0 %} | |
{% assign sum = skillScore | plus: attr1Mod | plus: attr2Mod | plus: attr3Mod %} | |
<span style="font-weight:bold;color:red">{{vars.skill.label}} Probe.</span> (Wert: {{skillScore}}) | |
{% if vars.handicap != 0 %} | |
<div> | |
<span style="font-weight:bold">Erschwernis:</span> | |
<span style="font-weight:bold">{{vars.handicap}}</span> | |
</div> | |
{% endif %} | |
<div style="height:6px"></div> | |
<div> | |
<span style="font-weight:bold">{{vars.skill.value.attr1.name}}:</span> | |
{% renderDiceRoll attr1Roll %} (Wert: | |
{% if vars.handicap > 0 %} | |
<span style="color:red;font-weight:bold">{{attr1ScoreFinal}}</span> | |
<span style="text-decoration:line-through">{{attr1Score}}</span> | |
{% elsif vars.handicap < 0 %} | |
<span style="color:green;font-weight:bold">{{attr1ScoreFinal}}</span> | |
<span style="text-decoration:line-through">{{attr1Score}}</span> | |
{% else %} | |
<span style="font-weight:bold">{{attr1Score}}</span> | |
{% endif %} | |
) | |
</div> | |
<div> | |
<span style="font-weight:bold">{{vars.skill.value.attr2.name}}:</span> | |
{% renderDiceRoll attr2Roll %} (Wert: | |
{% if vars.handicap > 0 %} | |
<span style="color:red;font-weight:bold">{{attr2ScoreFinal}}</span> | |
<span style="text-decoration:line-through;">{{attr2Score}}</span> | |
{% elsif vars.handicap < 0 %} | |
<span style="color:green;font-weight:bold">{{attr2ScoreFinal}}</span> | |
<span style="text-decoration:line-through">{{attr2Score}}</span> | |
{% else %} | |
<span style="font-weight:bold">{{attr2Score}}</span> | |
{% endif %} | |
) | |
</div> | |
<div> | |
<span style="font-weight:bold">{{vars.skill.value.attr3.name}}:</span> | |
{% renderDiceRoll attr3Roll %} (Wert: | |
{% if vars.handicap > 0 %} | |
<span style="color:red;font-weight:bold">{{attr3ScoreFinal}}</span> | |
<span style="text-decoration:line-through;">{{attr3Score}}</span> | |
{% elsif vars.handicap < 0 %} | |
<span style="color:green;font-weight:bold">{{attr3ScoreFinal}}</span> | |
<span style="text-decoration:line-through">{{attr3Score}}</span> | |
{% else %} | |
<span style="font-weight:bold">{{attr3Score}}</span> | |
{% endif %} | |
) | |
</div> | |
<div style="height:12px"></div> | |
{% if sum >= 16 %} | |
QS 6 | |
{% elsif sum >= 13 %} | |
QS 5 | |
{% elsif sum >= 10 %} | |
QS 4 | |
{% elsif sum >= 7 %} | |
QS 3 | |
{% elsif sum >= 4 %} | |
QS 2 | |
{% elsif sum >= 0 %} | |
QS 1 | |
{% else %} | |
<span style="color:red"> | |
Nicht geschafft (um {{ sum | abs }}) | |
</span> | |
{% endif %} | |
</Template> | |
<ChatMacro | |
templateId="skillCheck" | |
> | |
Talent Probe | |
</ChatMacro> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment