mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-09-05 06:32:31 +00:00
arm5: reformatted python code
This commit is contained in:
@@ -24,14 +24,14 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<div>
|
||||
<h3> Info - February 2021 v1.6 Update</h3>
|
||||
<ul>
|
||||
<li>Fixed tabs not displaying properly in firefox <em>(tabs are again attached to an attribute)</em></li>
|
||||
<li>Fixed ability rolltemplate being too wide in some cases</li>
|
||||
<li>Added sheet documentation direclty into the sheet: <em>check out the "Help" tab to find it</em></li>
|
||||
<li>Added inline labels to all rolls: <em>hover over the result to see the details (may require re-selecting arts/characteristics to work properly)</em></li>
|
||||
<li>Added simple/stress die handling: <em>check out the "Help" tab for configuration options. Criticals are supported too (but see caveat in the "Help" tab, 3D dice are lying to you)</em></li>
|
||||
<li>Added support for additional fatigue levels: <em>magical creatures and enduring characters are easier now</em></li>
|
||||
<li>Added support for focus in magic totals & rolls</li>
|
||||
</ul>
|
||||
<li>Fixed tabs not displaying properly in firefox <em>(tabs are again attached to an attribute)</em></li>
|
||||
<li>Fixed ability rolltemplate being too wide in some cases</li>
|
||||
<li>Added sheet documentation direclty into the sheet: <em>check out the "Help" tab to find it</em></li>
|
||||
<li>Added inline labels to all rolls: <em>hover over the result to see the details (may require re-selecting arts/characteristics to work properly)</em></li>
|
||||
<li>Added simple/stress die handling: <em>check out the "Help" tab for configuration options. Criticals are supported too (but see caveat in the "Help" tab, 3D dice are lying to you)</em></li>
|
||||
<li>Added support for additional fatigue levels: <em>magical creatures and enduring characters are easier now</em></li>
|
||||
<li>Added support for focus in magic totals & rolls</li>
|
||||
</ul>
|
||||
</div>
|
||||
<label class="fakebutton">
|
||||
<input type="checkbox" name="attr_alert-1" value="1" /> ×
|
||||
@@ -42,18 +42,18 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<div>
|
||||
<h3> Info - February 2021 v1.6.1 Update - Rounding edges</h3>
|
||||
<ul>
|
||||
<li>Fixed botch die botching on 1s instead of 10s</li>
|
||||
<li>Fixed critical dice displaying 10s as exploding, instead of 1s</li>
|
||||
<li>Fixed spell's arts value not being updated when the character's arts are modified<ul>
|
||||
<li>Completely changed how arts are handled inside spells</li>
|
||||
<li>A script will be run to convert your data to the new format, but may fail for some spells</li>
|
||||
<li>Check the arts of your spells !</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Added a critical roll for initiative that sets the turn tracker initiative (not visible in the sheet, use the chat button)</li>
|
||||
<li>Added option to always ask which characteristic to use when rolling abilities</li>
|
||||
<li>Centered the sheet in its tab</li>
|
||||
</ul>
|
||||
<li>Fixed botch die botching on 1s instead of 10s</li>
|
||||
<li>Fixed critical dice displaying 10s as exploding, instead of 1s</li>
|
||||
<li>Fixed spell's arts value not being updated when the character's arts are modified<ul>
|
||||
<li>Completely changed how arts are handled inside spells</li>
|
||||
<li>A script will be run to convert your data to the new format, but may fail for some spells</li>
|
||||
<li>Check the arts of your spells !</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Added a critical roll for initiative that sets the turn tracker initiative (not visible in the sheet, use the chat button)</li>
|
||||
<li>Added option to always ask which characteristic to use when rolling abilities</li>
|
||||
<li>Centered the sheet in its tab</li>
|
||||
</ul>
|
||||
</div>
|
||||
<label class="fakebutton">
|
||||
<input type="checkbox" name="attr_alert-2" value="1" /> ×
|
||||
@@ -64,8 +64,8 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<div>
|
||||
<h3> Warning - February 2021 v1.6.1 update - ERROR: Spell's arts conversion</h3>
|
||||
The conversion script that updates your spell's arts to the new format failed to run. This means you need to setup the arts of your spells again.
|
||||
|
||||
<b>Note:</b> The script is run each time you open your character sheet, as long as this banner is visible. If it completes normally, it will hide this banner before you can see it.
|
||||
|
||||
<b>Note:</b> The script is run each time you open your character sheet, as long as this banner is visible. If it completes normally, it will hide this banner before you can see it.
|
||||
</div>
|
||||
<label class="fakebutton">
|
||||
<input type="checkbox" name="attr_alert-161-spell-update" value="1" /> ×
|
||||
@@ -432,7 +432,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<td><input type="text" class="number_1" style="width:50px;" name="attr_Reputations1_score"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_reputation1_simple" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations1}}} {{Result=[[@{simple-die} + [[@{Reputations1_Score}]] [@{Reputations1}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]] }}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_reputation1_stress" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations1}}} {{Result=[[@{stress-die} + [[@{Reputations1_Score}]] [@{Reputations1}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}]]] }} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_reputation1_stress" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations1}}} {{Result=[[@{simple-die} + [[@{Reputations1_Score}]] [@{Reputations1}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]] }} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -441,7 +441,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<td><input type="text" class="number_1" style="width:50px;" name="attr_Reputations2_score"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_reputation2_simple" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations2}}} {{Result=[[@{simple-die} + [[@{Reputations2_Score}]] [@{Reputations2}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]] }}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_reputation2_stress" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations2}}} {{Result=[[@{stress-die} + [[@{Reputations2_Score}]] [@{Reputations2}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}]]] }} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_reputation2_stress" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations2}}} {{Result=[[@{simple-die} + [[@{Reputations2_Score}]] [@{Reputations2}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]] }} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -450,7 +450,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<td><input type="text" class="number_1" style="width:50px;" name="attr_Reputations3_score"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_reputation3_simple" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations3}}} {{Result=[[@{simple-die} + [[@{Reputations3_Score}]] [@{Reputations3}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]] }}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_reputation3_stress" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations3}}} {{Result=[[@{stress-die} + [[@{Reputations3_Score}]] [@{Reputations3}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}]]] }} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_reputation3_stress" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations3}}} {{Result=[[@{simple-die} + [[@{Reputations3_Score}]] [@{Reputations3}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]] }} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -459,7 +459,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<td><input type="text" class="number_1" style="width:50px;" name="attr_Reputations4_score"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_reputation4_simple" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations4}}} {{Result=[[@{simple-die} + [[@{Reputations4_Score}]] [@{Reputations4}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]] }}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_reputation4_stress" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations4}}} {{Result=[[@{stress-die} + [[@{Reputations4_Score}]] [@{Reputations4}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}]]] }} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_reputation4_stress" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations4}}} {{Result=[[@{simple-die} + [[@{Reputations4_Score}]] [@{Reputations4}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]] }} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -468,7 +468,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<td><input type="text" class="number_1" style="width:50px;" name="attr_Reputations5_score"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_reputation5_simple" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations5}}} {{Result=[[@{simple-die} + [[@{Reputations5_Score}]] [@{Reputations5}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]] }}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_reputation5_stress" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations5}}} {{Result=[[@{stress-die} + [[@{Reputations5_Score}]] [@{Reputations5}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}]]] }} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_reputation5_stress" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations5}}} {{Result=[[@{simple-die} + [[@{Reputations5_Score}]] [@{Reputations5}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]] }} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -477,7 +477,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<td><input type="text" class="number_1" style="width:50px;" name="attr_Reputations6_score"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_reputation6_simple" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations6}}} {{Result=[[@{simple-die} + [[@{Reputations6_Score}]] [@{Reputations6}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]] }}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_reputation6_stress" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations6}}} {{Result=[[@{stress-die} + [[@{Reputations6_Score}]] [@{Reputations6}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}]]] }} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_reputation6_stress" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations6}}} {{Result=[[@{simple-die} + [[@{Reputations6_Score}]] [@{Reputations6}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]] }} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -534,7 +534,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<td><input type="text" class="number_1" name="attr_Intelligence_Score" value="0"/></td>
|
||||
<td><input type="text" class="number_1" name="attr_Intelligence_Aging" value="0"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_Intelligence_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{intelligence}}} {{banner=@{Intelligence_Description}}} {{label1=^{score}}} {{result1=@{Intelligence_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Intelligence_Score}) [@{intelligence_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}}"></button>
|
||||
<button type="roll" class="button simple-roll" name="roll_Intelligence_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{intelligence}}} {{banner=@{Intelligence_Description}}} {{label1=^{score}}} {{result1=@{Intelligence_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Intelligence_Score}) [@{intelligence_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_Intelligence_stress" value="&{template:ability} {{name= @{character_name}}} {{label0=^{intelligence}}} {{banner=@{Intelligence_Description}}} {{label1=^{score}}} {{result1=@{Intelligence_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{stress-die} + (@{Intelligence_Score}) [@{intelligence_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -544,7 +544,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<td><input type="text" class="number_1" name="attr_Perception_Score" value="0"/></td>
|
||||
<td><input type="text" class="number_1" name="attr_Perception_Aging" value="0"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_Perception_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{perception}}} {{banner=@{Perception_Description}}} {{label1=^{score}}} {{result1=@{Perception_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Perception_Score}) [@{perception_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}}"></button>
|
||||
<button type="roll" class="button simple-roll" name="roll_Perception_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{perception}}} {{banner=@{Perception_Description}}} {{label1=^{score}}} {{result1=@{Perception_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Perception_Score}) [@{perception_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_Perception_stress" value="&{template:ability} {{name= @{character_name}}} {{label0=^{perception}}} {{banner=@{Perception_Description}}} {{label1=^{score}}} {{result1=@{Perception_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{stress-die} + (@{Perception_Score}) [@{perception_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -554,7 +554,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<td><input type="text" class="number_1" name="attr_Strength_Score" value="0"/></td>
|
||||
<td><input type="text" class="number_1" name="attr_Strength_Aging" value="0"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_Strength_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{strength}}} {{banner=@{Strength_Description}}} {{label1=^{score}}} {{result1=@{Strength_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Strength_Score}) [@{strength_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}}"></button>
|
||||
<button type="roll" class="button simple-roll" name="roll_Strength_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{strength}}} {{banner=@{Strength_Description}}} {{label1=^{score}}} {{result1=@{Strength_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Strength_Score}) [@{strength_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_Strength_stress" value="&{template:ability} {{name= @{character_name}}} {{label0=^{strength}}} {{banner=@{Strength_Description}}} {{label1=^{score}}} {{result1=@{Strength_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{stress-die} + (@{Strength_Score}) [@{strength_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -564,7 +564,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<td><input type="text" class="number_1" name="attr_Stamina_Score" value="0"/></td>
|
||||
<td><input type="text" class="number_1" name="attr_Stamina_Aging" value="0"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_Stamina_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{stamina}}} {{banner=@{Stamina_Description}}} {{label1=^{score}}} {{result1=@{Stamina_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Stamina_Score}) [@{stamina_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}}"></button>
|
||||
<button type="roll" class="button simple-roll" name="roll_Stamina_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{stamina}}} {{banner=@{Stamina_Description}}} {{label1=^{score}}} {{result1=@{Stamina_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Stamina_Score}) [@{stamina_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_Stamina_stress" value="&{template:ability} {{name= @{character_name}}} {{label0=^{stamina}}} {{banner=@{Stamina_Description}}} {{label1=^{score}}} {{result1=@{Stamina_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{stress-die} + (@{Stamina_Score}) [@{stamina_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -574,7 +574,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<td><input type="text" class="number_1" name="attr_Presence_Score" value="0"/></td>
|
||||
<td><input type="text" class="number_1" name="attr_Presence_Aging" value="0"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_Presence_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{presence}}} {{banner=@{Presence_Description}}} {{label1=^{score}}} {{result1=@{Presence_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Presence_Score}) [@{presence_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}}"></button>
|
||||
<button type="roll" class="button simple-roll" name="roll_Presence_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{presence}}} {{banner=@{Presence_Description}}} {{label1=^{score}}} {{result1=@{Presence_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Presence_Score}) [@{presence_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_Presence_stress" value="&{template:ability} {{name= @{character_name}}} {{label0=^{presence}}} {{banner=@{Presence_Description}}} {{label1=^{score}}} {{result1=@{Presence_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{stress-die} + (@{Presence_Score}) [@{presence_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -584,7 +584,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<td><input type="text" class="number_1" name="attr_Communication_Score" value="0"/></td>
|
||||
<td><input type="text" class="number_1" name="attr_Communication_Aging" value="0"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_Communication_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{communication}}} {{banner=@{Communication_Description}}} {{label1=^{score}}} {{result1=@{Communication_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Communication_Score}) [@{communication_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}}"></button>
|
||||
<button type="roll" class="button simple-roll" name="roll_Communication_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{communication}}} {{banner=@{Communication_Description}}} {{label1=^{score}}} {{result1=@{Communication_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Communication_Score}) [@{communication_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_Communication_stress" value="&{template:ability} {{name= @{character_name}}} {{label0=^{communication}}} {{banner=@{Communication_Description}}} {{label1=^{score}}} {{result1=@{Communication_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{stress-die} + (@{Communication_Score}) [@{communication_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -594,7 +594,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<td><input type="text" class="number_1" name="attr_Dexterity_Score" value="0"/></td>
|
||||
<td><input type="text" class="number_1" name="attr_Dexterity_Aging" value="0"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_Dexterity_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{dexterity}}} {{banner=@{Dexterity_Description}}} {{label1=^{score}}} {{result1=@{Dexterity_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Dexterity_Score}) [@{dexterity_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}}"></button>
|
||||
<button type="roll" class="button simple-roll" name="roll_Dexterity_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{dexterity}}} {{banner=@{Dexterity_Description}}} {{label1=^{score}}} {{result1=@{Dexterity_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Dexterity_Score}) [@{dexterity_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_Dexterity_stress" value="&{template:ability} {{name= @{character_name}}} {{label0=^{dexterity}}} {{banner=@{Dexterity_Description}}} {{label1=^{score}}} {{result1=@{Dexterity_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{stress-die} + (@{Dexterity_Score}) [@{dexterity_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -604,7 +604,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<td><input type="text" class="number_1" name="attr_Quickness_Score" value="0"/></td>
|
||||
<td><input type="text" class="number_1" name="attr_Quickness_Aging" value="0"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_Quickness_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{quickness}}} {{banner=@{Quickness_Description}}} {{label1=^{score}}} {{result1=@{Quickness_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Quickness_Score}) [@{quickness_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}}"></button>
|
||||
<button type="roll" class="button simple-roll" name="roll_Quickness_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{quickness}}} {{banner=@{Quickness_Description}}} {{label1=^{score}}} {{result1=@{Quickness_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + (@{Quickness_Score}) [@{quickness_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_Quickness_stress" value="&{template:ability} {{name= @{character_name}}} {{label0=^{quickness}}} {{banner=@{Quickness_Description}}} {{label1=^{score}}} {{result1=@{Quickness_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{stress-die} + (@{Quickness_Score}) [@{quickness_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>
|
||||
@@ -1169,7 +1169,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
<td colspan="2">
|
||||
<div class="flex-container_2">
|
||||
<span>
|
||||
<input type="checkbox" class="check" name="attr_Lab_Focus" value="((@{lab_Technique} + @{lab_Form} - abs(@{lab_Technique} - @{lab_Form})) /2)"/>
|
||||
<input type="checkbox" class="check" name="attr_Lab_Focus" value="((@{lab_Technique} + @{lab_Form} - abs((@{lab_Technique}) - (@{lab_Form}))) /2)"/>
|
||||
<span data-i18n="focus">Focus</span>
|
||||
</span>
|
||||
<span style="text-align: right;">
|
||||
@@ -1179,6 +1179,7 @@ This file is automatically generated from a template. Any change will be overwri
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><div style="width:50px;"><input type="number" class="number_2" name="attr_Lab_Int" value="@{Intelligence_Score}" disabled="true"/></div></td>
|
||||
<td><div style="width:50px;"><input type="number" class="number_2" name="attr_Lab_Theory" value="0" /></div></td>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
"""Module for providing the parts in the template.html file"""
|
||||
import csv
|
||||
import textwrap
|
||||
from pathlib import Path
|
||||
|
||||
import markdown
|
||||
@@ -14,6 +15,9 @@ from .helpers import (
|
||||
)
|
||||
from .translations import translation_attrs, translation_attrs_setup
|
||||
|
||||
# Note: Python automatically concatenates strings that are separated by newlines
|
||||
# This can be used to split long strings into multiple lines
|
||||
|
||||
|
||||
# Xp helper
|
||||
def xp(
|
||||
@@ -22,7 +26,15 @@ def xp(
|
||||
"""
|
||||
Generate the HTML for the Xp parts of arts & abilities
|
||||
"""
|
||||
return f"""[<input type="text" class="number_3" name="attr_{name}{suffix}" value="0"/>/<input type="text" class="number_3 advance" name="attr_{name}{adv_suffix}" value="0" readonly/>/<input type="text" class="number_3 total" name="attr_{name}{tot_suffix}" value="0" readonly/>]"""
|
||||
return (
|
||||
"["
|
||||
f"""<input type="text" class="number_3" name="attr_{name}{suffix}" value="0"/>"""
|
||||
"/"
|
||||
f"""<input type="text" class="number_3 advance" name="attr_{name}{adv_suffix}" value="0" readonly/>"""
|
||||
"/"
|
||||
f"""<input type="text" class="number_3 total" name="attr_{name}{tot_suffix}" value="0" readonly/>"""
|
||||
"]"
|
||||
)
|
||||
|
||||
|
||||
def alert(title: str, text: str, *, level: str = "warning", ID: str = None):
|
||||
@@ -47,16 +59,21 @@ def alert(title: str, text: str, *, level: str = "warning", ID: str = None):
|
||||
alert_id = str(ID)
|
||||
alert.strid.append(alert_id)
|
||||
|
||||
return f"""<input type="hidden" class="alert-hidder" name="attr_alert-{alert_id}" value="0"/>
|
||||
<div class="alert alert-{level}">
|
||||
<div>
|
||||
<h3> {level.title()} - {title}</h3>
|
||||
{text}
|
||||
</div>
|
||||
<label class="fakebutton">
|
||||
<input type="checkbox" name="attr_alert-{alert_id}" value="1" /> ×
|
||||
</label>
|
||||
</div>"""
|
||||
indent = " " * 4 * 4
|
||||
text = str(text).replace("\n", "\n" + indent)
|
||||
return textwrap.dedent(
|
||||
f"""\
|
||||
<input type="hidden" class="alert-hidder" name="attr_alert-{alert_id}" value="0"/>
|
||||
<div class="alert alert-{level}">
|
||||
<div>
|
||||
<h3> {level.title()} - {title}</h3>
|
||||
{text}
|
||||
</div>
|
||||
<label class="fakebutton">
|
||||
<input type="checkbox" name="attr_alert-{alert_id}" value="1" /> ×
|
||||
</label>
|
||||
</div>"""
|
||||
)
|
||||
|
||||
|
||||
# python supports attributes on function
|
||||
@@ -66,13 +83,17 @@ alert.strid = []
|
||||
|
||||
|
||||
def disable_old_alerts(marker: str):
|
||||
lines = ",\n ".join(
|
||||
indent = " " * 4 * 3
|
||||
lines = f",\n{indent}".join(
|
||||
f'"alert-{i}": 1' for i in list(range(alert.numid)) + alert.strid
|
||||
)
|
||||
return f"""setAttrs({{
|
||||
"{marker}": 1,
|
||||
{lines}
|
||||
}}); """
|
||||
return textwrap.dedent(
|
||||
f"""\
|
||||
setAttrs({{
|
||||
"{marker}": 1,
|
||||
{lines}
|
||||
}}); """
|
||||
)
|
||||
|
||||
|
||||
# Add new parts to this dictionary
|
||||
@@ -94,48 +115,135 @@ GLOBALS = {
|
||||
|
||||
|
||||
# Personality traits
|
||||
personnality_roll = (
|
||||
"[[@{Personality_Trait$$_Score}]] [@{Personality_Trait$$}] "
|
||||
"+ (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}]"
|
||||
)
|
||||
personnality_roll_template = (
|
||||
"&{template:generic} "
|
||||
"{{Banner=^{personality} ^{roll}}} "
|
||||
"{{Label=@{Personality_Trait$$}}} "
|
||||
"{{Result=[[%(die)s + %(roll)s ]]}} "
|
||||
)
|
||||
personnality_roll_template_simple = personnality_roll_template % {
|
||||
"roll": personnality_roll,
|
||||
"die": "@{simple-die}",
|
||||
}
|
||||
personnality_roll_template_stress = (
|
||||
(personnality_roll_template % {"roll": personnality_roll, "die": "@{stress-die}"})
|
||||
# Additional roll template fields for stress rolls
|
||||
+ (
|
||||
"{{stress=1}} "
|
||||
"{{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} "
|
||||
"{{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"
|
||||
)
|
||||
)
|
||||
GLOBALS["personality_trait_rows"] = repeat_template(
|
||||
"""<tr>
|
||||
<td><input type="text" class="heading_2" style="width:245px" name="attr_Personality_Trait%%"/></td>
|
||||
<td><input type="text" class="number_1" style="width:70px;" name="attr_Personality_Trait%%_score"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_personality%%_simple" value="&{template:generic} {{Banner=^{personality} ^{roll}}} {{Label=@{Personality_Trait%%}}} {{Result=[[@{simple-die} + [[@{Personality_Trait%%_Score}]] [@{Personality_Trait%%}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} "></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_personality%%_stress" value="&{template:generic} {{Banner=^{personality} ^{roll}}} {{Label=@{Personality_Trait%%}}} {{Result=[[@{stress-die} + [[@{Personality_Trait%%_Score}]] [@{Personality_Trait%%}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]}} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>""",
|
||||
textwrap.dedent(
|
||||
f"""\
|
||||
<tr>
|
||||
<td><input type="text" class="heading_2" style="width:245px" name="attr_Personality_Trait$$"/></td>
|
||||
<td><input type="text" class="number_1" style="width:70px;" name="attr_Personality_Trait$$_score"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_personality$$_simple" value="{personnality_roll_template_simple}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_personality$$_stress" value="{personnality_roll_template_stress}"></button>
|
||||
</div></td>
|
||||
</tr>"""
|
||||
),
|
||||
range(1, 7),
|
||||
rep_key="$$",
|
||||
)
|
||||
|
||||
|
||||
# Reputations
|
||||
reputation_roll = (
|
||||
"[[@{Reputations$$_Score}]] [@{Reputations$$}] "
|
||||
"+ (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}]"
|
||||
)
|
||||
reputation_roll_template = (
|
||||
"&{template:generic} "
|
||||
"{{Banner=^{reputation} ^{roll}}} "
|
||||
"{{Label=@{Reputations$$}}} "
|
||||
"{{Result=[[%(die)s + %(roll)s ]] }}"
|
||||
)
|
||||
reputation_roll_template_simple = reputation_roll_template % {
|
||||
"roll": reputation_roll,
|
||||
"die": "@{simple-die}",
|
||||
}
|
||||
reputation_roll_template_stress = (
|
||||
(reputation_roll_template % {"roll": reputation_roll, "die": "@{simple-die}"})
|
||||
# Additiona roll template fields for stress rolls
|
||||
+ (
|
||||
" {{stress=1}} "
|
||||
"{{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} "
|
||||
"{{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"
|
||||
)
|
||||
)
|
||||
GLOBALS["reputation_rows"] = repeat_template(
|
||||
"""<tr>
|
||||
<td><input type="text" class="heading_2" name="attr_Reputations%%"/></td>
|
||||
<td><input type="text" class="heading_2a" name="attr_Reputations%%_type"/></td>
|
||||
<td><input type="text" class="number_1" style="width:50px;" name="attr_Reputations%%_score"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_reputation%%_simple" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations%%}}} {{Result=[[@{simple-die} + [[@{Reputations%%_Score}]] [@{Reputations%%}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]] }}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_reputation%%_stress" value="&{template:generic} {{Banner=^{reputation} ^{roll}}} {{Label=@{Reputations%%}}} {{Result=[[@{stress-die} + [[@{Reputations%%_Score}]] [@{Reputations%%}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}]]] }} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>""",
|
||||
textwrap.dedent(
|
||||
f"""\
|
||||
<tr>
|
||||
<td><input type="text" class="heading_2" name="attr_Reputations$$"/></td>
|
||||
<td><input type="text" class="heading_2a" name="attr_Reputations$$_type"/></td>
|
||||
<td><input type="text" class="number_1" style="width:50px;" name="attr_Reputations$$_score"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_reputation$$_simple" value="{reputation_roll_template_simple}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_reputation$$_stress" value="{reputation_roll_template_stress}"></button>
|
||||
</div></td>
|
||||
</tr>"""
|
||||
),
|
||||
range(1, 7),
|
||||
rep_key="$$",
|
||||
)
|
||||
|
||||
|
||||
# Characteristics definitions
|
||||
characteristic_roll = "(@{%(Char)s_Score}) [@{%(char)s_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}]"
|
||||
characteristic_roll = (
|
||||
"(@{%(Char)s_Score}) [@{%(char)s_i18n}] "
|
||||
"+ (@{wound_total}) [@{wounds_i18n}] "
|
||||
"+ ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] "
|
||||
"+ (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}]"
|
||||
)
|
||||
characteristic_roll_template = (
|
||||
"&{template:ability} "
|
||||
"{{name= @{character_name}}} "
|
||||
"{{label0=^{%%(char)s}}} "
|
||||
"{{banner=@{%%(Char)s_Description}}} "
|
||||
"{{label1=^{score}}} "
|
||||
"{{result1=@{%%(Char)s_Score}}} "
|
||||
"{{label2=^{characteristic-m}}} "
|
||||
"{{label2=^{weakness-m}}} "
|
||||
"{{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} "
|
||||
"{{label3=^{circumstances-m}}} "
|
||||
"{{result3=[[(?{@{circumstantial_i18n}|0})]]}} "
|
||||
"{{result0=[[ %(die)s + %(roll)s ]]}} "
|
||||
"{{stress=%(stress)s}} "
|
||||
"{{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} "
|
||||
"{{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"
|
||||
)
|
||||
characteristic_roll_template_simple = characteristic_roll_template % {
|
||||
"roll": characteristic_roll,
|
||||
"die": "@{simple-die}",
|
||||
"stress": "",
|
||||
}
|
||||
characteristic_roll_template_stress = characteristic_roll_template % {
|
||||
"roll": characteristic_roll,
|
||||
"die": "@{stress-die}",
|
||||
"stress": "1",
|
||||
}
|
||||
GLOBALS["characteristic_rows"] = repeat_template(
|
||||
"""<tr>
|
||||
<th data-i18n="%(char)s" >%(Char)s</th>
|
||||
<td><input type="text" class="heading_2" name="attr_%(Char)s_Description"/></td>
|
||||
<td><input type="text" class="number_1" name="attr_%(Char)s_Score" value="0"/></td>
|
||||
<td><input type="text" class="number_1" name="attr_%(Char)s_Aging" value="0"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_%(Char)s_simple" value="&{template:ability} {{name= @{character_name}}} {{label0=^{%(char)s}}} {{banner=@{%(Char)s_Description}}} {{label1=^{score}}} {{result1=@{%(Char)s_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{simple-die} + $characteristic_roll$ ]]}}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_%(Char)s_stress" value="&{template:ability} {{name= @{character_name}}} {{label0=^{%(char)s}}} {{banner=@{%(Char)s_Description}}} {{label1=^{score}}} {{result1=@{%(Char)s_Score}}} {{label2=^{characteristic-m}}} {{label2=^{weakness-m}}} {{result2=[[[[floor(@{Fatigue})]][@{fatigue_i18n}] + @{wound_total}[@{wounds_i18n}]]]}} {{label3=^{circumstances-m}}} {{result3=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=[[ @{stress-die} + $characteristic_roll$ ]]}} {{stress=1}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"></button>
|
||||
</div></td>
|
||||
</tr>""".replace(
|
||||
"$characteristic_roll$", characteristic_roll
|
||||
textwrap.dedent(
|
||||
f"""\
|
||||
<tr>
|
||||
<th data-i18n="%(char)s" >%(Char)s</th>
|
||||
<td><input type="text" class="heading_2" name="attr_%(Char)s_Description"/></td>
|
||||
<td><input type="text" class="number_1" name="attr_%(Char)s_Score" value="0"/></td>
|
||||
<td><input type="text" class="number_1" name="attr_%(Char)s_Aging" value="0"/></td>
|
||||
<td><div class="flex-container">
|
||||
<button type="roll" class="button simple-roll" name="roll_%(Char)s_simple" value="{characteristic_roll_template_simple}"></button>
|
||||
<button type="roll" class="button stress-roll" name="roll_%(Char)s_stress" value="{characteristic_roll_template_stress}"></button>
|
||||
</div></td>
|
||||
</tr>"""
|
||||
),
|
||||
CHARACTERISTICS,
|
||||
str_key="char",
|
||||
@@ -171,13 +279,37 @@ GLOBALS["characteristic_name_ask_attr"] = (
|
||||
)
|
||||
|
||||
# Abilities
|
||||
ability_roll_template = "&{template:ability} {{name=@{character_name}}} {{label0=@{Ability_name}}} {{banner=@{Ability_Speciality}}} {{label1=^{rank}}} {{result1= [[ @{Ability_Score} + @{Ability_Puissant} ]]}} {{label2=@{Ability_CharacName}}} {{result2=[[@{sys_at}@{character_name}@{sys_pipe}@{Ability_CharacName}_Score@{sys_rbk}]]}} {{label3=^{weakness-m}}} {{result3=[[ ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (@{wound_total}) [@{wounds_i18n}] ]]}} {{label4=^{circumstances-m}}} {{result4=[[(?{@{circumstantial_i18n}|0})]]}} {{result0=%(roll)s}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"
|
||||
ability_roll = "[[ %(die)s + (@{Ability_Score} + @{Ability_Puissant}) [@{Ability_name}] + (@{sys_at}@{character_name}@{sys_pipe}@{Ability_CharacName}_Score@{sys_rbk}) [@{sys_at}@{character_name}@{sys_pipe}@{Ability_CharacName}_i18n@{sys_rbk}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}] ]]"
|
||||
ability_roll = (
|
||||
"(@{Ability_Score} + @{Ability_Puissant}) [@{Ability_name}] "
|
||||
"+ (@{sys_at}@{character_name}@{sys_pipe}@{Ability_CharacName}_Score@{sys_rbk}) [@{sys_at}@{character_name}@{sys_pipe}@{Ability_CharacName}_i18n@{sys_rbk}] "
|
||||
"+ (@{wound_total}) [@{wounds_i18n}] "
|
||||
"+ ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] "
|
||||
"+ (?{@{circumstantial_i18n}|0}) [@{circumstances_i18n}]"
|
||||
)
|
||||
ability_roll_template = (
|
||||
"&{template:ability} "
|
||||
"{{name=@{character_name}}} "
|
||||
"{{label0=@{Ability_name}}} "
|
||||
"{{banner=@{Ability_Speciality}}} "
|
||||
"{{label1=^{rank}}} "
|
||||
"{{result1= [[ @{Ability_Score} + @{Ability_Puissant} ]]}} "
|
||||
"{{label2=@{Ability_CharacName}}} "
|
||||
"{{result2=[[@{sys_at}@{character_name}@{sys_pipe}@{Ability_CharacName}_Score@{sys_rbk}]]}} "
|
||||
"{{label3=^{weakness-m}}} "
|
||||
"{{result3=[[ ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (@{wound_total}) [@{wounds_i18n}] ]]}} "
|
||||
"{{label4=^{circumstances-m}}} "
|
||||
"{{result4=[[(?{@{circumstantial_i18n}|0})]]}} "
|
||||
"{{result0=[[ %(die)s + %(roll)s ]]}} "
|
||||
"{{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} "
|
||||
"{{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"
|
||||
)
|
||||
|
||||
GLOBALS["ability_roll_simple"] = ability_roll_template % {
|
||||
"roll": ability_roll % {"die": "@{simple-die}"}
|
||||
"roll": ability_roll,
|
||||
"die": "@{simple-die}",
|
||||
}
|
||||
GLOBALS["ability_roll_stress"] = (
|
||||
ability_roll_template % {"roll": ability_roll % {"die": "@{stress-die}"}}
|
||||
ability_roll_template % {"roll": ability_roll, "die": "@{stress-die}"}
|
||||
) + " {{stress=1}}"
|
||||
|
||||
|
||||
@@ -262,8 +394,34 @@ GLOBALS["form_enumerated_options"] = repeat_template(
|
||||
|
||||
# Casting rolls
|
||||
## Magic tab
|
||||
spontaneous_roll_template = "&{template:arcane} {{label0=^{spontaneous} ^{casting}}} {{result0=%(roll)s}} {{label1=^{aura}}} {{result1=@{aura}}} {{label2=^{weakness-m}}} {{result2=[[ @{wound_total}[@{wounds_i18n}] + [[floor(@{fatigue})]][@{fatigue_i18n}] ]]}} {{label3=^{circumstances-m}}} {{result3=?{@{modifiers_i18n}|0}}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical-spontaneous)}}"
|
||||
spontaneous_roll = "[[(%(die)s + @{Spontaneous1_Technique} + @{Spontaneous1_Form} + ([[@{Spontaneous1_Focus}]]) [@{focus_i18n}] + (@{gestures}) + (@{words}) + (@{Stamina_Score}) [@{stamina_i18n}] + (@{aura}) [@{aura_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (@{wound_total}) [@{wounds_i18n}] + (?{@{modifiers_i18n}|0}) [@{modifiers_i18n}] )/2 ]]"
|
||||
spontaneous_roll_template = (
|
||||
"&{template:arcane} "
|
||||
"{{label0=^{spontaneous} ^{casting}}} "
|
||||
"{{result0=%(roll)s}} "
|
||||
"{{label1=^{aura}}} "
|
||||
"{{result1=@{aura}}} "
|
||||
"{{label2=^{weakness-m}}} "
|
||||
"{{result2=[[ @{wound_total}[@{wounds_i18n}] + [[floor(@{fatigue})]][@{fatigue_i18n}] ]]}} "
|
||||
"{{label3=^{circumstances-m}}} "
|
||||
"{{result3=?{@{modifiers_i18n}|0}}} "
|
||||
"{{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} "
|
||||
"{{crit-button=[@{critical_i18n}!](~@{character_name}|critical-spontaneous)}}"
|
||||
)
|
||||
spontaneous_roll = (
|
||||
"[[("
|
||||
"%(die)s "
|
||||
"+ @{Spontaneous1_Technique} "
|
||||
"+ @{Spontaneous1_Form} "
|
||||
"+ ([[@{Spontaneous1_Focus}]]) [@{focus_i18n}] "
|
||||
"+ (@{gestures}) "
|
||||
"+ (@{words}) "
|
||||
"+ (@{Stamina_Score}) [@{stamina_i18n}] "
|
||||
"+ (@{aura}) [@{aura_i18n}] "
|
||||
"+ ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] "
|
||||
"+ (@{wound_total}) [@{wounds_i18n}] "
|
||||
"+ (?{@{modifiers_i18n}|0}) [@{modifiers_i18n}]"
|
||||
" )/2 ]]"
|
||||
)
|
||||
GLOBALS["spontaneous_roll_simple"] = spontaneous_roll_template % {
|
||||
"roll": spontaneous_roll % {"die": "@{simple-die}"}
|
||||
}
|
||||
@@ -271,8 +429,36 @@ GLOBALS["spontaneous_roll_stress"] = (
|
||||
spontaneous_roll_template % {"roll": spontaneous_roll % {"die": "@{stress-die}"}}
|
||||
) + " {{stress=1}}"
|
||||
|
||||
ceremonial_roll_template = "&{template:arcane} {{label0=^{ceremonial} ^{casting}}} {{result0= %(roll)s }} {{label1=^{aura}}} {{result1=@{aura}}} {{label2=^{weakness-m}}} {{result2=[[@{wound_total}[@{wounds_i18n}] + [[floor(@{fatigue})]][@{fatigue_i18n}] ]]}} {{label3=^{circumstances-m}}} {{result3=?{@{modifiers_i18n}|0}}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical-spontaneous)}}"
|
||||
ceremonial_roll = "[[(%(die)s+ @{Ceremonial_Technique} + @{Ceremonial_Form} + ([[@{Ceremonial_Focus}]]) [@{focus_i18n}] + (@{gestures}) + (@{words}) + (@{Stamina_Score}) [@{stamina_i18n}] + (@{aura}) [@{aura_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (@{wound_total}) [@{wounds_i18n}] + (@{Ceremonial_Artes_Lib}) [@{artes_i18n}] + (@{Ceremonial_Philos}) [@{philos_i18n}] + (?{@{modifiers_i18n}|0}) [@{modifiers_i18n}] )/2 ]]"
|
||||
ceremonial_roll_template = (
|
||||
"&{template:arcane} "
|
||||
"{{label0=^{ceremonial} ^{casting}}} "
|
||||
"{{result0= %(roll)s }} "
|
||||
"{{label1=^{aura}}} "
|
||||
"{{result1=@{aura}}} "
|
||||
"{{label2=^{weakness-m}}} "
|
||||
"{{result2=[[@{wound_total}[@{wounds_i18n}] + [[floor(@{fatigue})]][@{fatigue_i18n}] ]]}} "
|
||||
"{{label3=^{circumstances-m}}} "
|
||||
"{{result3=?{@{modifiers_i18n}|0}}} "
|
||||
"{{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} "
|
||||
"{{crit-button=[@{critical_i18n}!](~@{character_name}|critical-spontaneous)}}"
|
||||
)
|
||||
ceremonial_roll = (
|
||||
"[[("
|
||||
"%(die)s"
|
||||
"+ @{Ceremonial_Technique} "
|
||||
"+ @{Ceremonial_Form} "
|
||||
"+ ([[@{Ceremonial_Focus}]]) [@{focus_i18n}] "
|
||||
"+ (@{gestures}) "
|
||||
"+ (@{words}) "
|
||||
"+ (@{Stamina_Score}) [@{stamina_i18n}] "
|
||||
"+ (@{aura}) [@{aura_i18n}] "
|
||||
"+ ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] "
|
||||
"+ (@{wound_total}) [@{wounds_i18n}] "
|
||||
"+ (@{Ceremonial_Artes_Lib}) [@{artes_i18n}] "
|
||||
"+ (@{Ceremonial_Philos}) [@{philos_i18n}] "
|
||||
"+ (?{@{modifiers_i18n}|0}) [@{modifiers_i18n}] "
|
||||
")/2 ]]"
|
||||
)
|
||||
GLOBALS["ceremonial_roll_simple"] = ceremonial_roll_template % {
|
||||
"roll": ceremonial_roll % {"die": "@{simple-die}"}
|
||||
}
|
||||
@@ -280,8 +466,34 @@ GLOBALS["ceremonial_roll_stress"] = (
|
||||
ceremonial_roll_template % {"roll": ceremonial_roll % {"die": "@{stress-die}"}}
|
||||
) + " {{stress=1}}"
|
||||
|
||||
formulaic_roll_template = "&{template:arcane} {{label0=^{formulaic} ^{casting}}} {{result0= %(roll)s }} {{label1=^{aura}}} {{result1=@{aura}}} {{label2=^{weakness-m}}} {{result2=[[@{wound_total}[@{wounds_i18n}] + [[floor(@{fatigue})]][@{fatigue_i18n}] ]]}} {{label3=^{circumstances-m}}} {{result3=?{@{modifiers_i18n}|0}}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"
|
||||
formulaic_roll = "[[%(die)s + @{Formulaic_Technique} + @{Formulaic_Form} + ([[@{Formulaic_Focus}]]) [@{focus_i18n}] + (@{gestures}) + (@{words}) + (@{Stamina_Score}) [@{stamina_i18n}] + (@{aura}) [@{aura_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (@{wound_total}) [@{wounds_i18n}] + (?{@{modifiers_i18n}|0}) [@{modifiers_i18n}] ]]"
|
||||
|
||||
formulaic_roll_template = (
|
||||
"&{template:arcane} "
|
||||
"{{label0=^{formulaic} ^{casting}}} "
|
||||
"{{result0= %(roll)s }} "
|
||||
"{{label1=^{aura}}} "
|
||||
"{{result1=@{aura}}} "
|
||||
"{{label2=^{weakness-m}}} "
|
||||
"{{result2=[[@{wound_total}[@{wounds_i18n}] + [[floor(@{fatigue})]][@{fatigue_i18n}] ]]}} "
|
||||
"{{label3=^{circumstances-m}}} "
|
||||
"{{result3=?{@{modifiers_i18n}|0}}} "
|
||||
"{{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} "
|
||||
"{{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"
|
||||
)
|
||||
formulaic_roll = (
|
||||
"[["
|
||||
"%(die)s "
|
||||
"+ @{Formulaic_Technique} "
|
||||
"+ @{Formulaic_Form} "
|
||||
"+ ([[@{Formulaic_Focus}]]) [@{focus_i18n}] "
|
||||
"+ (@{gestures}) "
|
||||
"+ (@{words}) "
|
||||
"+ (@{Stamina_Score}) [@{stamina_i18n}] "
|
||||
"+ (@{aura}) [@{aura_i18n}] "
|
||||
"+ ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (@{wound_total}) [@{wounds_i18n}] "
|
||||
"+ (?{@{modifiers_i18n}|0}) [@{modifiers_i18n}] "
|
||||
"]]"
|
||||
)
|
||||
GLOBALS["formulaic_roll_simple"] = formulaic_roll_template % {
|
||||
"roll": formulaic_roll % {"die": "@{simple-die}"}
|
||||
}
|
||||
@@ -289,8 +501,34 @@ GLOBALS["formulaic_roll_stress"] = (
|
||||
formulaic_roll_template % {"roll": formulaic_roll % {"die": "@{stress-die}"}}
|
||||
) + " {{stress=1}}"
|
||||
|
||||
ritual_roll_template = "&{template:arcane} {{label0=^{ritual} ^{casting}}} {{result0= %(roll)s }} {{label1=^{aura}}} {{result1=@{aura}}} {{label2=^{weakness-m}}} {{result2=[[ @{wound_total}[@{wounds_i18n}] + [[floor(@{fatigue})]][@{fatigue_i18n}] ]]}} {{label3=^{circumstances-m}}} {{result3=?{@{modifiers_i18n}|0}}} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"
|
||||
ritual_roll = "[[%(die)s + @{Ritual_Technique} + @{Ritual_Form} + ([[@{Ritual_Focus}]]) [@{focus_i18n}] + (@{Stamina_Score}) [@{stamina_i18n}] + (@{aura}) [@{aura_i18n}] + (@{Ritual_Artes_Lib}) [@{artes_i18n}] + (@{Ritual_Philos}) [@{philos_i18n}] + (@{wound_total}) [@{wounds_i18n}] + ([[floor(@{fatigue})]]) [@{fatigue_i18n}] + (?{@{modifiers_i18n}|0}) [@{modifiers_i18n}] ]]"
|
||||
ritual_roll_template = (
|
||||
"&{template:arcane} "
|
||||
"{{label0=^{ritual} ^{casting}}} "
|
||||
"{{result0= %(roll)s }} "
|
||||
"{{label1=^{aura}}} "
|
||||
"{{result1=@{aura}}} "
|
||||
"{{label2=^{weakness-m}}} "
|
||||
"{{result2=[[ @{wound_total}[@{wounds_i18n}] + [[floor(@{fatigue})]][@{fatigue_i18n}] ]]}} "
|
||||
"{{label3=^{circumstances-m}}} "
|
||||
"{{result3=?{@{modifiers_i18n}|0}}} "
|
||||
"{{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} "
|
||||
"{{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"
|
||||
)
|
||||
ritual_roll = (
|
||||
"[["
|
||||
"%(die)s "
|
||||
"+ @{Ritual_Technique} "
|
||||
"+ @{Ritual_Form} "
|
||||
"+ ([[@{Ritual_Focus}]]) [@{focus_i18n}] "
|
||||
"+ (@{Stamina_Score}) [@{stamina_i18n}] "
|
||||
"+ (@{aura}) [@{aura_i18n}] "
|
||||
"+ (@{Ritual_Artes_Lib}) [@{artes_i18n}] "
|
||||
"+ (@{Ritual_Philos}) [@{philos_i18n}] "
|
||||
"+ (@{wound_total}) [@{wounds_i18n}] "
|
||||
"+ ([[floor(@{fatigue})]]) [@{fatigue_i18n}] "
|
||||
"+ (?{@{modifiers_i18n}|0}) [@{modifiers_i18n}] "
|
||||
"]]"
|
||||
)
|
||||
GLOBALS["ritual_roll_simple"] = ritual_roll_template % {
|
||||
"roll": ritual_roll % {"die": "@{simple-die}"}
|
||||
}
|
||||
@@ -300,18 +538,54 @@ GLOBALS["ritual_roll_stress"] = (
|
||||
|
||||
## Spells
|
||||
# Deferred attribute access to get the spell's technique value
|
||||
spell_tech_value = "(@{sys_at}@{character_name}@{sys_pipe}@{spell_tech_name}_Score@{sys_rbk} + @{sys_at}@{character_name}@{sys_pipe}@{spell_tech_name}_Puissant@{sys_rbk}) [@{sys_at}@{character_name}@{sys_pipe}@{spell_tech_name}_i18n@{sys_rbk}]"
|
||||
spell_form_value = "(@{sys_at}@{character_name}@{sys_pipe}@{spell_form_name}_Score@{sys_rbk} + @{sys_at}@{character_name}@{sys_pipe}@{spell_form_name}_Puissant@{sys_rbk}) [@{sys_at}@{character_name}@{sys_pipe}@{spell_form_name}_i18n@{sys_rbk}]"
|
||||
spell_tech_value = (
|
||||
"("
|
||||
"@{sys_at}@{character_name}@{sys_pipe}@{spell_tech_name}_Score@{sys_rbk} "
|
||||
"+ @{sys_at}@{character_name}@{sys_pipe}@{spell_tech_name}_Puissant@{sys_rbk}"
|
||||
") "
|
||||
"[@{sys_at}@{character_name}@{sys_pipe}@{spell_tech_name}_i18n@{sys_rbk}]"
|
||||
)
|
||||
spell_form_value = (
|
||||
"("
|
||||
"@{sys_at}@{character_name}@{sys_pipe}@{spell_form_name}_Score@{sys_rbk} "
|
||||
"+ @{sys_at}@{character_name}@{sys_pipe}@{spell_form_name}_Puissant@{sys_rbk}"
|
||||
") "
|
||||
"[@{sys_at}@{character_name}@{sys_pipe}@{spell_form_name}_i18n@{sys_rbk}]"
|
||||
)
|
||||
# Export the deferred attribute access for use in the HTML since the focus depends on them
|
||||
GLOBALS["spell_tech_value"] = spell_tech_value
|
||||
GLOBALS["spell_form_value"] = spell_form_value
|
||||
spell_roll_template = "&{template:spell} {{spell= @{spell_name}}} {{character= @{character_name} }} {{sigil=@{sigil}}} {{roll= %(roll)s }} {{range= @{spell_range} }} {{duration= @{spell_duration} }} {{target= @{spell_target} }} {{effect= @{spell_note} }} {{mastery= @{spell_note-2} }} {{Technique= @{sys_at}@{character_name}@{sys_pipe}@{spell_tech_name}_i18n@{sys_rbk} }} {{Form= @{sys_at}@{character_name}@{sys_pipe}@{spell_form_name}_i18n@{sys_rbk} }} {{Level= @{spell_level} }} {{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} {{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"
|
||||
|
||||
spell_roll_template = (
|
||||
"&{template:spell} "
|
||||
"{{spell= @{spell_name}}} "
|
||||
"{{character= @{character_name} }} "
|
||||
"{{sigil=@{sigil}}} {{roll= %(roll)s }} "
|
||||
"{{range= @{spell_range} }} "
|
||||
"{{duration= @{spell_duration} }} "
|
||||
"{{target= @{spell_target} }} "
|
||||
"{{effect= @{spell_note} }} "
|
||||
"{{mastery= @{spell_note-2} }} "
|
||||
"{{Technique= @{sys_at}@{character_name}@{sys_pipe}@{spell_tech_name}_i18n@{sys_rbk} }} "
|
||||
"{{Form= @{sys_at}@{character_name}@{sys_pipe}@{spell_form_name}_i18n@{sys_rbk} }} "
|
||||
"{{Level= @{spell_level} }} "
|
||||
"{{botch-button=[@{botch_i18n}!](~@{character_name}|botch)}} "
|
||||
"{{crit-button=[@{critical_i18n}!](~@{character_name}|critical)}}"
|
||||
)
|
||||
spell_roll = (
|
||||
"[[%(die)s + (@{Stamina_Score}) [@{stamina_i18n}] + "
|
||||
+ spell_tech_value
|
||||
+ " + "
|
||||
+ spell_form_value
|
||||
+ "+ ([[@{spell_Focus}]]) [@{focus_i18n}] + (@{spell_bonus}) [@{bonus_i18n}] + (@{gestures}) + (@{words}) + (@{aura}) [@{aura_i18n}] + ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] + (@{wound_total}) [@{wounds_i18n}] + (?{@{modifiers_i18n}|0}) [@{modifiers_i18n}] ]]"
|
||||
"[["
|
||||
"%(die)s "
|
||||
"+ (@{Stamina_Score}) [@{stamina_i18n}] "
|
||||
f"+ {spell_tech_value} "
|
||||
f"+ {spell_form_value}"
|
||||
"+ ([[@{spell_Focus}]]) [@{focus_i18n}] "
|
||||
"+ (@{spell_bonus}) [@{bonus_i18n}] "
|
||||
"+ (@{gestures}) "
|
||||
"+ (@{words}) "
|
||||
"+ (@{aura}) [@{aura_i18n}] "
|
||||
"+ ([[floor(@{Fatigue})]]) [@{fatigue_i18n}] "
|
||||
"+ (@{wound_total}) [@{wounds_i18n}] "
|
||||
"+ (?{@{modifiers_i18n}|0}) [@{modifiers_i18n}] ]]"
|
||||
)
|
||||
GLOBALS["spell_roll_simple"] = spell_roll_template % {
|
||||
"roll": spell_roll % {"die": "@{simple-die}"}
|
||||
|
||||
@@ -133,7 +133,11 @@ def main(
|
||||
module = importlib.import_module(module_name)
|
||||
ns.update(getattr(module, attr_name))
|
||||
except Exception as err:
|
||||
print(f"error: Could not load {name}: {err}", end="")
|
||||
print(
|
||||
f"error: Could not load {name} due to "
|
||||
f"{err.__class__.__name__}: {err}",
|
||||
end="",
|
||||
)
|
||||
if verbose < 1:
|
||||
print(" (use -v to display detailed traceback)")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user