Forge Custom Sealed Deck?
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
18 posts
• Page 1 of 2 • 1, 2
Forge Custom Sealed Deck?
by RumbleBBU » 21 Aug 2012, 11:47
With the current Manalink's Sealed Deck support being a bit unpredictable, I'm looking for alternatives, i.e., computerized versions that let me play Sealed Deck against the computer A.I.
I have now tried Forge and BotArena, both of which have an impressive list of cards and some sort of Sealed Deck mode.
It seems to me that, functionally, Forge is closer to the kind of Sealed Deck play I want (aside from not having a tournament tree - and if there is a way to save and exit the game in the middle of play, I haven't found it yet).
However, just one big problem. I can't figure out how to use Custom Sealed Deck mode.
I like the option of being able to pick the block you want to play Sealed Deck in. But sometimes I would like to try something crazy, like the current environment with an Arabian Nights booster pack thrown in. Presumably the Custom Sealed Deck mode might allow this. But how?
I tried to build a 'Cube' and put it in the relevant directory with the '.sealed' extension. Result: Now Forge crashes when I select 'Custom' Sealed Deck.
Can anyone point me to some 'for dummies' instructions of how to use Custom Sealed Deck mode?
I have now tried Forge and BotArena, both of which have an impressive list of cards and some sort of Sealed Deck mode.
It seems to me that, functionally, Forge is closer to the kind of Sealed Deck play I want (aside from not having a tournament tree - and if there is a way to save and exit the game in the middle of play, I haven't found it yet).
However, just one big problem. I can't figure out how to use Custom Sealed Deck mode.
I like the option of being able to pick the block you want to play Sealed Deck in. But sometimes I would like to try something crazy, like the current environment with an Arabian Nights booster pack thrown in. Presumably the Custom Sealed Deck mode might allow this. But how?
I tried to build a 'Cube' and put it in the relevant directory with the '.sealed' extension. Result: Now Forge crashes when I select 'Custom' Sealed Deck.
Can anyone point me to some 'for dummies' instructions of how to use Custom Sealed Deck mode?
Re: Forge Custom Sealed Deck?
by RumbleBBU » 21 Aug 2012, 15:03
And wait...one further question.
In Sealed Deck Mode, the computer gets the same exact deck as you do? (Instead of getting a different set cards from similar packs and building a deck from them.)
If so, that is...so not good.
In Sealed Deck Mode, the computer gets the same exact deck as you do? (Instead of getting a different set cards from similar packs and building a deck from them.)
If so, that is...so not good.

Re: Forge Custom Sealed Deck?
by mcrawford620 » 21 Aug 2012, 23:13
No, this is not true. The computer builds a deck from his own packs of cards.RumbleBBU wrote:In Sealed Deck Mode, the computer gets the same exact deck as you do? (Instead of getting a different set cards from similar packs and building a deck from them.)
Right now, every time you use that Sealed Deck, the computer will always play the same deck. In order to get a different AI deck, you have to create a new Sealed Deck for yourself. I've been thinking about this recently -- is that how it should work? Or should the AI get a different deck every time you start a match with your Sealed Deck?
Actually probably your suggestion of implementing a little 8-person tournament is the right way to go, but that's a much bigger project. There's no way to have the AI play itself currently.
I don't know the answer to your first question, though, about why the Custom Sealed version crashes on you. I would guess it's because there's an error in your custom cube, but I haven't tried it so I can't say for sure what it might be or if the feature works in general.
- mcrawford620
- Posts: 112
- Joined: 25 Jun 2012, 16:59
- Has thanked: 55 times
- Been thanked: 25 times
Re: Forge Custom Sealed Deck?
by RumbleBBU » 22 Aug 2012, 06:16
That does not seem to be the case. At least when I choose the 'Full Cardpool' Sealed Deck option (which, to my understanding, should make it very unlikely that the computer gets the same exact selection of cards as you do), it seems that the computer builds its deck from same card selection as you do. Well, yes, the computer may not have constructed an exact copy of my playdeck, but all cards I see computer play are exactly the same ones that were available to me when I built my deck, even the Rares/Mythic Rares! Just how likely is that?mcrawford620 wrote:No, this is not true. The computer builds a deck from his own packs of cards.RumbleBBU wrote:In Sealed Deck Mode, the computer gets the same exact deck as you do? (Instead of getting a different set cards from similar packs and building a deck from them.)
I see the same happen in Block Mode, too.
I suspect that there is bug here (maybe the computer's Sealed Deck card distribution is not randomized properly?) - or I'm doing something wrong and just don't know what, yet.
(Regarding RNG seed initialization and speaking from personal experience as a game programmer, I would point out that there is a specific danger related to clock-based seed initialization. If you initialize the RNG based on clock value, the do some instructions, and initialize the RNG again, the second seed could be the same as the first one, if not enough time passed between the two RNG initializations. Entirely possible on modern computers, I've seen it happen. In such cases, it is normally better to avoid unnecessary RNG initializations. For example, initialize the RNG when the player starts the game, and then don't initialize again while program is running...
However, I have not looked at the Forge source code so I can't really tell if this is what is happening here. Just a possibility.)
Glad to hear that it is not the intended behavior, though, so I can hope not to see it in the future!

The latter option would be greatly preferred! That would make it feel more like a real Sealed Deck tournament...mcrawford620 wrote:Right now, every time you use that Sealed Deck, the computer will always play the same deck. In order to get a different AI deck, you have to create a new Sealed Deck for yourself. I've been thinking about this recently -- is that how it should work? Or should the AI get a different deck every time you start a match with your Sealed Deck?
I believe my poor understanding of how to build a Custom Sealed version is to blame. I'm doing something wrong and just don't know what. Or how to build a working Custom Sealed 'cube' or whatever in the first place.mcrawford620 wrote:I don't know the answer to your first question, though, about why the Custom Sealed version crashes on you. I would guess it's because there's an error in your custom cube, but I haven't tried it so I can't say for sure what it might be or if the feature works in general.
Is there any documentation/instructions available anywhere?
Thank you for taking the time reply, greatly appreciated!
Re: Forge Custom Sealed Deck?
by Chris H. » 22 Aug 2012, 10:27
RumbleBBU wrote:(Regarding RNG seed initialization and speaking from personal experience as a game programmer, I would point out that there is a specific danger related to clock-based seed initialization. If you initialize the RNG based on clock value, the do some instructions, and initialize the RNG again, the second seed could be the same as the first one, if not enough time passed between the two RNG initializations. Entirely possible on modern computers, I've seen it happen. In such cases, it is normally better to avoid unnecessary RNG initializations. For example, initialize the RNG when the player starts the game, and then don't initialize again while program is running...
However, I have not looked at the Forge source code so I can't really tell if this is what is happening here. Just a possibility.)
Forge:How to Get Started Developing Forge

-
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: Forge Custom Sealed Deck?
by RumbleBBU » 22 Aug 2012, 11:18
Me and my big mouth. 
In the meantime, I have actually figured out how to build cubes for Sealed Deck. The MTGO Cube thread (on the same page) contained the critical info I had been missing - I had skipped one vital step, hence the crashes. Now I've got a working test cube, I just need to adjust the parameters to get the correct number of cards for a Sealed match.
But the fundamental issue persists - in Sealed Deck mode, the computer seems to always get the same cards as I do (even if it builds a slightly different deck).

In the meantime, I have actually figured out how to build cubes for Sealed Deck. The MTGO Cube thread (on the same page) contained the critical info I had been missing - I had skipped one vital step, hence the crashes. Now I've got a working test cube, I just need to adjust the parameters to get the correct number of cards for a Sealed match.
But the fundamental issue persists - in Sealed Deck mode, the computer seems to always get the same cards as I do (even if it builds a slightly different deck).
Re: Forge Custom Sealed Deck?
by Sloth » 22 Aug 2012, 12:07
Fixed! Thanks RumbleBBU.RumbleBBU wrote:But the fundamental issue persists - in Sealed Deck mode, the computer seems to always get the same cards as I do (even if it builds a slightly different deck).
And this was just the case for the "Full" option, Block and Custom didn't have this error (please correct me if not).
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Forge Custom Sealed Deck?
by friarsol » 22 Aug 2012, 14:17
Did I hear someone was interested in joining the Forge dev team? I think I did! Welcome aboardRumbleBBU wrote:(Regarding RNG seed initialization and speaking from personal experience as a game programmer, I would point out that there is a specific danger related to clock-based seed initialization.....
However, I have not looked at the Forge source code so I can't really tell if this is what is happening here. Just a possibility.)

- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Forge Custom Sealed Deck?
by RumbleBBU » 22 Aug 2012, 14:26
I'm afraid the problem (computer getting the same cards as I do) does affect the other Sealed Deck modes as well. I'm currently experiencing it with my spanking-new Custom Mode 'Arabian Ice Cube'. And I remember experiencing it yesterday in Block Mode as well.
But I believe I've found a workaround:
Start two Sealed Deck games with the same cardset options. Build your deck in one of them, then manually copy the computer's deck file (ai-1.dck) from the other one.
Should work, no?
But I believe I've found a workaround:
Start two Sealed Deck games with the same cardset options. Build your deck in one of them, then manually copy the computer's deck file (ai-1.dck) from the other one.
Should work, no?
Re: Forge Custom Sealed Deck?
by Sloth » 22 Aug 2012, 18:31
I've tested all modes and the AI always used cards that weren't in my pool. So grab the next snapshot build as soon as it is released.RumbleBBU wrote:I'm afraid the problem (computer getting the same cards as I do) does affect the other Sealed Deck modes as well. I'm currently experiencing it with my spanking-new Custom Mode 'Arabian Ice Cube'. And I remember experiencing it yesterday in Block Mode as well.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Forge Custom Sealed Deck?
by Chris H. » 22 Aug 2012, 19:12
Sloth wrote:I've tested all modes and the AI always used cards that weren't in my pool. So grab the next snapshot build as soon as it is released.RumbleBBU wrote:I'm afraid the problem (computer getting the same cards as I do) does affect the other Sealed Deck modes as well. I'm currently experiencing it with my spanking-new Custom Mode 'Arabian Ice Cube'. And I remember experiencing it yesterday in Block Mode as well.
forge-1.2.12-20120822.185031-10.tar.bz2
forge-1.2.12-20120822.185031-10-osx.tar.bz2
-
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: Forge Custom Sealed Deck?
by RumbleBBU » 23 Aug 2012, 09:09
So I built my uber-Cube and maybe added a few too many cards to it, causing an overflow or something. When I now try to run Sealed games with it, I get totally random cards. But never mind...
I've just realized that there is a much more effective way to get the exact Sealed cardset combo I want. The block info is stored in a file (res/blockdata/blocks.txt), and you can modify it. I've already added a couple of fantasy block sets (at new indices), and they work. One of them is actually labeled "Unlimited Power" (you'll never guess which sets I put in it
.
Which got me thinking. Why choose from only 3 sets per block (other than because it's how official blocks work) - why not have the option of building 4, 5 or 6 set fantasy blocks? So you could play a Sealed Deck game that consisted of 6 different cardsets!
So I took a quick look around in svn.slightlymagic.net/forge/trunk/src with my browser. It would seem to me that you would only need to modify two files to enable 4-6 cardset "blocks":
In card/CardBlock.java:
And:
So...
In game/limited/SealedDeckFormat.java:
After
(And what do I know, ayway, the last time I even touched Java was several years ago.)
Anybody want to give this a try?
I've just realized that there is a much more effective way to get the exact Sealed cardset combo I want. The block info is stored in a file (res/blockdata/blocks.txt), and you can modify it. I've already added a couple of fantasy block sets (at new indices), and they work. One of them is actually labeled "Unlimited Power" (you'll never guess which sets I put in it

Which got me thinking. Why choose from only 3 sets per block (other than because it's how official blocks work) - why not have the option of building 4, 5 or 6 set fantasy blocks? So you could play a Sealed Deck game that consisted of 6 different cardsets!
So I took a quick look around in svn.slightlymagic.net/forge/trunk/src with my browser. It would seem to me that you would only need to modify two files to enable 4-6 cardset "blocks":
In card/CardBlock.java:
- Code: Select all
final List<CardEdition> sets = new ArrayList<CardEdition>(4);
And:
- Code: Select all
else if ("set0".equals(key) || "set1".equals(key) || "set2".equals(key))
- Code: Select all
else if ("set0".equals(key) || "set1".equals(key) || "set2".equals(key) || "set3".equals(key) || "set4".equals(key) || "set5".equals(key))
So...
In game/limited/SealedDeckFormat.java:
After
- Code: Select all
if (sets.length >= 3) {
setCombos.add(String.format("%s/%s/%s/%s/%s/%s", sets[2], sets[2], sets[2], sets[0], sets[0], sets[0]));
setCombos.add(String.format("%s/%s/%s/%s/%s/%s", sets[2], sets[2], sets[1], sets[1], sets[0], sets[0]));
}
- Code: Select all
if (sets.length >= 4) {
setCombos.add(String.format("%s/%s/%s/%s/%s/%s", sets[3], sets[2], sets[1], sets[0], sets[0], sets[0]));
setCombos.add(String.format("%s/%s/%s/%s/%s/%s", sets[3], sets[2], sets[1], sets[1], sets[0], sets[0]));
}
if (sets.length >= 5) {
setCombos.add(String.format("%s/%s/%s/%s/%s/%s", sets[4], sets[3], sets[2], sets[1], sets[0], sets[0]));
}
if (sets.length >= 6) {
setCombos.add(String.format("%s/%s/%s/%s/%s/%s", sets[5], sets[4], sets[3], sets[2], sets[1], sets[0]));
}

Anybody want to give this a try?
Re: Forge Custom Sealed Deck?
by Sloth » 23 Aug 2012, 10:56
Can you post your cube and/or the error message?RumbleBBU wrote:So I built my uber-Cube and maybe added a few too many cards to it, causing an overflow or something. When I now try to run Sealed games with it, I get totally random cards. But never mind...
It works. I've added it to the SVN version. Thanks RumbleBBU.RumbleBBU wrote:I've just realized that there is a much more effective way to get the exact Sealed cardset combo I want. The block info is stored in a file (res/blockdata/blocks.txt), and you can modify it. I've already added a couple of fantasy block sets (at new indices), and they work. One of them is actually labeled "Unlimited Power" (you'll never guess which sets I put in it.
...
Anybody want to give this a try?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Forge Custom Sealed Deck?
by moomarc » 23 Aug 2012, 12:39
Would you mind posting your cube and fantasy blocks here? Would be nice to have access to a few good custom 'presets'.
-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: Forge Custom Sealed Deck?
by mcrawford620 » 23 Aug 2012, 16:53
That's a funny bug where the AI gets the exact same cards you do, and it's true that it was affecting regular block sealed as well -- I just experienced it. I guess I never noticed it because I never chose the same colors as the computer, but this time I did.
Yesterday I was playing around with a Door to Nothingness sealed deck, which is just sort of a "can I possibly get this to work" thing. I almost had the AI a couple of times, but he had not one but two Torch Fiend cards to kill the Door just when I was going to win.
Yesterday I was playing around with a Door to Nothingness sealed deck, which is just sort of a "can I possibly get this to work" thing. I almost had the AI a couple of times, but he had not one but two Torch Fiend cards to kill the Door just when I was going to win.

- mcrawford620
- Posts: 112
- Joined: 25 Jun 2012, 16:59
- Has thanked: 55 times
- Been thanked: 25 times
18 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 40 guests