It is currently 26 Apr 2024, 20:17
   
Text Size

Java Set Editor

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

Java Set Editor

Postby mtgrares » 12 Feb 2009, 19:32

This is a set editor that I wrote all in Java. I shamelessly stole the gui from Rob Cashwalker, thanks! It is basically the same except you can sort the cards by name, type, color, rarity. I had the idea of letting users use the keyboard and Rob had the same idea. (Using the keyboard let me easily remove a bunch of artifacts. I don't like too many artifacts since they seem to appear often.) As always there are probably some bugs but it seems to work. The Java source code is included for those who are adventurous. I made this program completely separate from the rest of MTG Forge in order to reduce the complexity and the number of errors.

Put "run-set-editor.jar" in the same directory as MTG Forge, if you don't it will show an error message.
Download Set Editor

Below is the FAQ that is included with the zipped download.

What does the Set Editor do?
It modifies the files common.txt, uncommon.txt, and rare.txt which are used to generate the booster packs which are used for sealed and drafting.

Why does the card text not show activated abilities?
The set editor only reads the card information from the file "cards.txt" which doesn't include activated abilities.

Can I use the keyboard?
Yup, you can use the up and down keys as well as these keyboard shortcuts.
z - common
x - uncommon
c - rare
v - none
Just press the z key and it will make the card common.

How does the sorting work?
Each time you sort you are sorting the current listing of cards. So if you sort by color and then type, it is different than sorting by type then color. Sorting by the card name "resets" everything.

What is the order of "sort by color"?
WUBRG, multi-colored, land, artifacts

What is the order of "sort by type"?
Planeswalker
Artifact Creature
Artifact
Creature
Instant
Land
Sorcery
Enchantment

Why is Master of Etherium and Sarcomite Myr sorted incorrectly?
Because they are blue and yet they are artifacts, usually artifacts are colorless. Basically it is just an error.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: Java Set Editor

Postby DennisBergkamp » 12 Feb 2009, 20:43

Awesome, trying it out right now =D>
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Java Set Editor

Postby Chris H. » 12 Feb 2009, 21:05

I just finished using the new java based card editor. wow \:D/

BTW: The jpgs are now being moved to a "pics" sub-directory. It would be great if at some point this application could look for jpgs in both the root and the pics directories. Cover all bases this way.

And, thank you! :D
User avatar
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: Java Set Editor

Postby mtgrares » 13 Feb 2009, 15:46

I'm glad you enjoy using it. I like using the set editor myself because it is fun to remove boring cards that you see too often or that you don't like to play with/against. Yes, I can tweak the editor and look for the card pictures in both the current directory and the pics directory.

I really wanted to have a sort function and I was glad I could add it since it is essentially the same as the deckbuilder. I wanted to show stats like "Green 32 commons, 50 uncommons, and 25 rares" but I cut that feature in order to get it done.

And by the way I don't think it matters if the colors aren't even, like you may have 100 green cards and 200 white cards, the booster pack generator evens everything out. The booster packs should be relatively evenly colored even if there are 100 common green cards and 200 common white cards.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: Java Set Editor

Postby Chris H. » 13 Feb 2009, 16:14

mtgrares wrote:I'm glad you enjoy using it.
It makes the job of maintaining the original Rarities files so much easier.

Yes, I can tweak the editor
Is there a chance that in the future we can also edit the material in the cards.txt file? And possibly add new card data to the cards.txt data for new card additions by using your editor?

If not, we can continue to add the new card data by hand to the cards.txt file.
User avatar
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: Java Set Editor

Postby mtgrares » 13 Feb 2009, 16:42

Is there a chance that in the future we can also edit the material in the cards.txt file? And possibly add new card data to the cards.txt data for new card additions by using your editor?
Sure, it doesn't seem too hard to be able to edit cards.txt and add a new card. I'll just add an option through the menu called "Add Card" which will popup a text box. I don't mind adding new features (if I can actually program them) but I'm not sure what would be useful, so your suggestion is very helpful.

While I was briefly looking through the cards I noticed that Forbidding Watchtower has the mana cost W instead of no cost, so I understand how updating cards.txt is almost a full time job, lol.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: Java Set Editor

Postby Chris H. » 14 Feb 2009, 14:39

mtgrares wrote:Sure, it doesn't seem too hard to be able to edit cards.txt and add a new card. I'll just add an option through the menu called "Add Card" which will popup a text box. I don't mind adding new features (if I can actually program them) but I'm not sure what would be useful, so your suggestion is very helpful.
Currently, all new and corrected card entries placed in the cards.txt file are being moved to the very start of this file. This makes it very easy for other people to find the data for the new and corrected cards.

When your application writes to the cards.txt file could we keep this new system in place? It may make things easier for those who are helping with this project.

I think that your current way to write to the rarity files in alphabetical order is acceptable and will not create any problems for the rarity files.

Writing the cards.txt file in alphabetical order will make finding the data for the new and corrected card entries more difficult.
User avatar
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: Java Set Editor

Postby mtgrares » 17 Feb 2009, 20:14

Currently, all new and corrected card entries placed in the cards.txt file are being moved to the very start of this file. This makes it very easy for other people to find the data for the new and corrected cards.
I might be able to do this. It just means when the program writes cards.txt it has to write the cards in the previous order. If I can get my head around it, I should be able to program it.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times


Return to Forge

Who is online

Users browsing this forum: Google Feedfetcher and 163 guests


Who is online

In total there are 164 users online :: 1 registered, 0 hidden and 163 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: Google Feedfetcher and 163 guests

Login Form