It is currently 28 May 2025, 20:54
   
Text Size

Complete: Deck set assignment deck converter

Post MTG Forge Related Programming Questions Here

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

Re: WIP: Deck set assignment deck converter

Postby Xitax » 15 Mar 2012, 06:47

Bugfix version: link removed - old version.

-Fixed bad assignment of EVE to levelers
-Fixed bad assignment of EVE to cards from EVT (Elspeth vs. Tezzeret)

The following cards generated a Forge error even though they are in the sets assigned:
Thought Courier:9ED
Eager Cadet:S99
Concentrate:8ED
AEther Flash:7ED
Ambition's Cost:8ED
AEthersnipe:COM
Familiar Ground:7ED
Vengeance:9ED
Last edited by Xitax on 16 Mar 2012, 06:00, edited 1 time in total.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: WIP: Deck set assignment deck converter

Postby moomarc » 15 Mar 2012, 08:08

Xitax wrote:Bugfix version: http://www.mediafire.com/?p8r6saz14l08lnm

-Fixed bad assignment of EVE to levelers
-Fixed bad assignment of EVE to cards from EVT (Elspeth vs. Tezzeret)

The following cards generated a Forge error even though they are in the sets assigned:
Thought Courier:9ED
Eager Cadet:S99
Concentrate:8ED
AEther Flash:7ED
Ambition's Cost:8ED
AEthersnipe:COM
Familiar Ground:7ED
Vengeance:9ED
Just checked Vengeance and it appears that it was only available with the box sets in 8th and 9th Edition, actually having the 'Special' rarity for 8ED. I'm assuming the others are similar, but will check. Thanks Xitax!

The other senior devs should just decide whether we should add the set info to the cards if they were only in box sets. Edit: Nevermind. I see Eager Cadet had the same thing but had those added, so fixing em all....

Edit 2: Turns out that the other 6 were simply missing so I've added where necessary and committed. Vengeance was only available with the 8ED and 9ED box sets (listed as uncommon for 9eb and Special for 8eb). Same for Eager Cadet which is also listed as Special rarity for Starter 1999 and 2000.
The set info python script skips all those whereas mtg-data.txt lists them all as the rarity of the regular card (Vengeance-uncommon, Eager Cadet-common). Eager Cadet has the 9E det info in its script, but it was added by hand because if deleted and you run the script its left out. So I'm not sure what to do for these. I've added the missing sets in my local copy with rarities as listed on magiccards.info, so ready to commit if given the go-ahead.
-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: WIP: Deck set assignment deck converter

Postby Xitax » 15 Mar 2012, 15:34

Appreciate that you looked those up for me - if it were me I'd add them all as I have card pictures for them all, but if the devs don't want the two special cards added I'll have to restrict them by hand. That would be too bad as originally the program was designed to be maintenance-free as time goes on.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Complete: Deck set assignment deck converter

Postby Xitax » 16 Mar 2012, 02:21

OK, I think I've reached a nearly final version:
Download removed: new version.

-Fixed bug where a card was listed more than one time in a deckfile. Program now combines multiples into a single line before assigning sets.
-Added list function in case the user wants to see the deckfile before conversion.
-Distribution is now in .zip archive.

Instructions: Unzip into its own folder. Go get mtg-data.txt from /res and setdata.txt from /res/blockdata and place in same folder. Copy decks to convert into same folder, run program. There are several options within the program which should be self-explanatory. Output will be in subfolder /output, created if not present.
Last edited by Xitax on 16 Mar 2012, 05:59, edited 1 time in total.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Complete: Deck set assignment deck converter

Postby Xitax » 16 Mar 2012, 05:58

New bugfix: Wouldn't parse decks if there were trailing spaces after card names.

The program has and will successfully convert all quest and gos' constructed decks without error. There are some Forge errors with cards missing from sets where they should exist, but that's it.
Attachments
decksetfix.zip
(906.45 KiB) Downloaded 336 times
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Complete: Deck set assignment deck converter

Postby Xitax » 22 Mar 2012, 03:45

Has anyone tried it out? Have any comments or suggestions?
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Complete: Deck set assignment deck converter

Postby moomarc » 22 Mar 2012, 08:58

Xitax wrote:Has anyone tried it out? Have any comments or suggestions?
Just tried it and its awesome. So nice to not have to edit each precon manually to get everything to have the right set pic. Thanks Xitax!
-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: Complete: Deck set assignment deck converter

Postby Xitax » 08 May 2012, 01:38

It's broken with the new version of datafiles with 1.2.7. A quick look at mtg-data.txt reveals the reason why: they're now using many 2-letter set abbreviations and they don't match setdata.txt any more. Before I go off half-cocked and do something like hardcode the setdata in (the only solution that I can see), I'd like to ask what the intention is concerning these files?

For example I have "A" or "LEA" for alpha in setdata, and "1E" in mtg-data.txt. Thanks!

I suppose I should add that the reason that I'd hardcode the set data in is that if I use mtg-data.txt as the sole set resource I have to filter out by hand all the sets that Forge doesn't use so it comes to the same thing as hardcoding them in the conversion script. That is, unless I have a way to correlate the two, which right now I don't. :^o

EDIT: Well, one way to deal with it is to change the setinfo in mtg-data.txt to the 3-letter versions. Not too terribly difficult, though not ideal. :wink:

EDIT 2: Deleted link as mtg-text still has some errors - will fix soon.
Last edited by Xitax on 12 May 2012, 17:12, edited 1 time in total.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Complete: Deck set assignment deck converter

Postby friarsol » 08 May 2012, 03:12

I'm not sure why this change happened for mtg-data, I'll ask Arch since we're not the one who generates it. I noticed there's some funkiness in the PerSetTracking script related to the set data changing formats as well.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Complete: Deck set assignment deck converter

Postby 7Durandal7 » 12 May 2012, 05:37

Using that mtg-data.txt file works well. I did have an error with Mana Crypt. Couldn't be found in sets PLS, CFX or M12.
User avatar
7Durandal7
 
Posts: 15
Joined: 04 May 2012, 04:38
Has thanked: 7 times
Been thanked: 9 times

Re: Complete: Deck set assignment deck converter

Postby friarsol » 12 May 2012, 13:11

7Durandal7 wrote:Using that mtg-data.txt file works well. I did have an error with Mana Crypt. Couldn't be found in sets PLS, CFX or M12.
Mana Crypt is a Media Insert (in the early days of magic there were books with card giveaways in them, Mana Crypt was one of these). I'm not sure where you got the above sets as possibilities for it?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Complete: Deck set assignment deck converter

Postby 7Durandal7 » 12 May 2012, 14:33

friarsol wrote:Mana Crypt is a Media Insert (in the early days of magic there were books with card giveaways in them, Mana Crypt was one of these). I'm not sure where you got the above sets as possibilities for it?
I used xitax's posted mtg-data.txt, I'm guessing it's an error in that somewhere.
User avatar
7Durandal7
 
Posts: 15
Joined: 04 May 2012, 04:38
Has thanked: 7 times
Been thanked: 9 times

Re: Complete: Deck set assignment deck converter

Postby Xitax » 12 May 2012, 17:18

Ok, fixed a problem with 4ED, and changed the media promo code to MBP from PPC. Thanks, 7Durandal7!
Attachments
mtg-data.txt
(2.36 MiB) Downloaded 302 times
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Complete: Deck set assignment deck converter

Postby mark » 15 May 2012, 07:50

I try to use it with wine but it fails:
Code: Select all
Can't open file: No such file or directory at Z:\home\mark\opt\forge\forge-1.2.8\res\decks\constructed\decksetfix.exe line 9.

This exe file was created with the evaluation version of Perl2Exe.
could you also upload the original perl script, please?
mark
 
Posts: 138
Joined: 28 Dec 2011, 11:32
Has thanked: 6 times
Been thanked: 11 times

Re: Complete: Deck set assignment deck converter

Postby Xitax » 17 May 2012, 04:41

Here it is.
Attachments
Decksetfix.zip
(2.32 KiB) Downloaded 311 times
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 19 guests


Who is online

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

Login Form