Page 1 of 1

New CW Tool Sneak Peek

PostPosted: 31 Oct 2016, 05:34
by Xander9009
I started work awhile back on a new tool for the Community Wad mean to handle most of the tasks my various applets handled previously. Everything from syncing the CW, to making decks from lists of cards (readable by the Deck Builder), to packing the CW.

Here are screenshots of the various views at the moment: https://drive.google.com/drive/folders/ ... sp=sharing

Not everything is functional right now, but a decent chunk of the features are at least basically working. I didn't work on it at all for many months, but I felt motivated the last few days, so I decided to tackle some of the issues I'd had before, such as letting it copy files in the background without freezing up the UI.

Currently, it can do the following (though maybe not perfectly):
  • Display information related to the current version of the Community Wad*
  • Sync the packed or unpacked versions of both the core and art files (or skip one if desired)
  • Sync decks based on the user's CPE ID
  • Sync YOUR decks to the "Add Decks Here" folder as you edit them (set the "My CPE ID" box and check your box below)
  • Create a deck from a given deck list (with or without an "x" next to the numbers)
  • Point out problem cards in the given deck list
  • Store information about packing the CW (but currently can't actually do anything with that info)
  • List all cards currently in the CW, including Filename, Cardname, English Name, and Multiverse ID (all are sortable)
  • Convert images (jpg|png <> tdx), and wads (.wad <> directory)
  • Resize/crop images and adjust their brightness/contrast
  • Rename those images**
  • Provide guides for normal, eldrazi, token, and token+ability art sizes***
  • Sync files as they're changed, rather than on a schedule****
*This information is currently static. It doesn't update automatically, but it will once the tool can be the source of repacking the CW.

**This is very, very rudimentary and not tested well. It won't let you change extensions (intentionally), but there are still a few issues with it. An explicit renaming function would be very simple, but it's currently using the built-in system where you can click an image in the ImageUtility window twice (not double-click) like how it works in normal explorer windows. However, if the image's new name moves it around in the list, the list doesn't update properly.

***In two of the images, you'll see what I mean. The gray sections at the edges of the images are the guides. You can drag the image around and zoom in and out, but you cannot move it or zoom it out such that the central area (the size required for the image type chosen) would be uncovered. It also support zooming slowly for better control (ctrl+scroll) and zooming faster (shift+scroll). The image adjustments are only basic, but that's because it's both unnecessary to put in the effort to include more complicated alterations, and it would encourage altering images more than I'd like to be responsible for. It should be enough to get them as close as possible to the original card's image if desired, while also allowing for a bit of sharpening/smoothing. Not much, but it should be enough. And for the few where it's not enough, Gimp will cover those cases. But for any that only need resized/cropped, it should be perfect.

****Scheduling is very easy in AHK (what the current CW Syncing tool is written in), and would be relatively simple in C#, but C#'s extra power let me also figure out how to sync changes as they happen. This way, you can set it to sync, it'll run once through everything it's supposed to sync to make sure it's currently up to date, and then it will run in the background and immediately catch any new files and put them where they need to go. There are lots of programs out there that could potentially do something similar, but having a utility specially built just for this should work much better and allow more functionality in the future, such as multiplayer assistance.

If you notice the "Developer Mode" menu item, that enables/disables the Developer tab. It'll always be visible, but unless the menu item is checked, you can't actually go to it. You can freely check it, of course.

Things it can't currently do, but should in the future:
  • Pack the CW between 23:00 and 24:00 hours EST (the current repacking utility's working schedule)
  • Check for updates (when asked to or set to check whenever it runs/on a schedule/as updates are found)
  • Display information about the CWT program itself (the "Current Version" menu item)
  • Automatically convert and upload resized/cropped images
  • Keep the CW up to date without needing Google Drive running*
*Awhile back, I finally figured out how to get a download URL for a file on GD. I just figured out very recently how to update Google Sites dynamically, including the ability to use GD files. This combination allows for the possibility of providing a single page on the CW's Google Sites website which can redirect to a download for the current file containing all of the download links related to the CW. This means that a static URL could be used to find and download a file even though that file's actual download URL is changed really often. Of course, this method would only support the packed versions. Trying to provide 40,000 download links would be... a bit ridiculous. :lol:

Since you can see the program, let me know if you've got any thoughts for what I might add/change. Feedback is always useful. :D

Re: New CW Tool Sneak Peek

PostPosted: 31 Oct 2016, 16:45
by migookman
I like it. Especially the syncing and deck creation tools. Can the 'Create Lists' be customizable?

Re: New CW Tool Sneak Peek

PostPosted: 31 Oct 2016, 16:54
by Xander9009
migookman wrote:I like it. Especially the syncing and deck creation tools. Can the 'Create Lists' be customizable?
Which lists specifically, and customizable how? The answer is most likely yes, but I'm not certain what you mean.

Re: New CW Tool Sneak Peek

PostPosted: 31 Oct 2016, 18:22
by migookman
The main thing that was going through my mind was 'sets'.

Re: New CW Tool Sneak Peek

PostPosted: 31 Oct 2016, 18:58
by Xander9009
migookman wrote:The main thing that was going through my mind was 'sets'.
Do you mean creating a list of cards in the CW that are from a particular set? I'm sorry, I'm still very confused. There's nothing in this that really "creates lists", although it does have a list of cards included (which it will read from a file).

Or maybe that's the list you're referring to? This one: https://drive.google.com/file/d/0B-cZn2 ... sp=sharing

Maybe you mean adding a custom column to that?

EDIT: Also, the deck syncing is now at about 95%. There are only two things I really want to change about syncing decks. 1: I want each progress bar related operation to register and unregister itself so the most recently relevant one has control of the progress bar. The last tab you looked at that used the progress bar will keep updating it as you browse other tabs unless you visit a new tab which currently needs it. Then, if two operations both need it, and the active one finishes while the inactive one is still going, the inactive one should take control. In addition to that, I want to include a status label to show what the progress bar is currently updating for. 2: It currently deletes decks from the game folder, which I really don't like. If something happens and the My CPE ID value is lost while the Remove Unchecked box is checked, it would delete all of your decks, which would be... bad. I want to only delete decks which have an identical copy in the GD Decks folder. Any others would be moved to a subfolder within the game folder (appending numbers for duplicates).

I just got the progress bar is currently working for decks, though (but not including the above-mentioned functionality).

I also thought of the deck making tab. I want to include a second pane to the right which lists invalid cards, and let the Create Deck button work and simply ignore invalid cards. This way, you can deal with multiple invalid cards at a time (for those who would add new cards) or just more easily track the ones that need replaced (for everyone else). I also want this tab to store and retrieve information from the settings file (thank you RiiakShiNal for the settings system!).

Re: New CW Tool Sneak Peek

PostPosted: 01 Nov 2016, 00:08
by Splinterverse2
This looks really cool. Nice work!

There are a couple of things that would help me that may already be incorporated:
-- ability to filter by author
-- missing cards list
-- indicating art that is low res in the current .wad (if this is possible)
-- cards that are missing art

I currently have a separate expanded .wad I keep away from the game folder. Can you have both a compressed and expanded version without having duplicates in the deck builder? I use the expanded one while coding only for reference. I grep on the files to find similar expressions using AstroGrep.

Re: New CW Tool Sneak Peek

PostPosted: 01 Nov 2016, 00:31
by Xander9009
Splinterverse2 wrote:This looks really cool. Nice work!

There are a couple of things that would help me that may already be incorporated:
-- ability to filter by author
-- missing cards list
-- indicating art that is low res in the current .wad (if this is possible)
-- cards that are missing art

I currently have a separate expanded .wad I keep away from the game folder. Can you have both a compressed and expanded version without having duplicates in the deck builder? I use the expanded one while coding only for reference. I grep on the files to find similar expressions using AstroGrep.
This won't do too much that overlaps with the deck builder, since it's meant to compliment it, but those should all be possible, except for maybe the LQ art list.

Currently, it's set up such that card list is built from the CW version file, which for this tool would be updated to include much more information. Any information that needs to be extracted from the cards could be, but this would only update during the wad's daily repack. I'm hoping to re-work that so it reads the information directly from the wads the same way the deck builder does, but it'll take some time.

I intend to fully integrate the Card Validity Checker, which checks a lot of things, including missing art.

There are a few things that are currently being done by various small programs but which I intend to integrate into this. These would mostly end up in the Developer tab, which is only meant for use by me. They'll include the programs which monitors the new decks folder and the auto-upload folder, as well as the programs which track the CW's current progress for the spreadsheet and the one which manages the deck website files.

I also want to include a tab with handy links to things, such as the CW website, main thread, tutorial on the wiki, where to post decks, and things like that.

I'm currently getting caught up on a couple of shows, but many of these are either fairly simple, or else they mostly share a single difficult task (that single difficult task being getting the program to dynamically create the list of cards from available resources rather than a hard-coded list, preferably all while keeping the UI usable).

I don't currently know how to make the card list such that it could be filtered by a column, but it's a pretty standard feature, so it shouldn't take long to find it somewhere and learn to do it myself.

EDIT: Sorry, forgot to answer your question. If you have a packed wad and a loose wad, the deck builder will show results from both, even if they're identical (Riiak is hoping to eliminate this issue, actually). The loose directory wad takes precedence over the packed wad. Out of curiosity, if you've got a loose wad on hand, why bother with the packed wad?

Re: New CW Tool Sneak Peek

PostPosted: 01 Nov 2016, 11:19
by Splinterverse
Xander9009 wrote:Sorry, forgot to answer your question. If you have a packed wad and a loose wad, the deck builder will show results from both, even if they're identical (Riiak is hoping to eliminate this issue, actually). The loose directory wad takes precedence over the packed wad. Out of curiosity, if you've got a loose wad on hand, why bother with the packed wad?
There are a couple reasons I use both packed and unpacked, with the main reason being that I maintain several instances of the game and it's easier to copy the packed version. Also, sometimes when I am going through the existing files, I make changes when I find bugs, and I sometimes save over the version that's there (and then move it of course), but I like having a copy of the original in the packed version in case I need to get it back for some reason. I can continue on as I have though. I don't need the unpacked version to be in sync. I can always unpack the new packed one that has automatically downloaded.

I really was never able to get the auto-download to work for me as it is today, so maybe I will with your new tool.

I thought of a couple of other features that might be nice:
-- Impossible cards list (doesn't need to be as elaborate as the forum thread, just a barebones list). This combined with the missing cards list would be great because then we can see the complete picture of where every card is at in development.
-- A scroll-able updates list, like the last 5 updates to the .wad or something. This would be useful if we aren't able to login for a few days (or more) and want to see what we've missed.

Overall, this sounds like a truly awesome addition to our tools. Thank you for putting the hard work in on this.

Re: New CW Tool Sneak Peek

PostPosted: 01 Nov 2016, 17:44
by Xander9009
The lists of new/modified cards are already scrollable, but they currently only contain cards new/modified for that particular version. However, all of that information is already being tracked, and converting it to an XML style version file would be a simple process, meaning all of that is already possible, so it would be an easy and useful inclusion. I like it. However, instead of just a scrollable list, I think I'd prefer a 'previous/next' setup with back and forth buttons for browsing updates.

The impossible list and missing cards list both already exist, so parsing them for the information necessary would be relatively simple. The tool working with them would just need to be changed slightly to include a copy in the wad. However, I'd prefer the one in the wad to be an XML file. Instead of dynamically reading the cards, I'm thinking a better way to go (much faster for opening the program) might be to have a file, but have it be separate from the version file. Instead, it would be a Card Status file, containing the list of cards currently included, currently missing, and impossible.

Re: New CW Tool Sneak Peek

PostPosted: 01 Nov 2016, 21:24
by Splinterverse2
Xander9009 wrote:The lists of new/modified cards are already scrollable, but they currently only contain cards new/modified for that particular version. However, all of that information is already being tracked, and converting it to an XML style version file would be a simple process, meaning all of that is already possible, so it would be an easy and useful inclusion. I like it. However, instead of just a scrollable list, I think I'd prefer a 'previous/next' setup with back and forth buttons for browsing updates.

The impossible list and missing cards list both already exist, so parsing them for the information necessary would be relatively simple. The tool working with them would just need to be changed slightly to include a copy in the wad. However, I'd prefer the one in the wad to be an XML file. Instead of dynamically reading the cards, I'm thinking a better way to go (much faster for opening the program) might be to have a file, but have it be separate from the version file. Instead, it would be a Card Status file, containing the list of cards currently included, currently missing, and impossible.
Sounds awesome! :)

Re: New CW Tool Sneak Peek

PostPosted: 13 Dec 2016, 18:36
by Xander9009
I've just gotten started on a new feature, and while it's currently being written in AHK instead of C# (this tool will need it converted to C#), it's working relatively well so far. The ability to scan a decklist and determine the legal formats. It's set up so it's easy to update as the formats change (which only happens with Modern, Standard, and the newest block format, except when cards are banned/restricted, which I don't think happens for older formats very often).

It works by having a set of ini files for the formats. The ini files contains rules about the format, including which sets to include, which sets to ban (Vintage and Legacy are defined as "all sets except..."), which cards to ban/restrict, how many cards/copies the format allows, and a field for special restrictions, such as Commander's requirement of having a legendary. Although, for Commander, while I can easily check if there's a legendary, and I can relatively easily check for basic colors, checking all color interactions isn't feasible. So, it'll probably only check the basic color issues. That'll be up to the player mostly...

I've wanted to do this for a long time so that I could more easily determine if two decks are on an even playing field, so to speak.

So far, it doesn't have any ability to import from a wad, though, which is something it'll really need in order to be considered fully functional.

Once it's completed and integrated into the tool, I intend for it to be something that's automatically checked when you paste or edit a deck into the deck creator tab. That way, you can quickly see which cards in the deck would need replaced if you want it to be Modern, for example.