Jump to content

pkNX: Nintendo Switch ROM Editor & Randomizer


Recommended Posts

Hey there. I've been using a combination of pkNX and hex editing to make my romhack for a bit now, and I have a quick question for everyone here.

 

Has anyone ever actually gotten the AI to swap out their Pokemon? I always enable the Pokechange flag, but despite that the AI still never switches out their Pokemon no matter what. I wanted to reference the Battle Tower trainers maybe, since I know they swap Pokemon, but I can't find their data easily either it seems.

 

Thanks in advance!

Link to comment
Share on other sites

6 hours ago, Kobazco said:

Hey there. I've been using a combination of pkNX and hex editing to make my romhack for a bit now, and I have a quick question for everyone here.

 

Has anyone ever actually gotten the AI to swap out their Pokemon? I always enable the Pokechange flag, but despite that the AI still never switches out their Pokemon no matter what. I wanted to reference the Battle Tower trainers maybe, since I know they swap Pokemon, but I can't find their data easily either it seems.

 

Thanks in advance!

The game might not use the old logic flags, or the flags are differently ordered? I dunno.

Link to comment
Share on other sites

2 hours ago, Kaphotics said:

The game might not use the old logic flags, or the flags are differently ordered? I dunno.

Hmm well there definitely is AI for Pokechange, as I've also found the Pokechange.amx file. And there's also the fact of the battle tower. I just wish literally any of the base game trainers used Pokechange so we could more easily figure out how to enable it out side of the Battle Tower. I found the Battle Tower trainer data, but its structured differently from normal trainers as expected and didn't help sadly.

Link to comment
Share on other sites

Hey guys, I've been trying to get this to work for about a day or so and was wondering if anyone had advice. 

So my problem is I am unable to get wild encounters. It seems to work for randomizing a trainers' pokemon and levels. When I open the folder that pkNX creates, I open RomFS, then I open the bin folder. I see archive and trainer folders. I'm assuming the trainer folder is there because it has been modified. I also noticed if I open the 'Pokemon' randomizer and adjust abilities or evolution levels, I get a new pml folder in this directory. The one that doesnt seem to generate a new folder is Wild_SW. Any suggestions?

Link to comment
Share on other sites

Is there a way to randomize the tm/trs or other items? Like is it possible to randomize the move the tm/tr give like instead of TM25 giving protect it could give something like bolt strike? Also is it possible to do something similar with shops and items off the ground like the second shop guy at a pokecenter instead of giving like the X items he could randomly sell like heavy balls or apricots as an example and instead of the rock in wedgehurst instead of giving a revive it was it could randomized to something else? I just wanna know if its possible and if so how would you perform it. 

Edited by Tricksta
Link to comment
Share on other sites

Hello there. Thanks for the great app. A potential bug (if I'm not doing something wrong) I've recently encountered while randomising Sword/Shield is that the post-game championship tournaments cannot be made into double battles. Other changes I've made - including changing the pokemon, levels, and trainer class - function just fine. This is only the case for the rematches afaik and it's the same for both pre and post Galarian Star Tourney championship tournaments. I'm unsure if this is already known, and if it's just something unchangeable that's forcing single battles, just mentioning it as I have not seen it brought up in any posts thus far.

Link to comment
Share on other sites

On 3/17/2021 at 1:40 PM, Dhoward2305 said:

Hey guys, I've been trying to get this to work for about a day or so and was wondering if anyone had advice. 

So my problem is I am unable to get wild encounters. It seems to work for randomizing a trainers' pokemon and levels. When I open the folder that pkNX creates, I open RomFS, then I open the bin folder. I see archive and trainer folders. I'm assuming the trainer folder is there because it has been modified. I also noticed if I open the 'Pokemon' randomizer and adjust abilities or evolution levels, I get a new pml folder in this directory. The one that doesnt seem to generate a new folder is Wild_SW. Any suggestions?

I had the same problem. It turns out the game was actually randomizing the pokemon. I was checking the Zacian forest (Slumbering Weald) and those pokemon weren't randomized, so I thought pkNX wasn't working. I checked route 1 and 2, and those pokemon were randomized. 

Link to comment
Share on other sites

  • 1 month later...

Hey, so I tried to edit the pokemon move set for level ups, for example i used galarian Moltres and added the ability to gain ember at lvl 4 and flamethrower at lvl 10, In game everything else like randomization worked and everything else i randomized. However the levelup learnset did not happen, i didnt gain ember at lvl4 or flamethrower at lvl 10 with galarian Moltres. Anyone know how to fix this?

Link to comment
Share on other sites

  • 2 weeks later...

Is there any way to add more "slots" to the PokeMart?

Example: I wanted to add a Choice Scarf to the Mart, but I want to keep all the other items in the Mart as they are, is there any way to create another slot so I can add the Choice Scarf?

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Hello, sorry if my english is bad... I'm sorry but when I try to launch the game after I put the folder in atmosphere/contents, I have an error message : " Vous avez quitté le logiciel car une erreur est survenue" (You quit the software because an error as occurred)... Have I do a bad thing ? Can someone help me ?

Link to comment
Share on other sites

Heya folks. I realize it's probably frowned upon for someone to register an account and immediately ask for help, but I've been trying for the last 7 hours to get around this hurdle, having already dumped a few times. Not sure if it's because I'm on 1.3.2 or if my Switch just has a bad case of poo-brain and is corrupting my dumps, but from what I understand, the file count that pkNX calls for is correct.

image.png.c486934767f4689cb41d34dd91332e45.png

Link to comment
Share on other sites

On 6/11/2021 at 3:55 PM, Delerious said:

Heya folks. I realize it's probably frowned upon for someone to register an account and immediately ask for help, but I've been trying for the last 7 hours to get around this hurdle, having already dumped a few times. Not sure if it's because I'm on 1.3.2 or if my Switch just has a bad case of poo-brain and is corrupting my dumps, but from what I understand, the file count that pkNX calls for is correct.

image.png.c486934767f4689cb41d34dd91332e45.png

I have the same issue only for sword...  Pok__mon Sword v458752 (0100ABF008968800) (UPD).  I get the same error pop-up and am also 12.1GB.  Hope someone can help us soon.  I noticed we're using versions of the game that seem to be newer than the ones listed in the guide on extracting the files

 

6 hours ago, GreenLion said:

I have the same issue only for sword...  Pok__mon Sword v458752 (0100ABF008968800) (UPD).  I get the same error pop-up and am also 12.1GB.  Hope someone can help us soon.  I noticed we're using versions of the game that seem to be newer than the ones listed in the guide on extracting the files

Deleted update and then updated to 1.3.1 and I still get this same issue.  I was hoping the May2021 update wasn't supported because the tool is older than that, but that doesn't seem to be the issue.

Any help would be appreciated

 

 

 

Capture.PNG

 

 

-------------EDIT-------------

Figured it out!

Expected file path for pknx is:

Dump->ExeFS->(Files from Pok__mon Sword v458752 (0100ABF008968800) (UPD) in the ExeFSFolder)

Dump->RomFS-> Bin

Dump->RomFS-> System_resource

 

 

You essentially don't want any reference to the weird folder directory that NXDumpTool makes, just move the files to the directory listed above and then load Dump into PKSX!

Link to comment
Share on other sites

Hi, having issues in Sword with the first 3 set encounters and the legendary in the fog.  Every time i create a randomizer setup all four of these encounters at the start of the game are Ivysaur (legendary slot is level 7 and can actually faint) every time.  I would like these to either actually randomize (and the legend slot not faint) or not be randomized at all.  Everything else about the randomization seems to be working perfectly.  any ideas?

Link to comment
Share on other sites

Hello,

I am trying to edit my raid rewards (no dlc raids) in pkNX following this guide (although its for my local use only) https://docs.google.com/document/d/1NyeFXsdGavBW1nftIRfI5x6z7R7zF8njf79VgIrF_u4/edit.

 

But everytime i put the changes in the atmosphere/contentst folder it doesn't reconize the changes. (layeredfs is working though with other mods).

Is it because im on 1.3.2? I can't boot the game on version 1.3.0 due an forced update prompt.

Am i doing something wrong? Or should i wait for a future update?

 

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

I didn't see this ever fixed or any sort of work around besides doing everything manually. But, when randomizing moves within pknx, you can only use None, Random and metronome.
Using High Power and Levelup results in an error where it cannot pull those moves. Does that list simply not exist within PKNX and that is  the reason for said error? I only saw one other person bring up not being able to randomize with those options. But never got an answer. I don't mind doing things manually, but that is a pain in the ass to do for a ton of trainers when randomizing pokemon and it's not for a set challenge randomizer.

 

Spoiler

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at pkNX.Randomization.LearnsetRandomizer.GetCurrentMoves(Int32 species, Int32 form, Int32 level, Int32 count)
   at pkNX.WinForms.BTTE.B_CurrentAttack_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4360.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
pkNX
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/blood/Downloads/pkNX%20(1)/pkNX/net461/pkNX.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4341.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4360.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4360.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Resources.Extensions
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.20.51904
    CodeBase: file:///C:/Users/blood/Downloads/pkNX%20(1)/pkNX/net461/System.Resources.Extensions.DLL
----------------------------------------
System.Memory
    Assembly Version: 4.0.1.1
    Win32 Version: 4.6.28619.01
    CodeBase: file:///C:/Users/blood/Downloads/pkNX%20(1)/pkNX/net461/System.Memory.DLL
----------------------------------------
System.Runtime.CompilerServices.Unsafe
    Assembly Version: 4.0.4.1
    Win32 Version: 4.6.28619.01
    CodeBase: file:///C:/Users/blood/Downloads/pkNX%20(1)/pkNX/net461/System.Runtime.CompilerServices.Unsafe.DLL
----------------------------------------
System.Numerics.Vectors
    Assembly Version: 4.1.4.0
    Win32 Version: 4.6.26515.06
    CodeBase: file:///C:/Users/blood/Downloads/pkNX%20(1)/pkNX/net461/System.Numerics.Vectors.DLL
----------------------------------------
pkNX.Structures
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/blood/Downloads/pkNX%20(1)/pkNX/net461/pkNX.Structures.DLL
----------------------------------------
pkNX.Game
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/blood/Downloads/pkNX%20(1)/pkNX/net461/pkNX.Game.DLL
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
pkNX.Containers
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/blood/Downloads/pkNX%20(1)/pkNX/net461/pkNX.Containers.DLL
----------------------------------------
pkNX.Sprites
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/blood/Downloads/pkNX%20(1)/pkNX/net461/pkNX.Sprites.DLL
----------------------------------------
pkNX.Randomization
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/blood/Downloads/pkNX%20(1)/pkNX/net461/pkNX.Randomization.DLL
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Newtonsoft.Json
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.3.23909
    CodeBase: file:///C:/Users/blood/Downloads/pkNX%20(1)/pkNX/net461/Newtonsoft.Json.DLL
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
System.Runtime.Serialization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4250.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Design
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Design/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------
LZ4
    Assembly Version: 1.0.15.93
    Win32 Version: 1.0.15.93
    CodeBase: file:///C:/Users/blood/Downloads/pkNX%20(1)/pkNX/net461/LZ4.DLL
----------------------------------------
LZ4mm
    Assembly Version: 1.0.15.93
    Win32 Version: 1.0.15.93
    CodeBase: file:///C:/Users/blood/AppData/Local/Temp/f82a68ada1d833f8838dd859bcb27a61/44b09ced47d1340e4b5af5cc6f2fc8b2.dll
----------------------------------------
LZ4cc
    Assembly Version: 1.0.15.93
    Win32 Version: 1.0.15.93
    CodeBase: file:///C:/Users/blood/AppData/Local/Temp/f82a68ada1d833f8838dd859bcb27a61/bed5714f0a00711677483c138938e914.dll
----------------------------------------
LZ4pn
    Assembly Version: 1.0.15.93
    Win32 Version: 1.0.15.93
    CodeBase: file:///C:/Users/blood/AppData/Local/Temp/f82a68ada1d833f8838dd859bcb27a61/50495300240756128a79c0c0850f98e5.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
 

Edit: It might simply just be a bug as I closed out and opened it a few times and on the 4th reopen it randomized with those 2 options. 

Edited by Gir003
Might just be a program bug?
Link to comment
Share on other sites

On 7/15/2021 at 6:31 PM, JonnyDros said:

Has anyone found a way to modify

1) Type matchups

2) Shop inventory and prices?

I saw your comment about BS and DS. He does it via hex editing. The only file that has any sort of difference is  shop_data.bin file. So I am assuming the data was supposed to be pulled from the shop_data - Copy.bin file. Because that one contains all the changes made to the shop. I'll point out which lines were changed in case you want to find them in Hex editor. I'll also highlight the parts that are different.
 

Spoiler

Original:
00002940 09 00 00 00 3E 01 00 00 FE 00 00 00 3D 01 00 00
Edited:
00002940 09 00 00 00 13 01 00 00 1D 02 00 00 1E 02 00 00

Original: 
00002950 3B 01 00 00 3A 01 00 00 FF 00 00 00 3C 01 00 00
Edited:
00002950 23 02 00 00 72 03 00 00 73 03 00 00 74 03 00 00

Original:
00002960 40 01 00 00 3F 01 00 00 48 FE FF FF 10 00 00 00
Edited:
00002960 71 03 00 00 0D 00 00 00 48 FE FF FF 10 00 00 00

Original:
00002980 04 00 00 00 04 00 00 00 22 00 00 00 23 00 00 00
Edited: 
00002980 04 00 00 00 04 00 00 00 9E 00 00 00 0F 01 00 00

Original:
00002990 24 00 00 00 25 00 00 00 30 FE FF FF 0C 00 00 00
Edited:
00002990 D6 00 00 00 DB 00 00 00 30 FE FF FF 0C 00 00 00

Original:
000029F0 07 00 00 00 07 00 00 00 0D 00 00 00 0A 00 00 00
Edited:
000029F0 07 00 00 00 6F 03 00 00 7F 02 00 00 3B 00 00 00

Original: 
00002A00 3B 00 00 00 3C 00 00 00 37 00 00 00 38 00 00 00
Edited:
00002A00 3C 00 00 00 E4 04 00 00 85 02 00 00 46 06 00 00

 

There is only one difference between the mod and the clean shop file dumps and that's with the shop_data.bin files.
If you compare the 2 files only line 00002820 is changed
Differences
Original
02 00 00 1B 03 (end of the line)
Edited to
02 00 00 1C 03

Even though I can tell you what lines were changed and where, I don't exactly know which lines pertain to what shop and items. They could be using a Ram reader to find out what to edit in the game. It'd be easier just to edit the bag contents at the start of the game to contain other items.

 

Edited by Gir003
Link to comment
Share on other sites

Hello everyone,

I've been playing with the pkNX tool for a bit, and a was wondering : Is there was a way to force the randomization to have no pokemon left over, so that they are all obtainable with wild encounters ? With the older generations, using Universal Pokemon Randomizer, it was named "Catch'em all mode".

I can't get a randomized game with all legendaries and mythical pokemons in the wild, that's why I want to do this. Maybe another solution exists for this ?

Thanks  :)

Link to comment
Share on other sites

19 hours ago, fabifly said:

Hello everyone,

I've been playing with the pkNX tool for a bit, and a was wondering : Is there was a way to force the randomization to have no pokemon left over, so that they are all obtainable with wild encounters ? With the older generations, using Universal Pokemon Randomizer, it was named "Catch'em all mode".

I can't get a randomized game with all legendaries and mythical pokemons in the wild, that's why I want to do this. Maybe another solution exists for this ?

Thanks  :)

Are you using the newest update? Because all of them that are in the 1.3.2 update show up in the wild when you randomize if you have both Legendary and Event flags set to "True" under misc option. Or did you mean that you only want them to appear once? Assuming I read your comment right, no, there isn't an option to do that. You have to manually set the pokemon in the slots. Whether that is in the hidden or overworld.

Link to comment
Share on other sites

20 hours ago, Gir003 said:

Are you using the newest update? Because all of them that are in the 1.3.2 update show up in the wild when you randomize if you have both Legendary and Event flags set to "True" under misc option. Or did you mean that you only want them to appear once? Assuming I read your comment right, no, there isn't an option to do that. You have to manually set the pokemon in the slots. Whether that is in the hidden or overworld.

What I would like is a way to encounter each pokemon at least once in the wild (hidden or overworld). For example, if I randomize, it is possible that I don't have access to Victini or Yveltal for example, in the wild.
I am using the April 22 version

Link to comment
Share on other sites

I honestly feel like this cool little program was sadly abandoned lol. There's still a ton of issues with it like the typed themed trainers option still doesn't work

also what's the "fused pokemon" option in the randomize trainers menu?

Edited by UniversalShinx
Link to comment
Share on other sites

From my experience, I don’t think it’s abandoned. At the very least it handles standard randomisation as well as and reading of game files.

Ignoring miscellaneous features that aren’t fully fleshed out, most errors seem to occur due to user error or users using badly dumped (or pirated) ROMs.

I can imagine things get out of hand when people keep suggesting different features to add..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...