It is currently 23 Aug 2019, 19:54
   
Text Size

Planeswalker's Complementary Set [MOD]

Moderators: Xander9009, CCGHQ Admins

Re: gorem2k mod

Postby KENOG » 12 Aug 2013, 00:58

Hey Gorem, I was so excited about the Planeswalker cards, so I decided to snoop inside a few select cards' '.xml's. :lol: And I kind of liked all the things that were running through my mind, as I looked through it, and I was thinking about certain things. If I may,:

1- I was wondering if you could give 'Type' as Planeswalker (reason, so that it shows as 'Planeswalker' on the card, and I believe Magmaquake would be able to recognize and affect it), 'Supertype' as Legendary (for 'only one of this card on your side of field at a time' effect), and 'Subtype' as Liliana or Garrus etc. And most importantly, NO 'Enchantment' as any of its type classification. Basically, that means as long as its in your hand, it's not a type recognized by the game, so it can't be affected by cards that target spells of any kind, as long as its in your hand.

2- Now, as I see it, when cast and put on the battlefield, it would be 'thrown' directly into the graveyard like 'it doesn't belong', since the game doesn't recognize a type called Planeswalker. So, I was thinking, why not give it a Trigger Ability, that triggers 'when this card enters the battlefield', like Awaken the Ancient or Avenger of Zendikar, which would grant the card an affect of something like 'this card is also an enchantment, along with its original type', something like the effect of 'Adaptive Automaton'. That would make the card type Enchantment (along with the unrecognized Planeswalker type), so that it has an excuse to stay on the field as a permanent. Or so I believe.

3- Now, to prevent the problems generally faced by Enchantments, I was thinking, why not give it a 'Protection from everything' Static ability, like Progenitus from Sumomole's Mod, to prevent being affected by even effects that don't target.

Also, when the Planeswalker card gets type 'Enchantment' when it hits the field, I'm not sure if it would show on the card text, making it look 'Legendary Planeswalker Enchantment - Liliana', which would look clumsy.

Last but not least, I should tell you that I don't know a thing about coding. I was just looking at the .xml, and trying to find out possible 'bridges' that might be connected, to get everything working, all because I'm passionate about having a Planeswalker card that's close to perfection. I understand that I do not have the right to tell you (who is an experienced coder), what to do. I was only hoping that we could create a way, if there wasn't one already.

Keep perfecting the cards, and good luck. :wink:
KENOG
 
Posts: 22
Joined: 08 Aug 2013, 23:14
Has thanked: 3 times
Been thanked: 0 time

Re: gorem2k mod

Postby gorem2k » 12 Aug 2013, 09:46

Well, Thanks for the suggestions! All I can say about perfecting is that; there are more experienced user that could give this a try but most don't venture in this territory. There are so many rules, ie trampling over a creature, asking before attackers declared what to target, etc... that is not implemented. So basically, all we're left with is what some of us actually put on table. I'm quite satisfied with these primitive planeswalkers, at least you can build a black mana ramping with Liliana ;p
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: gorem2k mod

Postby Aiodren » 12 Aug 2013, 11:27

Hi Gorem! As many others here i am also excited that someone is finally willing to go the route of the planeswalkers ;) I myself experimented with planeswalkers for dotp2013 when it came out and had almost the same approach you took now. But i never got the damage redirection right, so i just coded the cards as normal, hexproof, indestructable enchantments with their respective abilities. I never made my approach public here in the forum, because i felt without them actually being vulnerable they are too unfinished and overpowered, so i just did them for personal use.
The problem i had back then was, that i could not bring the ai to attack my planeswalker at all if it didn't kill it with the attack, so it just ignored the pw most of the time. I didn't have time yet to test yours but your code is not that different from mine back then, so what are your experiences in this field?
And there was one other thing i noticed. When you let the opponent choose the planeswalker he wants to attack you are just filtering for enchantments, which would not allow for your walkers to be used with any other enchantment, because you could choose the non planeswalker enchantment instead. May i suggest you filtering for snow supertype and legendary supertype in addition to enchantment to identify your planeswalkers, because there is currently no legendary snow enchantment in the game (other then your planeswalkers ;) )? That would make them free to use with other enchantments.

To answer KENOGs questions:
If you give a card the planeswalker type it shows up in the deckmanager but not in game. Ingame you can't even see it in your hand, so giving it the planeswalker type is not possible as far as i can tell.
And protection from everything is not really needed for planeswalkers, because most effects that are not targeted and clear enchantments, would also effect planeswalkers. Things like Planar Cleansing for example. Most enchantment removal is targetted, so shroud or hexproof should suffice to protect our little walkers.
Aiodren
 
Posts: 45
Joined: 27 Jun 2012, 07:02
Has thanked: 5 times
Been thanked: 4 times

Re: gorem2k mod

Postby gorem2k » 12 Aug 2013, 11:37

Aiodren wrote:May i suggest you filtering for snow supertype and legendary supertype in addition to enchantment to identify your planeswalkers, because there is currently no legendary snow enchantment in the game (other then your planeswalkers ;) )? That would make them free to use with other enchantments.
This it what I've done yesterday.

using :

Code: Select all
      local filter = ClearFilter()
      local subfilter = filter:AddSubFilter_And()
       subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT )
        subfilter:Add( FE_SUPERTYPE, OP_IS, SUPERTYPE_LEGENDARY )
        subfilter:Add( FE_SUPERTYPE, OP_IS, SUPERTYPE_SNOW )
        subfilter:Add( FE_CONTROLLER, OP_IS, EffectController() )
        subfilter:Add( FE_ZONE, OP_IS, ZONE_BATTLEFIELD )
I still have to do some testing but it's getting tedious and time-consuming ! I wish I had some kind of special functions in a LOL just to reduce lines of code. they just keep getting bigger and bigger ! :lol:
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: gorem2k mod

Postby KENOG » 12 Aug 2013, 15:40

To Aiodren:

Ah, that makes sense. Therefore, I guess giving a 'Planeswalker' type is pointless, if the game won't recognize it in your hand, either. I was wondering though, could there be a way to code a 'Planeswalker' type into the game mechanics file (not the card .xml), such that Planeswalker uses the same conditions and status as that of 'Enchantments', so that if we tag a card as a 'Planeswalker' type, it would behave like it does with Gorem's cards now (as an Enchantment)? Because in essence 'Planeswalker = Enchantment' then?

To Gorem:

I found something wrong with 'Vraska The Unseen'. It's sub-type isn't showing as Vraska, but as a code itself. I checked the .xml, but don't think the problem's there. could you check it out?
KENOG
 
Posts: 22
Joined: 08 Aug 2013, 23:14
Has thanked: 3 times
Been thanked: 0 time

Re: gorem2k mod

Postby Aiodren » 12 Aug 2013, 15:45

Ah, that makes sense. Therefore, I guess giving a 'Planeswalker' type is pointless, if the game won't recognize it in your hand, either. I was wondering though, could there be a way to code a 'Planeswalker' type into the game mechanics file (not the card .xml), such that Planeswalker uses the same conditions and status as that of 'Enchantments', so that if we tag a card as a 'Planeswalker' type, it would behave like it does with Gorem's cards now (as an Enchantment)? Because in essence 'Planeswalker = Enchantment' then?
Correct me if i'm wrong but i think the card types are hardwired into the dopt.exe, so we have no way of altering them or creating new ones i'm afraid.
Aiodren
 
Posts: 45
Joined: 27 Jun 2012, 07:02
Has thanked: 5 times
Been thanked: 4 times

Re: gorem2k mod

Postby KENOG » 12 Aug 2013, 15:49

Haha, I don't really know about it :D . I was just making a theoretical suggestion. But most probably, you're right. If that's the case, then I guess there's nothing we can do for the time being, sadly.
KENOG
 
Posts: 22
Joined: 08 Aug 2013, 23:14
Has thanked: 3 times
Been thanked: 0 time

Re: gorem2k mod

Postby thefiremind » 12 Aug 2013, 16:12

Aiodren wrote:Correct me if i'm wrong but i think the card types are hardwired into the dopt.exe, so we have no way of altering them or creating new ones i'm afraid.
No, you can add all the sub-types you want. You need to do 2 things, plus an optional one:
  1. Find the sub-type list where you want to add a sub-type. They are in DATA_CORE\DATA_ALL_PLATFORMS\SPECS. For your needs, PLANESWALKER_TYPES.TXT is the right one. Copy it into your mod, keeping the folder structure intact (that means you'll have to make a SPECS folder), and add the missing sub-types to the copy, all in capitals.
  2. The sub-types you added will need localised text. Copy a TEXT_PERMANENT XML file from another mod (it will be shorter than the official ones, that's the only reason why I suggest to copy it from another mod), keeping the folder structure intact (that means you'll have to make a TEXT_PERMANENT folder if you aren't using it already in your mod), delete the original contents in your copy except for the first row (the one that lists the languages) and add your sub-types. Their internal name is always CARD_SUBTYPE_ plus the name you added in the TXT file, for example CARD_SUBTYPE_VRASKA. Just as a starting point you can write English in all languages, there's always time to put the translations later. If you do this with Excel it will be as easy as editing an Excel sheet; if you do this with Notepad, remember to update the ExpandedRowCount value to the number of rows you actually have in the file.
  3. (OPTIONAL) Look at this list and find the value of the last declared sub-type among those you need to edit. No Planeswalker is defined here, so if you want to do this, you need to give a value to all of them, both the existing ones and the ones you are going to add. So, make a FUNCTIONS folder in your mod (if there isn't one already) and create a LOL file there with Notepad or by copying an existing one (if you copy a LOL file, wipe it clean), then add the values in. The important thing is that you follow the order of the sub-types in the TXT file you copied. For example, this is how the existing Planeswalker sub-types' values should be defined:
    Code: Select all
    PLANESWALKER_TYPE_AJANI = PLANESWALKER_TYPES
    PLANESWALKER_TYPE_CHANDRA = PLANESWALKER_TYPE_AJANI + 1
    PLANESWALKER_TYPE_GARRUK = PLANESWALKER_TYPE_CHANDRA + 1
    PLANESWALKER_TYPE_JACE = PLANESWALKER_TYPE_GARRUK + 1
    PLANESWALKER_TYPE_LILIANA = PLANESWALKER_TYPE_JACE + 1
    I think you got the hang of it... each sub-type you add in your copy of the TXT file needs to be defined in the LOL file as well, and in the same sequence.
    Why is this optional? Because the constants are needed only when you need to check for one of those types inside the code. If you ever want to refine the check for the Planeswalkers' "legendary" rule, you might need this.
< 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: 717 times

Re: gorem2k mod

Postby Aiodren » 12 Aug 2013, 19:32

@firemind: i was aware you can add subtypes by using a lol file but does that work with types and supertypes too? i think kenog meant to create or finish the unfinished CARD_TYPE_PLANESWALKER, so it shows in game as the other types.
Aiodren
 
Posts: 45
Joined: 27 Jun 2012, 07:02
Has thanked: 5 times
Been thanked: 4 times

Re: gorem2k mod

Postby thefiremind » 12 Aug 2013, 21:00

I mixed up things, I don't know why but I ignored the quoting and I was thinking that you were referring to this:
KENOG wrote:I found something wrong with 'Vraska The Unseen'. It's sub-type isn't showing as Vraska, but as a code itself. I checked the .xml, but don't think the problem's there. could you check it out?
Anyway, CARD_TYPE_PLANESWALKER already shows up in game, the problem is that any card bearing that type goes immediately to the graveyard after entering the battlefield, no matter what other types you add.
< 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: 717 times

Re: gorem2k mod

Postby KENOG » 12 Aug 2013, 21:46

@Firemind: So my question is, can we create a new type called 'Planeswalker' (which would be considered a major unique type, like 'creature' or 'enchantment', for example), something that the game recognizes as valid, and so won't send to the graveyard when it enters the battlefield (You were right, that was what I meant, Aiodren)? Would the method you mentioned work in that case (so we could have a card that reads 'Planeswalker - Jace' for example, like the official cards, and also work properly, at the same time)? Or like Aiodren said, is that somehow integrated with the .exe, and impossible to implement? Kind of confused...
KENOG
 
Posts: 22
Joined: 08 Aug 2013, 23:14
Has thanked: 3 times
Been thanked: 0 time

Re: gorem2k mod

Postby thefiremind » 12 Aug 2013, 22:17

Sub-types and supertypes can be added, but about types, if I look into CARD_TYPES.TXT there's a comment that reads:
// The following types are built into Xylophone and thus this order
// must match the order of the enums in MTG_Types.h
which makes me think that Aiodren is right.
< 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: 717 times

Re: gorem2k mod

Postby KENOG » 12 Aug 2013, 22:43

So that clears it up. Thank you, Firemind.
KENOG
 
Posts: 22
Joined: 08 Aug 2013, 23:14
Has thanked: 3 times
Been thanked: 0 time

Re: gorem2k mod

Postby thefiremind » 14 Aug 2013, 12:52

I tried to add a new card type called "Planeswalker1", by adding PLANESWALKER1 to CARD_TYPES.TXT and by defining the CARD_TYPE_PLANESWALKER1 constant. Here's what I discovered:
  • You still need another existing type, because a card that only contains the new type will get stuck on the stack after the spell resolved.
  • The new type doesn't appear on the card (a "Planeswalker1 Enchantment" will still be seen as an "Enchantment").
  • The GetCardType():Test(...) function can check for the new type, but filters cannot. EDIT: Correction: the GetCardType():Test(...) function always returns true for the new type, while the filters always return false.
  • Despite being still defined, CARD_TYPE_PHENOMENON works the same as my new type. I guess it has been removed (partially or totally) from the executable.
So, a new type can actually be defined, but it's almost as if it weren't on the card.
< 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: 717 times

Re: gorem2k mod

Postby gorem2k » 14 Aug 2013, 15:17

thefiremind wrote:I tried to add a new card type called "Planeswalker1", by adding PLANESWALKER1 to CARD_TYPES.TXT and by defining the CARD_TYPE_PLANESWALKER1 constant. Here's what I discovered:
  • You still need another existing type, because a card that only contains the new type will get stuck on the stack after the spell resolved.
  • The new type doesn't appear on the card (a "Planeswalker1 Enchantment" will still be seen as an "Enchantment").
  • The GetCardType():Test(...) function can check for the new type, but filters cannot. EDIT: Correction: the GetCardType():Test(...) function always returns true for the new type, while the filters always return false.
  • Despite being still defined, CARD_TYPE_PHENOMENON works the same as my new type. I guess it has been removed (partially or totally) from the executable.
So, a new type can actually be defined, but it's almost as if it weren't on the card.
Interesting...

Of course, things would be better if a new unique type would be recognizable by the game. Making exceptions for enchantment is painful. Even with a correct type set up, it would be hard to code a perfectly working planeswalker.

I ran into another kind of problem. I decided to include a rumoured planeswalker (most possibly fake) from Theros called Elspeth Ascended. everything's fine except for the 6/6 token. it's supposed to have protection from all colors and when I cast Oblivion Ring, I can target it.

here's what I put in Token xml:

Code: Select all
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Protection from all colors]]></LOCALISED_TEXT>
    <CONTINUOUS_ACTION layer="6">
    if EffectSource() ~= nil then
       local filter = ClearFilter()
       filter:Add( FE_COLOUR, OP_IS, COLOUR_WHITE )
       filter:Add( FE_COLOUR, OP_IS, COLOUR_BLACK )
       filter:Add( FE_COLOUR, OP_IS, COLOUR_BLUE )
       filter:Add( FE_COLOUR, OP_IS, COLOUR_GREEN )
       filter:Add( FE_COLOUR, OP_IS, COLOUR_RED )
       EffectSource():Protection()
    end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
the badges are shown but it seems to not have protection... is Layer 6 ok? I had layer 0 first but had same results.

EDIT: nevermind. I found it. I had to add each color separated into a different CONTINUOUS_ACTION
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 7 guests


Who is online

In total there are 7 users online :: 0 registered, 0 hidden and 7 guests (based on users active over the past 10 minutes)
Most users ever online was 287 on 31 Mar 2019, 04:11

Users browsing this forum: No registered users and 7 guests

Login Form