1. OkazakiTheOtaku

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

    Joined:
    Jul 20, 2016
    Messages:
    1,229
    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: Dec 6, 2019
    tusk99 and LonelyPhantom like this.
  2. LonelyPhantom

    LonelyPhantom Golden Wind
    Member

    Joined:
    Mar 26, 2017
    Messages:
    192
    Country:
    United States
    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,229
    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.
     
    LonelyPhantom likes this.
  4. Shinigati

    Shinigati GBAtemp Fan
    Member

    Joined:
    Oct 31, 2012
    Messages:
    334
    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,229
    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:
    334
    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,229
    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:
    10
    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
     
Draft saved Draft deleted
Loading...

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