ROM Hack MHX DLC Encryption

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
I added support for MHX DLC encryption to my code: https://github.com/svanheulen/mhef
Capcom decided to use a non-SSL connection again for transferring DLC files so we can still proxy in replacements (edit: They added signatures to MHGen so it's no longer possible to proxy quests), but they did change the file formats (and encryption algorithm, obviously).
I'll be adding information about file formats to the wiki here: https://github.com/svanheulen/mhff/wiki

This code is for developers, not end users.
Edit: You can get the encryption keys using my MHX Data Manager homebrew appilcation.
 
Last edited by moghedien,

Deleted member 369977

Felyne Hunter
Member
Joined
Aug 16, 2015
Messages
383
Trophies
0
XP
346
Country
Germany
So the encrypted file in an .arc file. How do you open it?
I tried opening the arc file with ARCtools, which worked fine on the romfs arc files in mh4u, but if I try to use it on the decrypted dlc arc file it just gives me a file that's empty..
 

Deleted member 369977

Felyne Hunter
Member
Joined
Aug 16, 2015
Messages
383
Trophies
0
XP
346
Country
Germany
Alright, so I downloaded the file, and tried to execute it on my decrypted arc file.
Now it returns me an error : "ValueError: zero length field name in format ", which is cast by "file_extension = '{:08X}'.format(file_type_code)" in extract_arc

I have the output set to a valid directory.
 

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
Alright, so I downloaded the file, and tried to execute it on my decrypted arc file.
Now it returns me an error : "ValueError: zero length field name in format ", which is cast by "file_extension = '{:08X}'.format(file_type_code)" in extract_arc

I have the output set to a valid directory.
What version of Python are you using? As far as I can tell, that particular error can only happen in pretty old versions but I know it works fine in 3.5.
 

Deleted member 369977

Felyne Hunter
Member
Joined
Aug 16, 2015
Messages
383
Trophies
0
XP
346
Country
Germany
What version of Python are you using? As far as I can tell, that particular error can only happen in pretty old versions but I know it works fine in 3.5.
I'm still using Python 2.6 , I'll try and update to Python 3.5 now :)

EDIT: Thank you, seems like it was the python version.

EDIT2: How can you recompress the ARC file after I decompressed it and made a change? Arc.py only has an extract_arc, or am I missing something ?
 
Last edited by Deleted member 369977,

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
EDIT2: How can you recompress the ARC file after I decompressed it and made a change? Arc.py only has an extract_arc, or am I missing something ?
Yeah, sorry I need to added the ability to create ARCs to that script. I have some code for it, I just need to clean it up a bit first. I'll post here when I have it added.
 

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
Alright, thank you for your awesome work :)
Take your time
I added ARC creation support (and just fixed a bug, so get the new version).
Also I tested it, but all I did was change the text of the quest. I'm sure there's checks that may prevent certain changes like there was in MH4U and I'll do more testing on that later.
uE6AUuj.png
 

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
Here's an example:
Code:
python arc.py c new.arc quest/questData/questData_1010002_jpn.gmd quest/boss/setEmMain/b_m01em080_02.sem quest/boss/setEmMain/b_m00em000_00.sem quest/zako/emSetList/z_m01d_050.esl quest/zako/emSetList/z_m01d_054.esl quest/zako/emSetList/z_m00d_000.esl quest/rem/rem_610004.rem quest/rem/rem_610005.rem quest/rem/rem_000000.rem quest/rem/rem_610006.rem quest/supp/supp_1010002.sup quest/questData/questData_1010002.mib
I know it's kind of a pain having to put each individual file name but I'll work on making it easier to use. Also make sure the folder structure is the same as it was in the original.
 

Deleted member 369977

Felyne Hunter
Member
Joined
Aug 16, 2015
Messages
383
Trophies
0
XP
346
Country
Germany
Alright, so I tried to make some changes and upload these files on my nginx server so I can download them, after I redirect the request. It downloads the file, but the problem is, that it won't show for me when I try to select the quest.
I editied /quest/supp/supp_1010002.sup
Trying to redownload the original DLC file works without any problems and it is shown in the Event Quest Menu.
 

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
Can you upload your ARC so I can look at it?
I was just about to post that I added info about some of the quest file formats to the wiki and also that I was able to change the supply box items:
3oNTUQv.png
 
  • Like
Reactions: -Xin- and SaagiBols

Deleted member 369977

Felyne Hunter
Member
Joined
Aug 16, 2015
Messages
383
Trophies
0
XP
346
Country
Germany
Sure, here is the dlc arc file.
I'll take a quick look into the wiki now, maybe you can find an error ^^

EDIT: The supply box is quest/supp/supp1010002.sup , isn't it?
I just tried downloading the original dlc I put on the nginx via redirect and it showed up.. so I must have made a mistake, somewhere
 
Last edited by Deleted member 369977,

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
Ok, I looked at your file and I think I see the problem. In MH4U people said there was an issue where the first item in the supply box (and reward box) couldn't be modified. So try modifying a different item or just add a new item.
Also, I don't think this makes a difference, but I kept the order of the files in the ARC the same as the original.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtube.com/shorts/yjrjY6PCb7o?si=xnFz0B2o_adIgLTV +1