Skip to content

Instantly share code, notes, and snippets.

Assorted list of functions I looked at that affect the camp behavior in SWSH. All of this is from Sword 1.3.2. Most labels are mine, some are copied from BDSP.

Motostoke Outskirts
===
Cheri Berry 10 8.93%
Chesto Berry 10 8.93%
Pecha Berry 10 8.93%
Rawst Berry 10 8.93%
Aspear Berry 10 8.93%
Leppa Berry 10 8.93%
Oran Berry 10 8.93%
Persim Berry 10 8.93%

Overview

Each day in Legends: Arceus lasts 24 minutes, and each real-time minute is one in-game hour.

In-game time is saved; if you save and reboot your game, it will start at the same time. The save block for in-game time is 203A7F34 and stores a double value equal to the number of minutes. The function that converts this to the hour is at sub_71024AB9F0 in version 1.1.1.

There are 4 different times of day, which I will call Dawn, Day, Dusk, and Night. I do not believe that there are official names, but you may see other names such as Dawn = Morning, Day = Midday, Dusk = Evening on various fansites.

Times will be written as 24-hour time. You can subtract 12 to get the 12-hour time if you prefer.

I recorded a video of the full day cycle, which also shows when Night starts and ends [video]. The hour is displayed on the top right. You may notice the hour actually ticks to 24 very briefly, and the game immediately corrects it to 0 [[video](https://youtu.be/bOxToygZIl8

bool Sword = true;
void Main()
{
// Initial state
string ram = "D82C5B180FDEFE005E23F28A4FA36131";
string str0 = ram.Substring(16);
string str1 = ram.Substring(0, 16);
ulong s0 = Convert.ToUInt64(str0, 16);
ulong s1 = Convert.ToUInt64(str1, 16);

Most of this research was done by wwwwwwzx in 2018: https://x.com/wwwwwwzx/status/979949167224045568

Since most of this was already done, I used the XY radar as an introduction to debugging 3DS games. I won't be providing much info on how to play the game because I literally haven't done anything in-game besides look at the Poké Radar the moment my cartridge arrived. Huge thanks to SirToastyToes for helping me understand this part of the game!

New Things I Learned

I was able to solve the unknown condition that causes 4% upbeat music rate--it's the player's birthday!

We found some methods to force it to be your birthday ingame:

  • The birth date that matters is in the 3DS bio, not the one attached to the NNID. You can change this birth date without penalty.

This code is executed when the Poké Radar item is used and when finishing a battle that continues the chain.

The special music:

  • Each time the chain continues, there is a chance for the radar music to change into a more upbeat tune. The chance for this to occur is 2% normally and 4% if it is the player's birthday.
  • When the upbeat music is playing, the shiny rate is maxed out at 1/100, which is the normal rate after a chain of 40+.
  • The upbeat music cannot start with a chain of 0 or when the Poké Radar is used.
  • If the upbeat music is already playing, each time the radar is used or an encounter to +1 the chain finishes, there is a 50% chance the upbeat music changes back to the regular music.

How the grass patches are generated:

// Global settings to make things easier.
int FlawlessIVs = 3;
// Set these values for your gender ratio:
// Fixed gender = -1
// 50 M : 50 F = 127
// 25 M : 75 F = 191
// 75 M : 25 F = 63
// 87.5 M : 12.5 F = 31
// Unfortunately this area is very noisy and everything is blinking while you try to pick up eggs.
// You can set this to a certain value if you tend to see that many blinks from menu to egg generation...
// Just adjust it up until what you hit is on Adv 0.
const uint blinks = 0;
// You probably have either Shiny Charm or Masuda Method, else you'd get PID rolls.
bool shiny_charm_or_masuda_method = true;
void Main()
{
void Main()
{
// Initial state
ulong s0 = 0x0123456789ABCDEF;
ulong s1 = 0x0123456789ABCDEF;
// Set this for how far you want to search.
ulong maxAdvance = 5000;
Console.WriteLine("Adv | s0 | s1 | Earned Watts | Displayed Watts");