1. OkazakiTheOtaku

    OP OkazakiTheOtaku no thanks, I don't want a custom title
    Member

    Joined:
    Jul 20, 2016
    Messages:
    1,367
    Country:
    Japan
    (This is the same as from my GameBanana page)

    This tutorial assumes you have intermediate knowledge of installing software and navigating common computer tasks, as well as navigating your hard drive. To be blunt, if these prerequisite skills are out of reach then perhaps using unreleased software is a bit irresponsible.
    Also, I of course do not take responsibility for any issues or damage to any of your equipment.

    Also, right click images and open them in a new window to see them larger.

    Step 1: Installing Visual Studio 2019
    Do you know how to run an installer? Good. Do that.

    Go to this page and download Visual Studio Community 2019. Not Visual Studio Code. When installing just go through the process like normal. If asked, all you need to install is this package:
    [​IMG]
    Everything else can be left as default.


    Step 2: Cloning the source code

    [​IMG]
    Open Visual Studio 2019 and click on "Clone or check out code" on the right-hand side.
    [​IMG]
    Enter this URL: https://github.com/kwsch/pkNX
    Keep all of the other options default, just click "Clone."


    Step 3: Compiling the source code

    All of PPorg's software is dead-simple to compile. After the GitHub repo is finished being cloned by VS 2019, you will see a window similar to this:
    [​IMG]
    On the right-hand side of the screen, right-click on "pkNX.sln"
    [​IMG]
    Click "Build"
    [​IMG]
    Step 4: Finding your binary
    Depending on how fast your computer is, it will take a certain amount of time for the binary file to compile. When it is done, the bottom of the VS 2019 window will tell you "Build Succeeded" and also tell you where the actual .exe is.
    [​IMG]
    Assuming that you kept all other options as default, the steps below will help you find it.
    Hit the Win+R keys on your keyboard to open the "Run" prompt. In it, type Source like so:
    [​IMG]

    In Windows Explorer, open repos, then pkNX, then pkNX.WinForms, then bin, then Debug.
    [​IMG]

    This is your pkNX binary. These files need to be kept together. You can move them wherever you want on your hard drive, but they need to be together.

    Step 5: Setting up your game files for pkNX
    Obtain your Pokémon Sword or Shield romfs. Dump it yourself. Obtaining it is not in the scope of this guide.

    When you have your romfs, you must structure them in a very specific way for pkNX to accept it. This is the best way to do it, using Sword as an example:

    Have a top-level folder named Pokemon [Game]
    [​IMG]
    Inside of that folder you put your clean, unedited romfs.
    In the same directory as the romfs folder, you need to have an exefs folder.
    It can be completely empty, but it needs to be there.

    [​IMG]

    Step 6: Using pkNX
    Open your brand-new pkNX.exe and drag your top-level Pokemon Sword folder onto the window. It will load it in.

    Using all of the actual elements of the tool is a bit complicated and outside of the scope of this guide, but what you need to know is this:
    When you make your edits, the tool is keeping track of everything you changed. When you close pkNX, the software writes a file with the titleID of the game next to the romfs and exefs folders from step 5
    [​IMG]
    This file gets loaded in with Atmosphere LayeredFS and is all you need to use your mod. You never need to actually edit the romfs folder.

    When opening pkNX, if this Title ID folder exists, it will use it and display the modifications from it. If it does not, it will just base it off of the vanilla game and write a new folder.

    Step 7: ???

    Step 8: Profit

    Troubleshooting
    Some users are having issues regarding an error message to the effect of
    project.assets.json' not found and/or A numeric comparison was attempted on "$(MsBuildMajorVersion)" that evaluates to "" instead of a number, in condition "($(MsBuildMajorVersion) < 16)".

    This seems to happen when building on Windows 10. I was able to reproduce this in a clean VM with no variables and was able to fix it. A full tutorial is planned but if you get these issues then here is a quick-and-dirty solution:

    In VS 2019, go to View -> Other Windows -> Package Manager Consoleand enter dotnet build
    When that finishes, if you still receive the numeric comparison issue, then follow these steps:

    1. In the right-hand side of VS 2019, double click the pkNX.sln file
    2. Go to Tools -> NuGet Package Manager ->Manage NuGet Packages for this Solution
    3. Under Installed, find Costura.Foddy and click on it.
    4. On the right-hand side of the pane that appeared, select all of the pkNX choices and hit "uninstall"
    5. Accept all of the resulting warnings and dialogue boxes
    6. When it finishes, in the NuGet Package Manager, go to Browse and find Costura.Foddy
    7. Do the same as step 4 but Install instead. Accept all of the warnings.

    It should build properly after this.
     
    Last edited by OkazakiTheOtaku, Dec 6, 2019
  2. Deleted User

    Deleted User Newbie

    This was a nice guide, thank you for writing it. Do you have plans to write a guide for making the most out of pkNX perhaps?

    In particular, I am curious to know the scope of changes we're able to make through pkNX; For Example, It would be great if we could replace the Wild Battle & Capture mechanics in the Let's Go games with the mechanics we're more familiar with from the mainline pokemon games by utilizing the relevant scripts in Sword & Shield, but would such a drastic change even be possible to implement?
     
    Last edited Dec 10, 2019
    OkazakiTheOtaku likes this.
  3. OkazakiTheOtaku

    OP OkazakiTheOtaku no thanks, I don't want a custom title
    Member

    Joined:
    Jul 20, 2016
    Messages:
    1,367
    Country:
    Japan
    I considered it, but being that it isn’t released software I think I might be wasting my time, lest it gets changed drastically before release and everything is moved around or changed.
     
    Deleted User likes this.
  4. Shinigati

    Shinigati GBAtemp Fan
    Member

    Joined:
    Oct 31, 2012
    Messages:
    337
    Country:
    Mine didn't work for some reason this is the only output it shows.

    >------ Build started: Project: pkNX, Configuration: Debug|Any CPU ------

    Build failed.
     
  5. soplaytk

    soplaytk GBAtemp Regular
    Member

    Joined:
    Jan 9, 2017
    Messages:
    258
    Country:
    United States
    Could anyone gen me a Pokémon pls or just trade me a exp candie xl I’m stuck on the water gym pls ty
     
  6. OkazakiTheOtaku

    OP OkazakiTheOtaku no thanks, I don't want a custom title
    Member

    Joined:
    Jul 20, 2016
    Messages:
    1,367
    Country:
    Japan
    This has nothing to do with pkNX or my tutorial. Please find a more suitable place to make requests such as these.

    Did you make sure to wait until the git repo was completely cloned?
     
  7. Shinigati

    Shinigati GBAtemp Fan
    Member

    Joined:
    Oct 31, 2012
    Messages:
    337
    Country:
    Yes i did but in the end i got it working though, it was weird but it was looking for a file that didn't exist in the repo as i checked on the github page and it wasn't there either so i had to mess around a bit with re-opening the project until it worked.
     
  8. OkazakiTheOtaku

    OP OkazakiTheOtaku no thanks, I don't want a custom title
    Member

    Joined:
    Jul 20, 2016
    Messages:
    1,367
    Country:
    Japan
    Huh, weird. If you're able to reproduce it maybe consider getting screenshots of the missing file error so I can investigate. Thank you for the report back :)
     
  9. SanjiBlackLeg

    SanjiBlackLeg Newbie
    Newcomer

    Joined:
    Aug 5, 2018
    Messages:
    8
    Country:
    Italy
    Hi, I have this error when build:
    Fody: No weavers found for the configuration entries Costura. Add the desired weavers via their nuget package.
     
  10. MikeTheQuick

    MikeTheQuick Newbie
    Newcomer

    Joined:
    Dec 28, 2019
    Messages:
    1
    Country:
    United States
    mine says "The type or namespace ma,e 'FluentAssertions' could not be found (are you missing a using directive or an assembly reference?)"

    the code is CS0246
     
  11. reman

    reman Member
    Newcomer

    Joined:
    Jan 1, 2020
    Messages:
    16
    Country:
    United States
    It's pleasure for it.Thanks.
     
  12. Juanny

    Juanny Newbie
    Newcomer

    Joined:
    Jan 1, 2020
    Messages:
    3
    Country:
    United Kingdom
    Whenever i try to build i keep getting this message

    Error MSB4236 The SDK 'Microsoft.NET.Sdk' specified could not be found. C:\Users\jonny\Source\Repos\pkNX\pkNX.sln C:\Users\jonny\Source\Repos\pkNX\pkNX.Containers\pkNX.Containers.csproj 1
     
  13. Juanny

    Juanny Newbie
    Newcomer

    Joined:
    Jan 1, 2020
    Messages:
    3
    Country:
    United Kingdom
    Whenever i try to build i keep getting this message

    Error MSB4236 The SDK 'Microsoft.NET.Sdk' specified could not be found. C:\Users\jonny\Source\Repos\pkNX\pkNX.sln C:\Users\jonny\Source\Repos\pkNX\pkNX.Containers\pkNX.Containers.csproj 1
     
  14. HarveyDent

    HarveyDent Newbie
    Newcomer

    Joined:
    Feb 11, 2020
    Messages:
    5
    Country:
    United States
    I am getting an error message in Microsoft Visual Studio when I try to "build" the application. Attached is a screenshot of the error message. I would greatly appreciate any assistance in fixing the issue.

    PS - I have even tried working on another computer, and still get the same error. 2020-02-10.png
     
  15. OkazakiTheOtaku

    OP OkazakiTheOtaku no thanks, I don't want a custom title
    Member

    Joined:
    Jul 20, 2016
    Messages:
    1,367
    Country:
    Japan
    Did you try the troubleshooting steps at the bottom of the post?
     
  16. HarveyDent

    HarveyDent Newbie
    Newcomer

    Joined:
    Feb 11, 2020
    Messages:
    5
    Country:
    United States
    First off, OkazakiTheOtaku thank you so much for creating this thread! Thank you so much for writing up this article!


    That appears to have fixed the problem creating the pkNX.exe application. However I am still having issues importing my Pokemon Shield game file that I dumped to my microSD card then copied to my computer.
     
  17. OkazakiTheOtaku

    OP OkazakiTheOtaku no thanks, I don't want a custom title
    Member

    Joined:
    Jul 20, 2016
    Messages:
    1,367
    Country:
    Japan
    Yeah, so, pkNX is veeery specific about how it wants its game files and there really isn't any way to go about it besides exactly how it wants. Basically, just make sure you are following Step 5 exactly, including making a top-level Shield folder, with a ROMFS and EXEFS folder inside the Shield folder. The Exefs folder can be empty, but it needs to be there. What are you using to dump the game files? Hactool or NXDumpTool?

    Personally, I used NXDumpTool to just dump the entire romfs and then I structured it as I said above. Also keep in mind, I don't know if they have updated the software to use the newest update's romfs so make sure you are just dumping the base game without the update.
     
    HarveyDent likes this.
  18. HarveyDent

    HarveyDent Newbie
    Newcomer

    Joined:
    Feb 11, 2020
    Messages:
    5
    Country:
    United States



    Thanks for the repsonse!

    1) I used NXDumpTool and chose to dump the "romfs" to my microSD card. When I look at the properties of the folder the "size" is 9.47 GB, it also says the "size on disk" is 13.8 GB.
    2) I copied the whole NXDumpTool folder to my desktop.
    3) I found the folder called "Pok__mon Shield v0 (01008DB008C2C000) (BASE)" inside the folder for NXDumpTool
    4) I copied the Pok__mon Shield v0 (01008DB008C2C000) (BASE) folder to my desktop,
    5) I made 2 empty folders inside of the aforementioned folder named: the 1st named "exefs" & the 2nd named "romfs"
    6) I then dried dragging the Pok__mon Shield v0 (01008DB008C2C000) (BASE) folder into PKNX and get an error message.

    I attached screen shots of the folders & the error message that pops up on pkNX
     

    Attached Files:

  19. OkazakiTheOtaku

    OP OkazakiTheOtaku no thanks, I don't want a custom title
    Member

    Joined:
    Jul 20, 2016
    Messages:
    1,367
    Country:
    Japan
    Structure it like this
    [​IMG]
    The exefs folder should be empty, not the romfs folder. Bin and system_resource goes in romfs. Then drag the Pokemon Shield/Sword folder into pkNX
     
  20. Disnino

    Disnino Newbie
    Newcomer

    Joined:
    Feb 17, 2020
    Messages:
    6
    Country:
    United States
    Hey I was planning on editing this mod that I found on gamebanana which puts all the exclusive pokemon from shield to sword and vice versa. All it is, is a .gfpak file in a a bunch of folders in the romfs folder. Anyway I messaged him and he of course told me I can edit it using Pknx, and I of course have no idea on all this. Pknx says that its unable to recognize game data, so I've been trying to work this out for a few days and i'd appreciate some help :). He hasn't been very responsive on discord so I've been thrown in the deep end.

    The Directory is: 0100ABF008968000 > romfs > bin > archive > field > resident > Data_Table.gfpak
     
    Last edited by Disnino, Feb 17, 2020
  21. OkazakiTheOtaku

    OP OkazakiTheOtaku no thanks, I don't want a custom title
    Member

    Joined:
    Jul 20, 2016
    Messages:
    1,367
    Country:
    Japan
    You have to have the entirety of the game's romfs as shown in this image:
    and then, take the 0100ABF008968000 folder and place it next to the romfs folder. pkNX will then load your modded files and allow you to edit them
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - compile, Shield, Sword