
Sheet Authors and Coders,
I'm looking for guidance/perspective on this subject of whether to embed placeholders in my HTML for values that players either will never see or interact with, or just write these values to the character sheet via sheet workers. Here's what I've boiled this down to, sanity check please!
If a player can see or interact with certain values, then those values must exist in the HTML; but if a value is only used or required by a sheet worker then it does not require a placeholder in the HTML.
Examples of values which should be embedded in HTML:
- Use case: player can assign a numerical value to an attribute, such as the character's Strength. Example:
<div> <input type="number" class="attribute" name="attr_attribute_strength" value="0" /> </div>
- Use case: player can see character's health status in the character's health status field. Example:
<div> <span class="status" name="attr_health_status"></span> <input type="hidden" name="attr_health_status" value="Healthy|Injured|Out of Coffee" /> </div>
- Note: hidden input value is dynamically set by sheet worker!
Example of value which does not need to be embedded in HTML:
- Use case: sheet worker can track the rowID of a repeating section currently in use by the character. Example:
on(`clicked:repeating_weapons:armweapon`,(eventInfo)=>{ const rowID = eventInfo.triggerName.slice(eventInfo.triggerName.length-20); let setObj = {}; setObj.armedweapon = rowID; setAttrs(setObj); }
Since rowID has no intrinsic value to the player and is only used by sheet workers, it can be written to the character sheet but is not otherwise revealed to the player in HTML.
So this is really my question: in the last example, is it fine to write values to a character sheet that players won't interact with? Or would this be confusing for other sheet authors that pick up the character sheet after me? Or is there something technical that I'm missing that may cause issues down the road?