Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Even at 100, I'd recommend re-examining how you're building this template - look for things that can be combined by using a single table to display repeated sections.
If that's not an option, look for groupings that can be pulled out into their own templates, and then just arrange everything at the end.
<!-- Health Visual -->
<field
id="hhealthvis"
name="Visual Health"
type="derived"
maxfinal="1000">
<calculate phase="Render" priority="1000"><![CDATA[
~the value needs to change if any of the component values we rely upon change to ensure an update of any dependent portals
@value = field[hmaxhealth].value * 1000000 + field[hdmgaggrav].value * 10000 + field[hdmglethal].value * 100 + field[hdmgbash].value
]]></calculate>
<finalize><![CDATA[
~determine the number of excess damage boxes that are filled beyond max health
var extra as number
if (field[hdmgtotal].value > field[hmaxhealth].value) then
extra = field[hdmgtotal].value - field[hmaxhealth].value
endif
~setup the maximum number of boxes to be output
var max as number
max = 16
~determine the last box to be output for normal damage
var last as number
last = minimum(field[hdmgtotal].value,field[hmaxhealth].value)
last = minimum(last,max)
~setup to output everything
@text = ""
var i as number
var cnt as number
var total as number
~output aggravated damage boxes
cnt = field[hdmgaggrav].value
if (cnt > last) then
cnt = last
endif
total += cnt
for i = 1 to cnt
@text = @text & " {bmp dmg_aggravated}"
next
~output lethal damage boxes
cnt = field[hdmglethal].value
if (cnt + total > last) then
cnt = last - total
endif
total += cnt
for i = 1 to cnt
@text = @text & " {bmp dmg_lethal}"
next
~output bashing damage boxes
cnt = field[hdmgbash].value
if (cnt + total > last) then
cnt = last - total
endif
total += cnt
for i = 1 to cnt
@text = @text & " {bmp dmg_bashing}"
next
~if we have any excess damage and haven't filled everything, output the excess
cnt = extra
if (cnt + total > max) then
cnt = max - total
endif
total += cnt
for i = 1 to cnt
@text = @text & " {bmp dmg_excess}"
next
~output any empty health boxes if we haven't incurred full damage
cnt = field[hhealth].value
if (cnt + total > max) then
cnt = max - total
endif
total += cnt
for i = 1 to cnt
@text = @text & " {bmp dmg_none}"
next
~output faded boxes to fill any empty space in the health display region
cnt = max - field[hmaxhealth].value - extra
for i = 1 to cnt
@text = @text & " {bmp dmg_faded}"
next
]]></finalize>
</field>