Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
2014




How do I add the scroll down / scroll up bar to a card?
Moderator: CCGHQ Admins
How do I add the scroll down / scroll up bar to a card?
by Kieran » 06 Aug 2013, 18:33
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?
by RiiakShiNal » 06 Aug 2013, 19:54
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.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: How do I add the scroll down / scroll up bar to a card?
by Kieran » 06 Aug 2013, 23:18
Okay. I think I understand. What would be a good example card? Or what does the code look like?
Last edited by Kieran on 07 Aug 2013, 07:50, edited 1 time in total.
Re: How do I add the scroll down / scroll up bar to a card?
by RiiakShiNal » 06 Aug 2013, 23:27
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>
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: How do I add the scroll down / scroll up bar to a card?
by Kieran » 17 Aug 2013, 18:41
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?
by RiiakShiNal » 18 Aug 2013, 12:23
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).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.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: How do I add the scroll down / scroll up bar to a card?
by Kieran » 20 Aug 2013, 15:50
I'll retest it today. Thanks!
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 9 guests