Implementing variants
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Implementing variants
by Hellfish » 18 Nov 2012, 12:13
So as I mentioned, I've managed to make the Command zone matter for emblems/effects and am now working to implement other aspects of variants. So far I've modded the Deck class to add sections for the special cards (Vanguards,Schemes,Planes,Commanders.They're treated as empty if they don't exist in the deck file) and added restriction checks to meetsGameTypeRequirements(Except for Commander color identity,don't know how to do that).
I am now tinkering with PlayerStartCondition,GameNew and MatchController to enforce life and handsize alterations for Vanguard, as well as having the avatar directly added to your command zone.
Some semi-related questions:
1.What might we have to change to make LQ pics and Oracle text work with the nontraditional cards?
2.I could use some help/pointers on what to do for the homescreen for variants.Right now I just use a checkbox on the constructed screen to indicate that I'm using Vanguard decks..
3.Same thing with the deck editor, I'm currently manually hacking deck files..
I will create a branch later today or tomorrow evening at the latest.
I am now tinkering with PlayerStartCondition,GameNew and MatchController to enforce life and handsize alterations for Vanguard, as well as having the avatar directly added to your command zone.
Some semi-related questions:
1.What might we have to change to make LQ pics and Oracle text work with the nontraditional cards?
2.I could use some help/pointers on what to do for the homescreen for variants.Right now I just use a checkbox on the constructed screen to indicate that I'm using Vanguard decks..
3.Same thing with the deck editor, I'm currently manually hacking deck files..
I will create a branch later today or tomorrow evening at the latest.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Implementing variants
by friarsol » 18 Nov 2012, 13:58
As far as color identity goes, we can probably get away with just using the casting cost/card color and adding a "ColorIdentity" line for the guys that can't use it. That way we don't need to actually parse through ability text to determine it.
Here's the list of cards that have a different Color Identity than actual color:
Bosh, Iron Golem
Rhys the Exiled
Thelon of Havenwood
Memnarch
Daughter of Autumn {WG}
As far as Vanguard and Commander goes, you can only have one of these types in your deck. So maybe this is a special label on the top of your deck "Add/Change Commander" "Add/Change Vanguard" that after it's set, is listed instead of being inside the actual Table.
When attempting to save a deck, we may want to run it through meetsGameTypeRequirements right away so there isn't confusion of accidentally adding cards that don't work.
For Planechase and Archenemy, the whole deck consists of Plane or Scheme cards, so when creating a new deck we can include those as the type of deck to create, and then set the filters to only be for that specific type. (Although we should probably just have default Planechase and Archenemy decks so people can play without needing to build their own, and I can't tell if you are supposed to build your own for this anyway)
Here's the list of cards that have a different Color Identity than actual color:
Bosh, Iron Golem
Rhys the Exiled
Thelon of Havenwood
Memnarch
Daughter of Autumn {WG}
As far as Vanguard and Commander goes, you can only have one of these types in your deck. So maybe this is a special label on the top of your deck "Add/Change Commander" "Add/Change Vanguard" that after it's set, is listed instead of being inside the actual Table.
When attempting to save a deck, we may want to run it through meetsGameTypeRequirements right away so there isn't confusion of accidentally adding cards that don't work.
For Planechase and Archenemy, the whole deck consists of Plane or Scheme cards, so when creating a new deck we can include those as the type of deck to create, and then set the filters to only be for that specific type. (Although we should probably just have default Planechase and Archenemy decks so people can play without needing to build their own, and I can't tell if you are supposed to build your own for this anyway)
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Implementing variants
by Hellfish » 18 Nov 2012, 14:34
Hmm, I was working on the assumption that each deck file would have all it's planes/other extra cards contained within itself, since each player should have his/her own planar/scheme(for supervillain rumble) deck.Hence the extra sections.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Implementing variants
by friarsol » 18 Nov 2012, 14:43
I've never played either format, I just thought they were separate decks. I guess it could work that way too.Hellfish wrote:Hmm, I was working on the assumption that each deck file would have all it's planes/other extra cards contained within itself, since each player should have his/her own planar/scheme(for supervillain rumble) deck.Hence the extra sections.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Implementing variants
by Hellfish » 18 Nov 2012, 22:22
Quick update: I've managed to create a homescreen for Vanguard that sets up the works after running into a bit of threading shenanigans. I'll hopefully create a branch tomorrow night, though that's looking a bit shaky.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Implementing variants
by Max mtg » 18 Nov 2012, 23:03
Schemas and planes should be CardPrinted's. Will help with adjustents to my classes if needed.Hellfish wrote:So as I mentioned, I've managed to make the Command zone matter for emblems/effects and am now working to implement other aspects of variants. So far I've modded the Deck class to add sections for the special cards (Vanguards,Schemes,Planes,Commanders.They're treated as empty if they don't exist in the deck file) and added restriction checks to meetsGameTypeRequirements(Except for Commander color identity,don't know how to do that).
Their collections might really come as extra deck sections.
Vanguards are not supported.
I've told already, that vanguard is not a good idea at all.Hellfish wrote:I am now tinkering with PlayerStartCondition,GameNew and MatchController to enforce life and handsize alterations for Vanguard, as well as having the avatar directly added to your command zone.
Implementing commander would be much easier, cause you specify a commander card as part of deck which is already in that class.
2. you'll need a new IStorage<Deck> for that different deck types.Hellfish wrote:Some semi-related questions:
1.What might we have to change to make LQ pics and Oracle text work with the nontraditional cards?
2.I could use some help/pointers on what to do for the homescreen for variants.Right now I just use a checkbox on the constructed screen to indicate that I'm using Vanguard decks..
3.Same thing with the deck editor, I'm currently manually hacking deck files..
I will create a branch later today or tomorrow evening at the latest.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Implementing variants
by friarsol » 19 Nov 2012, 00:35
I disagree. Commander has so many in game complications as well as Deck editor complications. For Vanguard you just choose your Vanguard (either within the deck editor or just as the game is starting if being inside the deck wouldn't work, although I can't see how that would be any different than having a commander section). Vanguard only affects your starting life, starting/max hand size and has some other SpellAbility.Max mtg wrote:I've told already, that vanguard is not a good idea at all.
Implementing commander would be much easier, cause you specify a commander card as part of deck which is already in that class.
As opposed to keeping track of where your Commander is, revealing it in certain zones and sending it back to the Command Zone. Keeping track of how many times it was cast, Keeping track of how much combat damage its dealt to each player. Partial paris. Plus all the wonkiness with Color Identity. I just don't see how having Vanguard change starting life and starting/max hand size is more complex than any of that.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Implementing variants
by Hellfish » 19 Nov 2012, 06:48
Oh yeah, that's what I was going for. I've already modded CardRules for all that was necessary for Vanguards. (Reading a HandLifeModifier field in the same manner as P/T.)This was the easy part.Max mtg wrote:Schemas and planes should be CardPrinted's. Will help with adjustents to my classes if needed.
Their collections might really come as extra deck sections.
Vanguards are not supported.
As for Vanguards in decks, I've backpedaled a bit on that and gone with Sol's suggestion of choosing the Vanguard before each match, which also lets you combine it with any constructed deck you may already have without alot of C&P to create vanguard/non-vanguard versions of the deck.
Okay, thanks, I will look into that once I get to planes/schemes.2. you'll need a new IStorage<Deck> for that different deck types.Hellfish wrote:Some semi-related questions:
1.What might we have to change to make LQ pics and Oracle text work with the nontraditional cards?
2.I could use some help/pointers on what to do for the homescreen for variants.Right now I just use a checkbox on the constructed screen to indicate that I'm using Vanguard decks..
3.Same thing with the deck editor, I'm currently manually hacking deck files..
I will create a branch later today or tomorrow evening at the latest.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Implementing variants
by moomarc » 19 Nov 2012, 07:39
This is making me very happy! Thanks Hellfish!
If you need a hand getting some test Vanguards, give me a template to work with and I'll throw a few of them together.
If you need a hand getting some test Vanguards, give me a template to work with and I'll throw a few of them together.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Implementing variants
by Hellfish » 19 Nov 2012, 08:38
The format is much like any other card, Type:Vanguard,Cost: no cost and just make sure any ability you give it functions from the command zone. For the handsize and life bit use HandLifeModifier:<Hand>/<Life>
I guess it's better to leave SetInfo and Oracle for now.
Edit:Also name it like on gatherer i.e. Diamond Faerie Avatar
I guess it's better to leave SetInfo and Oracle for now.
Edit:Also name it like on gatherer i.e. Diamond Faerie Avatar
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Implementing variants
by Max mtg » 19 Nov 2012, 08:55
Commander was requested. The amount of changes is manageable.friarsol wrote:As opposed to keeping track of where your Commander is, revealing it in certain zones and sending it back to the Command Zone. Keeping track of how many times it was cast, Keeping track of how much combat damage its dealt to each player. Partial paris. Plus all the wonkiness with Color Identity. I just don't see how having Vanguard change starting life and starting/max hand size is more complex than any of that.
Zone changes might be managed by adding (hidden?) abilities to commander card.
Keep track of commander damage and number of casts - yes, there should be 2 variables added and extra lose condition check.
Color identity check can be performed by actual codebase (yet, checks for ability costs are missing)
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Implementing variants
by moomarc » 19 Nov 2012, 09:21
Vanguard was also requested, but there's just been more frequent requests for Commander lately because it's the newer (and admittedly more popular variant). And it's just a starting point anyway and I'm just glad someone with the skill has finally managed to devote some time to adding it. I'm sure the other variants will follow soon after anyway.Max mtg wrote:Commander was requested. The amount of changes is manageable.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Implementing variants
by moomarc » 19 Nov 2012, 11:49
Attached are a few samples to work with for further testing. I just started with 'A' and did the first five that could be done without additional code. Quite handily they cover avatars with Triggered abilities, static abilities and activated abilities. For ActivationZone, TriggerZones and EffectZone I used Command, so if the zone is named something else you'll need to adjust it. It did make me realise that making Effects use the command zone might mean some scripts need to have their scripts adjusted to ensure that they trigger of can be activated etc.Hellfish wrote:The format is much like any other card, Type:Vanguard,Cost: no cost and just make sure any ability you give it functions from the command zone. For the handsize and life bit use HandLifeModifier:<Hand>/<Life>
I guess it's better to leave SetInfo and Oracle for now.
Edit:Also name it like on gatherer i.e. Diamond Faerie Avatar
- So you'll have: | Open
- Arcbound Overseer Avatar
Ashling the Pilgrim Avatar
Ashnod
Barrin
Birds of Paradise Avatar
I also included a revised version of cardTemplateScript.py that will parse Vanguard cards and handle the HandLifeModifier line.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Implementing variants
by Hellfish » 19 Nov 2012, 12:39
Sounds really useful but I think the attachment was missed.
Also , I already took a pass over existing effects and emblems.
Also , I already took a pass over existing effects and emblems.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Implementing variants
by moomarc » 19 Nov 2012, 15:28
Haha! I'm special like that.Hellfish wrote:Sounds really useful but I think the attachment was missed.
Also , I already took a pass over existing effects and emblems.
Anyway, this time I'll actually attach something and throw in Crovax and Eladamri for the inconvenience (Eladamri might need additional zone control for the triggers in the effect created).
EDIT: Looks like the Oracle script added the Oracle text to those last two. Delete if necessary.
EDIT2: Added another 4 avatar scripts and fixed the LQ image link for Eladamri.
- Attachments
-
- Vanguard_moreAvatars1.zip
- Chronatog Avatar, Dauntless Escort Avatar, Diamond Faerie Avatar and Eladamri, Lord of Leaves Avatar
- (2.93 KiB) Downloaded 315 times
-
- Vanguard.zip
- (6.96 KiB) Downloaded 319 times
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Who is online
Users browsing this forum: No registered users and 49 guests