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)
2013




[REL] Riiak Shi Nal's DotP 2013 DLC - v1.5
Moderator: CCGHQ Admins
Re: [REL] Riiak Shi Nal's DotP 2013 DLC - v1.2.1
by Firehelp » 04 Dec 2012, 20:33
Flameblast Dragon's ability isn't working, could someone fix it, please? First, the ability does no damage to the target whatever mana you've spent for it. And second, the mana cost for the ability is XR. The problem here is, that it should automatically use the red mana for the cost, then let you use all the mana available for the X. But it works slightly wrong. It lets you first spend all the mana avaliable for X and it doesn't care for the R mana cost of the ability. It just lets you spend one mana less than the maximum available, but it lets the last mana untapped (unused) and it doesn't even care for it beiing red. Here is the code.

- Code: Select all
<TRIGGERED_ABILITY LKI_shield_effect_source="1" filter_zone="ZONE_IN_PLAY" active_zone="ZONE_IN_PLAY">
<TRIGGER value="ATTACKING" simple_qualifier="self" />
<COST type="Mana" cost="{R}" qualifier="Conditional" />
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:SetFilterType( FILTER_TYPE_CARDS + FILTER_TYPE_PLAYERS )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
filter:AddCardType( CARD_TYPE_CREATURE )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION>
local nMaxAvailable = 1
while (EffectController():CanAfford( "{"..nMaxAvailable.."}{R}" ) == 1) do
nMaxAvailable = nMaxAvailable + 1
end
-- Will finish at max + 1 so we need to reduce by 1
nMaxAvailable = nMaxAvailable - 1
EffectController():BeginNewNumericalChoice()
EffectController():AddNumericalChoiceAnswer( nMaxAvailable )
EffectController():AskNumericalChoiceQuestion( "CARD_QUERY_CHOOSE_AMOUNT_DAMAGE" )
</PLAY_TIME_ACTION>
<PLAY_TIME_ACTION target_choosing="1">
EffectDC():Int_Set( 1, Object():GetNumericalChoiceResult() )
EffectController():TapLand( "{"..EffectDC():Int_Get( 1 ).."}" )
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_DEAL_X_DAMAGE", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION conditional="if">
local Xvalue = EffectDC():Int_Get( 1 )
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if ( target_creature ~= nil ) then
target_creature:DealDamage(Xvalue, Object())
elseif ( target_player ~= nil ) then
target_player:DealDamage(Xvalue, Object())
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

Re: [REL] Riiak Shi Nal's DotP 2013 DLC - v1.2.1
by RiiakShiNal » 04 Dec 2012, 21:06
I remember testing Flameblast Dragon and having to re-write the ability a couple of times to get it to work, but I will test it again and verify it actually works. It is also possible that it worked on the version I created it on, but no longer works on a new version so if you could specify which version you are running that would also help.
Edit: Okay, I have been able to reproduce the problem, the land is tapped before the conditional is checked so the game taps the land without leaving any red mana available so the ability fails to properly work. I think I know how to fix it so I'll test a new version then report back.
Edit 2: Corrected code (should now work properly regardless of mana configuration). If you don't want to use the ability just select 0 for X (no mana will be tapped).
Edit 3: New core uploaded (v1.2.2) and first post updated.
Edit: Okay, I have been able to reproduce the problem, the land is tapped before the conditional is checked so the game taps the land without leaving any red mana available so the ability fails to properly work. I think I know how to fix it so I'll test a new version then report back.
Edit 2: Corrected code (should now work properly regardless of mana configuration). If you don't want to use the ability just select 0 for X (no mana will be tapped).
- Code: Select all
<TRIGGERED_ABILITY LKI_shield_effect_source="1" filter_zone="ZONE_IN_PLAY" active_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Flameblast Dragon attacks, you may pay {X}{R}. If you do, Flameblast Dragon deals X damage to target creature or player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que le Dragon à la salve de flammes attaque, vous pouvez payer {X}{R}. Si vous faites ainsi, le Dragon à la salve de flammes inflige X blessures à une cible, créature ou joueur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que el Dragón ráfaga de llamas ataque, puedes pagar {X}{R}. Si lo haces, el Dragón ráfaga de llamas hace X puntos de daño a la criatura o jugador objetivo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der Flammenstoß-Drache angreift, kannst du {X}{R} bezahlen. Falls du dies tust, fügt der Flammenstoß-Drache einer Kreatur oder einem Spieler deiner Wahl X Schadenspunkte zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta il Drago Esplosivo attacca, puoi pagare {X}{R}. Se lo fai, il Drago Esplosivo infligge X danni a una creatura o a un giocatore bersaglio.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[炎破のドラゴンが攻撃するたび、クリーチャー1体かプレイヤー1人を対象とする。あなたは{X}{R}を支払ってもよい。 そうした場合、炎破のドラゴンはそれにX点のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever Flameblast Dragon attacks, you may pay {X}{R}. If you do, Flameblast Dragon deals X damage to target creature or player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз когда Огнеметный Дракон атакует, вы можете заплатить {X}{R}. Если вы это делаете, Огнеметный Дракон наносит Х повреждений целевому существу или игроку.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que Dragão da Explosão Flamejante ataca, você pode pagar {X}{R}. Se fizer isso, Dragão da Explosão Flamejante causará X pontos de dano à criatura ou ao jogador alvo.]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKING" simple_qualifier="self" />
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:SetFilterType( FILTER_TYPE_CARDS + FILTER_TYPE_PLAYERS )
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
filter:AddCardType( CARD_TYPE_CREATURE )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION>
local nMaxAvailable = 1
while (EffectController():CanAfford( "{"..nMaxAvailable.."}{R}" ) == 1) do
nMaxAvailable = nMaxAvailable + 1
end
-- Will finish at max + 1 so we need to reduce by 1
nMaxAvailable = nMaxAvailable - 1
EffectController():BeginNewNumericalChoice()
EffectController():AddNumericalChoiceAnswer( nMaxAvailable )
EffectController():AskNumericalChoiceQuestion( "CARD_QUERY_CHOOSE_AMOUNT_DAMAGE" )
</PLAY_TIME_ACTION>
<PLAY_TIME_ACTION target_choosing="1">
local Xvalue = Object():GetNumericalChoiceResult()
EffectDC():Int_Set( 1, Xvalue )
if (Xvalue > 0) then
EffectController():TapLand( "{"..EffectDC():Int_Get( 1 ).."}{R}" )
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_DEAL_X_DAMAGE", EffectDC():Make_Targets(0) )
end
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local Xvalue = EffectDC():Int_Get( 1 )
if (Xvalue > 0) then
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if ( target_creature ~= nil ) then
target_creature:DealDamage(Xvalue, Object())
elseif ( target_player ~= nil ) then
target_player:DealDamage(Xvalue, Object())
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
Edit 3: New core uploaded (v1.2.2) and first post updated.
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: [REL] Riiak Shi Nal's DotP 2013 DLC - v1.2.1
by Firehelp » 05 Dec 2012, 10:11
Yep, I've just tested the ability and it works flawlessly now. Thanks for your effort good sir.RiiakShiNal wrote:Edit 2: Corrected code (should now work properly regardless of mana configuration). If you don't want to use the ability just select 0 for X (no mana will be tapped).

Re: [REL] Riiak Shi Nal's DotP 2013 DLC - v1.2.2
by RiiakShiNal » 20 Dec 2012, 16:34
Based on the two images you posted it looks like you are missing several cards and the TEXT_PERMANENT for the decks so my guess is that you don't have the Data_DLC_8192.WAD in your game directory. That is the core WAD of my mod and is absolutely required. The individual deck WADs are optional, but the core WAD is required.
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: [REL] Riiak Shi Nal's DotP 2013 DLC - v1.2.2
by RiiakShiNal » 21 Dec 2012, 15:24
I see you have a SCRIPT_LOG, maybe the contents of that can tell us what the problem is.
Please post your SCRIPT_LOG.
Please post your SCRIPT_LOG.
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: [REL] Riiak Shi Nal's DotP 2013 DLC - v1.2.2
by akqns » 21 Dec 2012, 15:27
[lua] ?:0: attempt to index field '?' (a nil value)
- Attachments
-
SCRIPT_LOG.TXT
- (943.62 KiB) Downloaded 434 times
Re: [REL] Riiak Shi Nal's DotP 2013 DLC - v1.2.2
by RiiakShiNal » 21 Dec 2012, 15:49
Unfortunately it doesn't tell me anything, but I have been able to reproduce the problem with Theta v1.0dc120919 so I will look for a solution and report back when I figure out what the problem is and how to fix it.
Edit: Found the problem. It was something bone-headed that I did for which I am truly sorry to have caused your problem and thankful that you pointed it out to me. I forgot to remove the @header.xml when I re-packed the WAD (I have now updated my pack batch file so that it should never happen again). You can re-download the 1.2.2 core which I have now fixed by simply repacking without the @header.xml. Or if you are comfortable unpacking and using (or repacking) the unpacked wad you can do that as well. I have not incremented the version number because there was no real content change.
Edit: Found the problem. It was something bone-headed that I did for which I am truly sorry to have caused your problem and thankful that you pointed it out to me. I forgot to remove the @header.xml when I re-packed the WAD (I have now updated my pack batch file so that it should never happen again). You can re-download the 1.2.2 core which I have now fixed by simply repacking without the @header.xml. Or if you are comfortable unpacking and using (or repacking) the unpacked wad you can do that as well. I have not incremented the version number because there was no real content change.
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: [REL] Riiak Shi Nal's DotP 2013 DLC - v1.2.2
by akqns » 24 Dec 2012, 11:01
Thanks but there is another problem.
thefiremind's deck is all unlocked
RiiakShiNal's deck is only 10 cards unlocked.

thefiremind's deck is all unlocked
RiiakShiNal's deck is only 10 cards unlocked.
Re: [REL] Riiak Shi Nal's DotP 2013 DLC - v1.2.2
by RiiakShiNal » 24 Dec 2012, 14:28
thefiremind's mod (currently v6) uses the promo unlock codes to unlock cards at this point. My mod uses AppId linking (the unlock and premium foil buttons in deck manager) to permanently unlock cards (the promo cards in my mod were never meant to be unlocked so they are all basic lands). Your options are as follows:
There are issues with using the promo codes to unlock more than 10 cards of which the DotP 2010 decks had more than 10 unlocks each so I will not code my mod to use only promo unlocks as it is meant to port DotP 2010's decks as closely as possible to DotP 2013.
If you are going to manage your own APPID_LINKING.TXT file then I would recommend starting from a relatively up to date file (to minimize how much work you need to do) as most if not all of the relatively up to date ones should include my mod (so that would mean at least one less mod you have to worry about).
- If you are only running thefiremind's and my mod then you can go ahead and use my AppId Linking wad and it will allow the unlock and premium deck buttons in the deck manager to work.
- If you are going to be using several mods then I recommend either getting an updated AppId Linking wad from the most up to date mod or managing your own APPID_LINKING.TXT file (which really isn't difficult).
There are issues with using the promo codes to unlock more than 10 cards of which the DotP 2010 decks had more than 10 unlocks each so I will not code my mod to use only promo unlocks as it is meant to port DotP 2010's decks as closely as possible to DotP 2013.
If you are going to manage your own APPID_LINKING.TXT file then I would recommend starting from a relatively up to date file (to minimize how much work you need to do) as most if not all of the relatively up to date ones should include my mod (so that would mean at least one less mod you have to worry about).
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: [REL] Riiak Shi Nal's DotP 2013 DLC - v1.2.2
by akqns » 25 Dec 2012, 04:24
If you are only running thefiremind's and my mod then you can go ahead and use my AppId Linking wad and it will allow the unlock and premium deck buttons in the deck manager to work.
-> that button in deck manager is not works. it gose to steam page
i think APPID_LINKING file is not working
-> that button in deck manager is not works. it gose to steam page
i think APPID_LINKING file is not working
Re: [REL] Riiak Shi Nal's DotP 2013 DLC - v1.2.2
by RiiakShiNal » 25 Dec 2012, 09:55
Then I assume you are using the Steam version of the game and not a cracked version. If that is the case then I can only guess what will make things work for you.akqns wrote:that button in deck manager is not works. it gose to steam page
i think APPID_LINKING file is not working
If you are running the Steam version then many of the pre-made APPID_LINKING.TXT files will probably not work for you. You could try editing the APPID_LINKING.TXT file to have all decks use the AppId of the game itself for the deck unlocks like this:
- Code: Select all
[TEETH_OF_THE_PREDATOR]
819290000
97330
97330
[HANDS_OF_FLAME]
819290001
97330
97330
[WINGS_OF_LIGHT]
819290002
97330
97330
[CLAWS_OF_VENGEANCE]
819290003
97330
97330
[THOUGHTS_OF_WIND]
819290004
97330
97330
[EARS_OF_THE_ELVES]
819290005
97330
97330
[SCALES_OF_FURY]
819290006
97330
97330
[EYES_OF_SHADOW]
819290007
97330
97330
[MIND_OF_VOID]
819290008
97330
97330
[CRIES_OF_RAGE]
819290009
97330
97330
[RELICS_OF_DOOM]
819290010
97330
97330
[EONS_OF_EVIL]
819290011
97330
97330
[HEAT_OF_BATTLE]
819290012
97330
97330
[HEART_OF_WORLDS]
819290013
97330
97330
[MASTER_OF_SHADOWS]
819290014
97330
97330
[ROOT_OF_THE_FIREMIND]
819290015
97330
97330
[WEAPONS_OF_THE_WARRIOR]
819290016
97330
97330
[EDGE_OF_MADNESS]
819290017
97330
97330
Remember to make sure that there are no other APPID_LINKING.TXT files in any of the other mods you are using (like deck_9999_unlocks2.wad, which should probably be removed, and Data_DLC_8192_AppId_Linking.wad).
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: [REL] Riiak Shi Nal's DotP 2013 DLC - v1.2.2
by akqns » 26 Dec 2012, 10:09
OMG it's working. problems are solved. Thank you for your helping.
Re: [REL] Riiak Shi Nal's DotP 2013 DLC - v1.2.2
by RiiakShiNal » 26 Dec 2012, 16:42
If you don't mind my asking, which part fixed it for you? Setting them to 97330 or setting them to 0?
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
Who is online
Users browsing this forum: No registered users and 316 guests