Jump to content
Kaphotics

tool pk3DS: 3DS ROM Editor & Randomizer

Recommended Posts

57 minutes ago, Darkiceflame said:

Is there any way to change an item's section? For example, I was hoping there might be a way to turn the dragon stones (Light Stone, Dark Stone and God Stone) from key items into held items so they could be used as mega stones.

Not with the current features of the program. Item editing only exposes the price property.

You'll have to hex edit them at the associated offset to make them Held Items. Should be offset 0x9 within the item data.

https://pastebin.com/f3GuVKCs

https://github.com/kwsch/pk3DS/blob/2aa06370c08df01ef017e02934d2f416539014ef/pk3DS.Core/Structures/Gen6/Item6.cs#L104

Share this post


Link to post
Share on other sites

Hello,

I'm trying to randomize my Moon game and accidentally left the "Types" box checked off when randomizing personal stats when I didn't want them randomized. Is there any way to get them back to original without manually changing each one?

Edited by JNish94

Share this post


Link to post
Share on other sites

Hey :D

I found a little bug/flaw in the Title Screen editor, only in pokemon X and Y though. It seems that it only loads the "logo_[x or y]00.bclim" and the "logo_[x or y]03.bclim" (tested wit build 175) correctly ... the other ones like "push_start.bclim", "light.bclim", "logo_[x or y]01.bclim" etc. are empty, extracted .pngs are empty aswell. (The blur in the X and Y logo shows correctly ingame, but is not editable because i cant find the correct files ...) pls fix this :D

Share this post


Link to post
Share on other sites

Randomizing TMs does nothing. The TMs don't change in game but editing the shiny rate works. I am using a 1.2 code.bin, and I am using the newest build of Pk3ds. Any help would be appreciated. 

Edited by Kingsbury8

Share this post


Link to post
Share on other sites
7 minutes ago, Kaphotics said:

you are doing something wrong.

I don't see how. I click Randomize, then Yes, then Ok, then rename the .code.bin to (TITLEID).bin, and put it in Luma3ds.  This is the only problem I have not been able to fix, and I can find no one who has a fix to it.

Edited by Kingsbury8

Share this post


Link to post
Share on other sites

@Kingsbury8 Depends on what version of Luma3DS you're running.

If 7.0.5 or earlier, the code.bin must be in the path /luma/code_sections/<titleid>.bin
If 7.1 or later, the code.bin must be in the path /luma/titles/<titleid>/code.bin

It must also match whichever version of the game you have installed. If you have no update data, it must be from a dump of the game (1.0).
If you do have update data installed, it must match that version (ie, 1.5 for XY, 1.4 for ORAS, 1.2 for SM).

Share this post


Link to post
Share on other sites
On 5.11.2017 at 8:57 PM, Kaphotics said:

it works as intended:

image.png

white & transparent background, you can see PRESS START there.

You can toggle a green-screen effect to see transparency areas by clicking in the image area:

image.png

I tried it with different versions of x and y but still nothing ... and yes the greenscreen was activated ...

bsp.png.e14092d4a7a5e79f4c33956ac7f39f1a.png

As you can see: no "Press Start" and I have no idea why (its the same for any file except 00 and 03 again - in x and y) so frustrating*

*Edit: I used a old version of pk3DS (to be more exact i used the pk3DS build: 12-02-15) and this one showed the pictures that even build 187 wont show me, this gets more confusing by the second ...

Edited by Zombie_ThePlayer
Strange results

Share this post


Link to post
Share on other sites

Continuing the discussion from here: https://github.com/kwsch/pk3DS/issues/230

Changing _0xB to 0, 1, 2, 3, or 4 does nothing to Revive or Potion's usability in battle (the items i used to test it), they still appear under Status Restore and HP Restore respectively and are usable as normal.

Messing with KeyFlags (I tried 0 here as well, to match Sacred Ash's value) also didn't change anything: Revive was still filed under Medicine outside of battle and Status Restore in battle.

Changing _0xD to 4 had interesting behavior: the Revive functioned normally outside of battle, but in battle it asked me which Pokémon to use it on (as if it were a Revive) and then proceeded to throw a Poké Ball that functioned normally (captured a Wild, was blocked by a Trainer.) This behavior consumed the Revive and did not restore the target Pokémon from fainting. This technically serves the function I'm looking for (preventing the use of the Revive item during battle) but is hacky, hard to understand, and doesn't give any feedback on what happened to the player.

Further research: I edited every value on Revive to match that of Sacred Ash, even the price. Outside of battle, the Revive functions as the Sacred Ash, restoring every fainted Pokémon in my team to full HP... But in battle it still shows up in the Bag. When I use it, it asks for a target and revives the selected Pokemon as usual, except to full HP instead of half.

This leads me to conclude that whatever flag sets an item's visibility in the Battle Bag isn't currently editable with PK3DS (and possibly entirely unknown).

Even Further research: Changing all the flags except for the HP restored ones to match that of Carbos is interesting. Outside of battle, the item "will have no effect". Inside battle, a message I've never seen legitimately appears: "But the item doesn't do anything here!" and it does not consume the Revive. An ideal outcome would be getting that in-battle behavior while retaining its normal behavior outside of battle... Changing the Field Effect to either that of Revive (1) or Sacred Ash (3) restores the behavior noted in "Further research".

A slap in the face: Changing UseEffect from 1 to 0 makes it unusable outside of battle, but usable as normal inside battle.

I figured out a way to do what I want that's less hacky than changing 0xD to 4. By changing the Field Effect to 3 but changing Amount Healed to 0, it fully restores all fainted Pokemon as a Sacred Ash would, but when used in battle it displays "Pokemon recovered from fainting!" but doesn't actually heal the Pokemon. I wish there were a way to change that message without messing with the one that's displayed by the Max Revive, but so far that's the least hacky way I've gotten the effect I'm looking for. Unfortunately all this research has still done nothing to find what flags an item's visibility in the Battle Bag.

Edited by Dio_Vento
  • Thanks 1

Share this post


Link to post
Share on other sites
On 11/10/2017 at 7:05 AM, Dio_Vento said:

Continuing the discussion from here: https://github.com/kwsch/pk3DS/issues/230

Changing _0xB to 0, 1, 2, 3, or 4 does nothing to Revive or Potion's usability in battle (the items i used to test it), they still appear under Status Restore and HP Restore respectively and are usable as normal.

Messing with KeyFlags (I tried 0 here as well, to match Sacred Ash's value) also didn't change anything: Revive was still filed under Medicine outside of battle and Status Restore in battle.

Changing _0xD to 4 had interesting behavior: the Revive functioned normally outside of battle, but in battle it asked me which Pokémon to use it on (as if it were a Revive) and then proceeded to throw a Poké Ball that functioned normally (captured a Wild, was blocked by a Trainer.) This behavior consumed the Revive and did not restore the target Pokémon from fainting. This technically serves the function I'm looking for (preventing the use of the Revive item during battle) but is hacky, hard to understand, and doesn't give any feedback on what happened to the player.

Further research: I edited every value on Revive to match that of Sacred Ash, even the price. Outside of battle, the Revive functions as the Sacred Ash, restoring every fainted Pokémon in my team to full HP... But in battle it still shows up in the Bag. When I use it, it asks for a target and revives the selected Pokemon as usual, except to full HP instead of half.

This leads me to conclude that whatever flag sets an item's visibility in the Battle Bag isn't currently editable with PK3DS (and possibly entirely unknown).

Even Further research: Changing all the flags except for the HP restored ones to match that of Carbos is interesting. Outside of battle, the item "will have no effect". Inside battle, a message I've never seen legitimately appears: "But the item doesn't do anything here!" and it does not consume the Revive. An ideal outcome would be getting that in-battle behavior while retaining its normal behavior outside of battle... Changing the Field Effect to either that of Revive (1) or Sacred Ash (3) restores the behavior noted in "Further research".

A slap in the face: Changing UseEffect from 1 to 0 makes it unusable outside of battle, but usable as normal inside battle.

I figured out a way to do what I want that's less hacky than changing 0xD to 4. By changing the Field Effect to 3 but changing Amount Healed to 0, it fully restores all fainted Pokemon as a Sacred Ash would, but when used in battle it displays "Pokemon recovered from fainting!" but doesn't actually heal the Pokemon. I wish there were a way to change that message without messing with the one that's displayed by the Max Revive, but so far that's the least hacky way I've gotten the effect I'm looking for. Unfortunately all this research has still done nothing to find what flags an item's visibility in the Battle Bag.

Maybe a way would be to remove revives from shops, and force the user to conserve them.

Try setting BoostACC to 0. I'd think the game reuses flags for different purposes. The only items that have the same BoostACC (=1) are... Revive, Max Revive, and Revival Herb.

Alternatively, try dummying out the item completely by copying over an unused item :)

Share this post


Link to post
Share on other sites
On 11/11/2017 at 4:41 PM, Kaphotics said:

Maybe a way would be to remove revives from shops, and force the user to conserve them.

Try setting BoostACC to 0. I'd think the game reuses flags for different purposes. The only items that have the same BoostACC (=1) are... Revive, Max Revive, and Revival Herb.

Alternatively, try dummying out the item completely by copying over an unused item :)

BoostAcc is tied to FieldEffect on Revive, changing one changes the other. 

I'd rather not dummy the item out, seeing as Hau gives you like 900 over the course of Sun and Moon, no idea how many in Ultra. If there was a way to change the ones Hau gives you into Sacred Ashes though...

I think what I'll do is what I did in Nova Sun and Umbra Moon: make Sacred Ashes available in shops for cheap. But instead of making Revives prohibitively expensive, I'll make them only heal 1 HP instead of 50%. That means you have to use a Max Potion or spend three turns healing to full in the mid-late game, solving the main issue with Revive spam in battles: the absurd turn economy you get by spamming Revives while your last Pokémon is bulky.

Edited by Dio_Vento

Share this post


Link to post
Share on other sites
6 minutes ago, Rosieplier said:

Just a question, does the latest Pk3DS support USUM Garcs? I'm gonna update my textures and model guide, so I need to unpack some garcs.

Asking without trying first? ;)

Share this post


Link to post
Share on other sites

Hey I'm currently using pk3DS build 200 (tested 197 aswell) and am unable to open "Wild Encounter" with a dump of my own digital version of sun (v1.0) from gm9.
Everything else appears to work as intended.

Windows 10 x64 LTSB

Error in spoiler
 

Spoiler

Exception Details:
System.ArgumentNullException: Value cannot be null.
Parameter name: source
   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   at pk3DS.Main.<B_Wild_Click>b__36_0() in C:\BuildAgent\work\b93f10d64d1a1178\pk3DS\Main.cs:line 616
   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.200, Culture=neutral, PublicKeyToken=null
C:\Users\roflpwnt\Desktop\pk3DS Build 200\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\roflpwnt\Desktop\pk3DS Build 200\pk3DS.Core.dll

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

 

Edit: updating .net

edit2: nope, trying another win10 machine I have
edit3: same error on another regular Win10 x64

I will try and redump

Edited by roflpwnt

Share this post


Link to post
Share on other sites

Hey, I've been trying to randomize Pokémon Omega Ruby for a few hours now with varying degrees of un-success and I'm trying to pin-point which step of the process is the reason for that.

I have a .cia of the game, I'm extracting it with HackingToolkit3DS, since the most recent version, called 9DS doesn't seem to create the ExtractedRomFS and ExtractedExeFS that I need to execute pk3DS, even though I use the same exact .cia file.
I've tested this file on my 3DS without problem, but it is when I check with pk3DS that I see all of a sudden, movesets from very random trainers have completely disappeared, locking them on using Struggle. Notice also that the moves are NOT EDITABLE, since the blocks are in full grey like in the printscreen down at the spoilers.
However random, this problems seems to be exclusive to smaller-class trainers too, gym leaders and rival encounters seem to be doing fine from what I checked. But this could just be the randomness of it. 

So, is this some known bug that I just didn't read about, something on my end? Because if so, I'd love to see what someone that understands this stuff has to say. Never had this issue before, and I've randomized Sinking and Star Sapphire before with no such problems.

If someone has any idea, let me know. Have a good day.

Spoiler

5a1226948a3aa_wtfishappening.png.8d06b89127a31758f9703cca709274c3.png

 

Edited by CodeZeta

Share this post


Link to post
Share on other sites
4 hours ago, CodeZeta said:

Hey, I've been trying to randomize Pokémon Omega Ruby for a few hours now with varying degrees of un-success and I'm trying to pin-point which step of the process is the reason for that.

I have a .cia of the game, I'm extracting it with HackingToolkit3DS, since the most recent version, called 9DS doesn't seem to create the ExtractedRomFS and ExtractedExeFS that I need to execute pk3DS, even though I use the same exact .cia file.
I've tested this file on my 3DS without problem, but it is when I check with pk3DS that I see all of a sudden, movesets from very random trainers have completely disappeared, locking them on using Struggle. Notice also that the moves are NOT EDITABLE, since the blocks are in full grey like in the printscreen down at the spoilers.
However random, this problems seems to be exclusive to smaller-class trainers too, gym leaders and rival encounters seem to be doing fine from what I checked. But this could just be the randomness of it. 

So, is this some known bug that I just didn't read about, something on my end? Because if so, I'd love to see what someone that understands this stuff has to say. Never had this issue before, and I've randomized Sinking and Star Sapphire before with no such problems.

If someone has any idea, let me know. Have a good day.

  Reveal hidden contents

5a1226948a3aa_wtfishappening.png.8d06b89127a31758f9703cca709274c3.png

Spoiler

 

HackingToolkit3DS v10+ requires an encrypted cia. use HackingToolkit3DS V9 if you have a unencrypted cia  

Edited by darkmage1991

Share this post


Link to post
Share on other sites
12 hours ago, darkmage1991 said:
  Reveal hidden contents

 

HackingToolkit3DS v10+ requires an encrypted cia. use HackingToolkit3DS V9 if you have a unencrypted cia  

This wasn't the answer, since using 10+ with any ROM that is not encrypted doesn't result in Extracted files to begin with. I did, anyways, update to V9 to no different results.
I have kept doing more trial-and-error solving in the meantime though, I'll make them as clear as possible, so sorry if I sound redundant at times:


I came to notice one thing in an altered ROM of Omega Ruby: Trainers with the "Moves" box in the "Trainer Info" tab of the Trainer Editor have their moves DELETED BY DEFAULT. To fix this I'd have to check the individual boxes of hundreds of random trainers and manually add their moves back.
Addition to this point: I've recently seen a video where a guy explains how to use this tool. The video is quite old, so he is probably using an OLDER VERSION OF Pk3DS, and I DO NOT KNOW HOW RELIABLE THIS SPECIFIC PIECE OF CLUE IS, but in it, when he clicks randomize (see: Skip to 34:41 if it doesn't do it automatically) when the program is running through every trainer you can clearly see that MOST of them have the "Moves" box unchecked. I wonder if that also means that they don't have moves, just like in mine.

I have recorded a gif of the problem for easier pinpointing. Maybe it is obvious that "yeah, the Moves box is there to specifically delete all moves in a Trainer" but since I doubt the usefulness of that, I'm thinking there's a problem. What I THOUGHT it did was select exactly which Trainers you'd want to mess with their moves, so an unchecked box meant they were locked but it should display the move names in the grey boxes. Instead they are empty and the Trainers thus only do Struggle over and over with all their pokemons.. And if IT IS working as intended, I'm still questioning the fact that AS SOON AS I USE PK3DS ON MY EXTRACTED FOLDERS IT DELETES MOVES OF 70%+ OF THE TRAINERS: (This was recorded on a freshly and pre-tested Rising Ruby ROM)

Spoiler

8ldhnwdef3.gif.a0f908cb20a278098c81f6abd8ff24bc.gif

 

 

On another note: The problem could be from three things: the ROM itself, pk3DS or the Toolkit. The ROM itself has no problem as this was the first thing I tested, booting up both the Rising Ruby and vanilla Omega Ruby without any changes to them. Both worked fine.

I then tested the extractor! I picked a ROM, extracted their folders and then remounted them. I also got in contact with the creator of the extractor over at twitter and they said it wasn't something their tool could do. And it is true, after the proccess, the remounted ROM also showed no problems whatsoever.

In conclusion, this really seems like a problem in pk3DS. Since I don't intend to do any major changes to Trainers in my run (only meant to add random prizes at a low-ish %) I'm going to try and use the randomizer on a working ROM WITHOUT EVER OPENING THE TRAINER TAB, since this program seems to apply changes and save them AUTOMATICALLY, which really looks like an oversight at times. And see if that works. I'll be only randomizing pokemon abilities and starters.
In the meantime, if someone can also help look into this or shed some light on the problem like "oh this tool specifically doesn't work on Ruby because of this issue, sorry", that would be great. Thanks in advance.

 

Reporting error I got while trying to change Stunky's moveset during my proccess, specifically I lowered all his moves by 3 then tried adding Sucker Punch at level 34, I then click on the "Level" tab, just to organize it in order, which got me: 

Spoiler

Exception Details:
System.ArgumentException: Object must be of type Int32.
   at System.Int32.CompareTo(Object value)
   at System.Windows.Forms.DataGridViewRowCollection.RowComparer.CompareObjects(Object value1, Object value2, Int32 rowIndex1, Int32 rowIndex2)
   at System.Windows.Forms.DataGridViewRowCollection.RowArrayList.Pivot(Int32 left, Int32 center, Int32 right)
   at System.Windows.Forms.DataGridViewRowCollection.RowArrayList.CustomQuickSort(Int32 left, Int32 right)
   at System.Windows.Forms.DataGridViewRowCollection.Sort(IComparer customComparer, Boolean ascending)
   at System.Windows.Forms.DataGridView.SortInternal(IComparer comparer, DataGridViewColumn dataGridViewColumn, ListSortDirection direction)
   at System.Windows.Forms.DataGridView.OnColumnHeaderMouseClick(DataGridViewCellMouseEventArgs e)
   at System.Windows.Forms.DataGridView.OnMouseClick(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

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.200, Culture=neutral, PublicKeyToken=null
C:\Users\Tito\Documents\3ds backup\3DS STUFF\Randomizer_Tutorial_6 (1)\Step #3 - Randomize (pk3DS)\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\Tito\Documents\3ds backup\3DS STUFF\Randomizer_Tutorial_6 (1)\Step #3 - Randomize (pk3DS)\pk3DS.Core.dll

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

--------------------
User Message:
An unhandled exception has occurred.
You can continue running the program (albeit with potential side-effects), but please report this error.
 

 

Edited by CodeZeta

Share this post


Link to post
Share on other sites

What exact code is it that prevents final evolutions from evolving further? Same with why the Perma. Megas reset forms every time I load up the file. I have an "Access PC anywhere" code to offset the latter, but the evolution problem still remains. If you know of any work arounds, that'd be great. As it is now, that's the only snag in my enjoyment of the rom...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...