It is currently 18 Apr 2024, 20:22
   
Text Size

I/O reworking

Post MTG Forge Related Programming Questions Here

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

Re: I/O reworking

Postby DennisBergkamp » 21 Sep 2009, 21:48

EDIT: forget it, it works :)

Although, parts of the game are in German, I guess that should be fixed after deleting the lang entry.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: I/O reworking

Postby silly freak » 22 Sep 2009, 09:48

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)
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: I/O reworking

Postby DennisBergkamp » 22 Sep 2009, 16:04

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).
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: I/O reworking

Postby silly freak » 22 Sep 2009, 20:01

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?
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: I/O reworking

Postby DennisBergkamp » 22 Sep 2009, 20:24

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.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: I/O reworking

Postby silly freak » 22 Sep 2009, 21:41

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
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: I/O reworking

Postby DennisBergkamp » 23 Sep 2009, 06:13

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!
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: I/O reworking

Postby silly freak » 23 Sep 2009, 14:04

i'm glad about that! :wink:
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: I/O reworking

Postby DennisBergkamp » 23 Sep 2009, 15:57

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 :)
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: I/O reworking

Postby silly freak » 23 Sep 2009, 18:59

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!
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: I/O reworking

Postby DennisBergkamp » 25 Sep 2009, 20:03

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.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: I/O reworking

Postby silly freak » 01 Oct 2009, 06:55

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.
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: I/O reworking

Postby DennisBergkamp » 01 Oct 2009, 19:55

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?
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: I/O reworking

Postby silly freak » 01 Oct 2009, 20:20

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
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: I/O reworking

Postby DennisBergkamp » 01 Oct 2009, 20:33

Awesome, thanks, yes it's back again :)
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 41 guests

cron

Who is online

In total there are 41 users online :: 0 registered, 0 hidden and 41 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 41 guests

Login Form