It is currently 16 Apr 2024, 06:29
   
Text Size

card explorer updates

Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins

card explorer updates

Postby Lodici » 09 Jun 2014, 17:16

Just published...

  • improved responsiveness of search text field by not filtering the card pool on every change event. Instead only initiate search after 500ms from the last event. So if you have reasonable typing speed it may only run a single search on, say "tap an untapped", instead of firing a new search for each character as it is typed (ie. 15 searches!).
  • can now search for a specific phrase in the oracle text. For example, if I type in tap an untapped this will show all cards which contain all of these words regardless of order in the oracle text. However I can now use double quotes, ie "tap an untapped", instead to restrict the results to cards containing this exact phrase.
  • moved search JTextField into new Oracle filter panel. Keeps everything nice and consistent and makes it easier to add additional options (eg. Starts With, Ends With, etc) in future.
    Untitled.png
User avatar
Lodici
Programmer
 
Posts: 399
Joined: 13 Oct 2013, 09:44
Has thanked: 29 times
Been thanked: 71 times

Re: card explorer updates

Postby jerichopumpkin » 09 Jun 2014, 21:35

yet another great addition!!!
jerichopumpkin
 
Posts: 212
Joined: 12 Sep 2013, 11:21
Has thanked: 19 times
Been thanked: 13 times

Re: card explorer updates

Postby ShawnieBoy » 09 Jun 2014, 22:07

Using the oracle button will take a bit of getting used to - but phrase searching is something I've been hoping for for a long time - Yay!
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: card explorer updates

Postby Lodici » 10 Jun 2014, 17:41

Finally. I got round to adding the Formats filter. I have added options for Standard and Extended. Here is how to add additional formats...

  • create a new text file in /resources/data/formats with a ".fmt" extension. See existing files for example.
  • add set codes.
  • add banned card names. These should be prefixed with an exclamation mark.
  • [optional] add restricted card names. These should be prefixed with an asterisk. This has no effect at the moment but may be useful in future should the restriction of only allowing one instance of a card in the deck/sideboard be implemented.
  • open the src\magic\data\MagicFormats class and add a new enum setting for the new format.
  • rebuild jar to make sure the new file is added as a resource.
User avatar
Lodici
Programmer
 
Posts: 399
Joined: 13 Oct 2013, 09:44
Has thanked: 29 times
Been thanked: 71 times

Re: card explorer updates

Postby ShawnieBoy » 10 Jun 2014, 23:22

Yay!!

All the formats were already included in the cards\formats folder

I'll convert to the new .fmt extension

Yes!

edit: Also Extended format no longer exists Retired 7th August 2013
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: card explorer updates

Postby ShawnieBoy » 10 Jun 2014, 23:50

Will need a text-replace for set codes that begin with a number, the enums are prefixed with an underscore

edit: Actually, can just add them in on the .fmt file - too excited :D
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: card explorer updates

Postby ShawnieBoy » 11 Jun 2014, 00:51

Updated the formats filter to include all current formats and all existing block formats!

edit: There may be some discrepancies with the numbers as the flip, split and transform cards are listed in the explorer as two different cards, and the card lists for the sets list them as per Gatherer eg Alive // Well
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: card explorer updates

Postby Lodici » 11 Jun 2014, 03:28

ShawnieBoy wrote:Updated the formats filter to include all current formats and all existing block formats!
Nice work! Thanks.
User avatar
Lodici
Programmer
 
Posts: 399
Joined: 13 Oct 2013, 09:44
Has thanked: 29 times
Been thanked: 71 times

Re: card explorer updates

Postby Lodici » 11 Jun 2014, 03:56

I guess we will need to look at the overlap between the formats and default cubes since this might cause some confusion in the explorer but I don't think we can just delete them since they are used when creating a duel and possibly elsewhere.
User avatar
Lodici
Programmer
 
Posts: 399
Joined: 13 Oct 2013, 09:44
Has thanked: 29 times
Been thanked: 71 times

Re: card explorer updates

Postby ShawnieBoy » 11 Jun 2014, 11:39

Pulled this from the wiki:

Added requirement for use in the Cube:

  • all cards must be good on their own : no combo or very narrow cards
  • maximum converted mana cost is 9
  • maximum three colors in mana cost
  • strong focus on multicolor : no cards that only work well in monocolor
Not sure if this still applies to the cube construction. Melvin should have a better idea.
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: card explorer updates

Postby melvin » 11 Jun 2014, 14:12

Originally cube was the only supported format and there is only one cube, hence the wiki mentions "the Cube". Over time we've (ab)used cubes to implement other formats such as standard, extended, modern, and legacy.

I believe the intention of the requirements is to help users suggest relevant cards to add to the cube. Since we no longer distribute a single cube, and generally we try to support any card that can be implemented and played effectively by the AI, I think these more stringent requirements are no longer relevant.
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: card explorer updates

Postby Lodici » 11 Jun 2014, 18:25

You can now sort cards in the explorer by player rating (from Gatherer) by clicking on the # column. The rating can be from 0.000 to 5.000. The actual value displayed is rounded to one decimal place but the full 3 decimal places are used when sorting. The rating for every card is updated on each new version release. Missing cards have a default rating of 2.500.

screenshot.png
User avatar
Lodici
Programmer
 
Posts: 399
Joined: 13 Oct 2013, 09:44
Has thanked: 29 times
Been thanked: 71 times

Re: card explorer updates

Postby ShawnieBoy » 11 Jun 2014, 21:09

melvin wrote:Originally cube was the only supported format and there is only one cube, hence the wiki mentions "the Cube". Over time we've (ab)used cubes to implement other formats such as standard, extended, modern, and legacy.

I believe the intention of the requirements is to help users suggest relevant cards to add to the cube. Since we no longer distribute a single cube, and generally we try to support any card that can be implemented and played effectively by the AI, I think these more stringent requirements are no longer relevant.
Would that then mean that the Cubes as they stand now can be removed?

Cube formats have gained in popularity, maybe an easier option for having player-created Cubes listed here instead?
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Re: card explorer updates

Postby melvin » 12 Jun 2014, 01:31

ShawnieBoy wrote:Would that then mean that the Cubes as they stand now can be removed?
Cube formats have gained in popularity, maybe an easier option for having player-created Cubes listed here instead?
Both cubes and formats allow players to define a set of cards they want to play with. Cubes do so with a listing of allowed cards, formats do so with a list of allowed expansions + banned cards. Cubes becomes a bit unwieldy when it is used to defined expansion based formats such as standard.

If we can generalize formats to allow defining an arbitrary list of cards (aka like the current cubes), then I think we can retire the cubes concept in favor of custom formats. Currently they provide different ways to specify a set of cards.
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: card explorer updates

Postby ShawnieBoy » 12 Jun 2014, 02:12

melvin wrote:
ShawnieBoy wrote:Would that then mean that the Cubes as they stand now can be removed?
Cube formats have gained in popularity, maybe an easier option for having player-created Cubes listed here instead?
Both cubes and formats allow players to define a set of cards they want to play with. Cubes do so with a listing of allowed cards, formats do so with a list of allowed expansions + banned cards. Cubes becomes a bit unwieldy when it is used to defined expansion based formats such as standard.

If we can generalize formats to allow defining an arbitrary list of cards (aka like the current cubes), then I think we can retire the cubes concept in favor of custom formats. Currently they provide different ways to specify a set of cards.
Allowing a random selection of cards from selected formats shouldn't be too tricky would it? (I'm not sure how the random deck generator works.) Especially as the Card Explorer can filter out the cards that are playable and in that format.
User avatar
ShawnieBoy
Programmer
 
Posts: 601
Joined: 02 Apr 2012, 22:42
Location: UK
Has thanked: 80 times
Been thanked: 50 times

Next

Return to Development

Who is online

Users browsing this forum: No registered users and 12 guests


Who is online

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

Login Form