Jump to content
Kaphotics

pkNX: Nintendo Switch ROM Editor & Randomizer

Recommended Posts

Hey i  getting Errors while Randomize the Trainers, it mostly only randomize the first trainer and then stops

 

Error log : 
 

************** Ausnahmetext **************
System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs.
   bei pkNX.Randomization.MoveRandomizer.GetRandomSTABMove(Int32[] types)
   bei pkNX.Randomization.MoveRandomizer.GetRandomMoves(Int32[] Types, Int32 movecount)
   bei pkNX.Randomization.MoveRandomizer.GetRandomMoveset(Int32[] Types, Int32 movecount)
   bei pkNX.Randomization.TrainerRandomizer.RandomizeEntryMoves(TrainerPoke pk)
   bei pkNX.Randomization.TrainerRandomizer.Execute()
   bei pkNX.WinForms.BTTE.B_Randomize_Click(Object sender, EventArgs e) in L:\Documents\GitHub\pkNX\pkNX.WinForms\Subforms\BTTE.cs:Zeile 548.
   bei System.Windows.Forms.Control.OnClick(EventArgs e)
   bei System.Windows.Forms.Button.OnClick(EventArgs e)
   bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
   bei System.Windows.Forms.Button.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Geladene Assemblys **************
mscorlib
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.8.4018.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:///G:/Switch/Pokemon%20Schild%20Randomizer/pkNX.exe.
----------------------------------------
System.Windows.Forms
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.8.4001.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.4001.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.3752.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.3752.0 built by: NET48REL1.
    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.4018.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.3752.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.Windows.Forms.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.8.3752.0 built by: NET48REL1.
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------
pkNX.Structures
    Assembly-Version: 1.0.0.0.
    Win32-Version: 1.0.0.0.
    CodeBase: file:///G:/Switch/Pokemon%20Schild%20Randomizer/pkNX.exe.
----------------------------------------
pkNX.Game
    Assembly-Version: 1.0.0.0.
    Win32-Version: 1.0.0.0.
    CodeBase: file:///G:/Switch/Pokemon%20Schild%20Randomizer/pkNX.exe.
----------------------------------------
pkNX.Containers
    Assembly-Version: 1.0.0.0.
    Win32-Version: 1.0.0.0.
    CodeBase: file:///G:/Switch/Pokemon%20Schild%20Randomizer/pkNX.exe.
----------------------------------------
pkNX.Sprites
    Assembly-Version: 1.0.0.0.
    Win32-Version: 1.0.0.0.
    CodeBase: file:///G:/Switch/Pokemon%20Schild%20Randomizer/pkNX.exe.
----------------------------------------
pkNX.Randomization
    Assembly-Version: 1.0.0.0.
    Win32-Version: 1.0.0.0.
    CodeBase: file:///G:/Switch/Pokemon%20Schild%20Randomizer/pkNX.exe.
----------------------------------------
System.xml.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.8.3752.0 built by: NET48REL1.
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Xml.resources.dll.
----------------------------------------
Microsoft.GeneratedCode
    Assembly-Version: 1.0.0.0.
    Win32-Version: 4.8.3752.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
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.8.3752.0 built by: NET48REL1.
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.resources.dll.
----------------------------------------
mscorlib.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.8.3752.0 built by: NET48REL1.
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_de_b77a5c561934e089/mscorlib.resources.dll.

may anyone can help ?

ROMSFS has 41.702 Files

EXEFS has 6 Files

Randmize PKMNS works

Is Randmize Starters coming too ?

Edited by Sc0uty

Share this post


Link to post
Share on other sites

i fixed the error by my self.

The other Problem is, the Randomizer, give the Trainers PKMN there do dont are in the Game actually, that can be give some Problems.

Is there a fix allready ?

 

Share this post


Link to post
Share on other sites

I have been trying to use your tool to randomize sword and shield.. i was wondering why it won't let me open the extracted nca i keep getting an error that says game data invalid.. i downloaded the latest .exe.. but i see you have source code available.. is the source code the only randomizer working atm? please, it would be great to hear back from you. i have been pulling my hair out these last few days. 

Share this post


Link to post
Share on other sites

Will we see the ability to edit moves in Sword and Shield with this tool? Specifically for the purpose of restoring cut moves. From what I can tell, moves being disabled is simply controlled by a hex value, so in theory we should be able to just re-enable them by editing their respective .wazabin files, right?

Edited by Darkiceflame

Share this post


Link to post
Share on other sites

I really wish I could get this to work, but over the past 3 nights of redumping, verifying I have that magic number mentioned in the thread of 41,702 files in the roms folder, trying dumps from both my xci file and my nsp files, I cannot get this to work at all. It always fails at this screen right here. I really have no clue what I'm doing wrong at this point. Am I just overlooking something super simple at this point?

explorer_2019-11-22_15-25-06.png

Share this post


Link to post
Share on other sites
12 hours ago, kurayamiyousei said:

I really wish I could get this to work, but over the past 3 nights of redumping, verifying I have that magic number mentioned in the thread of 41,702 files in the roms folder, trying dumps from both my xci file and my nsp files, I cannot get this to work at all. It always fails at this screen right here. I really have no clue what I'm doing wrong at this point. Am I just overlooking something super simple at this point?

I went with this NXDumpTool and my folders are named in lower case with no spaces. This gave me a lot of trouble at first as well so hopefully this helps you.

On that note, I understand the author here doesn't want to troubleshoot other people's work, but an example of which programs' dumps will work could save a lot of headache since many tools give varied output (full binary dumps of romfs as one file, folder namings, etc.)

Share this post


Link to post
Share on other sites
3 hours ago, Shadowth117 said:

I went with this NXDumpTool and my folders are named in lower case with no spaces. This gave me a lot of trouble at first as well so hopefully this helps you.

On that note, I understand the author here doesn't want to troubleshoot other people's work, but an example of which programs' dumps will work could save a lot of headache since many tools give varied output (full binary dumps of romfs as one file, folder namings, etc.)

Sadly no, that didn't seem to help. I've tried both dumps created by hactool on PC and by nxdumptool.nro directly from the switch, and both come up with the error. Same file structure/size/file counts each time. Guess I'm just waiting until either the program gets more progress made on future builds to work more accurately and easily, or trying to find someone else's working romfs to borrow.

Share this post


Link to post
Share on other sites

Hi just signed up to ask a few questions regarding how this program works. I'm using the zip compiled vers from the previous page if that helps

- Is the overworld and random encounters still broken for Shield? also how to set the specifics for each (or is that why there is 2 entries for every route?)

- when i tick true on all gens and hit randomize it only sets gen 1 pokemon, not sure if I've broken something

- Is it safe to use the "fill all empty slots" on Shield or will it break the encounter table?

Thanks in advance if anyone actually replies ^^'

Share this post


Link to post
Share on other sites
6 hours ago, kurayamiyousei said:

Sadly no, that didn't seem to help. I've tried both dumps created by hactool on PC and by nxdumptool.nro directly from the switch, and both come up with the error. Same file structure/size/file counts each time. Guess I'm just waiting until either the program gets more progress made on future builds to work more accurately and easily, or trying to find someone else's working romfs to borrow.

See I had a similar issue at first. I solved it the first time by literally dragging and dropping the 9222...679.nca folder onto the pkNX window. Now it just works to target that folder via the path, but maybe you'll have some luck?

 

As for other stuff, does anyone else get a frustrating issue with the trainer randomization where it flat out won't work? I just get an index out of bounds exception that appears to stem from the STAB array.

Edited by FreyC

Share this post


Link to post
Share on other sites
20 hours ago, kurayamiyousei said:

Sadly no, that didn't seem to help. I've tried both dumps created by hactool on PC and by nxdumptool.nro directly from the switch, and both come up with the error. Same file structure/size/file counts each time. Guess I'm just waiting until either the program gets more progress made on future builds to work more accurately and easily, or trying to find someone else's working romfs to borrow.

Sorry to hear that. I was using Shield, if that matters.

13 hours ago, FreyC said:

See I had a similar issue at first. I solved it the first time by literally dragging and dropping the 9222...679.nca folder onto the pkNX window. Now it just works to target that folder via the path, but maybe you'll have some luck?

 

As for other stuff, does anyone else get a frustrating issue with the trainer randomization where it flat out won't work? I just get an index out of bounds exception that appears to stem from the STAB array.

20 hours ago, LosslessAngel01 said:

Hi just signed up to ask a few questions regarding how this program works. I'm using the zip compiled vers from the previous page if that helps

- Is the overworld and random encounters still broken for Shield? also how to set the specifics for each (or is that why there is 2 entries for every route?)

- when i tick true on all gens and hit randomize it only sets gen 1 pokemon, not sure if I've broken something

- Is it safe to use the "fill all empty slots" on Shield or will it break the encounter table?

Thanks in advance if anyone actually replies ^^'

Remember that this whole thing is a work in progress and there's a lot to consider. I've attached a newer build that should fix some things, though not all.

pkNX.zip

Share this post


Link to post
Share on other sites

By chance where are newer builds of pknx coming from since the source from here doesn't seem to be getting updated?

 

Speaking on the executable and not the masters since having updated masters doesn't matter if the main pknx files aren't up to date.  

Edited by VanitysFire

Share this post


Link to post
Share on other sites
10 hours ago, VanitysFire said:

By chance where are newer builds of pknx coming from since the source from here doesn't seem to be getting updated?

 

Speaking on the executable and not the masters since having updated masters doesn't matter if the main pknx files aren't up to date.  

Not sure what you mean by "masters", but the source has most certainly been updated. The artifacts on TeamCity have not been updated lately, but the Github master branch of pknx has been updated pretty regularly recently. This is what builds are compiled from.

Share this post


Link to post
Share on other sites

Hi,

I was wondering if it is possible to edit the static encounters within PkNx for Sword and Shield since it is in the Master Dump section of PkNx.

Share this post


Link to post
Share on other sites

Having a few issues where nothing changed in the encounter tables is being saved. Also randomizing is some how working while not matching what the tables say for each route/area. 

 

Have these issues been fixed yet?

Thanks!

Share this post


Link to post
Share on other sites

I was able to get the randomizer working for Sword and Shield, but does anyone have a earlier version that is compatible with Lets go P/E? It just won't save when you randomize on those. (For me anyways.)

Share this post


Link to post
Share on other sites
On 11/26/2019 at 9:29 AM, Shadowth117 said:

Not sure what you mean by "masters", but the source has most certainly been updated. The artifacts on TeamCity have not been updated lately, but the Github master branch of pknx has been updated pretty regularly recently. This is what builds are compiled from.

well, given i said the masters meaning the github master branch that you mentioned yourself, that answers that by your own statement.

but yes the master branches gets updated regularly; however, if you follow the TeamCity link and login as a guest and download the file that gives you the pknx.exe it does not give all the options for randomizing. for example in the trainers option of pknx, when you open the executable, with the updated masters there should be an option for gigantamax and dynamax levels. But on the contrary what i do see is an option for mega evolutions, despite the master files being updated. So the TeamCity downloadable of pknx is not being, but the source/master files have been. And not having an updated main files for pknx that doesn't give all the proper options as the masters offers is less than desirable. 

Now by your statement the masters (should be) compiled into the usable executable that people would use to get the most out of the randomizer options - if i am understanding you correctly. Personally, I am not aware of how to compile the masters. Any assistance on how that is done would be greatly appreciated. I'm sure I am not the only one experiences issues with missing features.

Share this post


Link to post
Share on other sites
49 minutes ago, SacredSlash said:

https://gamebanana.com/tuts/13129 Found this link that is a guide on how to compile a master file of PKNX. Looks easy enough to follow. Thought I would post for those looking. 

yup. i saw that one earlier and have been trying to get it to work. also posted an issue there that i have been having with trying to get it done. which i will just quote here for reference in case anyone here can be of some help with it.

 

when trying to build pknx i get this error code below. doing some searching i found several possible fixes for getting the issue resolved. all of which so far has not worked. only causes 1k+ more errors to come up. 

Assets file ~\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.

any suggestion on trying to get it fixed? judging by trying to research a fix, this seems to be a very very common occurrence with visual studios when building files. 

Share this post


Link to post
Share on other sites
On 12/5/2019 at 9:35 PM, VanitysFire said:

yup. i saw that one earlier and have been trying to get it to work. also posted an issue there that i have been having with trying to get it done. which i will just quote here for reference in case anyone here can be of some help with it.

 

when trying to build pknx i get this error code below. doing some searching i found several possible fixes for getting the issue resolved. all of which so far has not worked. only causes 1k+ more errors to come up. 

Assets file ~\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.

any suggestion on trying to get it fixed? judging by trying to research a fix, this seems to be a very very common occurrence with visual studios when building files. 

I know you were able to fix this, but just an fyi to anybody else, they do provide a solution on the post. So the guide works if anybody doesn't know how to compile a masters file.

Share this post


Link to post
Share on other sites

Has anybody got the trainers to work, or gotten close.

Edit:

I was able to do it, but I had to edit it manually.

Edited by SacredSlash

Share this post


Link to post
Share on other sites

So are static and gift pokemon not able to be randomized as of yet? Without having to change species manually yourself.

Edited by Brodster1000

Share this post


Link to post
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...