How to export stage mod - TheLeonX/NSUNS4-ModManager GitHub Wiki
First of all you need to get StageInfo.bin.xfbin file. Open it with StageInfo Editor and select stage which you want to export:
In case if you want to edit stage from stage select menu, just pick any of this stage and it will replace exist stage, otherwise if you want to add new stage to roster, you need to pick stage which aren't in free battle stage select menu.
When you picked stage, press on "Export stage" button in menu tab and select folder where you want to store stage mod. It will create mod folder for it, so you don't really need to mess with it.
When you exported stage, open folder where you saved your stage:
Change information in Description.txt, Author.txt and change icon for your mod (it will be used for mod manager view).
After that, you need to open folder with actual stage and find BGM_ID.txt. This txt file stored ID of BGM for your future stage. If you want to check some BGMs, you need to extract adx2.cpk in game assets and get BGM.awb and BGM.acb files and open them with ACE Editor. With that tool, you will be able to see IDs for BGMs so you can check them.
In case if you want to add new BGMs, you need to edit this files with ACE Editor and pack this files in .CPK archive, then just store this cpk file in moddingAPI folder in your stage mod folder:
Also, you need to edit stageMessage.txt file. It was used for names in stage select menu! And for big preview of stage you need to change stage_tex.png:
For getting work stage in mod manager, you need to add icon for stage select menu (otherwise stage will not work). For that, you need to get XFBIN Parser,sample for icon and file, where you will save your icon.
For icon, you need to edit it in Photoshop/Paint.net and save it in DDS Extension (just any format, but DDS extension). When you will get you icon in DDS extension, drag and drop base file (aka stagesel_image_STAGE_CATHEDRAL.xfbin file) on xfbin_parser.exe It will unpack all data from it. Find this files:
Open stagesel_image_STAGE_CATHEDRAL.binary file and open your new DDS texture in HxD or any other hex editor: Copy paste all data from your new texture and paste itin stagesel_image_STAGE_CATHEDRAL.binary file where "DDS" string starts like that:
Now you need to find length of your texture. Select whole data in your texture with hex editor and wind length value. In my case it has 0x1970 length:
Back to your edited stagesel_image_STAGE_CATHEDRAL.binary file and put your length in 1st 4 bytes:
Now you can save file. Rename your file into name of exported stage (for example, in this tutorial you can see i messed with STAGE_TEST_01, that means im gonna rename file into stagesel_image_STAGE_TEST_01.binary:
Now you have to edit _page.json file. Open that file in Notepad++ and rename all "STAGE_CATHEDRAL" on name of your stage (in my case, it's "STAGE_TEST_01"):
Save file and then, rename folder from [000] stagesel_image_STAGE_CATHEDRAL (nuccChunkBinary) to new name (in my case, like [000] stagesel_image_STAGE_TEST (nuccChunkBinary). Don't forget to rename stagesel_image_STAGE_CATHEDRAL folder on your new name (in my case, like stagesel_image_STAGE_TEST_01):
Now you can drag and drop this folder into xfbin_parser.exe and it will create new file which you can use for stage select menu. But you need to pack it.
Create new directory like that: (random name)/data/ui/flash/OTHER/stagesel. And put here your new file:
Download YaCPKTool, extract it. Drag and drop your folder with random name into YaCPKTool.exe and it will create for you new CPK archive.
Put this archive into stage mod folder in moddingapi/mods/(name of your stage) like that:
For that cpk archive you also need to create extra file. Open hex editor and make new file. Put in that file bytes like that:
Where 0x20 is priority value for loading, but you can use any value there. Save that file as name of cpk and add ".info" at the end of name, like that:
Now your mod is ready for mod manager. Pack your mod folder into ZIP archive (and if you want, you can rename .ZIP extension to .NUS4 extension, so it would give less confusion for new users of mod manager, lmao)