PDA

View Full Version : Having problems adding an iconCycler to NPC sheet



MeepoSose
October 27th, 2008, 05:25
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:


<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|condi tion_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>

MeepoSose
October 27th, 2008, 06:00
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:

Moon Wizard
October 27th, 2008, 18:56
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

MeepoSose
October 28th, 2008, 01:20
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.