It is currently 27 Apr 2024, 12:06
   
Text Size

Modding tests (what changed from 2014, what didn't)

Moderator: CCGHQ Admins

Modding tests (what changed from 2014, what didn't)

Postby thefiremind » 10 Jun 2015, 20:29

I decided to open this topic so that we can gather information about the tests we conduct while trying to code new cards. The idea is to focus on what couldn't be done in DotP2014: can it be done now in DotP2015 or not? I'll also collect some findings that are scattered through the announcement topic.

Here's what I found so far.
  • Textures for monocolored hybrid mana are still missing (tried with {2/U} long time ago).
  • "Overload" is a possible qualifier for UTILITY_ABILITY, but it seems it hasn't been coded (tried long time ago). I was wrong, it's possible to make it work!
  • Giving the Planeswalker type to a card makes the game freeze on startup (tried long time ago). This is actually a step back, unfortunately.
  • Double-colored devotion works correctly (tried long time ago with green and blue, they just need to be comma-separated arguments of the GetDevotionTo function).
  • The BECAME_TAPPED_FOR_MANA trigger is still useless.
  • "Creature A blocks creature B this turn if able" is possible now! There's an official example with Grappling Hook.
  • Kira, Great Glass-Spinner and similar cards can be coded now! We have a brand new INTERROGATE_BECAME_TARGET which allows us to do this:
    Kira, Great Glass-Spinner granted ability | Open
    Code: Select all
      <TRIGGERED_ABILITY resource_id="1">
        <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever this creature becomes the target of a spell or ability for the first time in a turn, counter that spell or ability.]]></LOCALISED_TEXT>
        <TRIGGER value="BECAME_TARGET_OF_SPELL" simple_qualifier="self">
        local creature = EffectSource()
        if creature ~= nil then
           local interrogation = MTG():ClearInterrogationQuery()
           interrogation:SetObject(creature)
           return interrogation:Count(INTERROGATE_BECAME_TARGET, INTERROGATE_THIS_TURN) == 0
        end
        return false
        </TRIGGER>
        <TRIGGER value="BECAME_TARGET_OF_ABILITY" simple_qualifier="self">
        local creature = EffectSource()
        if creature ~= nil then
           local interrogation = MTG():ClearInterrogationQuery()
           interrogation:SetObject(creature)
           return interrogation:Count(INTERROGATE_BECAME_TARGET, INTERROGATE_THIS_TURN) == 0
        end
        return false
        </TRIGGER>
        <RESOLUTION_TIME_ACTION>
        MTG():CounterStackObject( TriggerStackObjectID() )
        </RESOLUTION_TIME_ACTION>
      </TRIGGERED_ABILITY>
  • SetBlockController is still broken: when choosing how the opponents' creatures block, the only possible choice is no blockers at all.
  • Layer 4 is now split into 4A and 4B, one for types and one for sub-types. Be sure to change it when you port a DotP2014 card, or it won't work.
  • card:Reveal() doesn't exist anymore: now the cards to reveal need to be put in a chest and then you call player:RevealToMe(chest).
  • The window_step attribute in AI_AVAILABILITY now uses the same names for the steps given to the constants (for example, "STEP_DECLARE_BLOCKERS" rather than "declare_blockers").

EDIT: I attached my test ZED contents for future reference. They won't be updated. If you want to modify them, or just pack them so that they can be used in DotP2015, use my D15Tool.
Attachments
TFM's 2015 test ZED contents.zip
(2.85 MiB) Downloaded 794 times
Last edited by thefiremind on 30 Nov 2016, 09:37, edited 8 times in total.
< 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: Modding tests (what changed from 2014, what didn't)

Postby GrovyleXShinyCelebi » 10 Jun 2015, 20:42

Something I noticed with Flameblast Dragon is that there's a new "QUERYTEXT" block that allows you to add query strings in the card rather than in a TEXT_PERMANENT file. It's much more convenient!

In Garruk's Wake is coded to account for planeswalkers, so one would think this engine would be able to accommodate them...

Code: Select all
   <SFX text="IN_GARRUKS_WAKE_LUA_PLAY" />
    <FILTER filter_id="0">
    local filter = ClearFilter()
    local subfilter = filter:AddSubFilter_Or()
       subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
       subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_PLANESWALKER)
    filter:Add( FE_TEAM, OP_NOT, EffectController():GetTeam() )
    </FILTER>
    <RESOLUTION_TIME_ACTION filter_id="0">
    if FilteredCard() ~= nil then   
       FilteredCard():Destroy()
    end
    </RESOLUTION_TIME_ACTION>
I wonder, is it possible to make additional costs optional, then test to see if that cost was paid with 2015's engine (i.e. Dragonlord's Prerogative)?
User avatar
GrovyleXShinyCelebi
 
Posts: 294
Joined: 12 Jun 2013, 18:23
Has thanked: 14 times
Been thanked: 37 times

Re: Modding tests (what changed from 2014, what didn't)

Postby sweetLu » 10 Jun 2015, 21:24

I probably won't be doing any DotP 2015 modding but here is what I noticed a year or so ago when sumomole first linked some card xml from the 3dm crack. Some of these are obvious but I figure they are at least worth stating if someone is coming from a 2014 background with little background of 2015.

I took a look at a few cards and here are some things I've noticed:

  • We can now do "can attack as though X didn't have defender"
  • Spreading Seas is in the game including dual lands. We will have more options with lands but will still need a mana pool approximation for cards like Dark Ritual.
  • Some people have been commenting on the kicker for cards not working correctly. In 2015 Kicker is coded using a ZONECHANGE_END trigger and an intervening if to check if the card was kicked. In 2014 kicker was coded using an ZONE_TRANSITION trigger and replacement effect. I'm not a rules guru myself so I don't know which is technically correct but in 2015 kicker isn't working correctly. There are still ZONE_TRANSITION triggers but I haven't looked at enough cards yet to see if there is an equivalent to 2014s replacement effect tag.
  • Yes, the cost of the activated ability for Paragon of Fierce Defiance is incorrectly coded as {1} {R} instead of {R}.
  • It seems as though the localized text for multiple choice questions, etc. are hard coded into cards in a <QUERYTEXT> tag. At first this seems like a huge pain but if we can only make 300 or so different cards and can't add localized text files like we did in 2014, it may not be that bad of an alternative. Though the scry cards do have a bunch of redundant localized text definitions.
  • They added functions to get a player's devotion to a certain color. It will be interesting to see if these will work with hybrid mana costs and devotion to multiple colors.
  • This time the devs seem to have a little sense of humor. One of the tags is:
    Code: Select all
    <EXPLAIN play_tag="HINT_ABILITY_WEIRD_WHY_PLAY" />
  • It looks like we have some slight modifications on the costs for abilities from looking at Nemesis of Mortals (see below). Though I still don't think cards like Training Grounds will be possible unless we recode every activated ability to include a cost modification block.
    Nemesis of Mortals (2015) | Open
    Code: Select all
      <ACTIVATED_ABILITY>
        <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{7}{G}{G}:蛮化5。你坟墓场中每有一张生物牌,此异能便减少{1}来起动。]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{7}{G}{G} : Monstruosité 5. Cette capacité coûte {1} de moins à activer pour chaque carte de créature dans votre cimetière.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{7}{G}{G}: Monstruosidad 5. Cuesta {1} menos activar esta habilidad por cada carta de criatura en tu cementerio.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{7}{G}{G}: Monstrum 5. Das Aktivieren dieser Fähigkeit kostet für jede Kreaturenkarte in deinem Friedhof {1} weniger.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{7}{G}{G}: Mostruosità 5. Questa abilità costa {1} in meno per essere attivata per ogni carta creatura nel tuo cimitero.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{7}{G}{G}:怪物化5を行う。この能力を起動するためのコストは、あなたの墓地にあるクリーチャー・カード1枚につき{1}少なくなる。]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{7}{G}{G}: 괴수화 5. 이 능력은 당신의 무덤에 있는 생물 카드 한 장당 발동하는 데 {1}가 덜 든다.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{7}{G}{G}: Чудовищность 5. Стоимость активации этой способности уменьшается на {1} за каждую карту существа на вашем кладбище.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{7}{G}{G}: Monstruosidade 5. Esta habilidade custa {1} a menos para ser ativada para cada card de criatura no seu cemitério.]]></LOCALISED_TEXT>
        <SFX text="MONSTROUS_LUA_PLAY" />
        <COST mana_cost="{7}{G}{G}" type="Mana" />
        <COST_MODIFICATION>
        local filter = ClearFilter()
        filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
        filter:SetZone(ZONE_GRAVEYARD, EffectController() )
        MTG():DecreaseCurrentCost( filter:Count() )
        </COST_MODIFICATION>
        <RESOLUTION_TIME_ACTION>
        local effectSource = EffectSource()
        if effectSource ~= nil then
           if effectSource:IsMonstrous() == false then
              effectSource:AddCounters( MTG():PlusOnePlusOneCounters(), 5)
              effectSource:BecomeMonstrous(5)
           end
        end
        </RESOLUTION_TIME_ACTION>
        <EXPLAIN play_tag="HINT_ABILITY_PUMP_WHY_PLAY" />
        <AI_AVAILABILITY window_step="STEP_DECLARE_BLOCKERS" type="window" />
        <AI_AVAILABILITY type="in_response" response_target="1" />
        <AVAILABILITY>
        return Object():IsMonstrous() == false
        </AVAILABILITY>
      </ACTIVATED_ABILITY>
On a second thought cards like Training Grounds would be possible but would require detailed management of all cards that affect the cost of abilities. You would just have to have a complex filter to adjust the cost appropriately and every activated ability we code would have to utilize that filter.
sweetLu
 
Posts: 181
Joined: 16 Jul 2014, 01:24
Has thanked: 21 times
Been thanked: 22 times

Re: Modding tests (what changed from 2014, what didn't)

Postby thefiremind » 10 Jun 2015, 21:32

sweetLu wrote:Some people have been commenting on the kicker for cards not working correctly. In 2015 Kicker is coded using a ZONECHANGE_END trigger and an intervening if to check if the card was kicked. In 2014 kicker was coded using an ZONE_TRANSITION trigger and replacement effect. I'm not a rules guru myself so I don't know which is technically correct but in 2015 kicker isn't working correctly. There are still ZONE_TRANSITION triggers but I haven't looked at enough cards yet to see if there is an equivalent to 2014s replacement effect tag.
By looking at AEther Figment it seems they fixed Kicker.
sweetLu wrote:Yes, the cost of the activated ability for Paragon of Fierce Defiance is incorrectly coded as {1} {R} instead of {R}.
They fixed this, too.
< 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: Modding tests (what changed from 2014, what didn't)

Postby Tejahn » 10 Jun 2015, 21:43

This is a great topic that will surely be used as a reference. Having the 'Can' and 'Can't' pros and cons in one place will be invaluable. I've not done any extensive testing yet but I do wonder if the following cards will be possible:

Charging Rhino
Dark Impostor
Ghostly Prison
Harbor Serpent
Land Tax
Psychic Intrusion
Odric, Master Tactician
Oppressive Rays
Sphere of Safety

Those are the ones I can think of right now that I really want to know about.
Last edited by Tejahn on 28 Jun 2015, 13:46, edited 2 times in total.
Tejahn
 
Posts: 430
Joined: 14 May 2013, 01:35
Has thanked: 25 times
Been thanked: 25 times

Re: Modding tests (what changed from 2014, what didn't)

Postby Xander9009 » 10 Jun 2015, 22:01

Tejahn wrote:This is a great topic that will surely be used as a reference. Having the 'Can' and 'Can't' pros and cons in one place will be invaluable. I've not done any extensive testing yet but I do wonder if the following cards will be possible:

Charging Rhino
Dark Imposter
Ghostly Prison
Harbor Serpent
Land Tax
Psychic Intrusion
Odric, Master Tactician
Oppressive Rays
Sphere of Safety

Those are the ones I can think of right now that I really want to know about.
With the ability cost modification cards, there's at least the one card that does this: Nemesis of Mortals. However, it does that on its own ability. It might be possible to do from another card, but it seems unlikely. One way to make it work might be to make it a standard that every ability calls an ability cost modification function, and that function would allow other cards to modify the cost. This is only if there's no way to inherently affect another card's ability costs.
_______________________________
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: Modding tests (what changed from 2014, what didn't)

Postby Tejahn » 15 Jun 2015, 04:42


Thanks for that information Xander9009. I've only started testing some of the cards I was curious about tonight. And I CAN CONFIRM THAT AVALANCHE TUSKER WORKS! I created a Temur deck with cards listed below and forced the only creature the AI had untapped to block. I tested the ability multiple times against different decks. Thankfully, the AI seemed to recognize that their weaker creature was being forced to block and threw some other weak creatures in to finish off my Avalanche Tusker. I can tell that the AI made it's decision after realizing what I had done because the creature I forced to block was pulled up to block my Tusker immediately while the other creatures were allowed to join during the Blocking Phase. I'll keep posting more results as I continue testing.

Ancient Silverback
Avalanche Tusker
Awaken the Bear
Bear's Companion
Embodiment of Spring
Garruk's Packleader
Heir of the Wilds
Rattleclaw Mystic
Sagu Mauler
Savage Knuckleblade
Savage Punch
Temur Ascendancy
Temur Charm
Trap Essence
Tejahn
 
Posts: 430
Joined: 14 May 2013, 01:35
Has thanked: 25 times
Been thanked: 25 times

Re: Modding tests (what changed from 2014, what didn't)

Postby thefiremind » 15 Jun 2015, 08:28

Xander9009 wrote:One way to make it work might be to make it a standard that every ability calls an ability cost modification function, and that function would allow other cards to modify the cost. This is only if there's no way to inherently affect another card's ability costs.
I tried to code Elite Arcanist by using COST_MODIFICATION, but it seems it has the same limits as the AVAILABILITY block: some data can't be accessed from within it, for example LinkedDC.

Is this the card list for the deck you made? I think morph is still a no-go, approximations aside. I had high hopes for morph in DotP2015 since the Tarkir block was around, but no cards with morph/manifest/megamorph were added, and the face up/down functions available are the same as DotP2014. We could, however, take NeoAnderson's approximation for DotP2014 and see if we can port it and maybe improve it.
< 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: Modding tests (what changed from 2014, what didn't)

Postby Tejahn » 15 Jun 2015, 18:04

Concerning Morph. It's an approximation. I modified the code created by NeoAnderson and it worked properly. It would have been excellent if they included Morph. But I'm glad to announce that I have Morph and Megamorph working. However, when I tried to use the lands he coded they didn't work at all. I decided to use the lands from the Fate Reforged set and they worked.

For Savage Punch I modified the coded Functions to allow Ferocious to work.

For Rattleclaw Mystic mana production I used the official Frontier Bivouac. It's nice to be able to create mana abilities and Lands so easily. Well, they were already easy to begin with but now even more so.

As far as Cost Modification, I've not yet made an attempt.

Lastly, all of the cards I included showed up in the Collection Screen as well. I'm not sure about a card limit but these were added with no replacement or complications. I simply went in sequence and everything work. I packed it all into a .ZED file with no .WAD.
Tejahn
 
Posts: 430
Joined: 14 May 2013, 01:35
Has thanked: 25 times
Been thanked: 25 times

Re: Modding tests (what changed from 2014, what didn't)

Postby Tejahn » 04 Jul 2015, 18:01

Image

So, I decided to do a damage test with the Dromoka's Command deck I created and the numbers seem to go on forever. The picture above shows where the numbers were when I took the screenshot. It's still going as I post this. Hopefully, this is an indicator of how many cards we can add to the game. Lol! But I think that's highly improbable.

EDIT: Also, If two Enduring Scalelord are on the battlefield the go infinite as well. Is there a way to for them to reach their maximum number of counters after one resolution?

Lastly, which XML do I edit to change the name of my deck outside of the game? The computer has longer names for their decks but the in-game deck editor seemingly only allows less than 15 characters.
Tejahn
 
Posts: 430
Joined: 14 May 2013, 01:35
Has thanked: 25 times
Been thanked: 25 times

Re: Modding tests (what changed from 2014, what didn't)

Postby Xander9009 » 04 Jul 2015, 18:28

Tejahn wrote:Image

So, I decided to do a damage test with the Dromoka's Command deck I created and the numbers seem to go on forever. The picture above shows where the numbers were when I took the screenshot. It's still going as I post this. Hopefully, this is an indicator of how many cards we can add to the game. Lol! But I think that's highly improbable.

EDIT: Also, If two Enduring Scalelord are on the battlefield the go infinite as well. Is there a way to for them to reach their maximum number of counters after one resolution?

Lastly, which XML do I edit to change the name of my deck outside of the game? The computer has longer names for their decks but the in-game deck editor seemingly only allows less than 15 characters.
There wouldn't be a way for it to reach its max after one resolution. However, you could add an auto_skip block so that if it has, say 10 or more, then it'll skip the resolution time and just get it over with. Many draw cards in 2014 use this method so that if you already have 7 cards and it's a card that makes you draw every turn (and your library isn't in any immediate danger of running out), then it auto_skips the reaction time to keep play flowing. With that, the counters would wrack up REALLY fast. If you put in a check on Enduring Scalelord to only trigger if it has X or fewer counters (let's face it, you probably don't need more than a thousand... You PROBABLY don't need more then 50, but there are times that'd actually matter...), then you can cut it off at some point.
_______________________________
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: Modding tests (what changed from 2014, what didn't)

Postby Tejahn » 04 Jul 2015, 19:10

Thanks for the reply. And if I remember correctly, the max for damage and counters in 2014 was 9999. I think that's more than enough absolute ceiling. Can you post a code that would permit an infinite counter combo to go directly to that number? I'll actually try to create a working code tonight if you can't post one by then.
Tejahn
 
Posts: 430
Joined: 14 May 2013, 01:35
Has thanked: 25 times
Been thanked: 25 times

Re: Modding tests (what changed from 2014, what didn't)

Postby thefiremind » 04 Jul 2015, 19:40

Xander9009 wrote:If you put in a check on Enduring Scalelord to only trigger if it has X or fewer counters (let's face it, you probably don't need more than a thousand... You PROBABLY don't need more then 50, but there are times that'd actually matter...), then you can cut it off at some point.
You could also add that, if TriggerObject():GetCardName() == "ENDURING_SCALELORD", then a query asks you if you want to directly put the maximum number of counters you decided, since it would mean that 2 Scalelords are triggering off each other.
< 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: Modding tests (what changed from 2014, what didn't)

Postby Tejahn » 04 Jul 2015, 19:53

Will do. Thanks!

Oh, and concerning changing the name of a deck outside the game, I'm looking at the Campaign XLMs and I see a NAME_TAG attribute.
Tejahn
 
Posts: 430
Joined: 14 May 2013, 01:35
Has thanked: 25 times
Been thanked: 25 times

Re: Modding tests (what changed from 2014, what didn't)

Postby thefiremind » 04 Jul 2015, 20:24

Tejahn wrote:Oh, and concerning changing the name of a deck outside the game, I'm looking at the Campaign XLMs and I see a NAME_TAG attribute.
Changing the name of your decks can't be done through XML files... all your info is stored in the profile and deck names are no exception. You could take a look at the last of spirolone's tools, however it's more of a library, it needs additional code to make it do what you want.
< 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

Next

Return to 2015

Who is online

Users browsing this forum: No registered users and 2 guests


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 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 2 guests

Login Form