Jump to content
Holla!

SM USUM Save Research Thread

Recommended Posts

To add onto the Wormhole Encounters info, here's a table for the Legendaries:

I may need to edit the yellow wormhole Pokemon but I'm pretty sure they're correct. The slots are correct.

Wormhole Legendaries
Flag UnSet Const   Flag UnSet Const  
    Red     Green
0001 851=1? Articuno 0001 851=11? Mewtwo
0002 851=2? Zapdos 0002 851=12? Raikou
0003 851=3? Moltres 0003 851=13 Entei
0004 851=4? Ho-Oh 0004 851=14? Dialga
0005 851=5? Rayquaza 0005 851=15? Cobalion
0006 851=6? Cresselia 0006 851=16? Terrakion
0007 851=7? Tornadus 0007 851=17? Virizion
0008 851=8 Thundurus 0008 851=18? Reshiram
0009 851=9? Landorus 0009 851=19? Zekrom
0010 851=10? Yveltal 0010 851=20? Xerneas
           
    Yellow     Blue
0001 851=21? Regirock 0001 851=29? Suicune
0002 851=22? Regice 0002 851=30 Lugia
0003 851=23? Registeel 0003 851=31? Latias
0004 851=24? Groudon 0004 851=32? Latios
0005 851=25? Heatran 0005 851=33? Kyogre
0006 851=26 Regigigas 0006 851=34? Uxie
0007 851=27? Palkia 0007 851=35? Mesprit
0008 851=28? Giratina 0008 851=36? Azelf
      0009 851=37? Kyurem

I'm not sure if the 851 const does anything though. I tested a few times and it didn't affect which Pokemon appeared.

Here are some other consts that changed between my saves, before entering Ultra Space and after entering a wormhole with Thundurus in Ultra Moon:

0: 0->333 // unknown
1: 0->702 // unknown. Entei and Lugia had 702 also but Regigigas had 706.
2: 0->642 // Pokemon's Pokedex number used for message upon running away from Legendaries?
3: 0->4278 // Event flag to set upon capture (Thundurus's here)
4: 0->4541 // Unknown event flag (for Thundurus too I think).
851: 40->8 // 40 was when I edited it for Sigilyph prior to exiting the Wormhole and reentering. 8 is the const value from the legendary encounter table above.
852: 0->24 // unknown

 

IsSet flags upon entering a wormhole:
0001, 0002, 0003, 0004, 0005, 0006, 0007, 0009, 0010, 0011, 0012, 0013, 0014, 0015, 0016, 4114
0001 through 0015 are for determining the slot.
0016 might be too but I don't know. edit: I'm assume it's an unused slot flag.
I'm not sure what 4114 is. Maybe a "In wormhole" flag.

 

After finishing the battle, there are flags that are set like 0071 (Regigagas), 0067 (Lugia), 0068 (Entei). Also const 3's event flag is set if captured. const 4's event flag also appears to be set if captured but I need to make a clean save without any wormhole Pokemon caught to check.

 

I also ran into a shiny Thundurus that I assumed was caused by the wormhole's shiny flag and then soft-reset. I didn't have the shiny flag set though... nice.

Edited by PMArkive
use 4 digit format for flags
  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)
Battle Tree Scouted Partners for Multi Battles

The save file region for this starts at offset 6B224 in SM, or 6B824 in USUM. There's room to have up to 50 trainers scouted at a time. By default, players start out with only Rada available, using the sets Barbaracle-1 and Hawlucha-1. Interestingly, as an opponent Rada is incapable of using those sets (indeed, no opponent in the tree can possibly have that combination), but those simply happen to be sets #0 and 1 in their database, and you have to have something to start out with. In USUM, clearing Episode RR will also unlock Lillie as a second default trainer. After winning any Single or Double battle in a tree streak other than one involving a Battle Legend, you can "scout" that trainer by paying 10 BP to add them to your book of partners, with the first 2 Pokemon from the team that you just beat.

6B224-6B287 (SM), 6B824-6B887 (USUM): Trainer IDs
This is 100 bytes of allocated space, so each entry gets 2 bytes, stored as successive little-endian pairs, even though the high byte of each pair would have been unnecessary. Valid values range from 0x0000 to 0x00D1 (in SM, the upper limit is only 0x00CC). Note that BE, BF, CB-CC (SM), CC-CD (USUM) and CF-D1 are illegal, as you can never be in position to scout these trainers. They will not have a profile icon when you go to browse your list of partners, and the text box they say to you at the start of your joint challenge will be blank, but other than that they behave as sensibly as anyone else. Values above the upper limit will crash the game if you try to pick them, because there's no character model to draw. When you reach the end of the list of scouted trainers, all the remaining entries will be filled with FFFF.
A list of ID numbers and the trainer names they correspond to can be found at https://docs.google.com/spreadsheets/d/1w-xYTGS9SW8np4Qxg9KjB99QkSxfPDhmjTzHk8GOT04/edit?usp=sharing by clicking on the "Tree Trainers" tab.

6B288-6B2EB (SM), 6B888-6B8EB (USUM): Pokemon #1
Again these are 50 little-endian byte pairs, where this time the second byte is necessary. The first byte pair identifies a Pokemon that belongs to the trainer in your first slot, the second pair goes with the second slot, and so on. Valid values for these pairs range from 0x0000 to 0x03E3. In USUM, the pool is actually filled up to 0x03E6, but these three extra sets are only used in a Battle Agency tutorial battle shortly into the postgame, and no actual trainer is legally capable of having them (plus they suck anyway). Due to the way multi battles work, this first Pokemon will always be the one they send out in a lead position. By using the above link from the trainers, but this time clicking on the Tree Pokemon tab, you can see the mapping for those.

6B2EC-6B34F (SM), 6B8EC-6B94F (USUM): Pokemon #2
As above, but these pairs identify the Pokemon that each partner has in a backup position.

6B354-6B385 (SM), 6B954-6B985 (USUM): Ability for Pokemon #1
The way Battle Tree team generation works, each Pokemon rolls for one of its three ability slots completely at random at the start of the battle (without regard to legality, so they can end up with HA Oranguru, Passimian, or Heatran). These values are saved on scouted trainers, so that every time you pair up with the same one, you'll know they have the same abilities as they did during your original battle (in fact, some of those abilities may have guided you to scout them in the first place). Legal values are 00, 01, and 02, which represent what PKHeX calls the 1, 2, and H slots respectively. Note that this region is only 50 bytes rather than 100, so each successive byte belongs to a separate Pokemon instead of being grouped into pairs. Also note the 4-byte gap between the end of the "Species #2" region and the start of "Ability for #1" region. When you reach the end of your partner list, the remaining values in this region are filled out with 00, rather than FF.

6B386-6B3B7 (SM), 6B986-6B9B7 (USUM): Ability for Pokemon #2
Same as above, for the second Pokemon. There is no gap between the Ability #1 and Ability #2 regions, apart from whatever padding of 00s may result from having empty partner slots.

Gender, like abilities, is determined at random during team generation at the start of every battle instead of being codified in the pool of Tree sets, but I'm not seeing any place that could be saved in the file. It does seem to be held constant across multiple sessions with the same partner, at least.

[EDIT] just confirmed: Your partner's Pokemon will always be male, unless it's a species for which that's not possible. Even if they were female when you scouted their team, and you immediately quit out to play multis with them right away, the game doesn't remember that facet.
Edited by SadisticMystic
  • Like 1

Share this post


Link to post
Share on other sites

Lusamine Battle in Ultra Space
This was done in Pokémon Sun, could work for Pokémon Moon too.

Spoiler

Note: these are the results from comparing a before and after save.

Set: 0787, 0788, 0873, 0874, 0876, 2234
Unset: 0789, 1184

55: 21->0
68: 138->140
213: 0->1
221: 0->1
222: 0->1
231: 0->1
233: 1->0
246: 1->0
252: 0->1
257: 1->0
263: 0->1
266: 0->1
271: 1->0
272: 0->1
279: 1->0
280: 0->1
286: 0->1
290: 1->0
291: 0->1
408: 3->5
418: 3->4

Solgaleo Battle (acccepted Nanu's travel offer afterwards)

Spoiler

Same as above, these flags and constants obtained from comparing before and after.

Set: 0789, 0790, 1219, 3332, 3341
Unset: (none)

68: 140->141
398: 4->6
414: 0->3
423: 1->2
458: 0->1

Lunala Battle (rejected Nanu's travel offer afterwards)

Spoiler

Same as above, these flags and constants obtained from comparing before and after.

Set: 0789, 0790, 1219, 3333
Unset: 0884

55: 2->0
68: 140->141
200: 0->1
210: 0->1
213: 1->0
231: 1->0
234: 1->0
237: 1->0
243: 1->0
254: 1->0
258: 1->0
259: 0->1
262: 0->1
267: 0->1
271: 0->1
272: 1->0
279: 0->1
280: 1->0
285: 0->1
290: 0->1
414: 0->3
423: 1->2
458: 0->1

Lunala Battle (accepted Nanu's travel offer afterwards)

Spoiler

This was originally a Sun save. If I started from after I defeated Lusamine (but in front of Solgaleo), Lunala doesn't appear when the save transfers over. (also note, I was at Altar of the Sunne, which probably complicates things)

However, in this case, I started in Ultra Space, so once I defeated Lusamine, I get spit out in the correct place (Altar of the Moone), so the story progresses as normal. This is comparison is right before and right after Lunala.

Set: 0789, 0791, 1219, 3333, 3341, 3377, 3476
Unuset: (none)

68: 140->141
398: 4->6
414: 0->3
423: 1->2
458: 0->1

 

Share this post


Link to post
Share on other sites

Hey guys,

Just wanted to say that while I appreciate people who've thanked me researching the games via messaging on this forum, please note that I don't just do requests; if I have interest and spare time (which I don't have much nowadays) I'll do it.

If you want any feature(s) for other Pokemon game's save researched that hasn't already, please feel free to open a new thread about it and those with the spare time and interest down the road will hopefully be able to look into it.

If you think you have the skills and you'd like to try researching the thing(s) you want, then you can get started by downloading a hex editor. The one I use and recommend is HxD: https://mh-nexus.de/en/downloads.php?product=HxD20

Thank you.

  • Like 2

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...