Page 1 of 1

We handle constructed decks in subfolders now

PostPosted: 19 Aug 2013, 22:50
by Max mtg
Max mtg wrote:My to do after 1.4.4:
* Make IStorage<T> implementation that reads files traverse subfolders and be iterable as both flat list and groupped by folders. Per popular request.
(The UI part of effort to support decks arranged into folders is up to the rest of the team.)
The feature is half-complete now:
Forge can read subfolders in constructed deck, you may start game with such deck, but cannot yet edit decks in subfolders nor manipulate subfolders.

Marek14 wrote:Also, is it strictly necessary to read and convert deckfiles on start? Can't they just be read and converted (if that's necessary) on the fly?
Why should not they be converted?

Re: We handle constructed decks in subfolders now

PostPosted: 20 Aug 2013, 01:15
by Xitax
I strongly prefer them to be converted on startup, because file renaming often occurs and I'd rather that happen right away than at some future unknown time.

Re: We handle constructed decks in subfolders now

PostPosted: 20 Aug 2013, 05:25
by Marek14
Well, why should the files even be renamed?

Basically, this way adding a new deck is a lengthy process that involves shutting Forge down and restarting it (and it takes some time to restart). If it's really necessary, how about adding a "Reload decks" button that would perform this operation without shutting the program down? Or even, with subfolders, "Reload folder" which would reduce time needed for checking.

Re: We handle constructed decks in subfolders now

PostPosted: 20 Aug 2013, 07:25
by Max mtg
Files are renamed to keep their names in accordance with the Name property written inside the deck file.

It is possible to teach Forge how to watch changes to folders with constructed decks. As these events are handled, the in-memory deck collection can be updated accordingly.
That will take some time and is to become an extra part of this iteration devoted to subfolders.

Would anyone else need this feature?

Re: We handle constructed decks in subfolders now

PostPosted: 20 Aug 2013, 09:58
by Marek14
Max mtg wrote:Files are renamed to keep their names in accordance with the Name property written inside the deck file.
Once again: is that even important? From what I've seen, the benefit of Name property is mainly that this way, the deck name can contain characters that are not acceptable in filenames -- such decks won't be renamed perfectly in any case. The deck list uses the "Name" property instead of the file name. The file name is not visible from anywhere in Forge.

Sure, it's generally a good idea to keep the two same, or at least similar, but I don't think it should be rigidly enforced. If someone wants to keep the names different (perhaps storing extra information in filenames, like type of deck or date), is it really so important to not allow that?

Re: We handle constructed decks in subfolders now

PostPosted: 20 Aug 2013, 12:15
by Max mtg
Why would you need old file names? Are you intending to use the deck collection elsewhere?

So, are you requesting extra attributes added to deck files? Attributes like 'author', 'date', and 'top tournament' with 'best place' sound reasonable to me.

Re: We handle constructed decks in subfolders now

PostPosted: 20 Aug 2013, 13:26
by Marek14
Well, extra attributes might be fun :) As for the names, there's one reason not to change them: you can rename the files in a batch (for example, giving new decks names NEW_*.* until you actually try them out), but it's much harder to make some global changes to name field inside the file. Of course, this won't be as relevant if we'll have folders.