How to make main.npdm for skyline

  • Thread starter Thread starter huixia0010
  • Start date Start date
  • Views Views 1,032
  • Replies Replies 3

huixia0010

Member
Newcomer
Joined
Sep 16, 2020
Messages
12
Reaction score
11
Trophies
1
Age
38
Website
shipengliang.com
XP
632
Country
China
Hi everyone, I have what might be a pretty basic question: How to make main.npdm for Skyline?

I looked at @masagrator 's amazing work here:
https://github.com/masagrator/MonHunRiseResPlugin

I'm really curious about how the main.npdm in this project was created.

I found this thread:
https://gbatemp.net/threads/what-are-the-exact-steps-to-patching-main-npdm.508731/

But when I used http://carlus.altervista.org/nx/title_id_patcher.html with the base main.npdm from 0100B04011742000, the generated main.npdm doesn't match the one in MonHunRiseResPlugin.

Is there an expert who can explain how main.npdm is actually made?

On the Skyline GitHub, it only mentions:

"This file has to be made on a game-by-game basis and will usually be provided by plugin makers or made yourself using a mix of HACTool and npdmtool."
But there are no links or detailed explanations on how to actually do it. I'm pretty confused—I might be missing some basic knowledge here. However, if someone could point me in the right direction, I believe I can learn how to make it myself.

Thanks in advance!
 
it's pretty simple, and the line mentioned in the skyline github gives you a good idea.

heres my process:
1. dump the nsp for the game you want to mod
2. use NxFileViewer to dump the main.npdm
2.1 load your dumped nsp into the tool (make sure you add your keys)
2.2 go to the "content" tab
2.3 find the nca marked with (Program), expand it and then expand section 0​
2.4 right click on the "main.npdm" and save it somewhere​
3. use hactool to convert npdm to json by running the following command:
Code:
hactool -t npdm --json=config.json main.npdm
4. use in skyline/exlaunch or whatever to compile an exefs patch

extra steps (credit to masagrator):
hactool does not export all the fields in npdm files, the primary one you'll encounter is system_resource_size, without this the game you'll try to use skyline on will most likely crash on start. to get system_resource_size you have to open the main.npdm you dumped and look at offset 0x14 and see it's int32 value (use hex editors like imhex or hxd).
 
  • Like
Reactions: huixia0010
Thank you very much for your reply.
Words cannot express my gratitude to you.
I just encountered a problem, which should be the key point you mentioned.
I will study system_resource_size according to your suggestion. Thank you very much.:lol:
Post automatically merged:

it's pretty simple, and the line mentioned in the skyline github gives you a good idea.

heres my process:
1. dump the nsp for the game you want to mod
2. use NxFileViewer to dump the main.npdm
2.1 load your dumped nsp into the tool (make sure you add your keys)​
2.2 go to the "content" tab​
2.3 find the nca marked with (Program), expand it and then expand section 0​
2.4 right click on the "main.npdm" and save it somewhere​
3. use hactool to convert npdm to json by running the following command:
Code:
hactool -t npdm --json=config.json main.npdm
4. use in skyline/exlaunch or whatever to compile an exefs patch

extra steps (credit to masagrator):
hactool does not export all the fields in npdm files, the primary one you'll encounter is system_resource_size, without this the game you'll try to use skyline on will most likely crash on start. to get system_resource_size you have to open the main.npdm you dumped and look at offset 0x14 and see it's int32 value (use hex editors like imhex or hxd).
Thank you very much for your reply.
Words cannot express my gratitude to you.
I just encountered a problem, which should be the key point you mentioned.
I will study system_resource_size according to your suggestion. Thank you very much.:lol:
 
it's pretty simple, and the line mentioned in the skyline github gives you a good idea.

heres my process:
1. dump the nsp for the game you want to mod
2. use NxFileViewer to dump the main.npdm
2.1 load your dumped nsp into the tool (make sure you add your keys)​
2.2 go to the "content" tab​
2.3 find the nca marked with (Program), expand it and then expand section 0​
2.4 right click on the "main.npdm" and save it somewhere​
3. use hactool to convert npdm to json by running the following command:
Code:
hactool -t npdm --json=config.json main.npdm
4. use in skyline/exlaunch or whatever to compile an exefs patch

extra steps (credit to masagrator):
hactool does not export all the fields in npdm files, the primary one you'll encounter is system_resource_size, without this the game you'll try to use skyline on will most likely crash on start. to get system_resource_size you have to open the main.npdm you dumped and look at offset 0x14 and see it's int32 value (use hex editors like imhex or hxd).

Dear @unixian ,

I'm very sorry to bother you.My friend successfully modified the main_patch.cpp and updated the Title ID in main.npdm.

20250710153409.jpg


Initially, the compiled mod resulted in a game launch error. After adjusting the system_resource_size as instructed, the game now launches without errors, but the mod fails to take effect as expected.

Could you kindly provide some guidance on this matter?


Attached is the modified source package from my friend. Under the "Game main.npdm" folder, you'll find the relevant main.npdm files. By comparing MonHunRise-main.npdm.json and FantasyLife-plugin-main.npdm.json, we've confirmed that the Title ID modification was successful.


However, the compiled mod still doesn't achieve the intended resolution changes. We're at a loss for potential causes and would greatly appreciate your expertise.


I have attached the source code, you can also download by this link:


Thank you for your time and assistance!


Best regards.
 

Site & Scene News

Popular threads in this forum