|
5 | 5 | INT: 12 |
6 | 6 | WIS: 14 |
7 | 7 | CHR: 11 |
| 8 | +PROF_mod: 5 |
| 9 | +proficiency: |
| 10 | + acrobatics: 2 |
| 11 | + arcana: 1 |
| 12 | + deception: 0.5 |
8 | 13 | --- |
9 | 14 |
|
10 | 15 | This example calculates a DnD character's ability modifiers from the ability scores and displays it all in a list. |
@@ -39,3 +44,17 @@ VIEW[ floor(({CHR} - 10) / 2) ][math(hidden):memory^CHR_mod] |
39 | 44 | - INT: `VIEW[**{INT}**][text(renderMarkdown)]` (`VIEW[ concat(isPositive({memory^INT_mod}) ? '+' : '', string({memory^INT_mod})) ][math]`) |
40 | 45 | - WIS: `VIEW[**{WIS}**][text(renderMarkdown)]` (`VIEW[ concat(isPositive({memory^WIS_mod}) ? '+' : '', string({memory^WIS_mod})) ][math]`) |
41 | 46 | - CHR: `VIEW[**{CHR}**][text(renderMarkdown)]` (`VIEW[ concat(isPositive({memory^CHR_mod}) ? '+' : '', string({memory^CHR_mod})) ][math]`) |
| 47 | + |
| 48 | +## Skill modifiers |
| 49 | + |
| 50 | +If we want to calculate the skill modifiers for a character, while also taking into account it's proficiency, we can leverage the `inlineSelect` Input to map the proficiency types to numerical values while still having a nice, editable interface. |
| 51 | +We can additionally style the input depending on the currently selected value, to get helpful visual indicators. |
| 52 | + |
| 53 | +#### Here you can see an example of how it could work |
| 54 | + |
| 55 | +First we need to set the proficiency modifier: `INPUT[number:PROF_mod]` |
| 56 | + |
| 57 | +`INPUT[inlineSelect(option(0,not proficienct), option(0.5,half proficienct), option(1,proficient), option(2,experties), defaultValue(0), class(dnd5e-skill-prof)):proficiency.acrobatics]` Acrobatics (DEX) `VIEW[floor({proficiency.acrobatics}*{PROF_mod})+{memory^DEX_mod}]` |
| 58 | +`INPUT[inlineSelect(option(0,not proficienct), option(0.5,half proficienct), option(1,proficient), option(2,experties), defaultValue(0), class(dnd5e-skill-prof)):proficiency.arcana]` Arcana (INT) `VIEW[floor({proficiency.arcana}*{PROF_mod})+{memory^INT_mod}]` |
| 59 | +`INPUT[inlineSelect(option(0,not proficienct), option(0.5,half proficienct), option(1,proficient), option(2,experties), defaultValue(0), class(dnd5e-skill-prof)):proficiency.deception]` Deception (CHR) `VIEW[floor({proficiency.deception}*{PROF_mod})+{memory^CHR_mod}]` |
| 60 | +`INPUT[inlineSelect(option(0,not proficienct), option(0.5,half proficienct), option(1,proficient), option(2,experties), defaultValue(0), class(dnd5e-skill-prof)):proficiency.perception]` Perception (WIS) `VIEW[floor({proficiency.perception}*{PROF_mod})+{memory^WIS_mod}]` |
0 commit comments