mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-09-02 21:22:34 +00:00
Adding roll options for STR save throws as first real integration of the externally developed/tested RO to the sheet...alongside a few tweaks to fix bugs associated with the integration. Next step is to replicate this across other rolls (starting with other saves)
This commit is contained in:
@@ -832,6 +832,11 @@ div[class^="sheet-classaction-row"] {
|
||||
border-bottom: 1px dotted #000;
|
||||
}
|
||||
|
||||
.sheet-align-center,
|
||||
.sheet-rolltemplate-5eDefault .sheet-align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
input[type=number], input[type=text], select {
|
||||
width: 100%!important;
|
||||
margin-bottom:2px!important;
|
||||
|
||||
+91
-17
@@ -6,7 +6,7 @@
|
||||
<div class="sheet-core-header sheet-padb">
|
||||
<div class="sheet-row">
|
||||
<div class="sheet-col-1-3 sheet-margin-top"><img src="http://i.imgur.com/Y8KHPKm.png" alt="Dungeons and Dragons (5th edition)"></div>
|
||||
<div class="sheet-col-1-8 sheet-center sheet-margin-top"><p class="sheet-last-updated">Sheet version<br/>29th Mar 2015</p></div>
|
||||
<div class="sheet-col-1-8 sheet-center sheet-margin-top"><p class="sheet-last-updated">Sheet version<br/>1.01</p></div>
|
||||
<div class="sheet-col-1-4 sheet-small-label sheet-center"><input class="sheet-underlined sheet-center" type="text" name="attr_character_name"><br/>Character Name</div>
|
||||
<div class="sheet-col-1-8 sheet-small-label sheet-center"><input class="sheet-underlined sheet-center" type="text" name="attr_race"><br/>Race</div>
|
||||
<div class="sheet-col-1-6 sheet-small-label sheet-center"><input class="sheet-underlined sheet-center" type="text" name="attr_class"><br/>Class</div>
|
||||
@@ -44,21 +44,88 @@
|
||||
<h4 class="sheet-center">Core Stats</h4>
|
||||
|
||||
<div class="sheet-row sheet-sub-header">
|
||||
<div class="sheet-col-1-6 sheet-center sheet-small-label">Score</div>
|
||||
<div class="sheet-col-1-6 sheet-center sheet-small-label"> </div>
|
||||
<div class="sheet-col-1-6 sheet-center sheet-small-label">Mod</div>
|
||||
<div class="sheet-col-1-6 sheet-center sheet-small-label">Save Prof?</div>
|
||||
<div class="sheet-col-1-6 sheet-center sheet-small-label">Save Bonus</div>
|
||||
<div class="sheet-col-1-6 sheet-center sheet-small-label">Save</div>
|
||||
<div class="sheet-col-1-7 sheet-center sheet-small-label">Score</div>
|
||||
<div class="sheet-col-1-7 sheet-center sheet-small-label"> </div>
|
||||
<div class="sheet-col-1-7 sheet-center sheet-small-label">Mod</div>
|
||||
<div class="sheet-col-1-7 sheet-center sheet-small-label">Save Prof?</div>
|
||||
<div class="sheet-col-1-7 sheet-center sheet-small-label">Save Mod</div>
|
||||
<div class="sheet-col-1-7 sheet-center sheet-small-label">Save</div>
|
||||
<div class="sheet-col-1-7 sheet-center sheet-small-label"> </div>
|
||||
</div>
|
||||
|
||||
<div class="sheet-row">
|
||||
<div class="sheet-col-1-6"><input type="number" name="attr_strength" min="1" step="1"/></div>
|
||||
<div class="sheet-col-1-6 sheet-core-stat-label">Str</div>
|
||||
<div class="sheet-col-1-6"><input type="number" name="attr_strength_mod" value="(floor((@{strength}-10)/2))" disabled="disabled"/></div>
|
||||
<div class="sheet-col-1-6 sheet-vert-middle sheet-checkbox-row"><input type="checkbox" name="attr_strength_save_prof" value="@{PB}" /></div>
|
||||
<div class="sheet-col-1-6"><input type="number" name="attr_strength_save_mod" value="@{strength_mod} + @{strength_save_prof}" disabled="disabled"></div>
|
||||
<div class="sheet-col-1-6 sheet-center"><button type="roll" class="sheet-core-save" name="roll_Strength_Save" value="&{template:5eDefault} {{character_name=@{character_name}}} {{save=1}} {{title=STR saving throw}} {{subheader=@{character_name}}} {{rollname=STR save}} {{roll=[[ 1d20 + [[@{strength_save_mod}]] + [[@{global_saving_bonus}]] ]]}} {{rolladv=[[ 1d20 + [[@{strength_save_mod}]] + [[@{global_saving_bonus}]] ]]}} @{classactionstrengthsave}">Save</button></div>
|
||||
<div class="sheet-col-1-7"><input type="number" name="attr_strength" min="1" step="1"/></div>
|
||||
<div class="sheet-col-1-7 sheet-core-stat-label">Str</div>
|
||||
<div class="sheet-col-1-7"><input type="number" name="attr_strength_mod" value="(floor((@{strength}-10)/2))" disabled="disabled"/></div>
|
||||
<div class="sheet-col-1-7 sheet-vert-middle sheet-checkbox-row"><input type="checkbox" name="attr_strength_save_prof" value="@{PB}" /></div>
|
||||
<div class="sheet-col-1-7"><input type="number" name="attr_strength_save_mod" value="@{strength_mod} + @{strength_save_prof}" disabled="disabled"></div>
|
||||
<div class="sheet-col-1-7 sheet-center"><button type="roll" class="sheet-core-save" name="roll_Strength_Save" value="&{template:5eDefault} {{character_name=@{character_name}}} {{title=STR saving throw}} {{subheader=@{character_name}}} {{save=1}} {{savethrow=1}} {{rollname=STR save}} {{roll1=[[ 1d20 + [[@{strength_save_mod}]] + [[@{global_saving_bonus}]] ]]}} @{ro_strsave} @{classactionstrengthsave}">Save</button></div>
|
||||
<div class="sheet-col-1-7 sheet-align-center">
|
||||
<input type="checkbox" name="attr_str_save_ro" class="sheet-ro-checkbox" value="1" /><span class="sheet-ro-label">y</span>
|
||||
|
||||
<!-- Modal template Should be placed as the first element immediately after the input checkbox to open it -->
|
||||
<div class="sheet-ro-modal sheet-save-modal">
|
||||
|
||||
<div>
|
||||
<!-- Modal Title and close button row -->
|
||||
<div class="sheet-row sheet-ro-header sheet-border-bottom sheet-padb">
|
||||
<div class="sheet-col-3-4 sheet-ro-title">STR save throw roll options</div>
|
||||
<div class="sheet-col-1-4 sheet-ro-close-wrapper">
|
||||
<input type="checkbox" name="attr_str_save_ro" class="sheet-ro-close-checkbox" value="1" />
|
||||
<span class="sheet-ro-close-label"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- define hidden attribute to store summary of all options selected -->
|
||||
<input type="hidden" name="attr_ro_strsave" value="@{ro_strsave_rolltype}@{ro_strsave_roll2_closing} @{ro_strsave_emoteprompt} @{ro_strsave_showmath}" />
|
||||
|
||||
<!--Help text and copy of roll button-->
|
||||
<div class="sheet-row sheet-padb">
|
||||
<div class="sheet-col-2-3 sheet-small-note">The settings here apply <b>only</b> to the roll specified in the title above. </div>
|
||||
<div class="sheet-col-1-3 sheet-padl"><button type="roll" class="sheet-roll" name="roll_Strength_Save_ro" value="&{template:5eDefault} {{character_name=@{character_name}}} {{title=STR saving throw}} {{subheader=@{character_name}}} {{save=1}} {{savethrow=1}} {{rollname=STR save}} {{roll1=[[ 1d20 + [[@{strength_save_mod}]] + [[@{global_saving_bonus}]] ]]}} @{ro_strsave} @{classactionstrengthsave}">Roll</button></div>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<!-- Define options here -->
|
||||
|
||||
|
||||
<div class="sheet-row sheet-checkbox-row">
|
||||
<div class="sheet-col-1-3 sheet-ro-optionlabel">Roll type</div>
|
||||
<div class="sheet-col-2-3 sheet-padl sheet-ro-option">
|
||||
<input type="hidden" name="attr_ro_strsave_roll2_closing" value="+ [[@{strength_save_mod}]] + [[@{global_saving_bonus}]] ]] }}" />
|
||||
<select name="attr_ro_strsave_rolltype">
|
||||
<option value="{{showadvroll=1}} {{roll2=[[ 1d20 + [[@{strength_save_mod}]] + [[@{global_saving_bonus}]] ]]}}">Roll 2d20</option>
|
||||
<option value="{{noadvroll=1}}">Roll 1d20</option>
|
||||
<option value="?{Roll type?|Normal,{{noadvroll=1}} |Advantage,{{rollhasadv=1}} {{roll2=[[1d20 |Disadvantage,{{rollhasdisadv=1}} {{roll2=[[1d20}">Prompt for adv/disadv</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div class="sheet-row sheet-checkbox-row">
|
||||
<div class="sheet-col-1-3 sheet-ro-optionlabel">Prompt for emote?</div>
|
||||
<div class="sheet-col-2-3 sheet-padl sheet-ro-option"><input type="checkbox" name="attr_ro_strsave_emoteprompt" value="{{emote=?{Emote text} }}"></div>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div class="sheet-row sheet-checkbox-row">
|
||||
<div class="sheet-col-1-3 sheet-ro-optionlabel">Show math?</div>
|
||||
<div class="sheet-col-2-3 sheet-padl sheet-ro-option"><input type="checkbox" name="attr_ro_strsave_showmath" value="{{math=1d20
|
||||
+ [[@{strength_save_mod}]] [Save mod]
|
||||
+ (@{global_saving_bonus}) [Global save bonus]}}"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div> <!-- close inner modal div -->
|
||||
</div> <!-- close outer modal div -->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sheet-row">
|
||||
@@ -13738,12 +13805,19 @@
|
||||
<!--Saving throw-->
|
||||
{{#savethrow}}
|
||||
|
||||
{{#note}}
|
||||
{{#rollhasadv}}
|
||||
<div class="sheet-row">
|
||||
<div class="sheet-col-1 sheet-padl sheet-padr sheet-rt-key-wide">Note</div>
|
||||
<div class="sheet-col-1 sheet-padl sheet-padr sheet-rt-value">{{note}}</div>
|
||||
<div class="sheet-col-5-12 sheet-padl sheet-padr sheet-rt-key">Roll type</div>
|
||||
<div class="sheet-col-7-12 sheet-padl sheet-padr sheet-rt-value">With advantage</div>
|
||||
</div>
|
||||
{{/note}}
|
||||
{{/rollhasadv}}
|
||||
|
||||
{{#rollhasdisadv}}
|
||||
<div class="sheet-row">
|
||||
<div class="sheet-col-5-12 sheet-padl sheet-padr sheet-rt-key">Roll type</div>
|
||||
<div class="sheet-col-7-12 sheet-padl sheet-padr sheet-rt-value">With disadvantage</div>
|
||||
</div>
|
||||
{{/rollhasdisadv}}
|
||||
|
||||
<div class="sheet-row">
|
||||
<div class="sheet-col-5-12 sheet-padl sheet-padr sheet-rt-key">{{rollname}}</div>
|
||||
|
||||
Reference in New Issue
Block a user