It is currently 12 Jun 2025, 13:05
   
Text Size

Duels of the Planeswalkers 2013

New decks and cards for Stainless Games' release

Moderator: CCGHQ Admins

Re: Duels of the Planeswalkers 2013

Postby RiiakShiNal » 11 Jul 2012, 03:02

sumomole wrote:How can I easily enter the following code?
Code: Select all
    <FILTER>
    return (FilteredCard() == EffectDC():Get_Targets(0):Get_CardPtr(0) or
    FilteredCard() == EffectDC():Get_Targets(0):Get_CardPtr(1) or
    FilteredCard() == EffectDC():Get_Targets(0):Get_CardPtr(2) or
                                  .
                                  .
                                  .
    FilteredCard() == EffectDC():Get_Targets(0):Get_CardPtr(1000))
    </FILTER>
How about:
Code: Select all
<FILTER>
  local bTest = false
  if (FilteredCard() ~= nil) then
    for i=0,1000 do
      bTest = bTest or (FilteredCard() == EffectDC():Get_Targets(0):Get_CardPtr(i))
    end
  end
  return bTest
</FILTER>
Though I doubt you will ever have 1001 targets and I added a speed sanity check in case the FilteredCard is nil.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Duels of the Planeswalkers 2013

Postby thefiremind » 12 Jul 2012, 09:22

I remember someone talking about adding the missing planes, for example those from the original Planechase expansion. I can't say I'm 100% sure, but I think it can be done. We would just have to make a WAD file that contains a deck called D13_PLANE_DECK.XML, with uid="77" (maybe this isn't important but it should override the existing one), that contains the existing planes plus the ones we are going to add. Moreover, if you look at the illustrations in DECK_0077_PC, you see that they are not like the Archenemy cards: there's just the illustration, and the border is added by the game. This makes things a lot easier.

With the list of the existing planes and a good collection of images from the original Planechase expansion, we should be good to go. And I'll have a try soon.

EDIT: I coded Academy at Tolaria West, a very easy plane. The planar deck overriding worked just fine, but there's a visual bug when a custom plane is used: do you remember the rectangle that stays behind your avatar when you play a Planechase match, and displays a progressively fading image of the plane you are playing on? Well, that rectangle is all white for my custom plane. It would be natural to think that the image in that rectangle is automatically generated from the plane illustration, but this bug seems to tell otherwise, and I can't find any file in the core ART_ASSETS that could be connected to this.

EDIT 2: I still can't understand what's wrong, but it's something totally related to the illustration, because if I use an existing art ID for a custom plane, the rectangle is visible. There's no difference in dimensions, file size, nor in the header between my custom image and an official one... so what could I do?

EDIT 3: I found the reason! :D :D :D But it's something I wouldn't believe if I didn't test it myself... the reason for the visual bug isn't connected to the illustration itself, but to its art ID! The art IDs of the planes have to be totally numeric and they can't start with 0. Changing A198073.TDX to 1999198073.TDX (and of course its reference in the XML file) fixed the bug. Now the rectangle is visible for my custom plane with custom illustration.

It will take some time to code the planes because I can't use my tool to download localised text: magiccards.info doesn't have text for the plane cards. And I'm sorry for the Korean, Russian and Portuguese friends out there, but their languages don't exist in the original Planechase expansion. They'll have to bear with English text. :(

EDIT 4: Did someone understand without any doubt what's the meaning of the AI_PLANAR_DIE_BEHAVIOUR? AlwaysRoll is obvious, but the other 2 aren't: what's considered as a winning roll? Getting chaos, or getting nothing?

EDIT 5: You can already download 10 new planes here:
viewtopic.php?f=64&t=7498

EDIT 6: I just had a Planechase match with the new planes. Sole survivors: me with my Morbid deck at 34 life thanks to a chaos roll on Fields of Summer, and Ajani at 14 life. Goldmeadow stayed in play a lot, so we both had a bunch of Goat tokens... I thought that the match would have lasted longer, but then I rolled planeswalk, and where did I get to? Bant! All those Goat tokens suddenly were exalted, and my attacking Moldgraf Monstrosity became a trampling 26/26 (imagine some goats cheering up a giant caterpillar, it's quite hilarious :lol:). Ajani blocked it with only 1 Goat, I don't know why... anyway even if he managed to survive by blocking with all his Goats, I would have won the next turn for sure. :D

EDIT 7 (this post is becoming enormous :lol:): In case someone is interested: the simplest solutions are really the best sometimes. We can use ObjectDC to store custom characteristics and set them in static abilities as they were real, for example:
Code: Select all
  <STATIC_ABILITY>
    <CONTINUOUS_ACTION>
    ObjectDC():Set_Int( CHARACTERISTIC_MODULAR, 1 )
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
(of course you have to define that variable)
If I give this ability to all creatures with modular, Arcbound Overseer will easily work with this code:
Code: Select all
  <TRIGGERED_ABILITY filter_zone="ZONE_IN_PLAY">
    <TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
    return ( EffectController():MyTurn() ~= 0 ) and ( MTG():GetStep() == STEP_UPKEEP )
    </TRIGGER>
    <FILTER>
    return FilteredCard() ~= nil and
    FilteredCard():GetZone() == ZONE_IN_PLAY and
    FilteredCard():GetPlayer() == Object():GetPlayer() and
    FilteredCard():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0 and
    (FilteredCard():GetDataChest() ~= nil and FilteredCard():GetDataChest():Get_Int(CHARACTERISTIC_MODULAR) == 1)
    </FILTER>
    <RESOLUTION_TIME_ACTION>
    if FilteredCard() ~= nil then
       FilteredCard():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
(localised text omitted)
I tried to add badge="BADGE_MODULAR" to the static ability, but then, no matter which constants I defined and which TDX, MDL, MTL files I copied and edited, the creature was getting badge #0 (first strike). So adding badges is still impossible.
< 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: Duels of the Planeswalkers 2013

Postby Pesi » 14 Jul 2012, 23:33

I just noticed that the flavortext on the spanish version of Ajani’s Mantra is missing the closing quotes.
----
EDIT:
Furthermore, the russian quote begins with an english start-quote instead of the russian one (which is also the french one).
Pesi
 
Posts: 21
Joined: 03 May 2012, 15:19
Has thanked: 0 time
Been thanked: 0 time

Re: Duels of the Planeswalkers 2013

Postby kevlahnota » 15 Jul 2012, 01:07

good news on using custom card frame, however we must know the correct name of the card frame. it seems the color of a card and card types is based for displaying card frames. if we know the correct syntax we will be able to use our custom card frames.

here in this screenshot below it displays the basic plains white no symbol frame for ancient den(cloned and renamed), however the color is set to white, if its colorless, it will be a a general colorless frame also #-o
. anyway, if we can figure out how they do it in their mox frames, its likely possible to use our own custom frames.

Image

before I release my version 2 of my 2013 mod, I'll include possible card frames for artifact land. we just need correct naming.
User avatar
kevlahnota
Programmer
 
Posts: 825
Joined: 19 Jul 2010, 17:45
Location: Philippines
Has thanked: 14 times
Been thanked: 264 times

Re: Duels of the Planeswalkers 2013

Postby sumomole » 15 Jul 2012, 08:20

When I use the triggered ability "COUNTERS_CHANGED", how do I know which type of counters is to be changed?
I don't care the counters on which permanent and amount, I just have to define the type of counters.
I only know "MTG():GetCountersType(String)", but it's useless in here.
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Duels of the Planeswalkers 2013

Postby thefiremind » 15 Jul 2012, 08:48

sumomole wrote:When I use the triggered ability "COUNTERS_CHANGED", how do I know which type of counters is to be changed?
I don't care the counters on which permanent and amount, I just have to define the type of counters.
I only know "MTG():GetCountersType(String)", but it's useless in here.
If it works like DotP2012, you get the type with "CounterTypeIndex()", but you get an integer as the return value of "MTG():GetCountersType(String)", not the "String" itself.

EDIT: Oh, in case this could inspire you for anything you plan to do with counters: I thought about how we can code effects like Hex Parasite. Of course we can't "surgically" choose which counters we want to remove, but by using those functions for the proliferate mechanic, maybe it's possible to have a good approximation: iterate on worst/best counter types (according to the permanent's controller) until you removed them all, then iterate on best/worst (what's left) until you removed them all, and of course stop earlier if you already removed X.

EDIT 2: My Hex Parasite works and I posted its code here:
viewtopic.php?f=63&t=7514
< 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: Duels of the Planeswalkers 2013

Postby sumomole » 17 Jul 2012, 15:07

thefiremind wrote:EDIT 2: My Hex Parasite works and I posted its code here:
viewtopic.php?f=63&t=7514
I was testing a deck, and the following code in the file "SCRIPT_LOG.TXT".
I've never seen such a problem, do you know what that means?

Code: Select all
[lua]CLua::parseFile - Could not load "brandboot"
[lua]CLua::parseFile - Could not load "add_banner_boot"
[lua]CLua::parseFile - Could not load "add_banner_boot"
My test deck includes the following cards:
Merfolk.zip
(16.21 KiB) Downloaded 364 times
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Duels of the Planeswalkers 2013

Postby thefiremind » 17 Jul 2012, 15:25

Those errors are new for me, too. They seem to be really "low-level", not just a syntax error or something like that... did all the cards appear in your deck, or maybe some card was skipped because it had something wrong?

By looking at the code, I can't see anything wrong, but the cards are so many that it's difficult to take a careful look at all of them. The only strange thing I saw was on Aether Vial: you used MTG():GetCountersType("CHARGE") mixed with MTG():ChargeCounters()... I think that it's better to always use the latter, but I don't think that this could have caused the errors.

As I suggested to someone else before, remove the bottom half cards of the deck, then play with it a little and see if the errors come out again; if yes, remove another half of the remaining cards; if not, restore the bottom half cards and remove the other ones which you already tested. Go on like this until you find the exact card that causes the errors. Always make mirror matches, so that the AI has to evaluate the cards in your deck and errors can come up even without actually playing the cards (this isn't always true, but the chances improve for sure).
< 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: Duels of the Planeswalkers 2013

Postby sumomole » 19 Jul 2012, 07:51

I have a question, when I put a no-basic land card with sub-type(e.g. Island) into deck list, the number of this card in game three more than the number in deck list, and the number of basic land be reduce, but the number of this card in the deck manager is correct, why?
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Duels of the Planeswalkers 2013

Postby thefiremind » 19 Jul 2012, 09:04

sumomole wrote:I have a question, when I put a no-basic land card with sub-type(e.g. Island) into deck list, the number of this card in game three more than the number in deck list, and the number of basic land be reduce, but the number of this card in the deck manager is correct, why?
DotP2012 had the same problem:
viewtopic.php?f=101&t=6057&start=15#p79643
reduce the number of nonbasic land cards with basic land subtype until you get the number 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: 722 times

Re: Duels of the Planeswalkers 2013

Postby sumomole » 19 Jul 2012, 10:13

thefiremind wrote:DotP2012 had the same problem:
viewtopic.php?f=101&t=6057&start=15#p79643
reduce the number of nonbasic land cards with basic land subtype until you get the number you want.
But my D12 has never been this problem. :shock:
If I only need one land, how?
6.JPG
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

Re: Duels of the Planeswalkers 2013

Postby thefiremind » 19 Jul 2012, 11:11

Then I really don't know what to say, I don't use such lands because I know that the support for them is very limited.
< 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: Duels of the Planeswalkers 2013

Postby hmyzak » 20 Jul 2012, 19:11

Guys, is it possible to run ravnica decs, which are inside DoTP 2013? Or is there any unlock key for them? thx
hmyzak
 
Posts: 2
Joined: 20 Jul 2012, 18:52
Has thanked: 0 time
Been thanked: 0 time

Re: Duels of the Planeswalkers 2013

Postby thefiremind » 20 Jul 2012, 21:45

OK I made something that will make Ravnica decks unlocking possible for everyone. First, if you don't have them, go find my link:
viewtopic.php?f=62&t=6784&start=75#p91296
then download the attached file and extract it to your DotP2013 directory (together with the Ravnica decks).

The attached WAD does all the work for you: it contains copies of the decks, but already unlocked, and it also moves the promo unlocks to the ordinary unlocks, so even if we don't have codes for the promo unlocks on Ravnica decks, we can unlock them by playing or with the unlock button.

Oh I was forgetting: I also added the localised text for deck names and AI player names. I left the deck names English for all languages because I didn't want to make bad translations, while the AI player names are fully localised because I copied them from the cards. :D

EDIT: I trimmed the Italian localised text for the Selesnya AI player name because it was too long and the last letter was truncated by the game during the duels. If you don't play in Italian and you already downloaded this, you don't need to redownload.
Attachments
Deck_1000_GuildUnlock.zip
(11 KiB) Downloaded 434 times
< 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: Duels of the Planeswalkers 2013

Postby sumomole » 21 Jul 2012, 03:52

Is there any way to cancel a delayed Trigger?
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 234 times

PreviousNext

Return to Magic: The Gathering - Duels of the Planeswalkers

Who is online

Users browsing this forum: No registered users and 4 guests


Who is online

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

Login Form