It is currently 21 Feb 2017, 09:43
   
Text Size

D15Tool (with DuelsLib)

Moderator: CCGHQ Admins

D15Tool (with DuelsLib)

Postby thefiremind » 02 Jul 2015, 20:12

Thefiremind's DotP2015 Tool


CLARIFICATION FOR NEW USERS: This tool isn't a deck builder, it's made for modders: if you have new cards (or you are making them) and you want to build WAD/ZED files quickly in order to test them, then this is the tool for you. Otherwise it won't help.


Changelog:
  • Version 1.1.0.0: The converter can handle different ZED decryption keys and different data files for the ZED header. This makes the converter fully compatible with Magic Duels, but the workspace part is still built for DotP2015 only, as the name of the tool suggests. However the update on the converter should help making things a bit easier while the community understands more about Magic Duels until a new tool can be made.
  • Version 1.0.0.0: Initial version.

What is this all about?
This tool helps you by (hopefully) making the process of modding DotP2015 much faster. Please bear in mind that it doesn't interact with the profile: it only helps building ZED and WAD files.


How to install it
Just download the ZIP file with the binaries and extract it to a directory of your choice. It requires .NET Framework 4.5.


How to use the workspace
Run the executable and you'll face a window like this:
Image
The basic idea here is that you can add directories of unpacked WADs and/or ZEDs to the workspace, then you can add/delete/open files from the same window, update the CardPool XML automatically, and pack everything to the game directory.
First things first, add at least one directory. You can drag and drop it onto the window, or choose it with the "..." button, then click on "Add" to add it (you need to click it after drag and drop, too). Please remember that you can add either the outmost directory or the one immediately inside it for ZED files (DATA_0xx or DATA_0xx\DATA_0xx will be both fine), but you always need to add the outmost directory for WAD files: sorry but I didn't have enough skill to modify Rick's code for this degree of flexibility.
Select your game directory by writing it directly or with the "..." button (it will ask you to locate the game executable). The data file for the ZED header should already be in the right place (if the bin file is in the same directory as the program executable), but you can change it if you want to. Don't rename the bin file, though: the name tells the program how to name the root directory of the ZED file.
IMPORTANT: DATA_041.bin is for DotP2015; for Magic Duels, you should always use the header from the latest expansion: search for it in the Magic Duels section.
The field "Ignore pool IDs before" lets you choose the first ID number that you intend to use in your CardPool XML file. If you are using all of the original cards, you should set it to 383. Now, make sure your workspace already contains a CardPool XML file (since it seems that the maximum ID for card pools is 22 you probably want to copy and override an existing one anyway) and some new cards. If you click on "Update pool", the program will automatically add the new cards to the CardPool XML file and it will also try to preserve the IDs that are already assigned (for example, if you already have a card #383, it will always be the card #383 as long as the card XML file is inside your workspace).
If you want to add cards, illustrations or Text_Permanent files, just drag and drop them onto the window: the program will search for the first occurrence of the correct folder and copy the files there (if you drop a PNG file it will be automatically converted to DXT1 TDX, suitable for card illustrations, so don't do it if you want the TDX to have a different compression type). This means, however, that you must have made one of each folder already inside your workspace: the program won't do that for you.
By right-clicking on an item in the tree view on the right, you can open or delete files (they are moved to the recycle bin as default, but you can uncheck the option and delete them completely), or remove entire directories from the workspace (this never deletes them from your disk).
When you made all the needed modifications, it's time to test: click on "Pack all directories and start game", and the program will run DotP_D15.exe from the game directory as soon as the repacking is completed.


How to use the converter
If you select the Converter tab, you'll have a very handy converter for the "special" file types used in DotP2015: TDX, WAD and ZED. Drag and drop one or more files/directories onto the program window: the program will choose the best action based on the file extension or, for directories, based on their content (this is very basic: if it finds Header.xml it converts to WAD, otherwise it converts to ZED). Drop a TDX and you'll obtain a PNG, and viceversa.
The available options are quite intuitive, but if you have doubts feel free to ask.


How to use DuelsLib
If you don't plan on making other tools that interact with TDX, WAD, ZED files or with DotP2015 profiles (yes, I converted spirolone's library to C# but it's very basic), then ignore it. Otherwise, you should be able to look at the source files and see what it's about. I didn't comment it very much, but most exposed functions should be quite straight-forward to understand. Feel free to improve or change any part of it: I'd be glad if anyone else can make something useful out of it. :)


Links
I know that some combinations of browser/antivirus flag mega.nz as dangerous. I've never had any problem downloading from it, though. If you want an alternative link ask me via PM and I'll see what I can do.
Binaries:
Code: Select all
https://mega.nz/#!61EAyBQJ!CN5ys_5HBMwlAW0YU2TXZtjtY9sgvsauTB83lLTJxdk
http://www59.zippyshare.com/v/OooPJa2N/file.html
Source:
Code: Select all
https://mega.nz/#!GotU0azR!fCkGZYCXGU-6oGGBd4PZWqUsdFesGzpI6KWPNPL8O10
DuelsLib:
Code: Select all
https://mega.nz/#!b0kymD6A!AEOxd9UxTeKdrizZ4-ue-uyTLw2r1rtvbwm0BCqwKzM
.

Known bugs
  • The button "Pack all directories and start game" may stay disabled even if its conditions are met. If it happens, try and restart the program until it becomes enabled again.

Possible questions
  • Q: Why so many DLLs?
    A: Because I changed as little as possible from Gibbed Tools in order to make my WAD library, so I'm reusing all of Rick's DLLs in addition to mine.
  • Q: Can I suggest <insert new feature here>?
    A: Of course you can, but I can't promise I'll add it. I'm not planning to make this tool interact with profiles, if that's what you ask: I wouldn't be happy to make a profile editor that is too basic, and making it the way I'd like to would be too time-consuming.
Last edited by thefiremind on 25 Jul 2016, 18:35, edited 9 times in total.
< Former DotP 2012/2013/2014 modder >
Currently active in the Magic Duels section.
User avatar
thefiremind
Programmer
 
Posts: 3504
Joined: 07 Nov 2011, 10:55
Has thanked: 117 times
Been thanked: 711 times

Re: D15Tool (with DuelsLib)

Postby sumomole » 06 Jul 2015, 01:29

I have left DotP for a long time, I'm glad you still working for 2015, hope this soft can be used for Origins too. :lol:
User avatar
sumomole
Programmer
 
Posts: 611
Joined: 07 Jun 2011, 08:34
Has thanked: 51 times
Been thanked: 230 times

Re: D15Tool (with DuelsLib)

Postby temtira » 17 Dec 2015, 04:48

Hey there, first time modding Magic Duels, though I have some experience modding 2013 and 2014. I'm using the Converter section of the tool to pack/unpack ZED files (DATA_000.ZED). However, when I drag the newly packed ZED file into my game directory and then run my game, I get an error that just says "UNKNOWN ERROR". I have noticed that when unpacking a ZED file, its file size more than quadruples in size (DATA_000.ZED goes from a 600 MB file to a 3.0 GB directory). I assume this is normal. However, when I pack the same directory back up, without changing anything, it becomes a .ZED file, but its file size is still 3.0 GB. Is there something I'm doing incorrectly?
temtira
 
Posts: 2
Joined: 17 Dec 2015, 04:24
Has thanked: 0 time
Been thanked: 0 time

Re: D15Tool (with DuelsLib)

Postby thefiremind » 18 Dec 2015, 11:06

temtira wrote:However, when I pack the same directory back up, without changing anything, it becomes a .ZED file, but its file size is still 3.0 GB. Is there something I'm doing incorrectly?
Since we only have the public key for ZED decryption, we can decompress but we can't compress, so when you pack a ZED, the contents are added uncompressed. Maybe the game doesn't like to read big files, I don't know. Anyway it's best practice to make separate ZED files with copies of the files that you intend to modify: your files will override the original ones without the need to modify the original ZED.
< Former DotP 2012/2013/2014 modder >
Currently active in the Magic Duels section.
User avatar
thefiremind
Programmer
 
Posts: 3504
Joined: 07 Nov 2011, 10:55
Has thanked: 117 times
Been thanked: 711 times

Re: D15Tool (with DuelsLib)

Postby Nick26 » 14 Aug 2016, 04:15

Hi,
where (or how) can I find the header for Magic Duels?
Nick26
 
Posts: 56
Joined: 23 Mar 2015, 16:40
Has thanked: 14 times
Been thanked: 0 time


Return to Utilities

Who is online

Users browsing this forum: No registered users and 1 guest


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (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 1 guest

Login Form