It is currently 16 Apr 2024, 12:13
   
Text Size

Implementing variants

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Implementing variants

Postby 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.
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
User avatar
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

Postby 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 {R}
Rhys the Exiled {BG}
Thelon of Havenwood {BG}
Memnarch {U}
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

Postby 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
User avatar
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

Postby friarsol » 18 Nov 2012, 14:43

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.
I've never played either format, I just thought they were separate decks. I guess it could work that way too.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Implementing variants

Postby 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
User avatar
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

Postby Max mtg » 18 Nov 2012, 23:03

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).
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.

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.
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.

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.
2. you'll need a new IStorage<Deck> for that different deck types.
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

Postby friarsol » 19 Nov 2012, 00:35

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.
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.

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

Postby Hellfish » 19 Nov 2012, 06:48

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.
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. :)

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.


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.
2. you'll need a new IStorage<Deck> for that different deck types.
Okay, thanks, I will look into that once I get to planes/schemes.
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
User avatar
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

Postby moomarc » 19 Nov 2012, 07:39

This is making me very happy! =D> 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.
-Marc
User avatar
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

Postby 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
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
User avatar
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

Postby Max mtg » 19 Nov 2012, 08:55

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.
Commander was requested. The amount of changes is manageable.

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

Postby moomarc » 19 Nov 2012, 09:21

Max mtg wrote:Commander was requested. The amount of changes is manageable.
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.
-Marc
User avatar
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

Postby moomarc » 19 Nov 2012, 11:49

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
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.
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. =D>
-Marc
User avatar
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

Postby 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. :)
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
User avatar
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

Postby moomarc » 19 Nov 2012, 15:28

Hellfish wrote:Sounds really useful but I think the attachment was missed. ;)

Also , I already took a pass over existing effects and emblems. :)
Haha! I'm special like that. =P~

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). :mrgreen:

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 312 times
Vanguard.zip
(6.96 KiB) Downloaded 316 times
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Next

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 50 guests


Who is online

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

Login Form