Page 99 of 102

Re: Card Creation Request Thread

PostPosted: 12 Oct 2014, 18:36
by migookman
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.

Re: Card Creation Request Thread

PostPosted: 27 Oct 2014, 02:50
by NEMESiS
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>

Re: Card Creation Request Thread

PostPosted: 27 Oct 2014, 17:44
by mamoul
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:

Re: Card Creation Request Thread

PostPosted: 27 Oct 2014, 17:53
by NeoAnderson
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.

Re: Card Creation Request Thread

PostPosted: 27 Oct 2014, 18:00
by mamoul
Thank you NeoAnderson for your quick answer !

Re: Card Creation Request Thread

PostPosted: 28 Oct 2014, 10:54
by Morden
Oath of Druids and Dragon Breath can be useful also to me....

Re: Card Creation Request Thread

PostPosted: 28 Oct 2014, 12:55
by NeoAnderson
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.

Re: Card Creation Request Thread

PostPosted: 29 Oct 2014, 18:01
by Morden
good, I'll check. Soon or later, I'll code by myself Oath of druids, I love too much that card XD

Re: Card Creation Request Thread

PostPosted: 29 Oct 2014, 18:09
by NeoAnderson
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

Re: Card Creation Request Thread

PostPosted: 29 Oct 2014, 22:43
by NEMESiS
So no one wants to give me a suggestion with my issue? :C

Re: Card Creation Request Thread

PostPosted: 29 Oct 2014, 22:56
by thefiremind
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.

Re: Card Creation Request Thread

PostPosted: 30 Oct 2014, 00:52
by NEMESiS
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.

Re: Card Creation Request Thread

PostPosted: 31 Oct 2014, 02:57
by Xander9009
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.)

Re: Card Creation Request Thread

PostPosted: 01 Nov 2014, 12:45
by NEMESiS
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.

Re: Card Creation Request Thread

PostPosted: 01 Nov 2014, 13:29
by Xander9009
EDIT: ... I misread the problem...