ivaano / NsxLibraryManager

Another Lib Manager for NSP NSZ files
Other
41 stars 13 forks source link

Feature request/suggestion regarding rename function #29

Open wimpyrbx opened 7 months ago

wimpyrbx commented 7 months ago

When trying the rename feature I notice that some DLCs do not have {appname} that points to the original base nsp.

Example:

  1. Rain World [010047600BF72000][v0].nsp
  2. Rain World ( Downpour)[010047600BF73001][v262144].nsp
  3. Rain World [010047600BF72800][v524288].nsp

So what I tried to do was to place these in a folder named {TitleName} so the files would be inside a .\Rain World\ folder, however this did not work as expected.

Here is the data for the second file in titles.json

"70050000037272": {
        "bannerUrl": "https://img-eshop.cdn.nintendo.net/i/a0fbdb42d45e17a98ff1a52f23ed37825e1e15759abbbdbf6f4e579c5fb68f8c.jpg",
        "category": null,
        "description": "Return to the unwavering wild in Downpour, where you explore new, harsh lands and survive new predators. As time passed, the slugcat has evolved. With five variants of the species - take advantage of various skills that they possess and explore their own personal tales.\n\nCharacters:\nThe Rivulet\nAn aquatic evolved slugcat - it breathes longer underwater and moves through the world with ease.\n\nThe Gourmand\nAn indulger of the simpler pleasures in life. A culinary expert that excels in manipulating the objects it finds along its journey.\n\nThe Artificer\nA fierce combatant; master of pyrotechnics and explosives.\n\nThe Spearmaster\nAn abnormality with no mouth that uses needles pulled from its body for combat and to feed.\n\nThe Saint\nAttuned to the etheric plane, this slugcat uses no weapons but instead uses its long tongue to grip far away objects or platforms.  \n\nThe expansion also includes challenging one-time scenarios, a randomizer featuring complex quests to complete, and local co-op support! For players looking test their limits in Challenge Mode or players looking for a chill experience in Safari Mode, Rain World: Downpour features something new for every player! Optional additional mechanical additions allow for a new spin on the Rain World experience \u2013 tutorialized hints, alternate routing options, a new map system, handy collectibles tracker for storyline completion, and many more.\n\nFeatures\n\u2022 Breaking New Ground to Explore - With ten expansive regions across thousands of new maps, environments, and weather to survive and discover.\n\u2022 More Slugcats - All with unique abilities, skillsets, gameplay style, and stories.\n\u2022 Challenge Mode - Put your survivability to the test in multiple pre-constructed arena scenarios, adapting to each room as the difficulty increases.\n\u2022 Jolly Co-Op - Up to four local players can explore and survive all base-game campaigns in this local co-op mode. See if the power of friendship can overcome the treacherous world of Rain World.\n\u2022 Expedition Mode - A Rain World randomizer dropping you anywhere in the world with a task to complete some of the game\u2019s toughest challenges.\n",
        "developer": null,
        "frontBoxArt": null,
        "iconUrl": null,
        "id": "010047600BF73001",
        "ids": [
            "010047600BF73001"
        ],
        "intro": "Take control of five new characters with new abilities. Survive new environmental conditions, dangers and explore uncharted territory.",
        "isDemo": false,
        "key": null,
        "languages": null,
        "name": "Rain World: Downpour",
        "nsuId": 70050000037272,
        "numberOfPlayers": null,
        "publisher": "Akupara Games",
        "rating": 10,
        "ratingContent": [
            "Fantasy Violence",
            "Mild Blood",
            "Tobacco Reference"
        ],
        "region": null,
        "releaseDate": 20230711,
        "rightsId": null,
        "screenshots": [
            "https://img-eshop.cdn.nintendo.net/i/2fd1ad815f30dce0e789d2f854e86636b9ef27536bf045784bd6121c02a56330.jpg",
            "https://img-eshop.cdn.nintendo.net/i/981bbdd199bf50b9490e9db5aeaa1bac76d79f963a87bd745283b5d585a81570.jpg",
            "https://img-eshop.cdn.nintendo.net/i/e9c80a953e0faaa1860ebd2f321fc0e5b7646d38d8fe2c949eeace8bd1f8410d.jpg",
            "https://img-eshop.cdn.nintendo.net/i/d56a0571300d55e5dc44b44b3c587cffa14238e5a3ea49e8c7f6cbcc72335861.jpg",
            "https://img-eshop.cdn.nintendo.net/i/10c4696904981be446dd9aee51e16bd416f8fc73441e07bbe9e368b73b3745fa.jpg",
            "https://img-eshop.cdn.nintendo.net/i/bf1d5a593ee665677c7338c3ca09d67b1054786762243d24014a46142764e6bf.jpg"
        ],
        "size": 2377121792,
        "version": null
    },

and here is the json data for the 1st file:

    "70010000013493": {
        "bannerUrl": "https://img-eshop.cdn.nintendo.net/i/71f75ef1b21a61090bac1dfe1ea744bf205066fcc2652854b122c6173fae4158.jpg",
        "category": [
            "Platformer",
            "Action",
            "Multiplayer",
            "Adventure"
        ],
        "description": "You are a slugcat. The world around you is full of danger, and you must face it \u2013 alone. Separated from your family in a devastating flood, you will need to find food and shelter between terrifying torrential downpours which threaten to drown all life. Climb through the ruins of an ancient civilization, evade the jaws of vicious predators, and discover new lands teeming with strange creatures and buried mysteries. Find your family before something makes a meal of you!\n\nInspired by the simplicity and aesthetics of 16-bit classics, this survival platformer requires clever decision-making, both to catch your own prey and to avoid the jaws of hungry predators. Each ravenous foe in your path will be cunning, vicious and always on the hunt \u2013 eager to sink their teeth into you, or even each other. As a small, soft slugcat you must rely on stealth and wit rather than force: learn the ecosystem and turn their strengths to your advantage. Maybe then you can survive\u2026 Rain World!\n\nFeatures\n\u2022 Explore a vast world of over 1600 rooms, spanning 12 diverse regions filled with ancient secrets and undiscovered dangers.\n\u2022 Intense, primal predator encounters will challenge your reflexes. Limited resources and the constant, impending threat of rain will test your nerve.\n\u2022 Procedural design and individualistic AI\u2014 every playthrough is a unique challenge!\n\u2022 Play as The Monk and The Hunter! 2 playable characters corresponding to easier and more aggressive playstyles.\n\u2022 Control your unique campaign with accessibility, speedrun, and difficulty options sculpted to your particular taste and style.\n\u2022 Multiplayer Arena for up to 4 players, featuring Competitive and Sandbox modes.\n\u2022 Bestiary featuring dangerous predators and delicious prey.",
        "developer": null,
        "frontBoxArt": null,
        "iconUrl": "https://img-eshop.cdn.nintendo.net/i/feb7edc780671ab18b517ea734e0b970fd327148a3725a1dc0e069472f8492cc.jpg",
        "id": "010047600BF72000",
        "intro": "Rain World simulates a harsh, complex ecosystem- one where you are both predator and prey, hunter and hunted in unforgiving, apocalyptic climes.",
        "isDemo": false,
        "key": null,
        "languages": [
            "ja",
            "en",
            "es",
            "pt",
            "fr",
            "de",
            "it",
            "ru",
            "ko",
            "zh"
        ],
        "name": "Rain World",
        "nsuId": 70010000013493,
        "numberOfPlayers": 4,
        "publisher": "Akupara Games",
        "rating": 10,
        "ratingContent": [
            "Fantasy Violence",
            "Mild Blood",
            "Tobacco Reference"
        ],
        "region": null,
        "releaseDate": 20181213,
        "rightsId": "010047600BF720000000000000000006",
        "screenshots": [
            "https://img-eshop.cdn.nintendo.net/i/8dcfe41eab2df3a18c0793040e835e72c63e11ac5049a1a6b0b3d262bb7c5bb0.jpg",
            "https://img-eshop.cdn.nintendo.net/i/ea54da61f6a1581a76bde6b68b4bb48e4c06c567bfdea581660940f0f6bf8290.jpg",
            "https://img-eshop.cdn.nintendo.net/i/e4611d2a47dbe48dec0b6d1f3a2a9fc5adaf234e48f78b7842fc2b44e8549383.jpg",
            "https://img-eshop.cdn.nintendo.net/i/2fd42c9ff74864ca2607dbec48836bc20b17ad67f2f567a08636b634ba50ecec.jpg",
            "https://img-eshop.cdn.nintendo.net/i/397f87504434baec51311a75d05e7af93a4e1baf2387aa75c152d0427be88375.jpg",
            "https://img-eshop.cdn.nintendo.net/i/1ece62e82838230946646f7906ac0692f840bd8dbdb51bbaed54bb328f63c611.jpg"
        ],
        "size": 3448766464,
        "version": null
    },

So, I guess the reason is that there is no relationship between the two in the json entries?

Just asking if there is a way to combine DLCs to their parent with a {value} in some fashion. It works when renaming with "Switch Library Manager 1.4.0", and I believe that uses the same data? Not sure how it does it.

Maybe it first finds the base version of the game by using it's ID 010047600BF73001 and remove the last 4 digits and make sure all other id's (4 digits removed) connects to that first one?

  1. Rain World [010047600BF72000][v0].nsp -> 010047600BF7 (removing 2000)
  2. Rain World ( Downpour)[010047600BF73001][v262144].nsp <- 010047600BF7 (removing 3001)
  3. Rain World [010047600BF72800][v524288].nsp <- 010047600BF7 (removing 2800)

And then only do the rename on DLC/Updates if you already have the BASE and know where to place them if renaming using {FolderTitleName} (or similar variable) ?

wimpyrbx commented 7 months ago

A small addition. If above solution is not implemented or used in the rename function it would be nice if there was an option to make sure files remained in their respective recursive folders.

Like if I already have the nsp files in a folder called "Rain World" in the base folder I want to be able to make sure they stay in that folder and not default to the base folder.

(This point could become obsolete if the first suggestion is accepted though)

ivaano commented 7 months ago

Yes using the title id we can relate the dlc and the updates, I already started working on this, not this particular issue but relating titles and dlcs/updates. Next release will be a major release as I'm planing to drop litedb and use sqlite, but normalizing the data is taking more than I anticipated. Once we have the data normalized I think we can address this particular issue easily.