It is currently 17 Jan 2017, 10:53
   
Text Size

[REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Moderator: CCGHQ Admins

Re: [REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Postby RiiakShiNal » 01 Apr 2016, 10:45

deathpancreas wrote:Would I be able to make the cards that are meant to unlock, stay locked until earned?
Yes and no. You could export to directory then modify the deck XML to change the steam_id_* entries to a different number (that is not an AppId that someone would have, such as an 8+ digit number) and that would make the unlocks locked until unlocked by winning matches (or it could be done automatically by setting SteamDefaultUnlockId and SteamDefaultFoilId in the deck builder settings, but then it would take effect for all decks created). However, because there are not enough slots for deck configurations in the profile when you exit the game the unlocks would reset and become locked again.

deathpancreas wrote:If I move card X from unlocked to main board, the card X appears back in the sideboard once the game reloads. Is there a way around that?
Due to there not being enough deck configuration slots in the player profile the deck configurations of modded decks are not saved to the profile so they will always reset. This is a problem with DotP 2014, unfortunately there really isn't a way around it other than replacing the standard decks (meaning the file names and deck ids have to be identical), though that means that the standard decks are no longer available to be played (because you replaced them).
Problems with base game cards: DotP 2014 Core Fixes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
RiiakShiNal
Programmer
 
Posts: 2072
Joined: 16 May 2011, 21:37
Has thanked: 72 times
Been thanked: 447 times

Re: [REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Postby thanosyro » 27 Apr 2016, 17:54

Anyone tried to fix "Hallowed Moonlight"
thanosyro
 
Posts: 8
Joined: 28 Apr 2015, 18:58
Has thanked: 1 time
Been thanked: 0 time

Re: [REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Postby Xander9009 » 27 Apr 2016, 19:04

thanosyro wrote:Anyone tried to fix "Hallowed Moonlight"
For questions about cards or decks, you're better off in the CW thread, another thread where the card is relevant (such as the Origins development thread), or in a new thread.

However, I've just tested Hallowed Moonlight and it worked as intended. I'd suggest explaining the problem you're having with the card in a bit more detail. Preferably in the Origins or CW thread.
User avatar
Xander9009
Programmer
 
Posts: 2414
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 78 times
Been thanked: 307 times

Re: [REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Postby Xander9009 » 28 Apr 2016, 03:06

Hey, Riiak, I thought of something else that might be useful for the Deck Builder. Not sure how you'd feel about it, but I thought I'd mention it anyway. One thing that the CW lacks is good deck organization. While the IDs are useful, they're also pretty confusing for newer users. There aren't /many/ new users, from what I can tell, but they do keep appearing.

Something really simple that could help group the decks really nicely would be the addition of an optional username before the numbers (before or after, but before might make sorting more consistent, and would have the numbers separating it from the deck name). And if the CPE had the username as well, it would be a lot easier for new users to understand immediately which ones to grab without trying to explain that you ignore the last 2 digits, but in some cases 3 digits, and then find... Yeah. Not major, but might be worth considering.
User avatar
Xander9009
Programmer
 
Posts: 2414
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 78 times
Been thanked: 307 times

Re: [REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Postby Shoggoththe12 » 25 Jul 2016, 03:56

Well, I don't know why this error I received upon downloading a latest version keeps happening, but here goes:

Code: Select all
************** Exception Text **************
System.IO.EndOfStreamException: Attempted to read past the end of the stream.
   at Gibbed.IO.StreamHelpers.ReadToMemoryStream(Stream stream, Int64 size, Int32 buffer)
   at RSN.DotP.WadWrapper.RetrieveFile(FileStream fsInput, FileEntry feFile)
   at RSN.DotP.WadWrapper.LoadImageSpecific(String strId, LoadImageType eType)
   at RSN.DotP.WadWrapper.LoadImage(String strId, LoadImageType eType)
   at RSN.DotP.GameDirectory.LoadImage(String strImage, LoadImageType eType)
   at RSN.DotP.CardInfo.GeneratePreviewImage(String strLangCode)
   at RSN.DotP.CardInfo.GetPreviewImage(String strLangCode)
   at RSN.DotP.CardInfo.GetLocalizedPreviewImage()
   at RSN.DotP.DeckBuilder.ShowCardInfo(CardInfo ciCard)
   at RSN.DotP.DeckBuilder.dgvCards_CellMouseEnter(Object sender, DataGridViewCellEventArgs e)
   at System.Windows.Forms.DataGridView.OnCellMouseEnter(DataGridViewCellEventArgs e)
   at System.Windows.Forms.DataGridView.UpdateMouseEnteredCell(HitTestInfo hti, MouseEventArgs e)
   at System.Windows.Forms.DataGridView.OnMouseMove(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseMove(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.DataGridView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
It happens every time I mouse over cards after searching for say, Werewolves. And I can't even click on them because the pop-up appears and prevents me from doing so. I tried both 64-bit and 32-bit versions; both gave me this error of reaching the end of the "stream", whatever that is.

Dunno if it's my laptop or not, but I think 1.4.0 version was working just fine so idk. :evil:
Shoggoththe12
 
Posts: 9
Joined: 18 Dec 2015, 03:43
Has thanked: 0 time
Been thanked: 0 time

Re: [REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Postby Shoggoththe12 » 25 Jul 2016, 03:57

Well, I don't know why this error I received upon downloading a latest version keeps happening, but here goes:

Code: Select all
************** Exception Text **************
System.IO.EndOfStreamException: Attempted to read past the end of the stream.
   at Gibbed.IO.StreamHelpers.ReadToMemoryStream(Stream stream, Int64 size, Int32 buffer)
   at RSN.DotP.WadWrapper.RetrieveFile(FileStream fsInput, FileEntry feFile)
   at RSN.DotP.WadWrapper.LoadImageSpecific(String strId, LoadImageType eType)
   at RSN.DotP.WadWrapper.LoadImage(String strId, LoadImageType eType)
   at RSN.DotP.GameDirectory.LoadImage(String strImage, LoadImageType eType)
   at RSN.DotP.CardInfo.GeneratePreviewImage(String strLangCode)
   at RSN.DotP.CardInfo.GetPreviewImage(String strLangCode)
   at RSN.DotP.CardInfo.GetLocalizedPreviewImage()
   at RSN.DotP.DeckBuilder.ShowCardInfo(CardInfo ciCard)
   at RSN.DotP.DeckBuilder.dgvCards_CellMouseEnter(Object sender, DataGridViewCellEventArgs e)
   at System.Windows.Forms.DataGridView.OnCellMouseEnter(DataGridViewCellEventArgs e)
   at System.Windows.Forms.DataGridView.UpdateMouseEnteredCell(HitTestInfo hti, MouseEventArgs e)
   at System.Windows.Forms.DataGridView.OnMouseMove(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseMove(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.DataGridView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
It happens every time I mouse over cards after searching for say, Werewolves. And I can't even click on them because the pop-up appears and prevents me from doing so. I tried both 64-bit and 32-bit versions; both gave me this error of reaching the end of the "stream", whatever that is.

Dunno if it's my laptop or not, but I think 1.4.0 version was working just fine so idk. :evil:
Shoggoththe12
 
Posts: 9
Joined: 18 Dec 2015, 03:43
Has thanked: 0 time
Been thanked: 0 time

Re: [REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Postby RiiakShiNal » 25 Jul 2016, 10:57

This error is usually the result of an incomplete Wad file (it is trying to look past the end of the file to find the resource that the Wad says is there). So likely one of the Wads you downloaded either finished downloading prematurely or is corrupt.

To explain the error in detail (things become more high level and generic as you go down a call stack):
  • System.IO.EndOfStreamException: Attempted to read past the end of the stream. - Tried to read past end of file, in the Deck Builder files are managed with streams.
  • Gibbed.IO.StreamHelpers.ReadToMemoryStream(Stream stream, Int64 size, Int32 buffer) - Gibbed Tools is trying to read "size" bytes into "buffer" from "stream" (the Wad).
  • RSN.DotP.WadWrapper.RetrieveFile(FileStream fsInput, FileEntry feFile) - From my WadWrapper class I am trying to load the file described by "fefile", from the Wad passed in by "fsInput".
  • RSN.DotP.WadWrapper.LoadImageSpecific(String strId, LoadImageType eType) - Trying to load a specific image from a specific Wad with name passed in using "strId" and of the type passed in by "eType".
  • RSN.DotP.WadWrapper.LoadImage(String strId, LoadImageType eType) - Wrapper function to determine whether to load a specific image type or search for an image in this specific Wad.
  • RSN.DotP.GameDirectory.LoadImage(String strImage, LoadImageType eType) - Trying to load an image with name passed in by "strImage" and type passed in by "eType" from the game directory (will figure out which Wad and delegate the task).
  • RSN.DotP.CardInfo.GeneratePreviewImage(String strLangCode) - Try to build a specific card's preview image (the output from this is what is shown in the Deck Builder) in the specified language (strLangCode).
  • RSN.DotP.CardInfo.GetPreviewImage(String strLangCode) - Retrieve (or build) the preview image for this card in the specified language (strLangCode).
  • RSN.DotP.CardInfo.GetLocalizedPreviewImage() - Get an already built localized preview or build one for this card.
  • RSN.DotP.DeckBuilder.ShowCardInfo(CardInfo ciCard) - Show the card info for the "ciCard" object instance.
  • RSN.DotP.DeckBuilder.dgvCards_CellMouseEnter(Object sender, DataGridViewCellEventArgs e) - Mouse has entered a specific cell in the data grid for all cards, run the program specific code to handle this.
  • System.Windows.Forms.DataGridView.OnCellMouseEnter(DataGridViewCellEventArgs e) - Windows code to call a program specific handler for the event that happens when the Mouse cursor enters a cell in a data grid control (I'm going to stop tracing back from here since all that is left is Microsoft code).
Problems with base game cards: DotP 2014 Core Fixes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
RiiakShiNal
Programmer
 
Posts: 2072
Joined: 16 May 2011, 21:37
Has thanked: 72 times
Been thanked: 447 times

Re: [REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Postby Xander9009 » 25 Aug 2016, 19:14

Hey Riiak, I've come across an error recently that started showing up relatively often. It hasn't yet happened with a normal deck; rather it occurs with my test deck. So it might be related to repeatedly changing a deck? Anyway, the error happens when I try to export a deck.

The error displayed is "No English localized name specified, unable to export." If I press continue, then it shows a loading cursor which never goes away. If I try to open the Deck Information tab for the affected deck, it shows a different error: "Object reference not set to an instance of an object."

If I reload the Deck Builder, then the error persists. Once it appears, that deck has to be remade from scratch. I tried saving it as an XML file, deleting the wad, and loading the XML, only to discover that XML in fact contains the broken info. Comparing it to a working exported deck led to the "<LocalizedNames />" tag inside the "<AiPersonality>...</AiPersonality>" section. The working deck had proper localized names, whereas the broken one had that one-line tag with no info. Replacing it with the other deck's "<LocalizedNames>...</LocalizedNames>" section fixed the issue. I'm not certain exactly what precisely causes the issue, and I'm also not sure why it only started happening recently. Either way, I've got a way around it, and thus it's not urgent. However, I figured you'd like to know about it.

Also, while I am using a modified version of your deck builder, I tested the XML with a clean copy (which I just now downloaded to make sure it was up to date) and it experienced the same issue.

EDIT:
Broken XML | Open
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<DECK uid="100" personality="D14_PERSONALITY_9009_TEST.XML" deck_box_image="" deck_box_image_locked="locked" content_pack="9009" always_available="true" is_black="true" is_blue="true" is_green="true" is_red="true" is_white="true" cheat_menu_filter_deck_type="Standard" tus_save_data_id="100" ios_id_1="D14_DECK_UNLOCK_1" ios_id_2="D14_DECK_FOIL_1" steam_id_1="213850" steam_id_2="213850" android_id_1="d14_deck_unlock_01" android_id_2="d14_deck_foil_01" cheat_menu_filter_datapool="D14" name_tag="D14_9009100_TEST" description_tag="D14_9009100_TEST_DESCRIPTION">
  <DECKSTATISTICS Size="5" Speed="5" Flex="5" Syn="5" />
  <CARD name="_FAVOR_OF_THE_GODS_MM_CW_9009000" deckOrderId="0" />
  <CARD name="AJANI_GOLDMANE_CW_205957" deckOrderId="1" />
  <CARD name="AJANI_GOLDMANE_CW_205957" deckOrderId="2" />
  <CARD name="AJANI_GOLDMANE_CW_205957" deckOrderId="3" />
  <CARD name="AJANI_GOLDMANE_CW_205957" deckOrderId="4" />
  <CARD name="AJANI_GOLDMANE_CW_205957" deckOrderId="5" />
  <CARD name="BLIGHTCASTER_CW_370761" deckOrderId="6" />
  <CARD name="BLOOD_OATH_CW_19726" deckOrderId="7" />
  <CARD name="BREAK_ASUNDER_CW_47219" deckOrderId="8" />
  <CARD name="CAPASHEN_UNICORN_CW_22936" deckOrderId="9" />
  <CARD name="CLEAR_CW_5692" deckOrderId="10" />
  <CARD name="CLOUDCHASER_EAGLE_CW_4871" deckOrderId="11" />
  <CARD name="CONSIGN_TO_DUST_CW_380387" deckOrderId="12" />
  <CARD name="CREEPING_MOLD_CW_3660" deckOrderId="13" />
  <CARD name="CURSEBREAK_CW_240124" deckOrderId="14" />
  <CARD name="DARKSTEEL_FORGE_CW_370734" deckOrderId="15" />
  <CARD name="ENCHANTED_EVENING_CW_151979" deckOrderId="16" />
  <CARD name="ENCHANTED_EVENING_CW_151979" deckOrderId="17" />
  <CARD name="ENCHANTED_EVENING_CW_151979" deckOrderId="18" />
  <CARD name="ENCHANTED_EVENING_CW_151979" deckOrderId="19" />
  <CARD name="ENCHANTED_EVENING_CW_151979" deckOrderId="20" />
  <CARD name="GHASTLY_CONSCRIPTION_CW_391843" deckOrderId="21" />
  <CARD name="PARASELENE_CW_249975" deckOrderId="22" />
  <CARD name="SOUL_SUMMONS_CW_TEST" deckOrderId="23" />
  <CARD name="WHISPERWOOD_ELEMENTAL_CW_391958" deckOrderId="24" />
  <LocalizedDeckNames>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[TEST]]></LOCALISED_TEXT>
  </LocalizedDeckNames>
  <AiPersonality>
    <PLANESWALKER_NAME_TAG string="PLAYER_NAME_9009_TEST" />
    <LARGE_AVATAR_IMAGE string="" />
    <MEDIUM_AVATAR_IMAGE string="" />
    <SMALL_AVATAR_IMAGE string="" />
    <SMALL_AVATAR_IMAGE_LOCKED string="" />
    <LOBBY_IMAGE string="" />
    <MUSIC string="" />
    <LocalizedNames />    //Broken line
  </AiPersonality>
  <LandPool>
    <DECK uid="101" personality="" deck_box_image="" deck_box_image_locked="locked" content_pack="0" never_available="true" cheat_menu_filter_deck_type="Utility" tus_save_data_id="101" ios_id_1="D14_DECK_UNLOCK_1" ios_id_2="D14_DECK_FOIL_1" steam_id_1="213850" steam_id_2="213850" android_id_1="d14_deck_unlock_01" android_id_2="d14_deck_foil_01" cheat_menu_filter_datapool="D14" name_tag="" description_tag="">
      <CARD name="FOREST_357837" deckOrderId="0" />
      <CARD name="FOREST_357843" deckOrderId="1" />
      <CARD name="FOREST_357972" deckOrderId="2" />
      <CARD name="FOREST_369820" deckOrderId="3" />
      <CARD name="ISLAND_357811" deckOrderId="4" />
      <CARD name="ISLAND_357815" deckOrderId="5" />
      <CARD name="ISLAND_357935" deckOrderId="6" />
      <CARD name="ISLAND_369825" deckOrderId="7" />
      <CARD name="MOUNTAIN_357801" deckOrderId="8" />
      <CARD name="MOUNTAIN_357958" deckOrderId="9" />
      <CARD name="MOUNTAIN_369827" deckOrderId="10" />
      <CARD name="MOUNTAIN_369830" deckOrderId="11" />
      <CARD name="PLAINS_357849" deckOrderId="12" />
      <CARD name="PLAINS_357927" deckOrderId="13" />
      <CARD name="PLAINS_357981" deckOrderId="14" />
      <CARD name="PLAINS_357983" deckOrderId="15" />
      <CARD name="SWAMP_357825" deckOrderId="16" />
      <CARD name="SWAMP_357829" deckOrderId="17" />
      <CARD name="SWAMP_357830" deckOrderId="18" />
      <CARD name="SWAMP_357951" deckOrderId="19" />
    </DECK>
  </LandPool>
</DECK>
Working XML | Open
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<DECK uid="100" personality="D14_PERSONALITY_9009_TEST.XML" deck_box_image="" deck_box_image_locked="locked" content_pack="9009" always_available="true" is_black="true" is_blue="true" is_green="true" is_red="true" is_white="true" cheat_menu_filter_deck_type="Standard" tus_save_data_id="100" ios_id_1="D14_DECK_UNLOCK_1" ios_id_2="D14_DECK_FOIL_1" steam_id_1="213850" steam_id_2="213850" android_id_1="d14_deck_unlock_01" android_id_2="d14_deck_foil_01" cheat_menu_filter_datapool="D14" name_tag="D14_9009100_TEST" description_tag="D14_9009100_TEST_DESCRIPTION">
  <DECKSTATISTICS Size="5" Speed="5" Flex="5" Syn="5" />
  <CARD name="_FAVOR_OF_THE_GODS_MM_CW_9009000" deckOrderId="0" />
  <CARD name="AJANI_GOLDMANE_CW_205957" deckOrderId="1" />
  <CARD name="AJANI_GOLDMANE_CW_205957" deckOrderId="2" />
  <CARD name="AJANI_GOLDMANE_CW_205957" deckOrderId="3" />
  <CARD name="AJANI_GOLDMANE_CW_205957" deckOrderId="4" />
  <CARD name="AJANI_GOLDMANE_CW_205957" deckOrderId="5" />
  <CARD name="BLIGHTCASTER_CW_370761" deckOrderId="6" />
  <CARD name="BLOOD_OATH_CW_19726" deckOrderId="7" />
  <CARD name="BREAK_ASUNDER_CW_47219" deckOrderId="8" />
  <CARD name="CAPASHEN_UNICORN_CW_22936" deckOrderId="9" />
  <CARD name="CLEAR_CW_5692" deckOrderId="10" />
  <CARD name="CLOUDCHASER_EAGLE_CW_4871" deckOrderId="11" />
  <CARD name="CONSIGN_TO_DUST_CW_380387" deckOrderId="12" />
  <CARD name="CREEPING_MOLD_CW_3660" deckOrderId="13" />
  <CARD name="CURSEBREAK_CW_240124" deckOrderId="14" />
  <CARD name="DARKSTEEL_FORGE_CW_370734" deckOrderId="15" />
  <CARD name="ENCHANTED_EVENING_CW_151979" deckOrderId="16" />
  <CARD name="ENCHANTED_EVENING_CW_151979" deckOrderId="17" />
  <CARD name="ENCHANTED_EVENING_CW_151979" deckOrderId="18" />
  <CARD name="ENCHANTED_EVENING_CW_151979" deckOrderId="19" />
  <CARD name="ENCHANTED_EVENING_CW_151979" deckOrderId="20" />
  <CARD name="GHASTLY_CONSCRIPTION_CW_391843" deckOrderId="21" />
  <CARD name="PARASELENE_CW_249975" deckOrderId="22" />
  <CARD name="SOUL_SUMMONS_CW_TEST" deckOrderId="23" />
  <CARD name="WHISPERWOOD_ELEMENTAL_CW_391958" deckOrderId="24" />
  <LocalizedDeckNames>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[TEST]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[TEST]]></LOCALISED_TEXT>
  </LocalizedDeckNames>
  <AiPersonality>
    <PLANESWALKER_NAME_TAG string="PLAYER_NAME_9009_TEST" />
    <LARGE_AVATAR_IMAGE string="" />
    <MEDIUM_AVATAR_IMAGE string="" />
    <SMALL_AVATAR_IMAGE string="" />
    <SMALL_AVATAR_IMAGE_LOCKED string="" />
    <LOBBY_IMAGE string="" />
    <MUSIC string="" />
    <LocalizedNames>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[TEST]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[TEST]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[TEST]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[TEST]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[TEST]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[TEST]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[TEST]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[TEST]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[TEST]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[TEST]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[TEST]]></LOCALISED_TEXT>
    </LocalizedNames>
  </AiPersonality>
  <LandPool>
    <DECK uid="101" personality="" deck_box_image="" deck_box_image_locked="locked" content_pack="0" never_available="true" cheat_menu_filter_deck_type="Utility" tus_save_data_id="101" ios_id_1="D14_DECK_UNLOCK_1" ios_id_2="D14_DECK_FOIL_1" steam_id_1="213850" steam_id_2="213850" android_id_1="d14_deck_unlock_01" android_id_2="d14_deck_foil_01" cheat_menu_filter_datapool="D14" name_tag="" description_tag="">
      <CARD name="FOREST_357837" deckOrderId="0" />
      <CARD name="FOREST_357843" deckOrderId="1" />
      <CARD name="FOREST_357972" deckOrderId="2" />
      <CARD name="FOREST_369820" deckOrderId="3" />
      <CARD name="ISLAND_357811" deckOrderId="4" />
      <CARD name="ISLAND_357815" deckOrderId="5" />
      <CARD name="ISLAND_357935" deckOrderId="6" />
      <CARD name="ISLAND_369825" deckOrderId="7" />
      <CARD name="MOUNTAIN_357801" deckOrderId="8" />
      <CARD name="MOUNTAIN_357958" deckOrderId="9" />
      <CARD name="MOUNTAIN_369827" deckOrderId="10" />
      <CARD name="MOUNTAIN_369830" deckOrderId="11" />
      <CARD name="PLAINS_357849" deckOrderId="12" />
      <CARD name="PLAINS_357927" deckOrderId="13" />
      <CARD name="PLAINS_357981" deckOrderId="14" />
      <CARD name="PLAINS_357983" deckOrderId="15" />
      <CARD name="SWAMP_357825" deckOrderId="16" />
      <CARD name="SWAMP_357829" deckOrderId="17" />
      <CARD name="SWAMP_357830" deckOrderId="18" />
      <CARD name="SWAMP_357951" deckOrderId="19" />
    </DECK>
  </LandPool>
</DECK>
Only line 50 on the broken XML was changed to lines 50-62 of the working xml. The rest is identical.
User avatar
Xander9009
Programmer
 
Posts: 2414
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 78 times
Been thanked: 307 times

Re: [REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Postby Splinterverse » 08 Oct 2016, 20:38

Anyone having issues getting this to run in Windows 10? My friend installed it and when he opens it for the first time, he picks the directory and then it spins for a while. Eventually, it says that it has stopped working and exits.
---------------------------------------------
The CW is updated nightly between 11 PM and 12 AM EST.
Impossible Cards List | Update Your Land Pools | HQ art status
Splinterverse
 
Posts: 492
Joined: 04 Sep 2016, 13:32
Has thanked: 29 times
Been thanked: 12 times

Re: [REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Postby RiiakShiNal » 10 Oct 2016, 10:36

There shouldn't be any problems with Windows 10 as my development machine is currently Windows 10 and I've seen no problems running either the 32-bit or 64-bit versions in both Release and Debug configurations. Though if you can give me specifics I can always look into it.

Also check for the Errors.log file (in the same directory as the Deck Builder) as it could have some errors in it that could be contributing to the problem your friend is seeing.
Problems with base game cards: DotP 2014 Core Fixes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
RiiakShiNal
Programmer
 
Posts: 2072
Joined: 16 May 2011, 21:37
Has thanked: 72 times
Been thanked: 447 times

Re: [REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Postby Splinterverse2 » 11 Oct 2016, 13:48

RiiakShiNal wrote:There shouldn't be any problems with Windows 10 as my development machine is currently Windows 10 and I've seen no problems running either the 32-bit or 64-bit versions in both Release and Debug configurations. Though if you can give me specifics I can always look into it.

Also check for the Errors.log file (in the same directory as the Deck Builder) as it could have some errors in it that could be contributing to the problem your friend is seeing.
I will take a look at his logs. I may also try adding his folder before opening so that it will try scanning the folder on load rather than prompting. That is if I can find the config file to add the path into. Thanks for responding. I appreciate it.
Splinterverse2
 
Posts: 32
Joined: 20 Sep 2016, 13:52
Has thanked: 3 times
Been thanked: 0 time

Re: [REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Postby RiiakShiNal » 12 Oct 2016, 10:48

Splinterverse2 wrote:I will take a look at his logs. I may also try adding his folder before opening so that it will try scanning the folder on load rather than prompting. That is if I can find the config file to add the path into. Thanks for responding. I appreciate it.
Settings.xml is in the same folder as the Deck Builder, though since the Deck Builder crashed then it may not have created that file. The Errors.log file is created as soon as errors are detected that I can catch and log to the file (so even if the Deck Builder crashes that file should be there if any caught errors were generated).
Problems with base game cards: DotP 2014 Core Fixes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
RiiakShiNal
Programmer
 
Posts: 2072
Joined: 16 May 2011, 21:37
Has thanked: 72 times
Been thanked: 447 times

Re: [REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Postby Xander9009 » 21 Oct 2016, 08:02

I finally found the source of the issue I posted, but I have no idea how to correctly fix it. In the DeckBuilder.cs file -> ExportWad function -> kvpPersonalityName variable. It's set to an empty dictionary, and then only added to the exported deck's text permanent if the personality isn't a "BuiltIn" personality. When I replaced that with the same method the 'kvpDeckName' uses (initialized directly to the personality's name regardless of built-in status), the problem disappeared. Unfortunately, I don't see where personalities are being marked as BuiltIn, so I don't know how to figure out why it's marking some as built-in even though they aren't.

For the record, they're definitely not built in. They're completely custom, with custom names, images, and everything except music.

----

Nevermind. I figured out where it is. WadDirectory.cs -> LoadPersonalities() -> "ap.BuiltIn = true". Replaced that with (and of course undid the change to kvpPersonalityName )
Code: Select all
if (
    m_strFullDir.IndexOf("\\DATA_DECKS_", StringComparison.OrdinalIgnoreCase) < 0 ||
    m_strFullDir.IndexOf("\\DATA_DECKS_D14\\", StringComparison.OrdinalIgnoreCase) >= 0 ||
    m_strFullDir.IndexOf("\\DATA_DECKS_E14\\", StringComparison.OrdinalIgnoreCase) >= 0 ||
    m_strFullDir.IndexOf("\\DATA_DECKS_F14_PACK1\\", StringComparison.OrdinalIgnoreCase) >= 0 ||
    m_strFullDir.IndexOf("\\DATA_DECKS_F14_PACK2\\", StringComparison.OrdinalIgnoreCase) >= 0 ||
    m_strFullDir.IndexOf("\\DATA_DECKS_F14_PACK3\\", StringComparison.OrdinalIgnoreCase) >= 0
    )
{
    // This was loaded from the game directory and not a custom deck so we consider it built-in because the user already has it.
    ap.BuiltIn = true;
}
Sadly, I don't know the best method of doing this. I imagine the really best way would be to make a master list of official mods and a function for seeing if a particular path lies inside one of those, but that's too far outside my comfort level to risk my DotP modding lol. It works, so it's good enough for me. It'd probably be a lot better, since not everyone's decks were in the format DATA_DECKS_. Some used DATA_DLC_, such as TFM's decks. But I don't plan to go modding those anyway, so...

I don't know if you'd want to change that in the main version, but in case you do (or just so you're aware of it), I figured I'd post about what I discovered.

----

I also changed the name retrieval to return "New Personality" if the other options fail.
User avatar
Xander9009
Programmer
 
Posts: 2414
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 78 times
Been thanked: 307 times

Re: [REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Postby RiiakShiNal » 24 Oct 2016, 13:29

Xander9009 wrote:I finally found the source of the issue I posted, but I have no idea how to correctly fix it. In the DeckBuilder.cs file -> ExportWad function -> kvpPersonalityName variable. It's set to an empty dictionary, and then only added to the exported deck's text permanent if the personality isn't a "BuiltIn" personality. When I replaced that with the same method the 'kvpDeckName' uses (initialized directly to the personality's name regardless of built-in status), the problem disappeared. Unfortunately, I don't see where personalities are being marked as BuiltIn, so I don't know how to figure out why it's marking some as built-in even though they aren't.

For the record, they're definitely not built in. They're completely custom, with custom names, images, and everything except music.
I was actually using BuiltIn to determine if a Personality is already available to the user (i.e. they have the personality installed, either from game default or from mods). This was so that I could minimize how much is put into a deck and try to keep duplication to a minimum. Since if they have something installed it is available to everything without needing to have additional copies.

Though obviously things aren't being kept installed which is why this problem is cropping up.

I have a fix (and have had for a while, but can't really release due to partial state of other code) for loading saved deck XMLs where the personality information is missing (essentially I check to see if the LocalizedName is null before I try to use it and if it is I replace it with a localized version of "AI Personality"). Additionally, to prevent the problem from cropping up again when saving the localized text (XmlTools.SaveLocalizedText()) I check to make sure there is at least one child node and if not I put an empty string into the fallback language (English, en-US) so that it has one.

For quickly finding where something is set you can either go to the accessor set right-click on the name and select "Find All References" (if you are using Visual Studio) or you can set a break point on the set accessor and run in Debug mode and wait for it to be hit then look at the call stack to see what called it. With a lot of important data I have kept it private and provided accessors for them (even when the accessors don't really do much of anything) specifically to make debugging easier (public variables that are directly accessed can be hard to debug).

DeckInformation Constructor excerpt | Open
Code: Select all
         // Personality
         m_apPersonality = m_dkInfo.Personality;
         if (m_apPersonality.LocalizedName != null)
            lblAiPersonality.Text = m_apPersonality.LocalizedName.Replace("&", "&&");
         else
            lblAiPersonality.Text = Settings.UIStrings["AI_PERSONALITY"];
EditAiPersonality.RefreshPersonality excerpt | Open
Code: Select all
         if (m_apPersonality.LocalizedName != null)
            lblPersonalityName.Text = m_apPersonality.LocalizedName.Replace("&", "&&");
         else
            lblPersonalityName.Text = String.Empty;
SaveLocalizedText | Open
Code: Select all
      public static void SaveLocalizedText(Dictionary<string, string> dicLocalized, XmlDocument xdDoc, XmlNode xnNodeToSaveIn)
      {
         // By doing things this way we only write out the text we have rather than creating bogus entries.
         foreach (KeyValuePair<string, string> kvPair in dicLocalized)
            SaveLocalizedString(kvPair.Key, kvPair.Value, xdDoc, xnNodeToSaveIn);

         // Check to make sure we have a localized string and if not create an empty one in our fallback
         //  langauge.  This is used to help prevent errors when no-one sets any strings.
         if (!xnNodeToSaveIn.HasChildNodes)
            SaveLocalizedString(FALLBACK_LANG_CODE, String.Empty, xdDoc, xnNodeToSaveIn);
      }
Xander9009 wrote:Nevermind. I figured out where it is. WadDirectory.cs -> LoadPersonalities() -> "ap.BuiltIn = true". Replaced that with (and of course undid the change to kvpPersonalityName )
Code: Select all
if (
    m_strFullDir.IndexOf("\\DATA_DECKS_", StringComparison.OrdinalIgnoreCase) < 0 ||
    m_strFullDir.IndexOf("\\DATA_DECKS_D14\\", StringComparison.OrdinalIgnoreCase) >= 0 ||
    m_strFullDir.IndexOf("\\DATA_DECKS_E14\\", StringComparison.OrdinalIgnoreCase) >= 0 ||
    m_strFullDir.IndexOf("\\DATA_DECKS_F14_PACK1\\", StringComparison.OrdinalIgnoreCase) >= 0 ||
    m_strFullDir.IndexOf("\\DATA_DECKS_F14_PACK2\\", StringComparison.OrdinalIgnoreCase) >= 0 ||
    m_strFullDir.IndexOf("\\DATA_DECKS_F14_PACK3\\", StringComparison.OrdinalIgnoreCase) >= 0
    )
{
    // This was loaded from the game directory and not a custom deck so we consider it built-in because the user already has it.
    ap.BuiltIn = true;
}
Sadly, I don't know the best method of doing this. I imagine the really best way would be to make a master list of official mods and a function for seeing if a particular path lies inside one of those, but that's too far outside my comfort level to risk my DotP modding lol. It works, so it's good enough for me. It'd probably be a lot better, since not everyone's decks were in the format DATA_DECKS_. Some used DATA_DLC_, such as TFM's decks. But I don't plan to go modding those anyway, so...

I don't know if you'd want to change that in the main version, but in case you do (or just so you're aware of it), I figured I'd post about what I discovered.
Actually, if you want to see if something is official the best way is probably to have a list of official WADs then compare the name of the containing WAD to the list to see if it is official or not. Though this would only work 100% as intended if people don't modify the official WADs which they really aren't supposed to do anyway (due to the side effects from doing so).

I actually have more changes in the pipe such as a more memory efficient "Build an Image", card order precedence with duplicate filtering (so that the Deck Builder will attempt to detect the version of a particular card the game will use and only show that version, based on card filename). Unfortunately, they are in a partial state and so aren't ready to be released yet.
Problems with base game cards: DotP 2014 Core Fixes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
RiiakShiNal
Programmer
 
Posts: 2072
Joined: 16 May 2011, 21:37
Has thanked: 72 times
Been thanked: 447 times

Re: [REL] Riiak's DotP 2014 Deck Builder v1.5.0.3

Postby Xander9009 » 17 Dec 2016, 00:34

Splinterverse made the vanguard cards and informed me they're working (using methods borrowed from planeswalkers), but when I went to test them I noticed that Vanguard can't be checked in the filters. When you click apply after checking it, re-opening the window reveals the state wasn't saved. Vanguard is missing entirely from the advanced filter's type list. Was its exclusion intentional?
User avatar
Xander9009
Programmer
 
Posts: 2414
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 78 times
Been thanked: 307 times

PreviousNext

Return to Utilities

Who is online

Users browsing this forum: No registered users and 2 guests


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 2 guests

Login Form