It is currently 31 Oct 2025, 21:06
   
Text Size

Forge version 1.5.11

Post MTG Forge Related Programming Questions Here

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

Re: Forge version 1.5.11

Postby friarsol » 24 Jan 2014, 14:50

I'm not really sure if we're ready for a Release today anyway. Noone really knew you were planning on releasing and there's been a lot of code shifting. Maybe just plan it for next week?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Forge version 1.5.11

Postby drdev » 24 Jan 2014, 15:52

friarsol wrote:I'm not really sure if we're ready for a Release today anyway. Noone really knew you were planning on releasing and there's been a lot of code shifting. Maybe just plan it for next week?
Agreed. Right now there are still several deficiencies with DeckManagers I'd like to iron out, such as that you can't open or delete decks in subfolders and that new decks don't appear unless you restart. I also want to add back support for adding/removing columns and remembering that configuration if I have time.

Let's wait a week. There are a lot of big improvements this release, so it'd be good to make sure we release it when it's more stable.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Forge version 1.5.11

Postby drdev » 24 Jan 2014, 15:59

Max mtg wrote:...
I've tested save-load in root folder of constructed - they do work. (for nested ones there has to be used a different instance of DeckController)
Methods to find or create subfolders added.
...
You say there needs to be a different instance of DeckController to handle nested folders, but that's really not how DeckControllers are set up to work. I'm currently trying out an approach where DeckController will accept a path relative to a base folder (like "constructed"), and then determine from that what the deck name and parent folder are by parsing the path, utilizing the new Storage functions you added. If there are no "/" characters in the path, we will consider the deck name to be the path and the parent folder to be the base folder, which is how it currently works.

Do you foresee any issues with that approach? I thought I'd run it by you before committing anything, even if it is technically GUI code.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Forge version 1.5.11

Postby Max mtg » 24 Jan 2014, 16:34

Looks like it already accepts such a path! (and a single instance will serve for any folder with a storage)
This morning I've changed DeckController a bit - see r24449.

And, yes, it needs path and deckname in separate strings...


There's a small list of features that might be added into application:
- save deck under a different name and into a different folder ("save as" with folder added)
- update DeckProxy after deck has been changed (recalc color, formats, etc.. moreover, DeckController creates a new instance for deck after it has been edited (to safely discard it if changes were rejected) - so a new instance has to reach DeckProxy)
- add new DeckProxy instances to deck managers (have to change proxy's ctor to public to instantiate a single instance and add it to list)
- make sure sealed modes and variants' deck managers are also operational.
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: Forge version 1.5.11

Postby drdev » 24 Jan 2014, 18:24

Max mtg wrote:Looks like it already accepts such a path! (and a single instance will serve for any folder with a storage)
This morning I've changed DeckController a bit - see r24449.

And, yes, it needs path and deckname in separate strings...


There's a small list of features that might be added into application:
- save deck under a different name and into a different folder ("save as" with folder added)
- update DeckProxy after deck has been changed (recalc color, formats, etc.. moreover, DeckController creates a new instance for deck after it has been edited (to safely discard it if changes were rejected) - so a new instance has to reach DeckProxy)
- add new DeckProxy instances to deck managers (have to change proxy's ctor to public to instantiate a single instance and add it to list)
- make sure sealed modes and variants' deck managers are also operational.
Did you get it working so decks could be opened/deleted from DeckManagers if they're in a subfolder as part of this?

Either way, thanks for the help.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Forge version 1.5.11

Postby Max mtg » 24 Jan 2014, 18:34

drdev wrote:Did you get it working so decks could be opened/deleted from DeckManagers if they're in a subfolder as part of this?

Either way, thanks for the help.
Not sure if deleting works now (read the comments in code - I suggest that we should delete decks via DeckProxy's method and leave to deckmanager only confirmation popup and list item removal).
As for opening in editor decks located in subfolder that does work now. It should save changes properly as well. (should save = I have not tested, but there's no known reason for it to fail)

No problem.
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: Forge version 1.5.11

Postby moomarc » 24 Jan 2014, 19:22

r24463: Planechase is now launched from constructed game setup. I had to make some minor changes in the game module related to starting a match. Didn't have to import any gui module elements, or do anything drastic. Just did what I assume has to be done to get multivariant matches working. But please check it to make sure.

The changes should also make it possible to start implementing variants into quest matches with some similar tweaks in the right places in quest match launches. Let me know if anything is horribly wrong, or if it can be improved. I tried to do some other minor code cleanup in V- and CSubmenuConstructed.java and improved some logic slightly.

I had to adjust the way Planechase deck conformity is checked (and will probably have to do the same for the other variants. They would fail if chosing an external planar deck or scheme deck etc that isn't a deck section of the default deck, so were just being skipped.

There's two things I need some assistance with regarding the layout, but I've listed them in the new constructed match screen thread as they're more relevant there.

Feedback appreciated!
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Forge version 1.5.11

Postby Max mtg » 24 Jan 2014, 21:27

moomarc wrote:r24463: Planechase is now launched from constructed game setup. I had to make some minor changes in the game module related to starting a match. Didn't have to import any gui module elements, or do anything drastic. Just did what I assume has to be done to get multivariant matches working. But please check it to make sure.
That is what I meant speaking of two enums in the topic devoted to the new screen, because, as it has turned out, game type and game variants are different entities, and they'd better be in different enums.

There arises a question about decks, should we keep only five game types - where to store all those variant-specific decks? - in terms of both folderds in %appdata% and IStorages in code. Or should we keep all variant's decks together in a common folder and filter out those which are incompatible with current settings? Say, when player enables the commander option, only decks with commander section are shown. If he wants to be an archenemy, only decks with schemas will remain. If both, each filter applies. What do you think of it?
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: Forge version 1.5.11

Postby moomarc » 24 Jan 2014, 21:52

There I have no idea. I leave those sorts of decisions up to the rest of you guys. I'm probably the least experienced coder, and have zero idea of what would be faster or cleaner. That said, I don't think the filters should stack. Otherwise decks built with the Planar deck editor would only be useable in Planechase only matches because it only saves the planes deck section. You want to be able to select any deck that has a plane deck section to mix and match. So each variant should keep it's own deck selector that filters all the decks that can be used for that variant.

Come to think of it, that will enforce deck legality, and some players like to mess around with bogus scheme decks or planar decks with more than one of a type of a particular scheme or plane etc. So my personal opinion is leave it how it is in terms of deck selection. Feel free to change variants to a separate type if it will make the code better or enable more things.
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Forge version 1.5.11

Postby Max mtg » 24 Jan 2014, 21:58

Exactly, the purely consructed mode imposes no filters. Each selected variant adds its own filter, which do stack. A deck may be good for constructed but also contain a schemes section, so it will show up in both modes.

If some more people approve this idea, I'll be able toimplement it without becoming a tyrant. :D
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: Forge version 1.5.11

Postby drdev » 25 Jan 2014, 01:04

Max mtg wrote:
drdev wrote:Did you get it working so decks could be opened/deleted from DeckManagers if they're in a subfolder as part of this?

Either way, thanks for the help.
Not sure if deleting works now (read the comments in code - I suggest that we should delete decks via DeckProxy's method and leave to deckmanager only confirmation popup and list item removal).
As for opening in editor decks located in subfolder that does work now. It should save changes properly as well. (should save = I have not tested, but there's no known reason for it to fail)

No problem.
Changed to use deckProxy.deleteFromStorage in r24466 and deleting now works for decks in subfolders.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Forge version 1.5.11

Postby moomarc » 25 Jan 2014, 04:16

Max mtg wrote:Exactly, the purely consructed mode imposes no filters. Each selected variant adds its own filter, which do stack. A deck may be good for constructed but also contain a schemes section, so it will show up in both modes.

If some more people approve this idea, I'll be able toimplement it without becoming a tyrant. :D
So if the filters stack, would you still be able to choose a main deck with no additional sections, a planar deck that just has that deck section and a scheme deck that just has the schemes if you played a match with planechase and archenemy involved?
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Forge version 1.5.11

Postby drdev » 25 Jan 2014, 05:23

I just committed a big fix to Deck editing (r24468), where now, if you add/modify/delete a deck, all DeckManagers will be updated to reflect that change, either pulling in the added deck, showing updated colors, formats, and main/side counts for a modified deck, or no longer showing a deleted deck.

I also found and fixed a glaring bug where once you saved changes to a deck once in Deck Editor, attempts to save further changes to that deck would fail to update both the file and the deck that would be played.

Please let me know if you see any other bugs related to deck editing.

Thanks.
-Dan
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Forge version 1.5.11

Postby Agetian » 25 Jan 2014, 05:24

Here's a Planechase-related bug: clicking the "Planar Deck Editor" button on the new Planechase start screen fires up Planar Deck Editor in an interesting and, sadly, unusable mode: the subtitle indicates that you're adding cards into the main portion of the deck instead of the planar portion, and the added cards end up in the sideboard when the deck is saved. More importantly, they're not being added to the [Planes] section of the deck, so the resulting deck is not usable as a Planechase planar deck.

- Agetian
Agetian
Programmer
 
Posts: 3490
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: Forge version 1.5.11

Postby drdev » 25 Jan 2014, 06:00

I just committed a "Folder" column for DeckManagers. Adding a tree-like structure looks like it will be trickier than I hoped, so I figure a column will do for now so you can at least sort on it.

If there's interest, I could also add a filter that would let you show only decks in a given folder. Let me know if that's worth adding.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 27 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 27 users online :: 0 registered, 0 hidden and 27 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 27 guests

Login Form