Page 1 of 4

Duels - Profile Editing

PostPosted: 30 Nov 2015, 04:35
by spirolone
Here is a Java class I wrote to manage profile files. It reads a .profile file and store "decoded" content; there are some method to perform usefull operations like import/export of unlocked cards or decks.
There is also one for iOS version of profile files that are different. :mrgreen:

Re: Duels - Profile Editing

PostPosted: 30 Nov 2015, 04:59
by Marcel Costa
Thanks!
I will give it a try now.

EDIT 1: How to use the java files? I Installed java runtime and tried to open the files with them but nothing happened.
I went online to find how to compile .java into executable but found no easy (for me) way to do it.

Re: Duels - Profile Editing

PostPosted: 30 Nov 2015, 13:16
by spirolone
These are tools that used that class; you can specify name of profile file as argument (example: DecodeProfile.jar 12345678.profile; default is 1.profile for normal version and p1.profile for iOS profiles version).
DecodeProfile.jar: it returns a .bin file with "decoded" content of profile.
EncodeProfile.jar: it encodes .bin file and overwrite old .profile file.
ReadUnlockedCards.jar: it returns a Cards.bin file; byte at offset X contains number of unlocked cards with ID=X (number is in range 0-7; 9-F is 1-7 but foiled).
WriteUnlockedCards.jar: it changes number of unlocked cards reading ones contained in Cards.bin file.
ReadDecks.jar: it returns a Decks.txt file with content of decks stored in profile file, and 32 .bin files with hex content of each decks section.
ImportDeck.jar: you can specify, after profile file name, also name of saved deck file and position of deck to replace; it loads a deck saved in a xml file created with MagicAssistant and stores it in profile file; it needs a CardPool.xml file with IDs of cards.

Re: Duels - Profile Editing

PostPosted: 30 Nov 2015, 15:57
by spirolone
Marcel Costa wrote:Thanks!
I will give it a try now.

EDIT 1: How to use the java files? I Installed java runtime and tried to open the files with them but nothing happened.
I went online to find how to compile .java into executable but found no easy (for me) way to do it.
I think Java source files are usefull only for programmers; I added some jar tools to perform some usefull operations: try with that and ask me if you need specific tool... :mrgreen:

Re: Duels - Profile Editing

PostPosted: 01 Dec 2015, 01:57
by Marcel Costa
I cant get the jars to work. I used in a windows 7 64 VM inside ios with no luck, then openet them in a native windows7 64 in C: no luck. I added the class files to the same folder and nothing.
I have an instant error(hard to read) that the system could not find or load the main class c:\Decodeprofile.jar

Re: Duels - Profile Editing

PostPosted: 01 Dec 2015, 05:28
by spirolone
Marcel Costa wrote:I cant get the jars to work. I used in a windows 7 64 VM inside ios with no luck, then openet them in a native windows7 64 in C: no luck. I added the class files to the same folder and nothing.
I have an instant error(hard to read) that the system could not find or load the main class c:\Decodeprofile.jar
You don't need source file, Jars needs only Java installed in your PC: did you install it? Do you see Java icon used for Jars? Looking at "Properties" of file, is there Java Platform as "Open With"?

Re: Duels - Profile Editing

PostPosted: 01 Dec 2015, 14:10
by drovil
Thank you very much for the utilities. (And notifying me for it. Very much obliged. [-o< )

Managed to get the .jar files to work by creating a .bat file for each and inside it contains (for example):

Code: Select all
ReadDecks.jar 1.profile
Also placed all the .jar, .bat and .profile files in 1 folder.

But my Decks.txt has a weird output. Attached my .profile and Decks.txt file below.

(I have both the AI deck unlocker for the original and expansion saved in the profile. Maybe the profile is somewhat affected by that?)

Many thanks again.

Re: Duels - Profile Editing

PostPosted: 01 Dec 2015, 14:24
by spirolone
drovil wrote:...
But my Decks.txt has a weird output. Attached my .profile and Decks.txt file below.

(I have both the AI deck unlocker for the original and expansion saved in the profile. Maybe the profile is somewhat affected by that?)

Many thanks again.
Your profile is a Magic 2015 profile and decks are stored differently. I notified you for this thread cause you can use decode/encode tools, but these programs are for Magic Duels profiles! That is, "encoding" is the same and you can decode also a Magic 2015 profile, editing it (for example adding achievements) and encoding it again, but other tools should be adapted...

Re: Duels - Profile Editing

PostPosted: 01 Dec 2015, 15:07
by drovil
Woops. Very sorry about that sir. #-o

To be clear sir; The only .jar files that can be properly used in DotP2015 are the encode/decode profile .jar files, and only for the achievements editing? (are personas included?)

Many thanks again. :D

Re: Duels - Profile Editing

PostPosted: 01 Dec 2015, 17:26
by spirolone
drovil wrote:Woops. Very sorry about that sir. #-o

To be clear sir; The only .jar files that can be properly used in DotP2015 are the encode/decode profile .jar files, and only for the achievements editing? (are personas included?)

Many thanks again. :D
Encode/decode profile tools are most important ones: when you have "decoded" version of a profile is pretty easy to change whatever you want, not only achievements! Other programs simply automate some tasks...
However, yes, I think that only encode/decode profile jar files should give usefull result with Mgic 2015; I could create a Magic 2015 version, but is it necessary?

Re: Duels - Profile Editing

PostPosted: 01 Dec 2015, 18:44
by drovil
spirolone wrote:Encode/decode profile tools are most important ones: when you have "decoded" version of a profile is pretty easy to change whatever you want, not only achievements! Other programs simply automate some tasks...
However, yes, I think that only encode/decode profile jar files should give usefull result with Mgic 2015
Ok sir. Many thanks. :D

spirolone wrote:I could create a Magic 2015 version, but is it necessary?
Maybe the ImportDeck/ReadDeck .jar files?

Re: Duels - Profile Editing

PostPosted: 03 Dec 2015, 14:54
by Marcel Costa
In details:

First I used my main MacOSx yosemite. I had copied all files inside a folder with my renamed profile (1.profile) in it. I had already java installed and I updated it just in case.
Double clicking or left clicking and selecting the default program to open it (Jar Launcher Default 15.00.00) got me nothing.
After I saw here the guy being able to create a .bat file to make the jars to work I went online and found out that I could create a .sh file with the same name to replace that .bat executable in MacOs. Double clicking and right clicking got me nothing. I tried to do it all again through Terminal and got a funny message as attached. All that done checking if I was in the right folder and so on.

I tried the same process in my Windows VM inside Mac and a regular booted windows. Nothing worked so far. All Java installed and verified.

Re: Duels - Profile Editing

PostPosted: 03 Dec 2015, 15:25
by spirolone
Marcel Costa wrote:In details:

First I used my main MacOSx yosemite. I had copied all files inside a folder with my renamed profile (1.profile) in it. I had already java installed and I updated it just in case.
Double clicking or left clicking and selecting the default program to open it (Jar Launcher Default 15.00.00) got me nothing.
After I saw here the guy being able to create a .bat file to make the jars to work I went online and found out that I could create a .sh file with the same name to replace that .bat executable in MacOs. Double clicking and right clicking got me nothing. I tried to do it all again through Terminal and got a funny message as attached. All that done checking if I was in the right folder and so on.

I tried the same process in my Windows VM inside Mac and a regular booted windows. Nothing worked so far. All Java installed and verified.
I'm sorry, maybe it is caused by an error of mine: I forgot to write that I set "p1.profile" as default for iOS profiles version! #-o
Try without file renaming and check if that is the problem...

Re: Duels - Profile Editing

PostPosted: 03 Dec 2015, 16:33
by fallenangle
Spirolone, how do you know which cards have what ID when you want to unlock them? I'm trying to create a profile that gives me 4 of every card, but there's no indication of what card goes with which ID when I open up the cards.bin file in a hex editor. Any advice you might have for me would be greatly appreciated.

Re: Duels - Profile Editing

PostPosted: 03 Dec 2015, 22:07
by Marcel Costa
Thanks Spirolone, it worked out perfectly.
Answering the 4 of every card, just use ReadUnlockedCards.jar to generate the Cards.bin file and open it with and Hex editor. You will see many spots with diferent numbers varying from 01 to 04. Just change them all to 04 and save the Cards.bin file. Once you do that run WriteUnlockedCards.jar to update the p1.profile (or 1.profile if this is the pc version) and overwrite your profile in the game system directory

EDIT 1: any chance to upload custom cards to the Data_000.zed or another custom .zed file? I tryied every pc instruction by far an have not a single success with that. I would like to code the cards and I think I know how.