kwsch / pk3DS

Pokémon (3DS) ROM Editor & Randomizer
https://projectpokemon.org/forums/forums/topic/34377-pk3ds-xyoras-rom-editor-randomizer/
Other
400 stars 150 forks source link

received this error when messing around with shiny rate and static encounters. Where did I go wrong? #549

Closed Ethan082006 closed 5 months ago

Ethan082006 commented 5 months ago

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. at pk3DS.Core.CTR.CTRUtil.setNCCH(String EXEFS_PATH, String ROMFS_PATH, String EXHEADER_PATH, String TB_Serial, String LOGO_NAME, ProgressBar PB_Show, RichTextBox TB_Progress) at pk3DS.Core.CTR.CTRUtil.buildROM(Boolean Card2, String LOGO_NAME, String EXEFS_PATH, String ROMFS_PATH, String EXHEADER_PATH, String SERIAL_TEXT, String SAVE_PATH, Boolean trimmed, ProgressBar PB_Show, RichTextBox TB_Progress) at pk3DS.Main.<>c__DisplayClass66_0.b__0() in D:\a\1\s\pk3DS\Main.cs:line 1267 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()

Loaded Assemblies:

mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll

pk3DS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null C:\Users\c75pe\Downloads\drop\pk3DS\bin\Release\pk3DS.exe

System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll

System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll

System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll

System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll

System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll

System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll

pk3DS.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null C:\Users\c75pe\Downloads\drop\pk3DS\bin\Release\pk3DS.Core.dll


User Message: An unhandled exception has occurred. The program must now close.

kwsch commented 5 months ago

messing around with shiny rate and static encounters

No, you pressed "buildROM".

You likely do not have the entire romfs & exefs dumped, hence the error. It is not advisable to use the rebuilding parts of the program and to instead use your custom firmware's features (layeredfs) to just have the console load the modified files from the SD card in the unpacked state. Saves you a ton of effort in rebuilding each change you make.

Ethan082006 commented 5 months ago

I extracted the exefs and romfs using PK3DS, and I waited for it to be finished, too. On top of that, I rebuilt them, too.

Ethan082006 commented 5 months ago

If it's not recommended to use them, then why make it an option in the first place? And can I use it citra or what? I got the exefs and romfs from my 3ds with a digital copy of Ultra Moon and wanted to use it for Citra.

kwsch commented 5 months ago

Unpolished features can still be improved by future changes, but realize that this is an old project and changes likely won't be made to improve interactions with this feature. There are other toolkits that were made in the years that followed that allowed for rebuilding ROMs with better interaction, unspecific to Pokemon.

This program is designed for using with official hardware & full dumps, not emulators. If you need help loading mods with an emulator, then find a guide for your emulator.

Ethan082006 commented 5 months ago

What toolkit do you suggest then?

kwsch commented 5 months ago

Again, there's no need to rebuild ROM files if you just use the layeredfs features as initially recommended.

Use whatever tool you used to unpack your dumped ROM, if you really must rebuild a file.