It is currently 16 Apr 2024, 17:52
   
Text Size

Work In Progress: Card and Deck viewer

Moderator: CCGHQ Admins

Work In Progress: Card and Deck viewer

Postby jmp » 07 Dec 2010, 00:09

I saw a post on here the other day about someone writing a program to view cards, but it was never released so I figured I would take a shot at it.

What I am trying to achieve (C# project):
Image
1. A simple scanner that pulls the data from the xml files
2. A nice card data viewer (search/filter/sorting/etc)
3. A way to download images (if anyone has the code to create the images on the fly please share)
4. Local database to store images and card data (SqlCE)
5. Deck Editor
Image

I have some more testing to do... but I will post a beta in the next couple of days...
jmp
 
Posts: 25
Joined: 06 Dec 2010, 23:53
Has thanked: 0 time
Been thanked: 0 time

Re: Work In Progress: Card and Deck viewer

Postby Bog Wraith » 07 Dec 2010, 00:46

A true deck editor would be magnificent! The one thing we are lacking is the ability to create our own decks in this fashion.

The screenshots look very promising. I look forward to testing this baby out! 8)
'Twas in the bogs of Cannelbrae
My mate did meet an early grave
'Twas nothing left for us to save
In the peat-filled bogs of Cannelbrae.
User avatar
Bog Wraith
Global Mod 1 (Ret)
 
Posts: 1108
Joined: 28 May 2008, 22:40
Location: Shandalar
Has thanked: 425 times
Been thanked: 153 times

Re: Work In Progress: Card and Deck viewer

Postby jmp » 07 Dec 2010, 11:46

Updates:
1. Figured out the TDX format, collecting the fonts, should have auto-generated images complete soon.
2. Database sharing errors have been fixed. (scanning the extracted wad directories with expan 3 takes about 10 seconds)
3. A couple of small errors with switching images.
4. Started extracting deck information

If I can get some time to hack away at this today, I will post up a beta version tonight.
jmp
 
Posts: 25
Joined: 06 Dec 2010, 23:53
Has thanked: 0 time
Been thanked: 0 time

Re: Work In Progress: Card and Deck viewer

Postby jmp » 10 Dec 2010, 11:40

Some updates:
1. Took forever to get the cards text to render correctly (almost there) anyone know anything about how to get a .net flowdocument to work with a DrawingContext please speak up lol
2. Added magicassistant card data to DB, I found there were data missing from some of the cards.
3. Added some more but fixes
4. Started the groundwork for deck viewing and editing.
5. Planned: Card Editor
6. Planned: Lua script Editor
Image
This is the new card screen, removed the flavor text as it is now in the cards (and is still searchable... I think :) ) This card is 100% generated using the graphics from the game and the text from the db, which I will include.

Image
This shows the downloaded/scanned image vs the generated.
jmp
 
Posts: 25
Joined: 06 Dec 2010, 23:53
Has thanked: 0 time
Been thanked: 0 time

Re: Work In Progress: Card and Deck viewer

Postby Huggybaby » 10 Dec 2010, 14:02

Very exciting news, keep going jmp!
User avatar
Huggybaby
Administrator
 
Posts: 3205
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 696 times
Been thanked: 594 times

Re: Work In Progress: Card and Deck viewer

Postby castled » 10 Dec 2010, 15:57

so nice!
and i wish it can contain a function that directly open the cards xml with something like notepad~
castled
 
Posts: 84
Joined: 09 Oct 2010, 14:50
Location: Shenzhen,China
Has thanked: 16 times
Been thanked: 1 time

Re: Work In Progress: Card and Deck viewer

Postby jmp » 10 Dec 2010, 21:08

Like this?
Image
jmp
 
Posts: 25
Joined: 06 Dec 2010, 23:53
Has thanked: 0 time
Been thanked: 0 time

Re: Work In Progress: Card and Deck viewer

Postby Huggybaby » 10 Dec 2010, 21:20

Nice, it has the color coding and the line numbers and everything!
User avatar
Huggybaby
Administrator
 
Posts: 3205
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 696 times
Been thanked: 594 times

Re: Work In Progress: Card and Deck viewer

Postby jmp » 13 Dec 2010, 02:24

Updates...
Got a lot of work done this weekend:
1. Generated image is now complete, with some small issues
2. Decided on using the CSV from the HQCG project to fuel the missing data (better formatting of text and they have a nice db for font sizing)
3. Finally got the glyphs to work (tap/number/mana on card text)
4. Added a deck list on the main screen
5. Moved the card editor and deck text editors on the main screen as tabs (load but no save yet)
6. Cleaned up a lot of exceptions, cleaned up a bunch of left over testing code
7. Tested 90% of the cards from expansion 0-3
8. Added a couple of Community expansions, with "some" but very minor issues (mostly image sizes that are all wrong)

Snapshots:
Image
-New main tab layout, new card graphic
Image
-New main card XML editor
Image
-New deck editor

Todo:
1. Add drag and drop editing of decks
2. Finish the deck editors
3. Add save to the XML editors
4. Fully Test all the expansions, detect and fix issues and malformed XML data
5. Quit adding more requirements and get something done :)
jmp
 
Posts: 25
Joined: 06 Dec 2010, 23:53
Has thanked: 0 time
Been thanked: 0 time

Re: Work In Progress: Card and Deck viewer

Postby zaroblan » 13 Dec 2010, 09:17

This looks awesome!
Are you going to be sharing the source?
I am a professional/commercial c# developer so if you need help with anything please let me know.
zaroblan
 
Posts: 59
Joined: 22 May 2009, 11:36
Has thanked: 0 time
Been thanked: 0 time

Re: Work In Progress: Card and Deck viewer

Postby jmp » 13 Dec 2010, 23:32

I am planning on releasing the Card Utilities as open source:
1. Reading and writing card data.
2. Reading and writing deck data.
3. Reading and writing database data.
4. Scanning and opening the games files
5. Extracting and generating the card image
6. Extracting the Wad files.

and a bunch of the other utilities
jmp
 
Posts: 25
Joined: 06 Dec 2010, 23:53
Has thanked: 0 time
Been thanked: 0 time

Re: Work In Progress: Card and Deck viewer

Postby jmp » 15 Dec 2010, 04:03

After staring at this too long I decided its Early Beta time...

NOTE: You need to extract the Wad Files (I figured most of you have already done this lol) I will be adding a wizard in the next release that will do this for you

Also NOTE: This is a beta, and its full of bugs, I have ran it a few million times and it hasn't caused a wormhole or anything, however I still need to give the bla bla, run this at your OWN RISK, don't come and sue me because it blew up your microwave or anything like that. If you are worried MAKE A BACKUP of your MTG directories that way you can restore, or don't download it :) Yes it has bugs, Yes it will crash, yes it will throw nasty exception errors and such...

Now for the fun stuff:

Step 1: Download http://dl.dropbox.com/u/3259909/MTGEditor-Beta1.rar
Step 2: Make sure you have .Net 3.5 Framework installed
Step 3: Unrar
Step 4: (IMPORTANT) for now you have to manually install the fonts in the install directory, just copy them to your windows/font
Step 5: Run the program (take a few seconds the first time)
Step 6: Click Location and point it to the ROOT folder of where the exe for MTGDOTP resides.
Step 7: Click Scan->ReScan you should see the card list populate, close and restart for the decks to populate this takes 4-10 seconds typically but once done it doesn't need to be done again (Reading from the db is much faster) unless you change addons. If it throws an error about the location, just close and restart, I never changed this so i didn't notice the bug till after I built this..

Some extra tidbits:
1. This has been tested up to expansion 3, however there are some odd cards that may not show up right. I tossed some community packs at it, and they work 90-95% with some strange errors but once I fix all the stuff up to expansion 3 I will tackle the community cards :)
2. This version has a dynamic created cards (soon to be in the db once created) and it may be slow on some machines... mine it take 1-2 seconds to refresh and can be processor intensive, I am hoping to fix that, but all this GDI+ and WPF graphics takes it toll on our systems.
3. I have included a DB full of fun stuff I have extracted, specifically the files from the other HD card generator which the updates I found here on this site.
4. The cards can be sorted and filtered.
5. If you right click on the grid you can see:
Copy: Copies the values
Filter: Filters by the click value
Get Image: Used to fire the download, still does so be warned, it will fill the pictures db lol
Show all: Shows all the info on the card in a little white expandable box... great for debugging the
6. You can save your deck changes by right clicking and hitting save
7. It starts up as 1021X889 I will be adding the settings to save the size every time, doesn't really cause a problem just kinda annoying.

Otherwise... Enjoy if you see something you don't like let me know, or if you have any good ideas on how to organize things better please let me know. I will upload a new version in the morning with some bug fixed.

So far I have tested it on a Windows 7 64 and 32 system, Doesn't want to run on my text xp :( not sure if its the use of themes or double buffering... Adding it to the list.
jmp
 
Posts: 25
Joined: 06 Dec 2010, 23:53
Has thanked: 0 time
Been thanked: 0 time

Re: Work In Progress: Card and Deck viewer

Postby regen1 » 15 Dec 2010, 06:02

Hmm. crashes when starting.

I'm on windows 7 x64 with .net 3.5.1 and 4.0 installed.

Error in the Event Log is System.IO.FileNotFoundException.
regen1
 
Posts: 15
Joined: 13 Dec 2010, 00:17
Has thanked: 0 time
Been thanked: 0 time

Re: Work In Progress: Card and Deck viewer

Postby jmp » 15 Dec 2010, 11:39

Did it go into detail on what file? I plan on adding a global exception catching system this morning...

The only files that I know that are required, are the ones that are included in the rar file and they MUST be in the same folder as the rest of the files:

backfullcm4.jpg
carddatabase.sdf
pictures.sdf
squish_32.dll
squish_64.dll

Everything else is embedded in the exe.

Did you try running it as administrator just to see if its a rights issue?

I have a pretty good size bug list to work on, I will be setting up some virtual machines to do some fresh testing with.

Bear with me :)
jmp
 
Posts: 25
Joined: 06 Dec 2010, 23:53
Has thanked: 0 time
Been thanked: 0 time

Re: Work In Progress: Card and Deck viewer

Postby regen1 » 15 Dec 2010, 13:27

It did not go into detail regarding what file was missing, try as I might to find that information.

Those files are present in the folder.

Running it as Administrator was one of the first things I tried - it was a no-go.

I also tried on another machine of mine and it crashes on that one as well.

Also, Windows 7 comes preinstalled with .Net 3.5 SP1/2 as a windows component fyi, so it should be unnecessary (and I think, impossible) to install 3.5 on Win7.

If you need any other information, I'll keep checking this thread throughout the day to respond as promptly as possible. Really want to see this working :)

Just a thought, perhaps you included a wrong font or overlooked one necessary for the program to start? This could potentially be the missing file, no?
regen1
 
Posts: 15
Joined: 13 Dec 2010, 00:17
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Utilities

Who is online

Users browsing this forum: No registered users and 18 guests


Who is online

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

Login Form