We handle constructed decks in subfolders now
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
7 posts
• Page 1 of 1
We handle constructed decks in subfolders now
by Max mtg » 19 Aug 2013, 22:50
The feature is half-complete now: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.)
Forge can read subfolders in constructed deck, you may start game with such deck, but cannot yet edit decks in subfolders nor manipulate subfolders.
Why should not they be converted?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?
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: We handle constructed decks in subfolders now
by Xitax » 20 Aug 2013, 01:15
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
by Marek14 » 20 Aug 2013, 05:25
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.
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
by Max mtg » 20 Aug 2013, 07:25
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?
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?
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: We handle constructed decks in subfolders now
by Marek14 » 20 Aug 2013, 09:58
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.Max mtg wrote:Files are renamed to keep their names in accordance with the Name property written inside the deck file.
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
by Max mtg » 20 Aug 2013, 12:15
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.
So, are you requesting extra attributes added to deck files? Attributes like 'author', 'date', and 'top tournament' with 'best place' sound reasonable to me.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: We handle constructed decks in subfolders now
by Marek14 » 20 Aug 2013, 13:26
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.

7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 54 guests