Update L5RFFGSheet.html

Corrected the tooltip for Air Stance. I'd updated it at one point, but it had been rolled back somehow and was one update behind.
Fixed the XP requirements per rank.
Added the roller to the techniques page per user request.
I added the fitness skill, as a duplicate, on the Conflict page for quick rolls to resolve criticals. I also updated the text to add (Defense) in parenthesis. The intention for this change is for when a GM breaks out fitness into subskills. In this case, the default fitness skill spot becomes the defense skill for critical resolution.

In addition:
Although a final update never came out, I made advancement adjustments to help GMs still playing implement the final notes from the developers. In light of this:

Removed rings from advancement. If you don't wish to consider this change canon, you can add rings to one of the other lines.
Added four generic lines for out of rank training. These are calculated into the XP at half value. Imput the full value spent into the field.
Made the XP needed for each rank and editable field. The Devs didn't tell us how much they intended to raise XP per rank. If a GM wants to guess, they can edit the field manually.
This commit is contained in:
rdefendi
2018-01-23 17:25:25 -07:00
committed by GitHub
parent 5ca910e1e3
commit 1e0682f2a5
+233 -32
View File
@@ -15,8 +15,9 @@
<span class="tab"data-i18n-title="npcs-u" title="NPCs"></span>
<!--End Sheet Tabs-->
<p></p>
Version 0.8.1 Beta
Version 0.8.2 Beta
<div class="tab-content tab-narrative-mode"><!--Open Narrative Mode Tab-->
@@ -913,7 +914,7 @@ Version 0.8.1 Beta
<!--Start Rings-->
<table style="width:100%;class="attribute">
<tr>
<td style=background-color:#e1dacf;><div class="sheet-tooltip"><span class="sheet-tooltiptext" data-i18n="air-stance-u">Air Stance (conflict only): Increase the TN of Attack and Scheme action checks targeting you by half your school rank (rounded up).</span>
<td style=background-color:#e1dacf;><div class="sheet-tooltip"><span class="sheet-tooltiptext" data-i18n="air-stance-u">Air Stance (conflict only): Increase the TN of Attack and Scheme action checks targeting you by 1. If your school rank is 4 or higher, increase the TN by 2 instead.</span>
<p></p> <h3 data-i18n="air-u" class="attribute">Air</h3></div></td>
<td style=background-color:#e1dacf;><div class="sheet-tooltip"><span class="sheet-tooltiptext" data-i18n="earth-stance-u">Earth Stance (conflict only): Other characters cannot spend opportunity targeting you.</span>
<p></p> <h3 data-i18n="earth-u" class="attribute">Earth</h3></div></td>
@@ -1264,11 +1265,42 @@ Version 0.8.1 Beta
<div class="center"><!--Open Right Column Centering-->
<!--Start Defense Skill-->
<p></p>
<h3 data-i18n="defense-check-u">Defense Check</h3>
</div>
<table style='border-collapse: collapse; border-spacing: 0; width:100%'; margin-bottom:0px>
<tr>
<td style="font-weight:bold" data-i18n="skill-name-u">Skill Name</td>
<td style="font-weight:bold" data-i18n="rank-u">Rank</td>
<td style="font-weight:bold" data-i18n="approach-u">Approach</td>
<td style="font-weight:bold" data-i18n="roll-u">+Roll</td>
<td style="font-weight:bold" data-i18n="keep-u">+Keep</td>
<td style="font-weight:bold" data-i18n="modifiers-nocolon-u">Modifiers</td>
</tr>
<tr>
<td style="width:100px;" data-i18n="fitness-u">Fitness</td>
<td><input type="number" name="attr_rank_fitness" value="0"/></td>
<td><select class="narrow" name="attr_fitness_approach">
<option value="@{air}" data-i18n="air-u">Air</option>
<option value="@{earth}" data-i18n="earth-u">Earth</option>
<option value="@{fire}" data-i18n="fire-u">Fire</option>
<option value="@{water}" data-i18n="water-u">Water</option>
<option value="@{void}" data-i18n="void-u">Void</option>
</select></td>
<td><input type="number" name="attr_roll_bonus_fitness" value="0"></td>
<td><input type="number" name="attr_keep_bonus_fitness" value="0"></td>
<td><input style="width:65px;" type="text" value="" name="attr_fitness_mod"/>
<td><button type="roll" value="/em @{name} @{skill_emote_1} @{fitness_trans} @{skill_emote_2} @{fitness_approach_selected} @{skill_emote_3} [[@{fitness_approach}+@{keep_bonus_fitness}]]@{skill_emote_5} \n\n/roll [[@{fitness_approach}+@{keep_bonus_fitness}]]t[Ring]+[[@{rank_fitness}+@{roll_bonus_fitness}]]t[Skill]"></button></td>
</tr>
</table>
<!--End Defense Skill Main Section-->
<!--Start Notes and Gear Inventory-->
<p></p>
<h3 data-i18n="notes-gear-u">Notes and Gear Inventory</h3>
<textarea name="attr_notes_gear" class="four-lines"></textarea>
<textarea name="attr_notes_gear" class="three-lines"></textarea>
<!--End Notes and Gear Inventory-->
@@ -1289,6 +1321,27 @@ Version 0.8.1 Beta
<div class="sheet-col"><!--Open Bottom Section Left Column-->
<div class="center">
<!--Start Roller-->
<p></p>
<h3 data-i18n="roller-u">Roller</h3>
<table style="width:100%;class="attribute">
<tr>
<td style=background-color:#e1dacf;><h3 data-i18n="ring-u" class="attribute">Ring:</h3> </td>
<td style="vertical-align:middle;background-color:#e1dacf;padding-top: 6px;" ><img width="25px" src="https://i.imgur.com/KbPcmsc.png"/></td>
<td style=background-color:#e1dacf;><input type="number" value="0" name="attr_ringdie"/>
<td style=background-color:#e1dacf;><h3 data-i18n="skill-u" class="attribute">Skill:</h3> </td>
<td style="vertical-align:middle;background-color:#e1dacf;padding-top: 6px;"><img width="25px" src="https://i.imgur.com/zQD5LkP.png"/> </td>
<td style=background-color:#e1dacf;><input type="number" value="0" name="attr_skilldie"/> </td>
<td style=background-color:#e1dacf;><h3 data-i18n="modifiers-u" class="attribute">Modifiers:</h3> </td>
<td style=background-color:#e1dacf;><input style="width:75px;" type="text" value="" name="attr_rollmod"/>
<td style=background-color:#e1dacf;><button type='roll' name='generic_roll' value='/em @{name} @{skill_emote_4} @{ringdie}@{skill_emote_5} \n\n/roll [[@{ringdie}]]t[Ring]+[[@{skilldie}]]t[Skill]'></button><br/></td>
</tr>
</table>
<!--End Roller-->
</div><!--Close Left Column Centering-->
<p></p>
<b data-i18n="kata-u">Kata</b><input name="attr_kata_toggle" value="1" checked="checked" style="width:78px;margin:-13px -20px 0 -62px" class="sheet-toggle tab-kata" type="checkbox"/><span></span><!--Checkbox Kata Colapsable-->
@@ -1882,7 +1935,7 @@ Version 0.8.1 Beta
<table style="width:100%;class="attribute">
<tr>
<td style=background-color:#e1dacf;><b data-i18n="rank1-u" style="font-size:14px" class="attribute">Rank 1</b></td>
<td style=background-color:#e1dacf;><b data-i18n="xp-rank1-u" style="font-size:14px" class="attribute">XP spent at Rank 1 / Total:</b><input style="font-size:14px" type="number" name="attr_rank1xp" value="@{skillgroup_rank1_xp}+@{skill1_rank1_xp}+@{skill2_rank1_xp}+@{skill3_rank1_xp}+@{technique_cat_rank1_xp}+@{technique1_rank1_xp}+@{technique2_rank1_xp}+@{rings_rank1_xp}" disabled="true"/><b style="font-size:14px">/16</b></td>
<td style=background-color:#e1dacf;><b data-i18n="xp-rank1-u" style="font-size:14px" class="attribute">XP spent at Rank 1 / Total:</b><input style="font-size:14px" type="number" name="attr_rank1xp" value="round(@{skillgroup_rank1_xp}+@{skill1_rank1_xp}+@{skill2_rank1_xp}+@{skill3_rank1_xp}+@{technique_cat_rank1_xp}+@{technique1_rank1_xp}+@{technique2_rank1_xp}+@{out1_of_rank1_xp}/2+@{out2_of_rank1_xp}/2+@{out3_of_rank1_xp}/2+@{out4_of_rank1_xp}/2)" disabled="true"/><b style="font-size:14px">/</b><input style="font-size:14px" type="number" name="attr_rank1target" value="16"/></td>
</tr>
</table>
<table style='border-collapse: collapse; border-spacing: 0; width:100%'>
@@ -1927,9 +1980,24 @@ Version 0.8.1 Beta
<td><input type="number" name="attr_technique2_rank1_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="rings-u">Rings</td>
<td><input type="text" name="attr_rings_rank1" value=""/></td>
<td><input type="number" name="attr_rings_rank1_xp" value="0"></td>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out1_of_rank1" value=""/></td>
<td><input type="number" name="attr_out1_of_rank1_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out2_of_rank1" value=""/></td>
<td><input type="number" name="attr_out2_of_rank1_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out3_of_rank1" value=""/></td>
<td><input type="number" name="attr_out3_of_rank1_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out4_of_rank1" value=""/></td>
<td><input type="number" name="attr_out4_of_rank1_xp" value="0"></td>
</tr>
</table>
<input type="checkbox" class="checkmark" name="attr_rank1_comp value="0" /><span></span><b data-i18n="completed-u">Completed</b>
@@ -1938,7 +2006,7 @@ Version 0.8.1 Beta
<table style="width:100%;class="attribute">
<tr>
<td style=background-color:#e1dacf;><b data-i18n="rank2-u" style="font-size:14px" class="attribute">Rank 2</b></td>
<td style=background-color:#e1dacf;><b data-i18n="xp-rank2-u" style="font-size:14px" class="attribute">XP spent at Rank 2 / Total:</b><input style="font-size:14px" type="number" name="attr_rank2xp" value="@{skillgroup_rank2_xp}+@{skill1_rank2_xp}+@{skill2_rank2_xp}+@{skill3_rank2_xp}+@{technique_cat_rank2_xp}+@{technique1_rank2_xp}+@{technique2_rank2_xp}+@{rings_rank2_xp}" disabled="true"/><b style="font-size:14px">/16</b></td>
<td style=background-color:#e1dacf;><b data-i18n="xp-rank2-u" style="font-size:14px" class="attribute">XP spent at Rank 2 / Total:</b><input style="font-size:14px" type="number" name="attr_rank2xp" value="round(@{skillgroup_rank2_xp}+@{skill1_rank2_xp}+@{skill2_rank2_xp}+@{skill3_rank2_xp}+@{technique_cat_rank2_xp}+@{technique1_rank2_xp}+@{technique2_rank2_xp}+@{out1_of_rank2_xp}/2+@{out2_of_rank2_xp}/2+@{out3_of_rank2_xp}/2+@{out4_of_rank2_xp}/2)" disabled="true"/><b style="font-size:14px">/</b><input style="font-size:14px" type="number" name="attr_rank2target" value="20"/></td>
</tr>
</table>
<table style='border-collapse: collapse; border-spacing: 0; width:100%'>
@@ -1983,9 +2051,24 @@ Version 0.8.1 Beta
<td><input type="number" name="attr_technique2_rank2_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="rings-u">Rings</td>
<td><input type="text" name="attr_rings_rank2" value=""/></td>
<td><input type="number" name="attr_rings_rank2_xp" value="0"></td>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out1_of_rank2" value=""/></td>
<td><input type="number" name="attr_out1_of_rank2_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out2_of_rank2" value=""/></td>
<td><input type="number" name="attr_out2_of_rank2_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out3_of_rank2" value=""/></td>
<td><input type="number" name="attr_out3_of_rank2_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out4_of_rank2" value=""/></td>
<td><input type="number" name="attr_out4_of_rank2_xp" value="0"></td>
</tr>
</table>
<input type="checkbox" class="checkmark" name="attr_rank2_comp value="0" /><span></span><b data-i18n="completed-u">Completed</b>
@@ -1994,7 +2077,7 @@ Version 0.8.1 Beta
<table style="width:100%;class="attribute">
<tr>
<td style=background-color:#e1dacf;><b data-i18n="rank3-u" style="font-size:14px" class="attribute">Rank 3</b></td>
<td style=background-color:#e1dacf;><b data-i18n="xp-rank3-u" style="font-size:14px" class="attribute">XP spent at Rank 3 / Total:</b><input style="font-size:14px" type="number" name="attr_rank3xp" value="@{skillgroup_rank3_xp}+@{skill1_rank3_xp}+@{skill2_rank3_xp}+@{skill3_rank3_xp}+@{technique_cat_rank3_xp}+@{technique1_rank3_xp}+@{technique2_rank3_xp}+@{rings_rank3_xp}" disabled="true"/><b style="font-size:14px">/16</b></td>
<td style=background-color:#e1dacf;><b data-i18n="xp-rank3-u" style="font-size:14px" class="attribute">XP spent at Rank 3 / Total:</b><input style="font-size:14px" type="number" name="attr_rank3xp" value="round(@{skillgroup_rank3_xp}+@{skill1_rank3_xp}+@{skill2_rank3_xp}+@{skill3_rank3_xp}+@{technique_cat_rank3_xp}+@{technique1_rank3_xp}+@{technique2_rank3_xp}+@{out1_of_rank3_xp}/2+@{out2_of_rank3_xp}/2+@{out3_of_rank3_xp}/2+@{out4_of_rank3_xp}/2)" disabled="true"/><b style="font-size:14px">/</b><input style="font-size:14px" type="number" name="attr_rank3target" value="24"/></td>
</tr>
</table>
<table style='border-collapse: collapse; border-spacing: 0; width:100%'>
@@ -2039,9 +2122,24 @@ Version 0.8.1 Beta
<td><input type="number" name="attr_technique2_rank3_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="rings-u">Rings</td>
<td><input type="text" name="attr_rings_rank3" value=""/></td>
<td><input type="number" name="attr_rings_rank3_xp" value="0"></td>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out1_of_rank3" value=""/></td>
<td><input type="number" name="attr_out1_of_rank3_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out2_of_rank3 value=""/></td>
<td><input type="number" name="attr_out2_of_rank3_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out3_of_rank3" value=""/></td>
<td><input type="number" name="attr_out3_of_rank3_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out4_of_rank3" value=""/></td>
<td><input type="number" name="attr_out4_of_rank3_xp" value="0"></td>
</tr>
</table>
<input type="checkbox" class="checkmark" name="attr_rank3_comp value="0" /><span></span><b data-i18n="completed-u">Completed</b>
@@ -2050,7 +2148,7 @@ Version 0.8.1 Beta
<table style="width:100%;class="attribute">
<tr>
<td style=background-color:#e1dacf;><b data-i18n="rank4-u" style="font-size:14px" class="attribute">Rank 4</b></td>
<td style=background-color:#e1dacf;><b data-i18n="xp-rank4-u" style="font-size:14px" class="attribute">XP spent at Rank 4 / Total:</b><input style="font-size:14px" type="number" name="attr_rank4xp" value="@{skillgroup_rank4_xp}+@{skill1_rank4_xp}+@{skill2_rank4_xp}+@{skill3_rank4_xp}+@{technique_cat_rank4_xp}+@{technique1_rank4_xp}+@{technique2_rank4_xp}+@{rings_rank4_xp}" disabled="true"/><b style="font-size:14px">/16</b></td>
<td style=background-color:#e1dacf;><b data-i18n="xp-rank4-u" style="font-size:14px" class="attribute">XP spent at Rank 4 / Total:</b><input style="font-size:14px" type="number" name="attr_rank4xp" value="round(@{skillgroup_rank4_xp}+@{skill1_rank4_xp}+@{skill2_rank4_xp}+@{skill3_rank4_xp}+@{technique_cat_rank4_xp}+@{technique1_rank4_xp}+@{technique2_rank4_xp}+@{out1_of_rank4_xp}/2+@{out2_of_rank4_xp}/2+@{out3_of_rank4_xp}/2+@{out4_of_rank4_xp}/2)" disabled="true"/><b style="font-size:14px">/</b><input style="font-size:14px" type="number" name="attr_rank4target" value="32"/></td>
</tr>
</table>
<table style='border-collapse: collapse; border-spacing: 0; width:100%'>
@@ -2095,18 +2193,38 @@ Version 0.8.1 Beta
<td><input type="number" name="attr_technique2_rank4_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="rings-u">Rings</td>
<td><input type="text" name="attr_rings_rank4" value=""/></td>
<td><input type="number" name="attr_rings_rank4_xp" value="0"></td>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out1_of_rank4" value=""/></td>
<td><input type="number" name="attr_out1_of_rank4_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out2_of_rank4" value=""/></td>
<td><input type="number" name="attr_out2_of_rank4_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out3_of_rank4" value=""/></td>
<td><input type="number" name="attr_out3_of_rank4_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out4_of_rank4" value=""/></td>
<td><input type="number" name="attr_out4_of_rank4_xp" value="0"></td>
</tr>
</table>
<input type="checkbox" class="checkmark" name="attr_rank4_comp value="0" /><span></span><b data-i18n="completed-u">Completed</b>
<p></p>
</div><!--Close Top Section Left Column-->
<div class="sheet-col"><!--Open Top Section Right Column-->
<p></p>
<table style="width:100%;class="attribute">
<tr>
<td style=background-color:#e1dacf;><b data-i18n="rank5-u" style="font-size:14px" class="attribute">Rank 5</b></td>
<td style=background-color:#e1dacf;><b data-i18n="xp-rank5-u" style="font-size:14px" class="attribute">XP spent at Rank 5 / Total:</b><input style="font-size:14px" type="number" name="attr_rank5xp" value="@{skillgroup_rank5_xp}+@{skill1_rank5_xp}+@{skill2_rank5_xp}+@{skill3_rank5_xp}+@{technique_cat_rank5_xp}+@{technique1_rank5_xp}+@{technique2_rank5_xp}+@{rings_rank5_xp}" disabled="true"/><b style="font-size:14px">/16</b></td>
<td style=background-color:#e1dacf;><b data-i18n="xp-rank5-u" style="font-size:14px" class="attribute">XP spent at Rank 5 / Total:</b><input style="font-size:14px" type="number" name="attr_rank5xp" value="round(@{skillgroup_rank5_xp}+@{skill1_rank5_xp}+@{skill2_rank5_xp}+@{skill3_rank5_xp}+@{technique_cat_rank5_xp}+@{technique1_rank5_xp}+@{technique2_rank5_xp}+@{out1_of_rank5_xp}/2+@{out2_of_rank5_xp}/2+@{out3_of_rank5_xp}/2+@{out4_of_rank5_xp}/2)" disabled="true"/><b style="font-size:14px">/</b><input style="font-size:14px" type="number" name="attr_rank5target" value="48"/></td>
</tr>
</table>
@@ -2152,16 +2270,27 @@ Version 0.8.1 Beta
<td><input type="number" name="attr_technique2_rank5_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="rings-u">Rings</td>
<td><input type="text" name="attr_rings_rank5" value=""/></td>
<td><input type="number" name="attr_rings_rank5_xp" value="0"></td>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out1_of_rank5" value=""/></td>
<td><input type="number" name="attr_out1_of_rank5_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out2_of_rank5" value=""/></td>
<td><input type="number" name="attr_out2_of_rank5_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out3_of_rank5" value=""/></td>
<td><input type="number" name="attr_out3_of_rank5_xp" value="0"></td>
</tr>
<tr>
<td style="font-weight:bold" data-i18n="out-of-rank-u">Out of Rank Purchases</td>
<td><input type="text" name="attr_out4_of_rank5" value=""/></td>
<td><input type="number" name="attr_out4_of_rank5_xp" value="0"></td>
</tr>
</table>
<input type="checkbox" class="checkmark" name="attr_rank5_comp value="0" /><span></span><b data-i18n="completed-u">Completed</b>
</div><!--Close Top Section Left Column-->
<div class="sheet-col"><!--Open Top Section Right Column-->
<table style='border-collapse: collapse; border-spacing: 0; width:100%'>
@@ -3225,7 +3354,7 @@ Version 0.8.1 Beta
<table style="width:100%;class="attribute">
<tr>
<tr>
<td style=background-color:#e1dacf;><div class="sheet-tooltip"><span class="sheet-tooltiptext" data-i18n="air-stance-u">Air Stance (conflict only): Increase the TN of Attack and Scheme action checks targeting you by half your school rank (rounded up).</span>
<td style=background-color:#e1dacf;><div class="sheet-tooltip"><span class="sheet-tooltiptext" data-i18n="air-stance-u">Air Stance (conflict only): Air Stance (conflict only): Increase the TN of Attack and Scheme action checks targeting you by 1. If your school rank is 4 or higher, increase the TN by 2 instead.</span>
<p></p> <h3 data-i18n="air-u" class="attribute">Air</h3></div></td>
<td style=background-color:#e1dacf;><div class="sheet-tooltip"><span class="sheet-tooltiptext" data-i18n="earth-stance-u">Earth Stance (conflict only): Other characters cannot spend opportunity targeting you.</span>
<p></p> <h3 data-i18n="earth-u" class="attribute">Earth</h3></div></td>
@@ -6660,8 +6789,80 @@ on('sheet:opened', function () {
</script>
<!-- 8.2 Conversion Worker -->
<script type="text/worker">
var convertFromOldSheet = function () {
// Non-repeating attributes to rename
let conversionData = {
'rings_rank1': 'out1_of_rank1',
'rings_rank1_xp': 'out1_of_rank1_xp',
'rings_rank2': 'out1_of_rank2',
'rings_rank2_xp': 'out1_of_rank2_xp',
'rings_rank3': 'out1_of_rank3',
'rings_rank3_xp': 'out1_of_rank3_xp',
'rings_rank4': 'out1_of_rank4',
'rings_rank4_xp': 'out1_of_rank4_xp',
'rings_rank5': 'out1_of_rank5',
'rings_rank5_xp': 'out1_of_rank5_xp',
},
// Repeating attributes to rename; this assumes that the section name, e.g.
// repeating_spell, does NOT change, so make sure that that is the case or
// it will need quite a bit mor work
conversionDataRepeating = {
};
// Non-repeating attribute renaming
getAttrs(Object.keys(conversionData), function (values) {
let setting = {};
Object.keys(conversionData).forEach(function (oldAttr) {
if (values[oldAttr] != null) {
// set value of new attribute to the old one
setting[conversionData[oldAttr]] = values[oldAttr];
// blank old attribute
setting[oldAttr] = '';
}
});
setAttrs(setting, {silent: true}); // set things silently to make sure we do not trigger unwanted changes
});
// Repeating attribute renaming - loop through all sections, and loop through all ids
// and all attributes for every section
Object.keys(conversionDataRepeating).forEach(function (sectionName) {
let data = conversionDataRepeating[sectionName];
getSectionIDs(sectionName, function (idArray) {
let oldAttrs = idArray.reduce(function (m, id) {
return m.concat(Object.keys(data).map(name => `${sectionName}_${id}_${name}`));
}, []);
getAttrs(oldAttrs, function (values) {
let setting = {};
idArray.forEach(function (id) {
Object.keys(data).forEach(function (oldAttr) {
if (values[`${sectionName}_${id}_${oldAttr}`] != null) {
// set value of new attribute to the old one
setting[`${sectionName}_${id}_${data[oldAttr]}`] = values[`${sectionName}_${id}_${oldAttr}`];
// blank old attribute
setting[`${sectionName}_${id}_${oldAttr}`] = '';
}
});
});
setAttrs(setting, {silent: true}); // set things silently to make sure we do not trigger unwanted changes
});
});
});
};
on('sheet:opened', function () {
let currentVersion = '0.8.2';
getAttrs(['version'], function (v) {
if (v.version='0.8.1') {
convertFromOldSheet();
};
setAttrs({
version: currentVersion
});
});
});
</script>