Support for modern reprint/premium decks
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
16 posts
• Page 1 of 2 • 1, 2
Support for modern reprint/premium decks
by Max mtg » 02 Mar 2013, 01:01
There came an issue with cards referring to thier lastest reprint in duel decks or premium series sets,
viewtopic.php?p=111382#p111382
So, who would like to add all those sets and fill SetInfo(s) in card scripts, or should we just ignore these endless reprints?
Yet another reprint set is to be released in summer - http://www.wizards.com/Magic/Magazine/A ... rcana/1086
viewtopic.php?p=111382#p111382
So, who would like to add all those sets and fill SetInfo(s) in card scripts, or should we just ignore these endless reprints?
Yet another reprint set is to be released in summer - http://www.wizards.com/Magic/Magazine/A ... rcana/1086
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: Support for modern reprint/premium decks
by Xitax » 02 Mar 2013, 01:08
Meh. I don't prefer them. Besides, isn't memory for card pics already a bit of a problem?
Re: Support for modern reprint/premium decks
by friarsol » 02 Mar 2013, 01:13
We had been ignoring them. I'm not sure why we should start caring about them now? If someone on the dev team is really in favor of them, they could go around and add everything for them, but it's a lot of work for a gain I don't really see is worth the effort.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Support for modern reprint/premium decks
by Max mtg » 02 Mar 2013, 01:19
There's no memory problem, because card pictures are loaded into memory on demand.Xitax wrote:Besides, isn't memory for card pics already a bit of a problem?
The real problem is how AWT handles images. Looks like it attempts to cache every image somewhere internally. Once I tried to pass original images to Graphics.drawImage drawing card panels and got a tremendous increase in memory consumption - for just moving the mouse over cards in your hand. So I hope we'll switch someday to a 3D-battlefield backed by OpenGL (with jogl libs) and have videocard store and draw card images at desired positions.
But that is a different problem, so adding duel sets won't eat up any significant memory.
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: Support for modern reprint/premium decks
by Max mtg » 02 Mar 2013, 01:23
There is a single reprint set already in forge - Chronicles.friarsol wrote:We had been ignoring them. I'm not sure why we should start caring about them now? If someone on the dev team is really in favor of them, they could go around and add everything for them, but it's a lot of work for a gain I don't really see is worth the effort.
At first glance that 'lot of work' is limited by adding a line into setdata.txt and reassigning SetInfo to all cards... and restricting those reprint sets in quest mode.
And pictures - we'll have to donwload HQ pics for each edition when using MWS-style picture archive.
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: Support for modern reprint/premium decks
by friarsol » 02 Mar 2013, 01:43
It was specifically the Pictures that I thought would be the largest chunk of work. Adding all of the SetInfo could be a decent amount of work, depending on how friendly the SetInfoScript is to premium "sets".
I wouldn't really put Chronicles in the same category as premium decks though. At the time, it was treated as an extension of 4th edition, and cards in Chronicles were legal in Standard "Type 2" when the rest of Legends etc were not. This is not the case for FTV sets and Duel Decks.
I'm not saying if someone wants to do it they shouldn't, I'm just saying I don't see it being worth very much.
I wouldn't really put Chronicles in the same category as premium decks though. At the time, it was treated as an extension of 4th edition, and cards in Chronicles were legal in Standard "Type 2" when the rest of Legends etc were not. This is not the case for FTV sets and Duel Decks.
I'm not saying if someone wants to do it they shouldn't, I'm just saying I don't see it being worth very much.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Support for modern reprint/premium decks
by myk » 04 Mar 2013, 03:35
I started on restricting sets in quest mode here. Reprints can be excluded easily here too (also need to modify which sets are excluded in the DialogChooseSets when creating a custom format; perhaps we should add a unselectableTypes param as well).Max mtg wrote:and restricting those reprint sets in quest mode
- myk
- Posts: 439
- Joined: 17 Jan 2013, 02:39
- Location: California
- Has thanked: 38 times
- Been thanked: 57 times
Re: Support for modern reprint/premium decks
by Max mtg » 04 Mar 2013, 14:10
Ok, the recent script fecthes rarities from mtg-data.txt and moves those to the cards it finds. It writes most sets in SetInfo lines.
After 20044 forge looks setdata.txt for presence of each set mentioned at SetInfo lines and registers card only if a set was found.
After 20044 forge looks setdata.txt for presence of each set mentioned at SetInfo lines and registers card only if a set was found.
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: Support for modern reprint/premium decks
by friarsol » 04 Mar 2013, 14:56
Could you post examples for normal cards and cards with multiple printings in a Set? (Hymn to Tourach should be fine, or any basic land).Max mtg wrote:Ok, the recent script fecthes rarities from mtg-data.txt and moves those to the cards it finds. It writes most sets in SetInfo lines.
After 20044 forge looks setdata.txt for presence of each set mentioned at SetInfo lines and registers card only if a set was found.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Support for modern reprint/premium decks
by Max mtg » 04 Mar 2013, 17:06
Island - it's both normal and has multiple printings in some sets.
- Island | Open
- Code: Select all
Name:Island
ManaCost:no cost
Types:Basic Land Island
SVar:PicCount:4
SVar:Picture:http://resources.wizards.com/magic/cards/unh/en-us/card73951.jpg\http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=159281\http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=159282\http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=25964
Oracle:U
SetInfo:8ED Land x4
SetInfo:H09 Land
SetInfo:S99 Land x4
SetInfo:ZEN Land x8
SetInfo:COM Land x4
SetInfo:MRD Land x4
SetInfo:DDF Land x4
SetInfo:LEA Land x2
SetInfo:5ED Land x4
SetInfo:3ED Land x3
SetInfo:ISD Land x3
SetInfo:RAV Land x4
SetInfo:7ED Land x4
SetInfo:DD2 Land x4
SetInfo:DDJ Land x4
SetInfo:SOM Land x4
SetInfo:ROE Land x4
SetInfo:10E Land x4
SetInfo:M12 Land x4
SetInfo:TSP Land x4
SetInfo:RTR Land x5
SetInfo:PTK Land x3
SetInfo:TMP Land x4
SetInfo:POR Land x4
SetInfo:MBS Land x2
SetInfo:PO2 Land x3
SetInfo:2ED Land x3
SetInfo:S00 Land x2
SetInfo:CHK Land x4
SetInfo:9ED Land x4
SetInfo:LEB Land x3
SetInfo:DDI Land x3
SetInfo:DDE Land
SetInfo:HOP Land x4
SetInfo:INV Land x4
SetInfo:ICE Land x3
SetInfo:4ED Land x3
SetInfo:SHM Land x4
SetInfo:ONS Land x4
SetInfo:NPH Land x2
SetInfo:6ED Land x4
SetInfo:DDH Land
SetInfo:USG Land x4
SetInfo:MMQ Land x4
SetInfo:ODY Land x4
SetInfo:MIR Land x4
SetInfo:AVR Land x3
SetInfo:ALA Land x4
SetInfo:M11 Land x4
SetInfo:M10 Land x4
SetInfo:M13 Land x4
SetInfo:ARC Land x3
SetInfo:LRW Land x4
SetInfo:PC2 Land x5
- Mishra's Factory | Open
- Code: Select all
Name:Mishra's Factory
ManaCost:no cost
Types:Land
A:AB$ Mana | Cost$ T | Produced$ 1 | SpellDescription$ Add 1 to your mana pool.
A:AB$ Animate | Cost$ 1 | Defined$ Self | Power$ 2 | Toughness$ 2 | Types$ Artifact,Creature,Assembly-Worker | RemoveCreatureTypes$ True | SpellDescription$ CARDNAME becomes a 2/2 Assembly-Worker artifact creature until end of turn. It's still a land.
A:AB$ Pump | Cost$ T | ValidTgts$ Creature.Assembly-Worker | TgtPrompt$ Select target Assembly-Worker creature | NumAtt$ +1 | NumDef$ +1 | SpellDescription$ Target Assembly-Worker creature gets +1/+1 until end of turn.
SVar:Picture:http://resources.wizards.com/magic/cards/aq/en-us/card1074.jpg
Oracle:{T}: Add {1} to your mana pool.\n{1}: Mishra's Factory becomes a 2/2 Assembly-Worker artifact creature until end of turn. It's still a land.\n{T}: Target Assembly-Worker creature gets +1/+1 until end of turn.
SetInfo:ATQ Rare x4
SetInfo:4ED Uncommon
SetInfo:DDF Uncommon
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: Support for modern reprint/premium decks
by friarsol » 04 Mar 2013, 17:21
Thanks I'd normally just peek at the websvn but that hasn't been able to show cards of late.Max mtg wrote:Island - it's both normal and has multiple printings in some sets.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Support for modern reprint/premium decks
by Max mtg » 04 Mar 2013, 17:29
I did split the commit into several parts, but it doesn't help.friarsol wrote:Thanks I'd normally just peek at the websvn but that hasn't been able to show cards of late.
Now all we need - is an updated setdata.txt to support duel decks and all those 'fires and lightnings'
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: Support for modern reprint/premium decks
by friarsol » 05 Mar 2013, 01:32
Hey Max,
Why does your new assignSetInfo script write 12k files everytime it's run? I just ran it (because I scripted a new card) and I have 12k changed files now which is brutalizing TortoiseSVN on my laptop.
Edit: Just to clarify, the files themselves don't seem to have differences, but it still shouldn't write to every file unless it actually made a change, right?
Why does your new assignSetInfo script write 12k files everytime it's run? I just ran it (because I scripted a new card) and I have 12k changed files now which is brutalizing TortoiseSVN on my laptop.
Edit: Just to clarify, the files themselves don't seem to have differences, but it still shouldn't write to every file unless it actually made a change, right?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Support for modern reprint/premium decks
by Max mtg » 05 Mar 2013, 06:55
Simple enough.friarsol wrote:Hey Max,
Why does your new assignSetInfo script write 12k files everytime it's run? I just ran it (because I scripted a new card) and I have 12k changed files now which is brutalizing TortoiseSVN on my laptop.
Edit: Just to clarify, the files themselves don't seem to have differences, but it still shouldn't write to every file unless it actually made a change, right?
Originally I made this script to convert all files. The script has done well that task. Afterwards I ran it to add a set.
Though it overwrites all scripts, the resulting files on my PC match the source files (once they were converted) and tSVN does not suggest to commit them... so I never noticed tortoise being brutalized by that.
So, in case you want to skip any files, feel free to add some code that would parse existing file's setinfos, compare them with the setinfos to-be-assigned and 'continue' (the loop) if no write is needed.
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: Support for modern reprint/premium decks
by myk » 05 Mar 2013, 09:19
what, exactly is the difference in the files? is it just a line ending difference? If so, you could probably make some minor modifications to the script to keep the line endings consistent cross-platform. Another potential solution is marking each of the files in cardsfolder as svn:eol-style native.
- myk
- Posts: 439
- Joined: 17 Jan 2013, 02:39
- Location: California
- Has thanked: 38 times
- Been thanked: 57 times
16 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 30 guests