Page 1 of 1

How do I add the scroll down / scroll up bar to a card?

PostPosted: 06 Aug 2013, 18:33
by Kieran
For example, when Slivers grand each others their abilities. Is there a way to have the scroll bar on a card as soon as it comes to the battlefield without the use of another card to make it happen?

Re: How do I add the scroll down / scroll up bar to a card?

PostPosted: 06 Aug 2013, 19:54
by RiiakShiNal
The only way to put the scroll bar on a card is to grant it enough abilities (the abilities granted could simply be a STATIC_ABILITY with just text and no code) that the scroll bar is actually needed. The card can grant itself abilities in which case when enough abilities appear on the card it will get a scroll bar. Though abilities in general should not be granted unless necessary.

Re: How do I add the scroll down / scroll up bar to a card?

PostPosted: 06 Aug 2013, 23:18
by Kieran
Okay. I think I understand. What would be a good example card? Or what does the code look like?

Re: How do I add the scroll down / scroll up bar to a card?

PostPosted: 06 Aug 2013, 23:27
by RiiakShiNal
Well something simple that will grant an ability to itself would be something like this:
Code: Select all
<STATIC_ABILITY>
   <CONTINUOUS_ACTION layer="6">
      if (EffectSource() ~= nil) then
         local oCharacteristics = EffectSource():GetCurrentCharacteristics()
         if (oCharacteristics ~= nil) then
            oCharacteristics:GrantAbility(1)
         end
      end
   </CONTINUOUS_ACTION>
</STATIC_ABILITY>
<STATIC_ABILITY resource_id="1">
   <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[This is a really long block of text designed to make the scroll bar appear even though there is only one granted ability.  Though since this is the only granted ability and there may not be any other text on the card I can't guarantee this will be enough to actually make the scroll bar appear.  As such it might require one or more other abilities (whether granted, regularly present, or even just some flavour text) to be present (with text, though code is optional) on the card.  Hopefully it should be long enough of a text block by now that the scroll bar will be present.  If not you could try padding this string even more to see if that helps.]]></LOCALISED_TEXT>
</STATIC_ABILITY>
Though remember the scroll bar won't appear until there is enough text (from regular abilities, flavour text, and granted abilities) to necessitate needing the scroll bar.

Re: How do I add the scroll down / scroll up bar to a card?

PostPosted: 17 Aug 2013, 18:41
by Kieran
Riiak, I copied the code you provided above but it crashes the game. Perhaps you can refine it or is there an official card I can look to? The Sliver cards I looked @ didn't have any particular code that stood out to me. Am I overlooking something? Lastly, I vaguely remember playing with a Merfolk DLC deck and one of the cards had the scroll bar but I'm not sure which card it was.

Re: How do I add the scroll down / scroll up bar to a card?

PostPosted: 18 Aug 2013, 12:23
by RiiakShiNal
Kieran wrote:Riiak, I copied the code you provided above but it crashes the game. Perhaps you can refine it or is there an official card I can look to? The Sliver cards I looked @ didn't have any particular code that stood out to me. Am I overlooking something? Lastly, I vaguely remember playing with a Merfolk DLC deck and one of the cards had the scroll bar but I'm not sure which card it was.
Are you sure you put it in right? I just copied it into Ornithopter and it worked without any problem (no crash, even played a mirror match and the AI had no problem with it either). If you have your DotP set to a different localization then you need to make sure the there is text for that localization in the ability (I only included some English text because this is an example).

Re: How do I add the scroll down / scroll up bar to a card?

PostPosted: 20 Aug 2013, 15:50
by Kieran
I'll retest it today. Thanks!