Page 2 of 3

Re: I/O reworking

PostPosted: 21 Sep 2009, 21:48
by DennisBergkamp
EDIT: forget it, it works :)

Although, parts of the game are in German, I guess that should be fixed after deleting the lang entry.

Re: I/O reworking

PostPosted: 22 Sep 2009, 09:48
by silly freak
yes, it should. without that, the default locale is used, and that would be english for the most of you. those that have german by default will have this partly-translated version. (or can change it back with the property)

Re: I/O reworking

PostPosted: 22 Sep 2009, 16:04
by DennisBergkamp
Ah, I just changed the language setting to "en" in the config file.

I did notice one bug however, when I created a constructed deck, I could save it but I couldn't load the deck (the set of decks shown in the main game window were different from the ones in the deck editor's load/save as list).

Re: I/O reworking

PostPosted: 22 Sep 2009, 20:01
by silly freak
i'm sorry, I can't reproduce this.

I checked what decks existed in the main screen, then opened the deck editor and made a one-card constructed deck, saved it and closed the deck editor.
after that, the deck appeared in both the main and editor window, along with the previously existing ones. I could play the deck (start a game and see the single card in hand)

can you reproduce it that or another way?

Re: I/O reworking

PostPosted: 22 Sep 2009, 20:24
by DennisBergkamp
That's exactly what I did. In fact, in the deck editor, I still see my original decks.

Maybe I should change something in the properties file? Maybe I messed up on the merge and forgot to update a line.

Re: I/O reworking

PostPosted: 22 Sep 2009, 21:41
by silly freak
hard to tell. you say the deck editor shows the new files, even after a restart? if so, maybe you haven't updated the deck editor to read from the new location.
when I tested, I deleted all forge files from the old location to make sure errors get thrown at unchanged pieces of code.

if nothing helps, just mail me your full version, i'll PM you my mail for that case

Re: I/O reworking

PostPosted: 23 Sep 2009, 06:13
by DennisBergkamp
Ahh, as it turns out I did mess up on the merge. Forgot a line or two in GUI_DeckEditor_Menu :roll:
Everything's working now!

Re: I/O reworking

PostPosted: 23 Sep 2009, 14:04
by silly freak
i'm glad about that! :wink:

Re: I/O reworking

PostPosted: 23 Sep 2009, 15:57
by DennisBergkamp
Ahh, I did find a bug though I think... this might be fixed in your local version, but in forge.properties.NewConstants.java:
Code: Select all
        public static final String EASY     = "quest/common";
        public static final String MEDIUM   = "quest/uncommon";
        public static final String HARD     = "quest/hard";
EASY and MEDIUM were referred to as common/uncommon. So I kept getting errors saying things like "AEtherflame Wall is not in the list of AI decks".
I've changed them to easy and medium, and all is working again :)

Re: I/O reworking

PostPosted: 23 Sep 2009, 18:59
by silly freak
oh really :oops:
i haven't even changed it in my version; i play a generate deck match now and then, but hardly use the quest mode. thanks!

Re: I/O reworking

PostPosted: 25 Sep 2009, 20:03
by DennisBergkamp
You're welcome :) Another thing I noticed was that TableSorter.java also reads from cards.txt (for sorting by newest cards), so I've updated that too to use the ForgeProps.

Re: I/O reworking

PostPosted: 01 Oct 2009, 06:55
by silly freak
another small update to the resizable layout code
in the last version, few users seem to have used the possibility to resize the panels theirselves, and that resulted in the stack problem. so I changed this...
(located around line 700)
Code: Select all
try {
    XMLDecoder decoder = new XMLDecoder(new BufferedInputStream(new FileInputStream(f)));
    model = (Node) decoder.readObject();
    decoder.close();
    pane.getMultiSplitLayout().setModel(model);
>>    pane.getMultiSplitLayout().setFloatingDividers(false);
} catch(Exception ex) {
    model = parseModel(""//
            + "(ROW "//
            + "(COLUMN"//
            + " (LEAF weight=0.2 name=info)"//
            + " (LEAF weight=0.2 name=compy)"//
            + " (LEAF weight=0.2 name=stack)"//
            + " (LEAF weight=0.2 name=combat)"//
            + " (LEAF weight=0.2 name=human)) "//
            + "(COLUMN weight=1"//
            + " (LEAF weight=0.2 name=compyLand)"//
            + " (LEAF weight=0.2 name=compyPlay)"//
            + " (LEAF weight=0.2 name=humanPlay)"//
            + " (LEAF weight=0.2 name=humanLand)"//
            + " (LEAF weight=0.2 name=humanHand)) "//
            + "(COLUMN"//
            + " (LEAF weight=0.5 name=detail)"//
            + " (LEAF weight=0.5 name=picture)))");
    pane.setModel(model);
}
...to...
Code: Select all
try {
    XMLDecoder decoder = new XMLDecoder(new BufferedInputStream(new FileInputStream(f)));
    model = (Node) decoder.readObject();
    decoder.close();
    pane.getMultiSplitLayout().setModel(model);
} catch(Exception ex) {
    model = parseModel(""//
            + "(ROW "//
            + "(COLUMN"//
            + " (LEAF weight=0.2 name=info)"//
            + " (LEAF weight=0.2 name=compy)"//
            + " (LEAF weight=0.2 name=stack)"//
            + " (LEAF weight=0.2 name=combat)"//
            + " (LEAF weight=0.2 name=human)) "//
            + "(COLUMN weight=1"//
            + " (LEAF weight=0.2 name=compyLand)"//
            + " (LEAF weight=0.2 name=compyPlay)"//
            + " (LEAF weight=0.2 name=humanPlay)"//
            + " (LEAF weight=0.2 name=humanLand)"//
            + " (LEAF weight=0.2 name=humanHand)) "//
            + "(COLUMN"//
            + " (LEAF weight=0.5 name=detail)"//
            + " (LEAF weight=0.5 name=picture)))");
    pane.setModel(model);
}
>>pane.getMultiSplitLayout().setFloatingDividers(false);
this will deactivate the auto-resize from the beginning, no matter how the layout was determined.

Re: I/O reworking

PostPosted: 01 Oct 2009, 19:55
by DennisBergkamp
Ok, I'll make these changes too :)

By the way, there used to be a checkbox in the menu at the top to make the game pause at the End of Turn of the AI. This option somehow disappeared?

Re: I/O reworking

PostPosted: 01 Oct 2009, 20:20
by silly freak
thanks, I seem to have lost it when changing the menu code. in addMenu(), just change this
Code: Select all
Object[] obj = {
        HUMAN_GRAVEYARD_ACTION, HUMAN_REMOVED_ACTION, HUMAN_FLASHBACK_ACTION, COMPUTER_GRAVEYARD_ACTION, COMPUTER_REMOVED_ACTION, new JSeparator(), ErrorViewer.ALL_THREADS_ACTION, new JSeparator(), CONCEDE_ACTION};
to this
Code: Select all
Object[] obj = {
        HUMAN_GRAVEYARD_ACTION, HUMAN_REMOVED_ACTION, HUMAN_FLASHBACK_ACTION, COMPUTER_GRAVEYARD_ACTION, COMPUTER_REMOVED_ACTION, GuiDisplay3.eotCheckboxForMenu, new JSeparator(), ErrorViewer.ALL_THREADS_ACTION, new JSeparator(), CONCEDE_ACTION};
this is all to be done to add the checkbox back in. and since the checkbox's effect is ensured by stopEOT() it should also work again

Re: I/O reworking

PostPosted: 01 Oct 2009, 20:33
by DennisBergkamp
Awesome, thanks, yes it's back again :)