nstool icon indicating copy to clipboard operation
nstool copied to clipboard

Is it possible to extract all icons from an asset?

Open rlaphoenix opened this issue 2 years ago • 3 comments
trafficstars

For example, Fire Emblem Warriors has an icon file specific to each language. Yet, I can only seem to extract whatever is default, which I'm not sure is the first encountered in the asset, or something specifically marked as default.

Is it possible to specify which one to extract? Currently, I'm using nstool's python interface get_icon().

rlaphoenix avatar Aug 09 '23 02:08 rlaphoenix

I'm not aware of a python interface. It's probably made by someone else.

jakcron avatar Aug 09 '23 12:08 jakcron

Apologies, I made this at 3am. I mistaked my own mini-interface with that of an official one.

How I'm currently extracting the icon is nstool -k prod.keys --icon out.dat asset.nsp.

rlaphoenix avatar Aug 09 '23 12:08 rlaphoenix

No problems.

The --icon argument is only valid for homebrew NROs that have an icon included in the NRO file. Those only have one icon.

Since you said this was for Fire Emblem Warriors, an actual game, there is no easy argument to extract all the icons for a proper game. You'll have to extract the Control NCA from the NSP or XCI. Then once you have the Control NCA, from memory all of the icons and control.nacp are in partition 0, so extract that partition and you'll get all the icons.

You can tell which NCA is the "Control" NCA by either unpacking the *.cnmt.nca and reading the *.cnmt file with nstool, or by individually checking the NCAs with nstool and it'll report what kind of NCA it is.

jakcron avatar Aug 09 '23 15:08 jakcron