All user data for FoundryVTT. Includes worlds, systems, modules, and any asset in the "foundryuserdata" directory. Does NOT include the FoundryVTT installation itself.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
7.2 KiB

  1. <form>
  2. <section>
  3. <datalist id="groups">
  4. {{#each groups}}
  5. <option value="{{this}}"></option>
  6. {{/each}}
  7. </datalist>
  8. <ol class="token-variant-table" style="overflow-x: hidden;">
  9. <li class="table-row table-header flexrow">
  10. <div class="mapping-controls">
  11. <a class="create-mapping" title="Add new mapping"> <i class="fas fa-plus"></i></a>
  12. </div>
  13. <div class="mapping-label" title="Optional description for the mapping. Actor mappings will override Global ones if their Labels match."><label>Label</label></div>
  14. <div class="mapping-expression"><label>Expression</label>&nbsp;&nbsp;<i class="fas fa-question-circle" title="Accepted Operators:&#013;• && ( logical AND)&#013;• || (logical OR)&#013;• \! (escaped logical NOT)&#013;• \( (escaped open bracket to group expressions)&#013;• \) (escaped closed bracket to group expressions)&#013;&#013;Accepted hp and Token property Comparators:&#013;• = (equal)&#013;• < (less than)&#013;• > (greater than)&#013;• <= (less than or equal)&#013;• >= (greater than or equal)&#013;• <> (lesser or greater than)&#013;&#013;Accepted wildcards&#013;• \*&#013;• \{ \}&#013;&#013;Examples of valid expressions:&#013;• Flying&#013;• Dead && Burning&#013;• Flying && \! \( Prone || Dead \)&#013;• hp<=50%&#013;• name=&ldquo;Raging Barbarian&ldquo;&#013;• lockRotation=&ldquo;true&ldquo;&#013;• flags.token-variants.test=&ldquo;true&ldquo;&#013;• Exhaustion \*&#013;• Exhaustion \{1,2,3\}&#013;&#013;Special Effect Names:&#013;• token-variants-combat : Actives when Token is in combat&#013;• combat-turn : Activates when it's Token's turn in combat&#013;• combat-turn-next : Actives when Token is next in the initiative order"></i></div>
  15. <div class="mapping-priority" title="The order in which mappings are to be resolved. Which scripts are run first, token configs are prioritized, and overlay display order will all be based off of this value."><label>Priority</label></div>
  16. <div class="mapping-image" title="Image to be applied to the token."><label>Image</label></div>
  17. <div class="mapping-config" title="Token Configuration and Scripts"><label>Config</label></div>
  18. <div class="mapping-overlay" title="Image, text, or shapes to be shown on the token."><label>Overlay</label></div>
  19. <div class="mapping-alwaysOn" title="If checked mapping will always be treated as active, regardless whether the Expression is true or not."><label>Always On</label></div>
  20. <div class="mapping-disable" title="If checked mapping will never be activated regardless of whether the Expression is true or not."><label>Disable</label></div>
  21. {{#if global}}
  22. <div class="mapping-target" title="Actor types that this mapping is applicable to."><i class="fas fa-users"></i></div>
  23. {{/if}}
  24. <div class="mapping-group" title="Mappings sharing Group names will be displayed under the same header."><label>Group</label></div>
  25. </li>
  26. {{#each groupedMappings as |mappings group|}}
  27. <div class="group-title flexrow">
  28. <p><a class="group-delete" data-group="{{group}}"><i class="fas fa-trash fa-xs"></i></a> {{group}}</p>
  29. <div class="group-disable {{#if mappings.active}}active{{/if}}" data-group="{{group}}"><a><i class="fas fa-power-off"></i></a></div>
  30. <div class="group-toggle active {{#if ../global}}global{{/if}}" data-group="{{group}}"><a><i class="fas fa-chevron-double-up"></i></a></div>
  31. </div>
  32. {{#each mappings.list as |mapping|}}
  33. <input type="text" name="mappings.{{mapping.i}}.id" value="{{mapping.id}}" hidden/>
  34. <li class="table-row flexrow" data-group="{{group}}" data-index="{{mapping.i}}">
  35. <div class="mapping-controls">
  36. <a class="clone-mapping" title="Clone mapping"><i class="fas fa-clone"></i></a>
  37. <a class="delete-mapping" title="Delete mapping"><i class="fas fa-trash"></i></a>
  38. </div>
  39. <div class="mapping-label">
  40. <input
  41. type="text"
  42. name="mappings.{{mapping.i}}.label"
  43. value="{{mapping.label}}"
  44. />
  45. </div>
  46. <div class="mapping-expression">
  47. <div class="div-input" contenteditable="true">{{{mapping.highlightedExpression}}}</div>
  48. <input
  49. type="text"
  50. name="mappings.{{mapping.i}}.expression"
  51. value="{{mapping.expression}}"
  52. hidden/>
  53. </div>
  54. <div class="mapping-priority">
  55. <input
  56. type="number"
  57. name="mappings.{{mapping.i}}.priority"
  58. value="{{mapping.priority}}"
  59. placeholder="priority"
  60. />
  61. </div>
  62. <div class="mapping-image">
  63. <video
  64. height="32" width="32"
  65. src="{{mapping.imgSrc}}"
  66. title="{{mapping.imgName}}"
  67. autoplay
  68. loop
  69. muted
  70. {{#unless isVideo}}hidden{{/unless}}
  71. >
  72. </video>
  73. <img height="32" width="32" src="{{mapping.imgSrc}}" title="{{mapping.imgName}}" {{#if isVideo}}hidden{{/if}}/>
  74. <input
  75. class="imgSrc"
  76. type="hidden"
  77. name="mappings.{{mapping.i}}.imgSrc"
  78. value="{{mapping.imgSrc}}"
  79. />
  80. <input
  81. class="imgName"
  82. type="hidden"
  83. name="mappings.{{mapping.i}}.imgName"
  84. value="{{mapping.imgName}}"
  85. />
  86. </div>
  87. <div class="mapping-config">
  88. <a><i class="fas fa-cog fa-lg config {{#if mapping.hasTokenConfig}}active{{/if}}"></i></a>
  89. <a><i class="fas fa-edit config-edit {{#if mapping.hasConfig}}active{{/if}}"></i></a>
  90. <a><i class="fas fa-play config-script {{#if mapping.hasScript}}active{{/if}}"></i></a>
  91. <input class="config" type="hidden" name="mappings.{{mapping.i}}.config" value="{{mapping.config}}">
  92. </div>
  93. <div class="mapping-overlay">
  94. <input type="checkbox" name="mappings.{{mapping.i}}.overlay" {{#if mapping.overlay}}checked{{/if}}/>
  95. <a {{#if mapping.parentID}}class="child" title="Child Of: {{mapping.parentID}}"{{/if}}><i class="fas fa-cog fa-lg overlay-config"></i></a>
  96. </div>
  97. <div class="mapping-alwaysOn">
  98. <input type="checkbox" name="mappings.{{mapping.i}}.alwaysOn" {{#if mapping.alwaysOn}}checked{{/if}} title="Enabling will not trigger scripts."/>
  99. </div>
  100. <div class="mapping-disable">
  101. <input type="checkbox" name="mappings.{{mapping.i}}.disabled" {{#if mapping.disabled}}checked{{/if}}/>
  102. </div>
  103. {{#if ../../global}}
  104. <div class="mapping-target" title="Configure Applicable Actors">
  105. <a><i class="fas fa-users"></i></a>
  106. </div>
  107. {{/if}}
  108. <div class="mapping-group">
  109. <input list="groups" name="mappings.{{mapping.i}}.group" value="{{mapping.group}}"/>
  110. </div>
  111. </li>
  112. {{/each}}
  113. {{/each}}
  114. </ol>
  115. </section>
  116. <footer class="sheet-footer flexrow">
  117. <button class="save-mappings" type="button">
  118. <i class="far fa-save"></i>{{localize "token-variants.common.apply"}}
  119. </button>
  120. </footer>
  121. </form>