It is currently 19 Nov 2017, 10:29
   
Text Size

Problem merging Magic 2014 wads

New decks and cards for Stainless Games' release

Moderators: Xander9009, CCGHQ Admins

Problem merging Magic 2014 wads

Postby Ayssia » 24 Aug 2016, 12:38

I'm trying to make a magic 2014 mod for android, I downloaded Community WAD and all CW decks from google drive, they are separating WADs, but I can only append ONE wad file into the M14 android data pack. So I need to merge them into one WAD file.

I know how to use Gibbed unpacking tools, but my problem is:
1. The tool does not support unpacking multiple wads at a time. I have to unpack them one by one...
2. I don't know how to merge header.xml(especially these "Content pack enablers").
3. Maybe there are something important I didn't noticed?
Ayssia
 
Posts: 16
Joined: 14 Feb 2013, 23:21
Has thanked: 11 times
Been thanked: 1 time

Re: Problem merging Magic 2014 wads

Postby Xander9009 » 24 Aug 2016, 18:30

My Universal Gibbed Converter can unpack multiple wads at a time. You can drop a number of them onto it and they'll all be unpacked. The only limit there is Windows. Windows itself seems unable to call the program if there are too many, but it can handle at least, like, 25 at a time or so, which should make things considerably easier.

In order to merge the non-deck wads, just go down into DATA_ALL_PLATFORMS and move everything from that folder into another wad's folder. Non-decks will work fine doing this.

I don't know it Android will need the Content Pack Enablers, but assuming it does, it'll be a bit of a hassle because of how the CPEs work. They function via two files which will overwrite those from another CPE if you try to merge them. So, you'll have to merge those by hand, but it still shouldn't be too back since there are only a handful compared to the number of decks.

Unpack a CPE. Open the folder and you'll find a file named "@header.xml". In the next folder down you'll find "HEADER.XML". These files are identical except for their names. The exact same process needs done for both.

If you open @header.xml, it should look like this:
Code: Select all
<?xml version="1.0"?>
<WAD_HEADER>
  <ENTRY platform="ALL" source="DATA_DLC_9009_CONTENT_PACK_ENABLER/DATA_ALL_PLATFORMS/" alias="Content" order="3" />
  <CONTENTPACK UID="9009">
    <PD_SECTION>
      <APP_ID ID="213850" />
    </PD_SECTION>
    <CONTENTFLAGS>
      <AVATAR_CONTENT />
      <DECK_CONTENT />
      <GLOSSARY_CONTENT />
      <UNLOCK_CONTENT />
    </CONTENTFLAGS>
  </CONTENTPACK>
</WAD_HEADER>
Open one from another CPE, and it'll be almost identical:
Code: Select all
<?xml version="1.0"?>
<WAD_HEADER>
  <ENTRY platform="ALL" source="DATA_DLC_147_CONTENT_PACK_ENABLER/DATA_ALL_PLATFORMS/" alias="Content" order="3" />
  <CONTENTPACK UID="147">
    <PD_SECTION>
      <APP_ID ID="213850" />
    </PD_SECTION>
    <CONTENTFLAGS>
      <AVATAR_CONTENT />
      <DECK_CONTENT />
      <GLOSSARY_CONTENT />
      <UNLOCK_CONTENT />
    </CONTENTFLAGS>
  </CONTENTPACK>
</WAD_HEADER>
All you should need to do in order to merge them is copy the <CONTENTPACK...>...</CONTENPACK> section from one to the other so they become:
Code: Select all
<?xml version="1.0"?>
<WAD_HEADER>
  <ENTRY platform="ALL" source="DATA_DLC_9009_CONTENT_PACK_ENABLER/DATA_ALL_PLATFORMS/" alias="Content" order="3" />
  <CONTENTPACK UID="147">
    <PD_SECTION>
      <APP_ID ID="213850" />
    </PD_SECTION>
    <CONTENTFLAGS>
      <AVATAR_CONTENT />
      <DECK_CONTENT />
      <GLOSSARY_CONTENT />
      <UNLOCK_CONTENT />
    </CONTENTFLAGS>
  </CONTENTPACK>
  <CONTENTPACK UID="9009">
    <PD_SECTION>
      <APP_ID ID="213850" />
    </PD_SECTION>
    <CONTENTFLAGS>
      <AVATAR_CONTENT />
      <DECK_CONTENT />
      <GLOSSARY_CONTENT />
      <UNLOCK_CONTENT />
    </CONTENTFLAGS>
  </CONTENTPACK>
</WAD_HEADER>
Note the third line. It has the name of the folder this particular file is in. When you're done, move these header files to whatever folder will become your combined wad, and then MAKE SURE you change that line to match the folder's name. If you're unsure, then just open the header file that already there can directly copy the CONTENTPACK section to that header file.

Once all of that is dealt with, you should be able to pack the wad and use it. Note that in the Community Tools thread, I just posted a new program which will scan any decks provided and remove all unused cards. This can DRASTICALLY reduce the size of the CW by getting rid of any unused art. If you're putting it on something with a mobile, that could help both with the device's free space AND help it load the wad faster.

viewtopic.php?f=109&t=17394

It doesn't combine the Decks into the wad, but it will unpack them all as it goes, which might be a handy way of unpacking them and removing unneeded art all in one go.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2695
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 92 times
Been thanked: 392 times


Return to Magic: The Gathering - Duels of the Planeswalkers

Who is online

Users browsing this forum: No registered users and 3 guests


Who is online

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

Login Form