It is currently 25 Apr 2024, 01:45
   
Text Size

Card Creation Request Thread

User-made mods in DLC (Downloadable Content) form.
Get MTG cards here for your DotP that aren't available anywhere else!

Moderator: CCGHQ Admins

Re: Card Creation Request Thread

Postby migookman » 12 Oct 2014, 18:36

Daninja wrote:Hello,

I would like to ask you kindly for a code for DOTP14 for Priest of Titania and Gaea's Cradle. I've not been able to find a well functioning code for them so far.

Any help will be greatly appreciated. Thanks a lot in advance.
You can find both of them in the Community Wad.
User avatar
migookman
 
Posts: 135
Joined: 05 Aug 2014, 06:37
Has thanked: 21 times
Been thanked: 28 times

Re: Card Creation Request Thread

Postby NEMESiS » 27 Oct 2014, 02:50

I think I posted this a while back but I sort of dropped and just came back to it. For 2012, I tried to make Augur of Bolas but I seem to be having issues specifying to just use instants and sorceries as the targets. I had followed thefiremind's idea of putting the sorcery and instant filter the end piece of the code but I am having a hard time making it work. :/ Can someone give me some guidance?


Code: Select all
    <TRIGGER value="COMES_INTO_PLAY" simple_qualifier="self" />
    <TARGET_DETERMINATION>
    local filter = Object():GetFilter()
    filter:Clear()
    filter:NotTargetted()
    filter:SetPlayer( Object():GetPlayer() )
    filter:SetZone( ZONE_LIBRARY )
    filter:SetPortion( 3 )
    return TargetGoodF()
    </TARGET_DETERMINATION>
    <RESOLUTION_TIME_ACTION>
    ChooseTarget( "CARD_QUERY_CHOOSE_INSTANT_OR_SORCERY_TO_PUT_INTO_HAND" )
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target_card = Object():GetTargetCard()
    if target_card ~= nil then
      for i=0,2 do
        local card = Object():GetPlayer():Library_GetNth(0)
        if card ~= nil then
            if card == target_card then
      if card:GetCardType():Test( CARD_TYPE_SORCERY ) ~= 0 or card:GetCardType():Test( CARD_TYPE_INSTANT ) ~= 0 then
             card:GuidedReveal( ZONE_LIBRARY, ZONE_HAND )
             card:PutInHand()
              else
                  card:PutInLibrary(-1)
       end
          end
        end
      end
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
User avatar
NEMESiS
 
Posts: 460
Joined: 03 Jan 2013, 04:02
Location: Pools of Becoming
Has thanked: 70 times
Been thanked: 21 times

Re: Card Creation Request Thread

Postby mamoul » 27 Oct 2014, 17:44

Hello,

Thank you so much to all modders and to all administrators of this forum, your works are so incredible :D

With your tutorials, i've been able to add new cards in DOTP 2014 but i don't have enough knowledge about coding to add two new cards in order to play amazing vintage decks. Those cards are Oath of Druids and Auriok Salvagers. Is it possible that any modder can code them ?

Thanks a lot in advance

I'm french and i don't speak fluent english so please excuse me if i made syntax mistakes. :wink:
mamoul
 
Posts: 16
Joined: 27 Oct 2014, 17:20
Location: France
Has thanked: 0 time
Been thanked: 0 time

Re: Card Creation Request Thread

Postby NeoAnderson » 27 Oct 2014, 17:53

mamoul wrote:Hello,
Thank you so much to all modders and to all administrators of this forum, your works are so incredible :D
With your tutorials, i've been able to add new cards in DOTP 2014 but i don't have enough knowledge about coding to add two new cards in order to play amazing vintage decks. Those cards are Oath of Druids and Auriok Salvagers. Is it possible that any modder can code them ?
Thanks a lot in advance
I'm french and i don't speak fluent english so please excuse me if i made syntax mistakes. :wink:
I am a little bit busy right now to code Oath of Druids, i am focuse onto M15 Core set, anyway i already coded Auriok Salvagers.
Here you can find the XML code :
Auriok Salvagers - NEO VER | Open
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="5DN_004_NEO_AURIOK_SALVAGERS_999370370" />
  <CARDNAME text="AURIOK_SALVAGERS" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Auriok Salvagers]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Récupérateurs aurioks]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Desarmadores áuriok]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Auriok-Wiederverwerter]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Saccheggiatori Auriok]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[オーリオックの廃品回収者]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Auriok Salvagers]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Auriok Salvagers]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Salvádegos dos Aurioques]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="999370370" />
  <ARTID value="999370370" />
  <ARTIST name="Randy Gallegos" />
  <CASTING_COST cost="{3}{W}" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“Memnarch or the vedalken salvage most of the large machines, leaving us only scraps. Scraps are enough.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Memnarch et les vedalkens récupèrent toutes les grandes machines. Il ne nous reste que de la ferraille, mais cela nous suffit. »]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA["Memnarch o los vedalken desarman la mayoría de las máquinas grandes, dejándonos sólo despojos. Los despojos serán suficiente."]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Memnarch und die Vedalken verwerten die meisten Teile der großen Maschinen und lassen uns nur den Schrott. Aber der Schrott reicht uns."]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA["Memnarch o i vedalken saccheggiano la maggior parte dei macchinari più grandi, lasciandoci solo gli avanzi. Ma per noi sono abbastanza."]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[メムナークやヴィダルケンが大型の機械をほとんど引き上げちまったから、残りは屑鉄ばかりだよ。屑鉄でも十分だけどな。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“Memnarch or the vedalken salvage most of the large machines, leaving us only scraps. Scraps are enough.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[“Memnarch or the vedalken salvage most of the large machines, leaving us only scraps. Scraps are enough.”]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA["O Memnarca ou os vedalkeanos recolhem a maioria das máquinas grandes, deixando-nos somente a sucata. A sucata é suficiente."]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Human" />
  <SUB_TYPE metaname="Soldier" />
  <EXPANSION value="5DN" />
  <RARITY metaname="R" />
  <POWER value="2" />
  <TOUGHNESS value="4" />
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{W}: Return target artifact card with converted mana cost 1 or less from your graveyard to your hand.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{W} : Renvoyez la carte d'artefact avec un coût converti de mana de 1 ou moins ciblée depuis votre cimetière dans votre main.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{W}: Regresa la carta de artefacto objetivo con coste de maná convertido de 1 o menos de tu cementerio a tu mano.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{W}: Bringe eine Artefaktkarte deiner Wahl mit umgewandelten Manakosten von 1 oder weniger aus deinem Friedhof auf deine Hand zurück.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{W}: Riprendi in mano dal tuo cimitero una carta artefatto bersaglio con costo di mana convertito pari o inferiore a 1.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{W}:あなたの墓地にある、点数で見たマナ・コストが1以下のアーティファクト・カード1枚を対象とし、それをあなたの手札に戻す。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{W}: Return target artifact card with converted mana cost 1 or less from your graveyard to your hand.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{W}: Return target artifact card with converted mana cost 1 or less from your graveyard to your hand.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{W}: Devolve o card alvo de artefato com custo de mana convertido menor ou igual a 1 de seu cemitério para sua mão.]]></LOCALISED_TEXT>
     <COST mana_cost="{1}{W}" type="Mana" />
     <TARGET tag="CARD_QUERY_CHOOSE_ARTIFACT_TO_PUT_INTO_HAND" definition="0" compartment="0" count="1" />
     <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    local value = 1
    filter:Add(FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT)
    filter:SetZone( ZONE_GRAVEYARD, EffectController() )
    filter:Add( FE_CMC, OP_LESS_THAN_OR_EQUAL_TO, value )
    </TARGET_DEFINITION>
      <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if  target ~= nil then
       target:PutInHand()
    end 
    </RESOLUTION_TIME_ACTION>
      <AI_AVAILABILITY window_step="declare_blockers" type="window" />
      <AI_AVAILABILITY type="in_response" response_source="1" />
      <AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
      <AI_AVAILABILITY window_step="declare_attackers" type="window" />
      <AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
      <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
  </ACTIVATED_ABILITY>
   <SFX text="COMBAT_WHITE_MAGIC_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
   <SFX text="COMBAT_WHITE_MAGIC_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
   <AI_BASE_SCORE score="600" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
Or you can download the card and the picture into this rar file.
Attachments
Auriok Salvagers.rar
Auriok Salvagers - NEO VER
(110.61 KiB) Downloaded 301 times
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Card Creation Request Thread

Postby mamoul » 27 Oct 2014, 18:00

Thank you NeoAnderson for your quick answer !
mamoul
 
Posts: 16
Joined: 27 Oct 2014, 17:20
Location: France
Has thanked: 0 time
Been thanked: 0 time

Re: Card Creation Request Thread

Postby Morden » 28 Oct 2014, 10:54

Oath of Druids and Dragon Breath can be useful also to me....
Morden
 
Posts: 16
Joined: 18 Sep 2014, 19:23
Has thanked: 2 times
Been thanked: 0 time

Re: Card Creation Request Thread

Postby NeoAnderson » 28 Oct 2014, 12:55

Morden wrote:Oath of Druids and Dragon Breath can be useful also to me....
Dragon Breath is already included into official cards i think it should be the base core set. If you don't find it you just check the official expansions.
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Card Creation Request Thread

Postby Morden » 29 Oct 2014, 18:01

good, I'll check. Soon or later, I'll code by myself Oath of druids, I love too much that card XD
Morden
 
Posts: 16
Joined: 18 Sep 2014, 19:23
Has thanked: 2 times
Been thanked: 0 time

Re: Card Creation Request Thread

Postby NeoAnderson » 29 Oct 2014, 18:09

Morden wrote:good, I'll check. Soon or later, I'll code by myself Oath of druids, I love too much that card XD
Another skilled user (Firemind) already posted the code for Oath of Druids ability, you can find it here:
http://www.slightlymagic.net/forum/viewtopic.php?f=109&t=11010&p=166815#p166791
NeoAnderson
 
Posts: 914
Joined: 10 Sep 2013, 07:49
Has thanked: 18 times
Been thanked: 139 times

Re: Card Creation Request Thread

Postby NEMESiS » 29 Oct 2014, 22:43

So no one wants to give me a suggestion with my issue? :C
User avatar
NEMESiS
 
Posts: 460
Joined: 03 Jan 2013, 04:02
Location: Pools of Becoming
Has thanked: 70 times
Been thanked: 21 times

Re: Card Creation Request Thread

Postby thefiremind » 29 Oct 2014, 22:56

NEMESiS wrote:So no one wants to give me a suggestion with my issue? :C
I'm sorry, but too much time has passed since the last time I coded for DotP2012, I can't even remember what can and cannot be done.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times

Re: Card Creation Request Thread

Postby NEMESiS » 30 Oct 2014, 00:52

Oh damn, thanks anyways.

Ok for the current code I listed, if I remove

Code: Select all
if card:GetCardType():Test( CARD_TYPE_SORCERY ) ~= 0 or card:GetCardType():Test( CARD_TYPE_INSTANT ) ~= 0 then
from the code the game will show the first three cards from the top of the library and then I can pick any card and put it into my hand (the card is revealed as one would hope) and the rest go to the bottom of the library. The issues is that I just cannot make it select only instants and sorceries from among those 3 cards. Tried several things with mixed results.
User avatar
NEMESiS
 
Posts: 460
Joined: 03 Jan 2013, 04:02
Location: Pools of Becoming
Has thanked: 70 times
Been thanked: 21 times

Re: Card Creation Request Thread

Postby Xander9009 » 31 Oct 2014, 02:57

Can you emulate the way basic land fetch cards work? The restrict it to only a single type of card and are more or less done the same way, right? (I've never coded for 2012, so this is just a shot in the dark.)
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Card Creation Request Thread

Postby NEMESiS » 01 Nov 2014, 12:45

Xander9009 wrote:Can you emulate the way basic land fetch cards work? The restrict it to only a single type of card and are more or less done the same way, right? (I've never coded for 2012, so this is just a shot in the dark.)
I had originally set it up sort of that way like this:


Code: Select all
    <TRIGGER value="COMES_INTO_PLAY" simple_qualifier="self" />
    <RESOLUTION_TIME_ACTION>
    local filter = Object():GetFilter()
    filter:Clear()
    filter:NotTargetted()
    filter:SetPlayer( Object():GetPlayer() )
    filter:SetZone( ZONE_LIBRARY )
    filter:SetPortion( 3 )
    filter:AddCardType( CARD_TYPE_SORCERY )
    filter:AddCardType( CARD_TYPE_INSTANT )
    ChooseTarget( "CARD_QUERY_CHOOSE_INSTANT_OR_SORCERY_TO_PUT_INTO_HAND" )
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target_card = Object():GetTargetCard()
    if target_card ~= nil then
      for i=0,2 do
        local card = Object():GetPlayer():Library_GetNth(0)
        if card ~= nil then
          if card == target_card then
           card:PutInHand()
          else
            card:GuidedReveal( ZONE_LIBRARY, ZONE_HAND )
            card:PutInLibrary(-1)
          end
        end
      end
    end
    </RESOLUTION_TIME_ACTION>
However, whenever Augur of Bolas entered the battlefield it would look for the first three instants and sorceries in the entire library rather then just the top three cards. Thefiremind had the right idea of first creating a section where we just look at the top 3 cards, after that we make a distinction of just being able to get instants and sorceries from among then. I am having issues making that distinction.
User avatar
NEMESiS
 
Posts: 460
Joined: 03 Jan 2013, 04:02
Location: Pools of Becoming
Has thanked: 70 times
Been thanked: 21 times

Re: Card Creation Request Thread

Postby Xander9009 » 01 Nov 2014, 13:29

EDIT: ... I misread the problem...
Last edited by Xander9009 on 01 Nov 2014, 21:26, edited 1 time in total.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

PreviousNext

Return to New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)

Who is online

Users browsing this forum: No registered users and 10 guests


Who is online

In total there are 10 users online :: 0 registered, 0 hidden and 10 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 10 guests

Login Form