STAR TREK 2d20
  1. #1

    Having problems adding an iconCycler to NPC sheet

    I've tried adding a new icon cycler to the NPC sheet for the SWSE_II ruleset and I can't get anything to display. If I adjust the height and width, it makes an appropriately sized blank space but doesn't ever show my icons. In the scripts folder, I see there is a template_iconcycler.lua. Do I need to somehow reference this?

    Anyway, here is my xml so far:
    Code:
    <iconcycler name="condition">
        <anchored>
          <left>
            <anchor>left</anchor>
            <offset>5</offset>
          </left>
          <top>
            <anchor>top</anchor>
            <offset>15</offset>
          </top>
          <size>
            <width>20</width>
            <height>20</height>
          </size>
        </anchored>
      <sourcefields>
        <icons>condition_normal|condition_one|condition_two|condition_five|condition_ten|condition_helpless</icons>
        <values>0|-1|-2|-5|-10|-99</values>
        <srcnode>condition</srcnode>
        <defaulticon>condition_normal</defaulticon>
      </sourcefields>
      <script>
        function onInit()
        super.onInit();
    
        if not User.isHost() then
        setReadOnly(true);
        end
        end
      </script>        
    </iconcycler>

  2. #2
    Okay, I figured out what I was missing. Graphics.xml needed to have each of the icons defined.

    BTW, would any artistically inclined persons be able to whip up a batch of 20x20 png files I could use to show the condition status in Star Wars? The condition track goes from Normal | -1 | -2 | -5 | -10 | Helpless.

    Originally I was thinking of using the icon from Doom... but wanted something a little cleaner. Ultimately I have a cheap looking place holder with a heart that is partially blackened out as your condition deteriorates. Here is what I have so far:

  3. #3
    The iconcycler and labelcycler templates are from the 4E_JPG ruleset. I'm glad that they are easy enough to figure out and use for other rulesets.

    Cheers,
    JPG

  4. #4
    Quote Originally Posted by moon_wizard
    The iconcycler and labelcycler templates are from the 4E_JPG ruleset. I'm glad that they are easy enough to figure out and use for other rulesets.

    Cheers,
    JPG
    labelcycler... hmmm... that sounds interesting.

    The 4E_JPG ruleset has so many nice features, I think it would be a shame to base a new ruleset off anything else. Even the stuff that doesn't fit exactly gives good ideas for new functionality.

    Thanks for all your hard work. It makes it a lot easier on the rest of us.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in