summaryrefslogtreecommitdiff
path: root/mm/2s2h/Rando/MiscBehavior/OnFileCreate.cpp
diff options
context:
space:
mode:
authorGarrett Cox <garrettjcox@gmail.com>2024-11-11 09:55:32 -0600
committerGarrett Cox <garrettjcox@gmail.com>2024-11-11 09:55:32 -0600
commit1a95366dfe378d032e251cbf30d226bda232f8e9 (patch)
treeb493549d1d27b967f8ab0095b1826fae5e98040d /mm/2s2h/Rando/MiscBehavior/OnFileCreate.cpp
parent80f81a208517d5112a764155cae27184d2221b1b (diff)
Start as human with ocarina & SoT
Diffstat (limited to 'mm/2s2h/Rando/MiscBehavior/OnFileCreate.cpp')
-rw-r--r--mm/2s2h/Rando/MiscBehavior/OnFileCreate.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/mm/2s2h/Rando/MiscBehavior/OnFileCreate.cpp b/mm/2s2h/Rando/MiscBehavior/OnFileCreate.cpp
index 928e40990..df2c33664 100644
--- a/mm/2s2h/Rando/MiscBehavior/OnFileCreate.cpp
+++ b/mm/2s2h/Rando/MiscBehavior/OnFileCreate.cpp
@@ -5,6 +5,7 @@
#include <boost_custom/container_hash/hash_32.hpp>
extern "C" {
+#include "functions.h"
#include "variables.h"
#include "ShipUtils.h"
}
@@ -21,6 +22,22 @@ void Rando::MiscBehavior::OnFileCreate(s16 fileNum) {
&gSaveContext.save.saveInfo.inventory.dungeonKeys,
sizeof(gSaveContext.save.saveInfo.inventory.dungeonKeys));
+ // Skip the first cycle, in Rando we start as Human at south clock town.
+ gSaveContext.save.entrance = ENTRANCE(SOUTH_CLOCK_TOWN, 0);
+ gSaveContext.save.cutsceneIndex = 0;
+ gSaveContext.save.hasTatl = true;
+ gSaveContext.save.playerForm = PLAYER_FORM_HUMAN;
+ gSaveContext.save.saveInfo.playerData.threeDayResetCount = 1;
+ gSaveContext.save.isFirstCycle = false;
+ SET_WEEKEVENTREG(WEEKEVENTREG_59_04); // Tatl
+ SET_WEEKEVENTREG(WEEKEVENTREG_31_04); // Tatl
+ gSaveContext.save.saveInfo.permanentSceneFlags[SCENE_INSIDETOWER].switch0 |= (1 << 0); // Happy Mask Salesman
+
+ // TODO: Starting item configuration. Currently if you don't start with ocarina & SoT glitchless logic will fail
+ // because of looping condition of needing Deku mask to get ocarina, and needing ocarina to get deku mask.
+ GiveItem(RI_OCARINA);
+ GiveItem(RI_SONG_OF_TIME);
+
try {
// SpoilerFileIndex == 0 means we're generating a new one
if (CVarGetInteger("gRando.SpoilerFileIndex", 0) == 0) {