It is currently 16 Apr 2024, 07:15
   
Text Size

Duels - Profile Editing

Moderator: CCGHQ Admins

Duels - Profile Editing

Postby spirolone » 30 Nov 2015, 04:35

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:
Attachments
Source.zip
(5.69 KiB) Downloaded 693 times
spirolone
Programmer
 
Posts: 190
Joined: 31 Aug 2014, 23:14
Has thanked: 7 times
Been thanked: 107 times

Re: Duels - Profile Editing

Postby Marcel Costa » 30 Nov 2015, 04:59

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.
User avatar
Marcel Costa
 
Posts: 33
Joined: 31 Jul 2011, 18:08
Has thanked: 12 times
Been thanked: 0 time

Re: Duels - Profile Editing

Postby spirolone » 30 Nov 2015, 13:16

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.
Attachments
ProfileTools_iOS.zip
(25.97 KiB) Downloaded 503 times
ProfileTools.zip
(38.02 KiB) Downloaded 697 times
Last edited by spirolone on 03 Dec 2015, 15:27, edited 1 time in total.
spirolone
Programmer
 
Posts: 190
Joined: 31 Aug 2014, 23:14
Has thanked: 7 times
Been thanked: 107 times

Re: Duels - Profile Editing

Postby spirolone » 30 Nov 2015, 15:57

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:
spirolone
Programmer
 
Posts: 190
Joined: 31 Aug 2014, 23:14
Has thanked: 7 times
Been thanked: 107 times

Re: Duels - Profile Editing

Postby Marcel Costa » 01 Dec 2015, 01:57

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
User avatar
Marcel Costa
 
Posts: 33
Joined: 31 Jul 2011, 18:08
Has thanked: 12 times
Been thanked: 0 time

Re: Duels - Profile Editing

Postby spirolone » 01 Dec 2015, 05:28

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"?
spirolone
Programmer
 
Posts: 190
Joined: 31 Aug 2014, 23:14
Has thanked: 7 times
Been thanked: 107 times

Re: Duels - Profile Editing

Postby drovil » 01 Dec 2015, 14:10

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.
Attachments
508391162.txt
Please change this to .profile. Thanks
(14.01 KiB) Downloaded 621 times
Decks.txt
(9.31 KiB) Downloaded 532 times
"Also, that's post number 5. You're officially no longer censored. lol"
-Xander, the Enlightener
Rest in Peace Xander9009.
User avatar
drovil
 
Posts: 15
Joined: 10 Nov 2015, 16:29
Has thanked: 63 times
Been thanked: 0 time

Re: Duels - Profile Editing

Postby spirolone » 01 Dec 2015, 14:24

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...
spirolone
Programmer
 
Posts: 190
Joined: 31 Aug 2014, 23:14
Has thanked: 7 times
Been thanked: 107 times

Re: Duels - Profile Editing

Postby drovil » 01 Dec 2015, 15:07

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
"Also, that's post number 5. You're officially no longer censored. lol"
-Xander, the Enlightener
Rest in Peace Xander9009.
User avatar
drovil
 
Posts: 15
Joined: 10 Nov 2015, 16:29
Has thanked: 63 times
Been thanked: 0 time

Re: Duels - Profile Editing

Postby spirolone » 01 Dec 2015, 17:26

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?
spirolone
Programmer
 
Posts: 190
Joined: 31 Aug 2014, 23:14
Has thanked: 7 times
Been thanked: 107 times

Re: Duels - Profile Editing

Postby drovil » 01 Dec 2015, 18:44

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?
"Also, that's post number 5. You're officially no longer censored. lol"
-Xander, the Enlightener
Rest in Peace Xander9009.
User avatar
drovil
 
Posts: 15
Joined: 10 Nov 2015, 16:29
Has thanked: 63 times
Been thanked: 0 time

Re: Duels - Profile Editing

Postby Marcel Costa » 03 Dec 2015, 14:54

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.
Attachments
Screen Shot 2015-12-03 at 12.51.13.png
User avatar
Marcel Costa
 
Posts: 33
Joined: 31 Jul 2011, 18:08
Has thanked: 12 times
Been thanked: 0 time

Re: Duels - Profile Editing

Postby spirolone » 03 Dec 2015, 15:25

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...
spirolone
Programmer
 
Posts: 190
Joined: 31 Aug 2014, 23:14
Has thanked: 7 times
Been thanked: 107 times

Re: Duels - Profile Editing

Postby fallenangle » 03 Dec 2015, 16:33

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.
fallenangle
 
Posts: 319
Joined: 20 Jul 2013, 02:31
Has thanked: 73 times
Been thanked: 41 times

Re: Duels - Profile Editing

Postby Marcel Costa » 03 Dec 2015, 22:07

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.
User avatar
Marcel Costa
 
Posts: 33
Joined: 31 Jul 2011, 18:08
Has thanked: 12 times
Been thanked: 0 time

Next

Return to Utilities

Who is online

Users browsing this forum: No registered users and 16 guests


Who is online

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

Login Form