It is currently 26 Apr 2024, 05:24
   
Text Size

Deck Edtior Unhandled Exception Help

Moderator: CCGHQ Admins

Deck Edtior Unhandled Exception Help

Postby Orangewaggs » 09 Feb 2014, 19:26

Hey I was Exporting a deck when this came up
************** Exception Text **************
System.FormatException: One of the identified items was in an invalid format.
at Gibbed.Duels.FileFormats.TdxFile.Serialize(Stream output)
at RSN.DotP.WadBase.AddAiPersonalityImage(String strFilename, TdxWrapper twImage)
at RSN.DotP.DeckBuilder.ExportWad(WadBase wad, String strGameDirectory)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I Clicked Continue and it still didn't export my deck... I even tryed reinstalling the editor and that didn't work any help would be great...
User avatar
Orangewaggs
 
Posts: 17
Joined: 18 Dec 2013, 23:39
Has thanked: 8 times
Been thanked: 0 time

Re: Deck Edtior Unhandled Exception Help

Postby RiiakShiNal » 09 Feb 2014, 20:34

This error is stating that it had a problem trying to export the AI Personality image. Given that it threw a FormatException and it happened in Gibbed.Duels.FileFormats.TdxFile.Serialize() and not in some deeper .Net code then one of the following must be true:
  1. Wrong header flags were set for the image (unlikely as I don't set flags Unknown0, Unknown1, or Unknown12, though it is possible that you are trying to use a game TDX image that has one of those flags set).
  2. The image is too large (height and/or width is greater than 2048).
  3. You are trying to use the Deck Builder with a non-modified version of Gibbed Tools (unlikely if you used the files from the Deck Builder zip file as I packaged the Builder with my modified version, additionally I made no changes to that function so if you are using the wrong version the error shouldn't occur there anyway).

Personally, I think the most likely answer is #2, the source image is too large, but if that is not the case feel free to attach a "Save" of the deck which shows this problem so I can trace the error and fix it.
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Deck Edtior Unhandled Exception Help

Postby Orangewaggs » 09 Feb 2014, 20:37

Okay I think i know what I did. I used an image that was too big Thank you Riiak. :)
User avatar
Orangewaggs
 
Posts: 17
Joined: 18 Dec 2013, 23:39
Has thanked: 8 times
Been thanked: 0 time

Re: Deck Edtior Unhandled Exception Help

Postby RiiakShiNal » 09 Feb 2014, 21:02

Well as long as we figured out what the problem was.
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Deck Edtior Unhandled Exception Help

Postby Orangewaggs » 12 Feb 2014, 08:16

I figured i would ask here instead of making a new topic but whenever I make a deck that is either Bant or certain 4 color combos or a 5 color deck the land count skyrockets to over 250 and ideas to stop that?
User avatar
Orangewaggs
 
Posts: 17
Joined: 18 Dec 2013, 23:39
Has thanked: 8 times
Been thanked: 0 time

Re: Deck Edtior Unhandled Exception Help

Postby RiiakShiNal » 12 Feb 2014, 14:00

Orangewaggs wrote:I figured i would ask here instead of making a new topic but whenever I make a deck that is either Bant or certain 4 color combos or a 5 color deck the land count skyrockets to over 250 and ideas to stop that?
This has been covered several times, the problem is not with the Deck Builder (as the Deck Builder does not actually auto-add basic land to a deck). The problem is that the game engine does not like 4+ colour decks and can't handle them properly. The easiest way to get around the problem is to (in the Deck Builder) set the land config (in Deck Information) as follows:
  • Ignore Cards with CMC over: 0 (Important as you need to disable automatic land determination.)
  • Minimum Forests: <# of basic forests you want in the deck>
  • Minimum Islands: <# of basic islands you want in the deck>
  • Minimum Mountains: <# of basic mountains you want in the deck>
  • Minimum Plains: <# of basic plains you want in the deck>
  • Minimum Swamps: <# of basic swamps you want in the deck>
  • Number of Spells that count as land: 0 (This should be left at 0 due to a bug in the engine.)

This still will not allow changing land in the in-game deck manager (because the engine can't properly handle 4+ colour decks), but it will allow you to determine exactly what basic lands you want to have in the base 60 card deck.

This will not allow auto-adding lands to make a base deck more than 60 cards as the engine will only auto-add lands to get the base deck up to 60 cards. If you want the base deck to be more than 60 cards then you will have to add land manually to the main deck (the engine only supports up to 100 cards for standard decks including the unlocks).
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times


Return to 2014

Who is online

Users browsing this forum: No registered users and 47 guests


Who is online

In total there are 47 users online :: 0 registered, 0 hidden and 47 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 47 guests

Login Form