It is currently 30 Apr 2025, 07:54
   
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 sumomole » 18 May 2013, 10:03

thefiremind wrote:Savage Summoning is good news: some time ago I tried to imagine how to code Scout's Warning (which is similar) but I got stuck on something, can't remember exactly what.
I guess Savage Summoning will give all creature card flash until you cast a creature spell, but I want it to be coded by a new way
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Card Creation Request Thread

Postby NEMESiS » 18 May 2013, 12:20

sumomole wrote:I would like to request these cards. :mrgreen: :mrgreen: :mrgreen:



Those look pretty awesome. :D

Anyways, here is the link to the spoilers:

http://mythicspoiler.com/newspoilers.html
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 Scion of Darkness » 18 May 2013, 15:29

thefiremind wrote:
sumomole wrote:
Scion of Darkness wrote:Somomole Thanks you have been a real help here just one problem missing =s still freeze the game

Code: Select all
[lua] [string "IZZET_CHARM_141806_TITLE (PLAY_TIME_ACTION) [1652]"]:10:
call parameter mismatch - too many or too few a parameter count declared, method AddMultipleChoiceAnswer in class __Player
sorry to bother this much
You use the code from here?
I have tested it and work fine, haven't seen such problem.

EDIT: You'd better ask firemind or ohters for that how to read the error string, I know very little.
The error means that at line 10 of a PLAY_TIME_ACTION (with the <PLAY_TIME_ACTION> line being line #1), AddMultipleChoiceAnswer has the wrong number of parameters.
Maybe I'm totally drifting away from the solution, but I just thought of something... Scion of Darkness, are you able to use signets from other mods with no errors?:
I dont have any signet here could i be missing a lol file or something? Even grixis charm does the same
User avatar
Scion of Darkness
 
Posts: 235
Joined: 27 Aug 2012, 13:14
Has thanked: 17 times
Been thanked: 23 times

Re: Card Creation Request Thread

Postby thefiremind » 18 May 2013, 16:01

Scion of Darkness wrote:Even grixis charm does the same
OK this is starting to make sense... which version of the game are you using? (Original, Skidrow, Theta?)

I'll anticipate what I'm guessing: before the DLCs there were no charms in the game, so the game wasn't needing the second parameter for AddMultipleChoiceAnswer that can disable the choice. I think they added this capability to the executable after one of the updates. This means that if you are using Skidrow version, which comes with no updates at all, AddMultipleChoiceAnswer can't have 2 parameters according to your executable. Either you switch to Theta, or you can't get most charms to work properly.
< 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: 722 times

Re: Card Creation Request Thread

Postby AriesKiki » 18 May 2013, 16:32

Hi, I was testing Eladamri, Lord of Leaves (created by thefiremind) and noticed the problem that it gives shroud to itself. Any way to fix that?

Code: Select all
<STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Other Elves have shroud.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Other Elves have shroud.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Other Elves have shroud.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Other Elves have shroud.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Other Elves have shroud.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Other Elves have shroud.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Other Elves have shroud.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Other Elves have shroud.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Other Elves have shroud.]]></LOCALISED_TEXT>
    <FILTER>
    return FilteredCard() ~= nil and
    FilteredCard():GetZone() == ZONE_IN_PLAY and
    FilteredCard():GetSubType():Test( CREATURE_TYPE_ELF ) ~= 0
    </FILTER>
    <CONTINUOUS_ACTION layer="6">
    if FilteredCard() ~= nil then
       local characteristics = FilteredCard():GetCurrentCharacteristics()
       if characteristics ~= nil then
          characteristics:Characteristic_Set( CHARACTERISTIC_SHROUD, 1 )
       end
    end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
User avatar
AriesKiki
 
Posts: 53
Joined: 05 Mar 2013, 17:46
Has thanked: 15 times
Been thanked: 3 times

Re: Card Creation Request Thread

Postby thefiremind » 18 May 2013, 16:38

AriesKiki wrote:Hi, I was testing Eladamri, Lord of Leaves (created by thefiremind) and noticed the problem that it gives shroud to itself. Any way to fix that?
I forgot to exclude himself from the filter:
Code: Select all
    <FILTER>
    return FilteredCard() ~= nil and
    FilteredCard() ~= Object() and -- this was missing
    FilteredCard():GetZone() == ZONE_IN_PLAY and
    FilteredCard():GetSubType():Test( CREATURE_TYPE_ELF ) ~= 0
    </FILTER>
< 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: 722 times

Re: Card Creation Request Thread

Postby Scion of Darkness » 18 May 2013, 17:32

Th is might sound stupid bit is there a way to make the :x update to theta or do i have to DL the game again? You were right fire the game is skidrow version :
(

Thanks buddy
User avatar
Scion of Darkness
 
Posts: 235
Joined: 27 Aug 2012, 13:14
Has thanked: 17 times
Been thanked: 23 times

Re: Card Creation Request Thread

Postby thefiremind » 18 May 2013, 18:00

Scion of Darkness wrote:is there a way to make the :x update to theta or do i have to DL the game again?
Yes, you can apply a Theta update (v1.0dc120919 is the last one) on Skidrow and you'll end up with a Theta version. You can find more details about it from RiiakShiNal here:
viewtopic.php?f=102&t=9304&p=110637#p110637
< 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: 722 times

Re: Card Creation Request Thread

Postby Master Necro » 18 May 2013, 18:27

Just out of interest, is Overload possible to code?

P.S. I mean the Izzet ability not the card. :mrgreen:
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Card Creation Request Thread

Postby thefiremind » 18 May 2013, 19:04

Master Necro wrote:Just out of interest, is Overload possible to code?

P.S. I mean the Izzet ability not the card. :mrgreen:
Personally, I haven't been able to find a satisfying way to code it. If you search for "overload" in this topic (I think) you'll find an attempt by sumomole. I don't know how much approximated it is, though: you'll have to try and/or ask him.
< 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: 722 times

Re: Card Creation Request Thread

Postby East Bay » 19 May 2013, 01:13

Can anyone tell whats wrong with Shelldock Isle I made 2 but both are still wrong:
Code: Select all
    <AVAILABILITY>
    local player = Object():GetController()
    if player == nil or player:CanAfford("{G}{G}") == 0 then
       return false
    end

    -- NOTE: The ability could be activated even if the requirement isn't met, it would just do nothing. But it would be uncomfortable for the player.
    local spell = ObjectDC() and ObjectDC():Get_CardPtr(10)
    if spell ~= nil then
       local filter = Object():GetFilter()
       filter:Clear()
       filter:SetZone( ZONE_LIBRARY )
       filter:SetController( player )
       local filter_count = filter:EvaluateObjects()
       if filter_count &gt; 0 then
          local Library_Count = 0
          for i=0,filter_count-1 do
             Library_Count = Library_Count + filter:GetNthEvaluatedObject(i):GetCurrentLibrary()
          end
          return Library_Count &gt; 19
       end
    end
    return false
    </AVAILABILITY>
    <RESOLUTION_TIME_ACTION>
    local player = EffectController()
    if player ~= nil then
       local spell = ObjectDC() and ObjectDC():Get_CardPtr(10)
       if spell ~= nil then
          local filter = Object():GetFilter()
          filter:Clear()
          filter:SetZone( ZONE_LIBRARY )
          filter:SetController( player )
          local filter_count = filter:EvaluateObjects()
          if filter_count &gt; 0 then
             local Library_Count = 0
             for i=0,filter_count-1 do
                Library_Count = Library_Count + filter:GetNthEvaluatedObject(i):GetCurrentLibrary()
             end
             if Library_Count &gt; 19 then
                spell:PlayFreeFromAnywhere( player )
                ObjectDC():Free_Compartment(10)
             end
          end
       end
    end
    </RESOLUTION_TIME_ACTION>
Code: Select all
    <AVAILABILITY>
    local player = Object():GetController()
    if player == nil or player:CanAfford("{G}{G}") == 0 then
       return false
    end

    -- NOTE: The ability could be activated even if the requirement isn't met, it would just do nothing. But it would be uncomfortable for the player.
    local spell = ObjectDC() and ObjectDC():Get_CardPtr(10)
    if spell ~= nil then
       local filter = Object():GetFilter()
       filter:Clear()
       filter:SetZone( ZONE_LIBRARY )
       filter:SetController( player )
       local filter_count = filter:EvaluateObjects()
       if filter_count &gt; 0 then
          local CountCardsInLibrary = 0
          for i=0,filter_count-1 do
             CountCardsInLibrary = CountCardsInLibrary + filter:GetNthEvaluatedObject(i):GetCurrentLibrary()
          end
          return CountCardsInLibrary &gt; 19
       end
    end
    return false
    </AVAILABILITY>
    <RESOLUTION_TIME_ACTION>
    local player = EffectController()
    if player ~= nil then
       local spell = ObjectDC() and ObjectDC():Get_CardPtr(10)
       if spell ~= nil then
          local filter = Object():GetFilter()
          filter:Clear()
          filter:SetZone( ZONE_LIBRARY )
          filter:SetController( player )
          local filter_count = filter:EvaluateObjects()
          if filter_count &gt; 0 then
             local CountCardsInLibrary = 0
             for i=0,filter_count-1 do
                CountCardsInLibrary = CountCardsInLibrary + filter:GetNthEvaluatedObject(i):GetCurrentLibrary()
             end
             if CountCardsInLibrary &gt; 19 then
                spell:PlayFreeFromAnywhere( player )
                ObjectDC():Free_Compartment(10)
             end
          end
       end
    end
    </RESOLUTION_TIME_ACTION>
And can anyone port thefireminds Infernal Tutor from 2012? I tried already but I don't know how to the Reveal and GetCardName.
Thank You guys for the work hopefully I can understand more advanced code soon #-o
User avatar
East Bay
 
Posts: 85
Joined: 17 Mar 2013, 02:05
Has thanked: 33 times
Been thanked: 30 times

Re: Card Creation Request Thread

Postby sumomole » 19 May 2013, 03:34

East Bay wrote:Can anyone tell whats wrong with Shelldock Isle I made 2 but both are still wrong
I fixed your code:
fixed | Open
Code: Select all
    <AVAILABILITY>
    for i=0,MTG():GetNumberOfPlayers()-1 do
       local player = MTG():GetNthPlayer( i )
       if player ~= nil and CountCardsInLibrary( player ) &lt; 21 then
        return ObjectDC():Get_CardPtr(10) ~= nil and Object():GetController():CanAfford("{U}{U}") ~= 0
      end
    end
    return false
    </AVAILABILITY>
    <RESOLUTION_TIME_ACTION>
    local player = EffectController()
    if player ~= nil then
       local spell = ObjectDC() and ObjectDC():Get_CardPtr(10)
       if spell ~= nil and spell:CanBePlayed(player) then
          local threshold = 0
        for i=0,MTG():GetNumberOfPlayers()-1 do
           if MTG():GetNthPlayer( i ) ~= nil and CountCardsInLibrary( MTG():GetNthPlayer( i ) ) &lt; 21 then
              threshold = 1
          end
        end
          if threshold == 1 then
             spell:PlayFreeFromAnywhere( player )
             ObjectDC():Free_Compartment(10)
          end
       end
    end
    </RESOLUTION_TIME_ACTION>
But I think Hideaway should be code like this, of course, AI may not know how to use this code, so it's just a reference:
Hideaway | Open
Code: Select all
    <AVAILABILITY>
    return ObjectDC():Get_CardPtr(10) ~= nil and Object():GetController():CanAfford("{U}{U}") ~= 0
    </AVAILABILITY>
    <RESOLUTION_TIME_ACTION>
    local threshold = 0
    local num_players = MTG():GetNumberOfPlayers()
    for i=0,(num_players-1) do
       local player = MTG():GetNthPlayer( i )
       if player ~= nil and CountCardsInLibrary( player ) &lt; 21 then
        threshold = 1
      end
    end
    EffectDC():Set_Int( 20, threshold )
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local spell = ObjectDC():Get_CardPtr(10)
    local threshold = EffectDC():Get_Int(20)
    local player = EffectController()
    if spell ~= nil and player ~= nil then
      local browser = EffectDC():Make_Chest(0)
      browser:Set_CardPtr(0, spell )
       player:SetTargetCount( 1 )
      if threshold == 1 then
         player:SetTargetPrompt( 0, "CARD_QUERY_CHOOSE_CARD_TO_PLAY" )
       else
         player:SetTargetPrompt( 0, "CARD_QUERY_CHOOSE_CARD_TO_LOOK" )
      end
       player:ChooseTargetsFromDCWithFlags( NO_VALIDATION, browser, EffectDC():Make_Targets(1), QUERY_FLAG_CAN_BE_FINISHED_EARLY + QUERY_FLAG_CAN_BE_FINISHED_EARLY_FOR_AI_AS_WELL )
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local spell = EffectDC():Get_Targets(1) and EffectDC():Get_Targets(1):Get_CardPtr(0)
    local threshold = EffectDC():Get_Int(20)
    local player = EffectController()
    if spell ~= nil and player ~= nil then
      if spell:CanBePlayed(player) and threshold == 1 then
        spell:PlayFreeFromAnywhere( player )
      end
    end
    </RESOLUTION_TIME_ACTION>
East Bay wrote:And can anyone port thefireminds Infernal Tutor from 2012? I tried already but I don't know how to the Reveal and GetCardName.
Infernal Tutor | Open
Code: Select all
    <RESOLUTION_TIME_ACTION>
    local filter = Object():GetFilter()
    local player = EffectController()
    if CountCardsInHand(player) &gt; 0 then
       filter:Clear()   
       filter:SetPlayer( player )   
       filter:SetZone( ZONE_HAND )   
       filter:SetHint( HINT_ALLIED, player )   
       filter:NotTargetted()     
       player:SetTargetCount( 1 )   
       player:ChooseTarget( NO_VALIDATION, "CARD_QUERY_CHOOSE_CARD_TO_REVRAL", EffectDC():Make_Targets(0))   
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target_hand = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
    local filter = Object():GetFilter()
    local player = EffectController()
    player:MarkSearchedLibrary()
    filter:Clear()
    filter:NotTargetted()
    if target_hand ~= nil then
       target_hand:GuidedReveal( ZONE_HAND, ZONE_HAND )
      filter:AddCardName( target_hand:GetCardName())
    end
    filter:May()
    filter:SetZone( ZONE_LIBRARY )
    filter:SetPlayer( player )
    player:SetTargetCount( 1 )
    player:ChooseTarget( NO_VALIDATION, "CARD_QUERY_CHOOSE_CARD_TO_PUT_IN_HAND", EffectDC():Make_Targets(1))
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target_hand = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
    local target_search = EffectDC():Get_Targets(1) and EffectDC():Get_Targets(1):Get_CardPtr(0)
    if target_search ~= nil then
      if target_hand ~= nil then
          target_search:GuidedReveal( ZONE_LIBRARY, ZONE_HAND )
       end
       target_search:PutInHand()
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    EffectController():ShuffleLibrary()
    </RESOLUTION_TIME_ACTION>
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Card Creation Request Thread

Postby East Bay » 19 May 2013, 05:24

I edit that from thefiremind's Windbrisk Heights so maybe he want to change the hideaway but thank you for all the cards now storm is complete.
User avatar
East Bay
 
Posts: 85
Joined: 17 Mar 2013, 02:05
Has thanked: 33 times
Been thanked: 30 times

Re: Card Creation Request Thread

Postby East Bay » 19 May 2013, 17:41

sumomole wrote:But I think Hideaway should be code like this, of course, AI may not know how to use this code, so it's just a reference:
I think Hideaway is wrong they say the spell is "Cast" here: http://forums.mtgsalvation.com/showthread.php?t=382272
Who can confirm do we get the triggered ability?
Edit-Oops nvm just test on Emakul trigger works!
Last edited by East Bay on 19 May 2013, 18:27, edited 1 time in total.
User avatar
East Bay
 
Posts: 85
Joined: 17 Mar 2013, 02:05
Has thanked: 33 times
Been thanked: 30 times

Re: Card Creation Request Thread

Postby NEMESiS » 19 May 2013, 17:52

What am I doing wrong with Skull rend? It seems to also target me when discarding:

Code: Select all
    <FILTER>
    return (FilteredPlayer() ~= nil
    and FilteredPlayer():GetTeam() ~= Object():GetPlayer():GetTeam())
    </FILTER>
    <RESOLUTION_TIME_ACTION>
    if (FilteredPlayer() ~= nil) then
       FilteredPlayer():DealDamage(2, Object())
    elseif (FilteredCard() ~= nil) then
       FilteredCard():DealDamage(2, Object())
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    for i=0,MTG():GetNumberOfPlayers()-1 do
       local nthPlayer = MTG():GetNthPlayer(i)
       if (nthPlayer:GetTeam() ~= Object():GetPlayer():GetTeam()) ~= nil then
          local NumCards = 2
          while (NumCards &gt; 0) do
             NumCards = NumCards - 2
             nthPlayer:DiscardRandomCard()
          end
       end
    end
    </RESOLUTION_TIME_ACTION>
User avatar
NEMESiS
 
Posts: 460
Joined: 03 Jan 2013, 04:02
Location: Pools of Becoming
Has thanked: 70 times
Been thanked: 21 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 1 guest


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (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 1 guest

Login Form