Magic-League.com Forum Index Magic-League.com
Forums of Magic-League: Free Online Magic: the Gathering Play with Apprentice and Magic Workstation; casual or tournament play.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Format of .dec file?


Goto page 1, 2  Next
 
Reply to topic    Magic-League.com Forum Index -> Apprentice
Author Message
snotRag



Joined: 11 Apr 2007
Posts: 1

PostPosted: Wed Apr 11, 2007 8:47 am    Post subject: Format of .dec file? Reply with quote

hi,

does anyone know the format of the .dec files? i'd like to parse them...

thanks
Back to top
kfcman



Joined: 16 Sep 2006
Posts: 665

PostPosted: Wed Apr 11, 2007 8:37 pm    Post subject: Reply with quote

ummm guy.... .dec files are Dec files
unless im misuderstanding what you mean by format
Back to top
Laplie
League Staff


Joined: 31 Aug 2004
Posts: 547

PostPosted: Wed Apr 11, 2007 9:05 pm    Post subject: Reply with quote

I think the format of the deckfiles is pretty obvious if you just look at them (in notepad or your favorite text editor). Comments/headings begin with "//". Otherwise its just the quantity of the card followed by the card name.
Back to top
Jorbes



Joined: 14 Feb 2006
Posts: 277
Location: Netherland

PostPosted: Thu Apr 12, 2007 5:04 am    Post subject: Reply with quote

I think he means the binary versions, not the plain text ones, as they are too simple Razz

I have the code to parse them in pascal, i can post it here if you need it.

edit: LIES LIES LIES!! I can't post it, but I can link to it! Smile


Last edited by Jorbes on Fri Aug 10, 2007 1:51 am; edited 1 time in total
Back to top
karthic



Joined: 09 Aug 2007
Posts: 2

PostPosted: Thu Aug 09, 2007 4:10 pm    Post subject: Reply with quote

would you please post that code?
i'm also trying to read the dec file format, and having problems


thanks
Back to top
Jorbes



Joined: 14 Feb 2006
Posts: 277
Location: Netherland

PostPosted: Fri Aug 10, 2007 1:50 am    Post subject: Reply with quote

karthic wrote:
would you please post that code?
i'm also trying to read the dec file format, and having problems
thanks


Uhm, I can't really _post_ the code, cause it's spread over 2 pascal units, but I'll try to remember to put up a link here to those 2 files (packed in .zip)

If it's not here by this weekend, PM me on the site or irc (jb^3)
Back to top
Jorbes



Joined: 14 Feb 2006
Posts: 277
Location: Netherland

PostPosted: Fri Aug 10, 2007 9:22 am    Post subject: Reply with quote

url:

http://www.project-go.net/downloads/ApprLibs.zip

Tech Support is not available this weekend, Im rather busy Razz
Back to top
karthic



Joined: 09 Aug 2007
Posts: 2

PostPosted: Fri Aug 10, 2007 10:38 am    Post subject: Reply with quote

your awsome,..
also, do you know how to read the .trd file
or cards.dat?

i'm tryin to make a new feature for my website
www.mtgostats.com

thanks so much
Back to top
Jorbes



Joined: 14 Feb 2006
Posts: 277
Location: Netherland

PostPosted: Fri Aug 10, 2007 4:20 pm    Post subject: Reply with quote

karthic wrote:
your awsome,..
also, do you know how to read the .trd file
or cards.dat?

i'm tryin to make a new feature for my website
www.mtgostats.com

thanks so much


nope, btw, i did not write that code, it came straight from the guy that wrote apprentice.

good luck!
Back to top
Search88921



Joined: 29 Nov 2007
Posts: 2

PostPosted: Thu Nov 29, 2007 4:35 am    Post subject: Reply with quote

How can I turn the below into a dec?

//NAME: G Aggro
SB: 4 Eyes of the Wisent
SB: 4 Pyroclasm
SB: 4 Mwonvuli Acid-Moss
SB: 3 Krosan Grip
40 Pendelhaven
20 Horizon Canopy
Back to top
ant900



Joined: 11 Oct 2004
Posts: 2480
Location: somewhere

PostPosted: Thu Nov 29, 2007 7:42 am    Post subject: Reply with quote

Search88921 wrote:
How can I turn the below into a dec?

//NAME: G Aggro
SB: 4 Eyes of the Wisent
SB: 4 Pyroclasm
SB: 4 Mwonvuli Acid-Moss
SB: 3 Krosan Grip
40 Pendelhaven
20 Horizon Canopy

add .dec to the end of the file name?
Back to top
Search88921



Joined: 29 Nov 2007
Posts: 2

PostPosted: Thu Nov 29, 2007 2:50 pm    Post subject: Reply with quote

ant900 wrote:
Search88921 wrote:
How can I turn the below into a dec?

//NAME: G Aggro
SB: 4 Eyes of the Wisent
SB: 4 Pyroclasm
SB: 4 Mwonvuli Acid-Moss
SB: 3 Krosan Grip
40 Pendelhaven
20 Horizon Canopy

add .dec to the end of the file name?


No, it didn't work for me.

Can someone please help? It'd save me a LOT of time.
Back to top
iKe



Joined: 14 Dec 2005
Posts: 524
Location: New York

PostPosted: Thu Nov 29, 2007 3:09 pm    Post subject: Reply with quote

karthic wrote:
your awsome,..
also, do you know how to read the .trd file
or cards.dat?

i'm tryin to make a new feature for my website
www.mtgostats.com

thanks so much


Good way to advertise your website Wink
Back to top
gushatog



Joined: 19 Jan 2007
Posts: 63

PostPosted: Thu Nov 29, 2007 3:16 pm    Post subject: Reply with quote

Search88921 wrote:
How can I turn the below into a dec?

//NAME: G Aggro
SB: 4 Eyes of the Wisent
SB: 4 Pyroclasm
SB: 4 Mwonvuli Acid-Moss
SB: 3 Krosan Grip
40 Pendelhaven
20 Horizon Canopy

Make it legal
Back to top
ObservantOwl



Joined: 23 Nov 2006
Posts: 4

PostPosted: Sat Jul 05, 2008 10:07 pm    Post subject: Reply with quote

The following is an example deck that shows the template for making text decks. To open them in Apprentice, just click the open for how you would a normal .dec file, but change the "Files of type:" option to "All Files (*.*)" but make sure to only open properly formatted .txt files, as opening anything else could potentially crash the program/have undesired results. To have custom cards (like with the "input card" function) just replace the name with your card name.

Code:
//NAME: Example Deck
//To use this example, just copy the lines and replace the names with the names of your cards.
        20 Mountain
        20 Island
        20 Plains
        20 Swamp
        20 Forest
SB:  4 Mana Prism


EDIT: Darn spelling errors.
Back to top
Display posts from previous:   
Reply to topic    Magic-League.com Forum Index -> Apprentice All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 


Powered by phpBB © 2001, 2005 phpBB Group
Magic: the Gathering Cards

All content on this page may not be reproduced without consent of Magic-League Directors.
Magic the Gathering is TM and copyright Wizards of the Coast, Inc, a subsidiary of Hasbro, Inc. All rights reserved.


About Us | Contact Us | Privacy Policy