• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Template Portal Limit

RavenX

Well-known member
Mathias,

Is there a way to increase the number of portals a template can have or is it pretty much capped at 100?
 
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.
 
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.

It's a health level template I've been working on, for displaying health levels. So I have a bunch of image portals grouped together closely, each health level is five portals though, one for active, one for inactive (faded), one for Bashing damage, one for Lethal damage, and one for Aggravated damage. I can fit 15-16 into a template, but it looks like I will need more than a single template doing it this way.
 
Can you use a text portal that figures out which images need to be shown now, and assembles "{bmp whatever}{horz somespace}{bmp somethingelse}", etc.? as its text, then display that portal?
 
I can build a text field that does something like that. Can one image portal be used in such a way that it can display up to five different images?
 
An image portal can't do that, but a text portal can display images as part of its text, so all of the images in a group can be within the text portal, meaning only one portal should be needed for each group.

That way, for each choice of inactive/bashing/lethal/aggravated, an if...elseif will decide which image to put in that place. Or better yet, since you probably need to put one image after another, rather than having dozens of the same if...elseif, use a for loop, and a single if...elseif inside it.
 
I wasn't aware that text portals could do that.

So basically I need to foreach through the damage string showing {dmg_bashing.bmp} and then tell the text portal to display the appropriate damage image if the text is shown in that position matching the bitmap?
 
You'll need to tell me more about the way damage is tracked before I can help you build this.
 
Damage is tracked the same way as World of Darkness, lethal pushes bashing forward down the chart, aggravated pushes lthal and bashing orward down the chart. Only difference is that characters can have more health levels.

And to be clear, this is for Exalted, 2nd edition. I only have to finish adding artifact functionality, advances, and the health tracking system to wrap up the data for the core rulebook. I managed to get everything else in the data finished.
 
Last edited:
WoD uses a herofield for that:

Code:
    <!-- 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>
 
Ok so the text portal on the in-play tab just takes the text field and displays the result in terms of bitmap images using a single portal. I should be able to get this implemented then.
 
Last edited:
Got this implemened successfully.

I'm guessing willpower works the same way, just with different bitmaps?
 
Back
Top