It is currently 16 Apr 2024, 14:49
   
Text Size

My take on EDH (Commander) in 2014

Moderator: CCGHQ Admins

My take on EDH (Commander) in 2014

Postby MC Brodie » 09 May 2014, 19:22

For the most part I have a working version of EDH or commander for 2014 (list of rules here). I'm using a manager token to handle most things and the Exile zone to stand in for the Command Zone. I can appropriately track commander damage, make someone lose if they have 21 points or more of commander damage, increase the cost of the commander, set the starting life to 40, etc. I haven't incorporated the Partial Paris Mulligan rule and I'm not sure if I will.

I've run into a few things that I am unsure of how to deal with and would like to poll the community to get your thoughts.

Somewhat larger issues:
  • Showing players commander damage - The only easy way I can think to do this is through an activated ability. Use an activated ability, choose a player then the game will display a message showing the chosen player's commander damage. I currently have commanders labeled "Commander 1", "Commander 2", etc. so they can be more easily identified. To minimize problems with cards that shut down or punish you for using activated abilities I was thinking of trying to control it with the invisible manager token. I was going to have the manager token grant an ability to show commander damage to some card (most likely a land or a card in the graveyard). Then each turn (or phase or when state based actions are checked) the manager token evaluates if current card is still a good target (i.e., can still activate the ability) and move the ability to a different card if needed. Does anyone else have a better idea? Is something like this worth it?
  • Replacement effect for moving a Commander to the Command Zone instead of Graveyard - I've come up with the code below to cover this replacement effect. I used a MAY tag with the "always_prompt" attribute to cover the optional part but the game isn't giving a choice. If the Commander goes to the graveyard the ability just kicks in and it is exiled.
    | Open
    Code: Select all
      <TRIGGERED_ABILITY replacement_effect="1">
         <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_ANY">
       local commander = MCE_GetCommander( EffectController() )
       return commander ~= nil and TriggerObject() ~= nil and commander == TriggerObject()
       </TRIGGER>
       <MAY tag="CARD_QUERY_COMMANDER_GRAVEYARD" always_prompt="1" />
       <RESOLUTION_TIME_ACTION>
       local commander = MCE_GetCommander( EffectController() )
        if commander ~= nil then
           commander:Exile()   
        end
        </RESOLUTION_TIME_ACTION>
      </TRIGGERED_ABILITY>
Somewhat minor issues:
  • Using the Exile zone as the sole replacement for the Command Zone - In what I have right now there is no difference between Exile and the Command Zone. I'm not sure if this is an actual issue and cause problems with other cards. An easy fix would be to track when the commander is in the command zone in a data chest. I just don't have a lot of free time to mod (and I'm lazy too :D ) so I don't feel like implementing it unless I have to.

I'm sure I have other questions/issues but I'm done for the day. Thanks for any help.
-----------------------------------------------------------------------
Song of the Day: 46 and 2 (cover)
MC Brodie
 
Posts: 310
Joined: 01 Jun 2013, 00:10
Has thanked: 44 times
Been thanked: 34 times

Re: My take on EDH (Commander) in 2014

Postby RiiakShiNal » 09 May 2014, 21:48

MC Brodie wrote:For the most part I have a working version of EDH or commander for 2014 (list of rules here). I'm using a manager token to handle most things and the Exile zone to stand in for the Command Zone. I can appropriately track commander damage, make someone lose if they have 21 points or more of commander damage, increase the cost of the commander, set the starting life to 40, etc. I haven't incorporated the Partial Paris Mulligan rule and I'm not sure if I will.

I've run into a few things that I am unsure of how to deal with and would like to poll the community to get your thoughts.

Somewhat larger issues:
  • Showing players commander damage - The only easy way I can think to do this is through an activated ability. Use an activated ability, choose a player then the game will display a message showing the chosen player's commander damage. I currently have commanders labeled "Commander 1", "Commander 2", etc. so they can be more easily identified. To minimize problems with cards that shut down or punish you for using activated abilities I was thinking of trying to control it with the invisible manager token. I was going to have the manager token grant an ability to show commander damage to some card (most likely a land or a card in the graveyard). Then each turn (or phase or when state based actions are checked) the manager token evaluates if current card is still a good target (i.e., can still activate the ability) and move the ability to a different card if needed. Does anyone else have a better idea? Is something like this worth it?
The only card I can think of right now that punishes for activating an ability is Burning-Tree Shaman and if you have the ability masquerade as a mana ability Burning-Tree Shaman will ignore it (look at any card with a manual mana ability).

MC Brodie wrote:
  • Replacement effect for moving a Commander to the Command Zone instead of Graveyard - I've come up with the code below to cover this replacement effect. I used a MAY tag with the "always_prompt" attribute to cover the optional part but the game isn't giving a choice. If the Commander goes to the graveyard the ability just kicks in and it is exiled.
    | Open
    Code: Select all
      <TRIGGERED_ABILITY replacement_effect="1">
         <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_ANY">
       local commander = MCE_GetCommander( EffectController() )
       return commander ~= nil and TriggerObject() ~= nil and commander == TriggerObject()
       </TRIGGER>
       <MAY tag="CARD_QUERY_COMMANDER_GRAVEYARD" always_prompt="1" />
       <RESOLUTION_TIME_ACTION>
       local commander = MCE_GetCommander( EffectController() )
        if commander ~= nil then
           commander:Exile()   
        end
        </RESOLUTION_TIME_ACTION>
      </TRIGGERED_ABILITY>
Of course you won't be asked about this ability, because you have it marked as a replacement_effect, replacement_effect abilities ignore the MAY tag because player's can't control those. You will need to make it replacement_query and actually ask the question inside the ability (you won't be able to use the MAY tag).

MC Brodie wrote:Somewhat minor issues:
  • Using the Exile zone as the sole replacement for the Command Zone - In what I have right now there is no difference between Exile and the Command Zone. I'm not sure if this is an actual issue and cause problems with other cards. An easy fix would be to track when the commander is in the command zone in a data chest. I just don't have a lot of free time to mod (and I'm lazy too :D ) so I don't feel like implementing it unless I have to.
Yes, this will be a problem if you do not implement that otherwise you will have people re-casting their commander (even though they shouldn't be able to) once an Oblivion Ring or something is used on it.
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 496 times

Re: My take on EDH (Commander) in 2014

Postby Blue Ghost » 31 Jul 2014, 05:28

I've been meaning to start working on commander for 2014, and then I see that someone has already been doing it. Would you be able to share what you have so far? If there are any issues, I can try to help with them (though being less experienced, I probably won't be able to help much).
Blue Ghost
 
Posts: 52
Joined: 07 Apr 2013, 20:41
Has thanked: 6 times
Been thanked: 0 time

Re: My take on EDH (Commander) in 2014

Postby sweetLu » 01 Aug 2014, 20:33

Try this. I haven't looked at it in awhile. Here are some notes to help out.

  • I'm positive I made things extremely more complicated than what they needed. That's what you will get from someone who doesn't know programming/scripting. So good luck :) .
  • I got most of the rules implemented. There are only I few I didn't get to yet (like the mulligan rule). When I stopped, I was trying to distinguish between exile and the command zone. I was using something simple like checking an integer in a chest (e.g., 0 = not in command zone, 1 = in command zone). However, when I did this, I ended up breaking my code. So when you start you'll probably need to start there. If it's too much of a problem I can probably go in and take out those pieces that I tried so you at least will have a (somewhat) working version.
  • As for showing Commander Damage, I was going to grant an activated ability to some card (you might be able to do it to the commander itself) to check commander damage. When activated I was going to have it bring up a select player prompt. When you click that player the game will display the damage each commander has dealt to that player. I believe I have the display message part working correctly so you would only have to grant that ability to some card. I would still be hesitant to giving it to the commander though incase the commander gets hit by Arrest or similar type card. Then there is also the problem of Grand Abolisher and checking commander damage on your opponent's turn. I don't know if there is a good way around that.
  • As for making commanders, I was trying to keep that simple. People could copy and paste an already created legendary creature then add in one block of code that calls a bunch of functions. I was thinking it would be best to use functions incase something needed changed or tweaked down the road. That way you could just update the functions LOL file and people wouldn't have to modify each commander. I made one commander to do my testing. It is included in the download.
  • You may want to download TFM's DLC. I believe I used some of his cards in the test deck I included in the download. Alternatively you could just modify the test deck.


I hope you'll be able to finish it out. Best of luck to you. If things don't go well, I might pick it up again depending on how it goes with modding 2015 and if I get any more inspiration for this project (but I definitely wouldn't count on it).

On a side note, if we have to use the overwrite method to mod 2015 using invisible tokens becomes less attractive since it takes up a card spot :( .
Attachments
Magic 2014 - EDH.rar
(229.15 KiB) Downloaded 566 times
sweetLu
 
Posts: 181
Joined: 16 Jul 2014, 01:24
Has thanked: 21 times
Been thanked: 22 times

Re: My take on EDH (Commander) in 2014

Postby Blue Ghost » 17 Aug 2014, 23:23

Thanks so much! I've been playing around with it. Here's my version with the changes I made, if you're interested.

--Added the ability to show commander damage to the commander. I couldn't figure out how to get it to work in all zones, so I made a crude hack that grants an instance of the ability in exile and another instance on the battlefield.
--The cost increase function now checks if the commander is in exile, since the command zone hasn't been implemented. This fixes a bug in which the cost would not increase if the commander is exiled directly.
--Changed the ability that moves the commander to the command zone to a replacement_query, since it was not giving the option otherwise.
--For some reason, the line EffectController():LoseGame() in the commander damage function was crashing the game. I have no idea why, or how to fix it, so I approximated it by having it set the controller's life to 0 instead. Now it works fine.
--Added a function that adds counters to the commander when it's exiled, as a visual cue to track how many times it's been cast. As far as I know, there aren't any cards that interact with counters in exile (except time counters), so it hopefully shouldn't break anything.
Attachments
Magic 2014 - EDH.zip
(236.07 KiB) Downloaded 503 times
Blue Ghost
 
Posts: 52
Joined: 07 Apr 2013, 20:41
Has thanked: 6 times
Been thanked: 0 time

Re: My take on EDH (Commander) in 2014

Postby thefiremind » 18 Aug 2014, 10:06

Blue Ghost wrote:For some reason, the line EffectController():LoseGame() in the commander damage function was crashing the game.
I can't guarantee that it works, but try to remove <TOKEN /> from the manager. It solved crashing issues on my Planeswalkers manager, so it might work for you, 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: My take on EDH (Commander) in 2014

Postby Blue Ghost » 01 Sep 2014, 02:51

I've encountered another issue. In a multiplayer game with four players, all using commander decks, the game crashes when one player loses. It doesn't happen with less than four players, or if there are any noncommander decks present. Has this come up for you?

Permission to publish decks using your commander functions?
Blue Ghost
 
Posts: 52
Joined: 07 Apr 2013, 20:41
Has thanked: 6 times
Been thanked: 0 time

Re: My take on EDH (Commander) in 2014

Postby sweetLu » 01 Sep 2014, 09:03

Yea sure.I still plan on looking into it at some point of time.
sweetLu
 
Posts: 181
Joined: 16 Jul 2014, 01:24
Has thanked: 21 times
Been thanked: 22 times

Re: My take on EDH (Commander) in 2014

Postby Blue Ghost » 12 Oct 2014, 04:29

The commander setup crashes the game in multiplayer when there's more than one commander deck involved. Any idea how I can go about testing/fixing this?
Blue Ghost
 
Posts: 52
Joined: 07 Apr 2013, 20:41
Has thanked: 6 times
Been thanked: 0 time

Re: My take on EDH (Commander) in 2014

Postby migookman » 27 Aug 2015, 06:33

I've recently been checking this out. In order to get it to work I had to convert to use the CW cards. I'm curious about a few things:

1) Can a deck have 100 cards? I tried searching here but had better luck on google. The answer wasn't exactly clear. Some said no that 60 cards was max and some said that it was possible but some code to cards needed to be added.
2) Can commander cards/decks be uploaded to the Community Wad? If so, how should the naming conventions be?
3) Is having a casting cost of {0} necessary for the commanders? I see that Azusa has that casting cost but normally she is {2}{G}.

If 100 cards wouldn't be possible, maybe a variant of Tiny Leaders could be implemented since it has the commander + 59 cards. EDH and Tiny Leaders have probably been my most favorite formats and to see DOTP be able to handle those formats would be awesome.
User avatar
migookman
 
Posts: 135
Joined: 05 Aug 2014, 06:37
Has thanked: 21 times
Been thanked: 28 times

Re: My take on EDH (Commander) in 2014

Postby Xander9009 » 27 Aug 2015, 06:46

1: Decks can have 100 cards (that's the max). If they have 60 or more, they need to be set in the deck builder to not add any basic land, though, because it always tries to fill the deck to exactly 60 using basic lands. When it does this with a deck already at or above 60, it glitches and leaves the user with 255 cards (all the extras being basic lands). To be fair, the max MIGHT be 99. And you MIGHT be able to have more than 100 if you don't try to modify it with the in-game deck manager. I'm not certain. But I've made decks with 80 cards. And I recall a warning in-game with the number 100.

2: I certainly don't care if they're uploaded, but they definitely go in a different folder. As for the naming, I'm not sure. I'd say just add (EDH) to the end of the deck name. This will make it appear in-game and it'll show up as EDH at the end of all the deck's filenames.

I've added a new folder for these. Obviously it won't get any use unless you or someone else gets this working, but it's there. It's next to the normal decks folder.

EDIT: Just tested it to be sure, and yes, you can play a game with 100 cards. (It even did pretty pretty well for a deck that was literally just grabbing one copy of every green mythic I found and filling in the gaps with random legendaries... Then again, it was a deck entirely made of mythics and legendaries... lol).
_______________________________
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: My take on EDH (Commander) in 2014

Postby RiiakShiNal » 27 Aug 2015, 11:04

  1. The maximum cards that the game will support for a deck is 100 (though you can get above that with some basic lands), this was done to support the game's base decks (60 cards + 30 regular unlocks + 10 promos = 100). The best configuration for a 100 card deck is to make a deck of roughly 60 cards as the base deck then the additional cards needed in the regular unlocks. When you customize a deck with the 60+40 configuration (which is what the game was designed to handle) it is possible to get above 100 cards due to the basic lands that can be configured/added when adding unlocks to the base deck. DotP supported up to a maximum of 127 unique cards in a deck, but DotP 2014 has a hard-coded id cap at 100 (even though the number of bits used allows up to 127 ids).
  2. Xander9009 is the authority for this question so refer to his answer.
  3. having a cost of {0} should not be necessary (in fact that is counter to the rules), but it may have been done for testing purposes.
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 496 times

Re: My take on EDH (Commander) in 2014

Postby migookman » 03 Sep 2015, 12:45

Was just doing some testing with a few decks 1-vs-1 with the AI.

https://www.youtube.com/watch?v=YtFmznE-ND0
User avatar
migookman
 
Posts: 135
Joined: 05 Aug 2014, 06:37
Has thanked: 21 times
Been thanked: 28 times

Re: My take on EDH (Commander) in 2014

Postby Xander9009 » 03 Sep 2015, 14:38

It's looking good. At least in a 1v1.
_______________________________
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: My take on EDH (Commander) in 2014

Postby migookman » 04 Sep 2015, 03:33

Had a good game with 3 decks working (me -vs- 2 AI opponents). It seems that mono-colored decks load the manager quite well but multi-colored decks takes several tries to load each player meaning that the commander doesn't go into the exile zone. I have to restart the match several times for it to get all commanders to show. I was thinking of putting some of the functions in the card itself instead of relying so much on the EDH manager (or possibly most).
User avatar
migookman
 
Posts: 135
Joined: 05 Aug 2014, 06:37
Has thanked: 21 times
Been thanked: 28 times

Next

Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 10 guests


Who is online

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

Login Form