WIP: Quest deck cosmetic revamp of basic lands
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
25 posts
• Page 1 of 2 • 1, 2
WIP: Quest deck cosmetic revamp of basic lands
by Agetian » 11 Feb 2012, 13:45
Hello guys,
It's been a while since I did anything Forge-related, time to fix that a little bit.
I've been working on a little something for a while and I'm curious if it would be of any interest to the team - in particular, I found it a bit weird that every quest opponent that you're facing in Forge has a complete set of fancy-looking awesome new Zendikar lands, no matter what cards he has in his deck - everyone uses Zendikar lands. My little project aims to fix that, and I'm applying a simple algorithm that in my opinion makes sense: first, I check to see which set is the most modern set from which the cards exist in the deck, and then I change the set of basic lands to the set which is the closest in time to the identified set in which the basic lands actually exist (so basically, if the deck utilizes cards that are as modern as Magic 2010 but not any newer, the basic lands in the deck will use the M10 set (instead of Zendikar). If the cards are only as new as 7th Edition, then the basic lands will be from the 7ED set, etc. It's a purely cosmetic change but it makes sense to me. If it's of interest to the general public, I'll publish the revamped deck files once I'm done (and possibly the software I'm using to change the decks - it's currently a bit rough on the edges and still not 100% crash-proof).
Best regards and good luck with Forge!
It's been a while since I did anything Forge-related, time to fix that a little bit.

Best regards and good luck with Forge!
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: WIP: Quest deck cosmetic revamp of basic lands
by moomarc » 11 Feb 2012, 14:35
+1 - I'm always a fan of cosmetic changes!
-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: WIP: Quest deck cosmetic revamp of basic lands
by Max mtg » 11 Feb 2012, 20:32
This change will make useless the lands you obtain during quest, moreover - player won't be able to fit custom lands into his deck then.
If one has earned some how the pretty zendikar lands and has them in his inventory and decks, so once he adds a spell from Innistrad, will all of his lands be auto-converted to ISD set ones?
If one has earned some how the pretty zendikar lands and has them in his inventory and decks, so once he adds a spell from Innistrad, will all of his lands be auto-converted to ISD set ones?
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: WIP: Quest deck cosmetic revamp of basic lands
by Sloth » 11 Feb 2012, 21:39
Agetian is talking about lands in the opponents deck.Max mtg wrote:This change will make useless the lands you obtain during quest, moreover - player won't be able to fit custom lands into his deck then.
If one has earned some how the pretty zendikar lands and has them in his inventory and decks, so once he adds a spell from Innistrad, will all of his lands be auto-converted to ISD set ones?
I just want to throw in that some of the decks have basic lands with a set info (like "Forest|SOM") those should be untouched by this algorithm.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: WIP: Quest deck cosmetic revamp of basic lands
by Max mtg » 12 Feb 2012, 03:28
Oh, i got the idea.
It's impossible to distinguish, whether the set was explicitly set, after the deck is loaded. When it is, each card is assigned a set. By which rules? That is to be investigated.
It's impossible to distinguish, whether the set was explicitly set, after the deck is loaded. When it is, each card is assigned a set. By which rules? That is to be investigated.
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: WIP: Quest deck cosmetic revamp of basic lands
by Agetian » 12 Feb 2012, 04:32
@ Max mtg: Yep, like Sloth said, it only concerns the opponents' basic lands (and specifically the ones that have not yet been assigned a set by the deck creator). Players' lands will be left untouched.
As far as the algorithm in Forge goes that auto-assigns the set if no set info is specified, I haven't looked at the code but it looks like it just assigns the set code that is the latest alphabetically and contains the given card (so, Plains etc. are from Zendikar cause Zendikar [ZEN] starts with a Z). That's my idea of it, at least.
[btw, while we're talking about player's lands - is there really a way to obtain non-M10 basic lands in quest mode? The card shop always sells M10 ones, and I don't think you get basic lands for winning battles, at least I haven't seen that happen ever in my questing... did I miss something?
)
@ Sloth: Yep, the decks that already have set definitions are not touched in any way.



@ Sloth: Yep, the decks that already have set definitions are not touched in any way.
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: WIP: Quest deck cosmetic revamp of basic lands
by timmermac » 12 Feb 2012, 05:00
If you buy boosters in the card shop, especially from the more recent sets, there's a basic land in each pack. I'm hoping for the addition of starter/tournament packs for those sets that had them, so that we can get other basic lands in as well for added variety.Agetian wrote:@ Max mtg: Yep, like Sloth said, it only concerns the opponents' basic lands (and specifically the ones that have not yet been assigned a set by the deck creator). Players' lands will be left untouched.As far as the algorithm in Forge goes that auto-assigns the set if no set info is specified, I haven't looked at the code but it looks like it just assigns the set code that is the latest alphabetically and contains the given card (so, Plains etc. are from Zendikar cause Zendikar [ZEN] starts with a Z). That's my idea of it, at least.
[btw, while we're talking about player's lands - is there really a way to obtain non-M10 basic lands in quest mode? The card shop always sells M10 ones, and I don't think you get basic lands for winning battles, at least I haven't seen that happen ever in my questing... did I miss something?
)
@ Sloth: Yep, the decks that already have set definitions are not touched in any way.
"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
Re: WIP: Quest deck cosmetic revamp of basic lands
by Max mtg » 12 Feb 2012, 05:38
That's correct.Agetian wrote:As far as the algorithm in Forge goes that auto-assigns the set if no set info is specified, I haven't looked at the code but it looks like it just assigns the set code that is the latest alphabetically and contains the given card (so, Plains etc. are from Zendikar cause Zendikar [ZEN] starts with a Z). That's my idea of it, at least.
When CardDb returns a CardPrinted from getCard(name) function, it looks in "uniqueCards" map, which is filled with that edition of each card which came last from "setsData" map iteration (setsData in defined in class CardRuleCharacteristics). The TreeMap provides "natural ordering of its keys", so that iteration returns them ordered. That is why undefined set of lands turns into Zendikar.
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: WIP: Quest deck cosmetic revamp of basic lands
by Agetian » 12 Feb 2012, 08:10
OK, here's the zip file with the modded decks - the ones which already had set definitions are untouched, and the ones which did not now have sets assigned according to the algorithm above (mostly it turned out to be various modern sets, between 9th Edition and the latest, due to the reprints - but still, it adds variety to the AI decks and it's not all fancy ZEN
). Now, a little problem: even though the algorithm is intrinsically non-destructive, you never know where it could have in theory gone wrong. I playtested over 30 decks yesterday and did not have any issues, but I can hardly playtest all ~400... is there any checking mechanism or a test unit or something that can be used to assert that all the deck files are still valid? (they should be, I'm 99% sure that they are, but if there's a possibility to auto-test them for validity, it's probably a good idea to do it now). At any rate, playtesting reports are welcome.
Have fun!
P.S. This folder ("decks") goes into "quest", not the regular "decks" (I'm sure the dev team knows this perfectly, but this is in case someone else wants to playtest).


P.S. This folder ("decks") goes into "quest", not the regular "decks" (I'm sure the dev team knows this perfectly, but this is in case someone else wants to playtest).
- Attachments
-
decks_lands_mod.zip
- (167.82 KiB) Downloaded 254 times
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: WIP: Quest deck cosmetic revamp of basic lands
by Sloth » 12 Feb 2012, 10:28
Some of your deck lists are out of date. Please grab the latest SVN version before you modify them.Agetian wrote:OK, here's the zip file with the modded decks - the ones which already had set definitions are untouched, and the ones which did not now have sets assigned according to the algorithm above (mostly it turned out to be various modern sets, between 9th Edition and the latest, due to the reprints - but still, it adds variety to the AI decks and it's not all fancy ZEN). Now, a little problem: even though the algorithm is intrinsically non-destructive, you never know where it could have in theory gone wrong. I playtested over 30 decks yesterday and did not have any issues, but I can hardly playtest all ~400... is there any checking mechanism or a test unit or something that can be used to assert that all the deck files are still valid? (they should be, I'm 99% sure that they are, but if there's a possibility to auto-test them for validity, it's probably a good idea to do it now). At any rate, playtesting reports are welcome.
Have fun!
P.S. This folder ("decks") goes into "quest", not the regular "decks" (I'm sure the dev team knows this perfectly, but this is in case someone else wants to playtest).
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: WIP: Quest deck cosmetic revamp of basic lands
by Agetian » 12 Feb 2012, 12:29
@ Sloth: Oh, sorry - I didn't think about actually grabbing the SVN so I did the 1.2.3 decks.
Anyway, here's the same mod for the latest (at the moment of writing) SVN revision 13980. Hope it's OK this time! 


- Attachments
-
svn13980_decks_land_mod.zip
- (165.81 KiB) Downloaded 223 times
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: WIP: Quest deck cosmetic revamp of basic lands
by Chris H. » 12 Feb 2012, 12:43
For awhile things got a little hectic with the change from SVN to GIT and then back to a different SVN.
Following the instructions found on our current wiki will allow you to pull the most recent versions of the quest decks.
http://www.slightlymagic.net/wiki/Forge:How_to_Get_Started_Developing_Forge
Once you are set up you can request commit status and it is fairly easy to grant this status.
You can place the modded decks files into the /res/decks/ folder and then start up forge. You will get a dialog at start up if forge can not handle one or more of these modded deck files. The testing is fairly minimal.
Following the instructions found on our current wiki will allow you to pull the most recent versions of the quest decks.

http://www.slightlymagic.net/wiki/Forge:How_to_Get_Started_Developing_Forge
Once you are set up you can request commit status and it is fairly easy to grant this status.

You can place the modded decks files into the /res/decks/ folder and then start up forge. You will get a dialog at start up if forge can not handle one or more of these modded deck files. The testing is fairly minimal.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: WIP: Quest deck cosmetic revamp of basic lands
by Agetian » 12 Feb 2012, 12:55
@ Chris H: Hmm that's what I did when I pulled SVN 13980... did I pull the wrong thing then? (that was the revision that got checked out when I followed the steps at "How to get started developing Forge" just now -- from svn.slightlymagic.net, that is (not from GIT or old SVN). :\ If it's still wrong, then I'm confused. 

- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: WIP: Quest deck cosmetic revamp of basic lands
by Chris H. » 12 Feb 2012, 13:22
`Agetian wrote:@ Chris H: Hmm that's what I did when I pulled SVN 13980... did I pull the wrong thing then? (that was the revision that got checked out when I followed the steps at "How to get started developing Forge" just now -- from svn.slightlymagic.net, that is (not from GIT or old SVN). :\ If it's still wrong, then I'm confused.
I think that everything is OK.

You were able to pull the most recent versions of the quest decks, mod them and then post an updated archive ...
while I was slowly writing my response to your earlier message. So you were in essence following my advice before I could even post it.

Let me know if you want commit status, I can add you to the list of devs.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: WIP: Quest deck cosmetic revamp of basic lands
by Sloth » 12 Feb 2012, 13:30
I went ahead and submitted your deck lists. Thanks Agetian.Agetian wrote:@ Sloth: Oh, sorry - I didn't think about actually grabbing the SVN so I did the 1.2.3 decks.Anyway, here's the same mod for the latest (at the moment of writing) SVN revision 13980. Hope it's OK this time!
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
25 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 54 guests