mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-21 23:58:51 -05:00
Rando: More Misc. Hints (#2930)
* commit constipation * fix inconsistencies between 3d and soh settings * Add RSK check for Saria; Sheik now tells you other reqs for ganon * Translations (thanks Purple and Timmy_GamerNepgear); Retain Saria's "face-to-face" text in rando if you're too close * fix scene renames for sheik * whoops * Undo LA hint setting erasure from conflict * Clarified Sheik text IDs; Clarified final frogs hint * Fixed Sheik text ID assignment; Fixed Saria's messages in `OTRGlobals` * Added hint locs for sheik and saria * Set up hook for Sheik spawn; Sheik no longer cheats with room transitions; Enforced text IDs on saria msg function * Set up hook for Sheik spawn; Sheik no longer cheats with room transitions; Enforced text IDs on saria msg function * Update soh/soh/SaveManager.cpp Co-authored-by: Garrett Cox <garrettjcox@gmail.com> * nice.gif Co-authored-by: Garrett Cox <garrettjcox@gmail.com> * got ahead of myself * Conquered and divided; simplified stuff * nitpicking Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * the little things i stg --------- Co-authored-by: Garrett Cox <garrettjcox@gmail.com> Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
This commit is contained in:
parent
18e21e12c8
commit
c3a1eb2315
@ -307,13 +307,16 @@ typedef struct {
|
||||
/* */ char gregHintText[250];
|
||||
/* */ char ganonText[250];
|
||||
/* */ char dampeText[150];
|
||||
/* */ char sheikText[150];
|
||||
/* */ char sariaText[150];
|
||||
/* */ char warpMinuetText[100];
|
||||
/* */ char warpBoleroText[100];
|
||||
/* */ char warpSerenadeText[100];
|
||||
/* */ char warpRequiemText[100];
|
||||
/* */ char warpNocturneText[100];
|
||||
/* */ char warpPreludeText[100];
|
||||
/* */ RandomizerCheck ganonHintCheck;
|
||||
/* */ RandomizerCheck lightArrowHintCheck;
|
||||
/* */ RandomizerCheck sariaCheck;
|
||||
/* */ RandomizerCheck gregCheck;
|
||||
/* */ RandomizerCheck dampeCheck;
|
||||
/* */ char inputSeed[1024];
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
typedef enum {
|
||||
TEXT_CURSED_SKULLTULA_PEOPLE = 0x22,
|
||||
TEXT_SARIAS_SONG_FACE_TO_FACE= 0x160,
|
||||
TEXT_SARIAS_SONG_FOREST_SOUNDS = 0x161,
|
||||
TEXT_SARIAS_SONG_FOREST_TEMPLE = 0x16A,
|
||||
TEXT_SARIA_SFM = 0x10AD,
|
||||
TEXT_ITEM_KEY_SMALL = 0x60,
|
||||
TEXT_ITEM_DUNGEON_MAP = 0x66,
|
||||
TEXT_ITEM_COMPASS = 0x67,
|
||||
@ -27,12 +31,15 @@ typedef enum {
|
||||
TEXT_RED_RUPEE = 0xF0,
|
||||
TEXT_PURPLE_RUPEE = 0xF1,
|
||||
TEXT_HUGE_RUPEE = 0xF2,
|
||||
TEXT_FROGS_UNDERWATER = 0x22E,
|
||||
TEXT_BEAN_SALESMAN = 0x405E,
|
||||
TEXT_MEDIGORON = 0x304C,
|
||||
TEXT_GRANNYS_SHOP = 0x500C,
|
||||
TEXT_CARPET_SALESMAN_1 = 0x6077,
|
||||
TEXT_CARPET_SALESMAN_2 = 0x6078,
|
||||
TEXT_MARKET_GUARD_NIGHT = 0x7003,
|
||||
TEXT_SHEIK_NEED_HOOK = 0x700F,
|
||||
TEXT_SHEIK_HAVE_HOOK = 0x7010,
|
||||
TEXT_SCRUB_RANDOM = 0x9000,
|
||||
TEXT_SCRUB_RANDOM_FREE = 0x9001,
|
||||
TEXT_SHOP_ITEM_RANDOM = 0x9100,
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "mods.h"
|
||||
#include <libultraship/bridge.h>
|
||||
#include "game-interactor/GameInteractor.h"
|
||||
#include "soh/Enhancements/randomizer/3drando/random.hpp"
|
||||
#include "tts/tts.h"
|
||||
#include "soh/Enhancements/boss-rush/BossRushTypes.h"
|
||||
#include "soh/Enhancements/enhancementTypes.h"
|
||||
@ -21,6 +20,7 @@
|
||||
#include "src/overlays/actors/ovl_En_Poh/z_en_poh.h"
|
||||
#include "src/overlays/actors/ovl_En_Tp/z_en_tp.h"
|
||||
#include "src/overlays/actors/ovl_En_Firefly/z_en_firefly.h"
|
||||
#include "src/overlays/actors/ovl_En_Xc/z_en_xc.h"
|
||||
|
||||
extern "C" {
|
||||
#include <z64.h>
|
||||
@ -952,6 +952,28 @@ void RegisterAltTrapTypes() {
|
||||
});
|
||||
}
|
||||
|
||||
void RegisterRandomizerSheikSpawn() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneSpawnActors>([]() {
|
||||
if (!gPlayState) return;
|
||||
bool canSheik = (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIAL_COUNT) != RO_GANONS_TRIALS_SKIP &&
|
||||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_LIGHT_ARROWS_HINT));
|
||||
if (!gSaveContext.n64ddFlag || !LINK_IS_ADULT || !canSheik) return;
|
||||
switch (gPlayState->sceneNum) {
|
||||
case SCENE_TEMPLE_OF_TIME:
|
||||
if (gPlayState->roomCtx.curRoom.num == 1) {
|
||||
Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_EN_XC, -104, -40, 2382, 0, 0x8000, 0, SHEIK_TYPE_RANDO, false);
|
||||
}
|
||||
break;
|
||||
case SCENE_INSIDE_GANONS_CASTLE:
|
||||
if (gPlayState->roomCtx.curRoom.num == 1){
|
||||
Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_EN_XC, 101, 150, 137, 0, 0, 0, SHEIK_TYPE_RANDO, false);
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void InitMods() {
|
||||
RegisterTTS();
|
||||
RegisterInfiniteMoney();
|
||||
@ -976,5 +998,6 @@ void InitMods() {
|
||||
RegisterMirrorModeHandler();
|
||||
RegisterEnemyDefeatCounts();
|
||||
RegisterAltTrapTypes();
|
||||
RegisterRandomizerSheikSpawn();
|
||||
NameTag_RegisterHooks();
|
||||
}
|
||||
|
@ -1083,6 +1083,8 @@ int Fill() {
|
||||
CreateAltarText();
|
||||
CreateDampesDiaryText();
|
||||
CreateGregRupeeHint();
|
||||
CreateSheikText();
|
||||
CreateSariaText();
|
||||
CreateWarpSongTexts();
|
||||
return 1;
|
||||
}
|
||||
|
@ -132,6 +132,8 @@ Text childAltarText;
|
||||
Text adultAltarText;
|
||||
Text ganonText;
|
||||
Text ganonHintText;
|
||||
Text sheikText;
|
||||
Text sariaText;
|
||||
Text dampesText;
|
||||
Text gregText;
|
||||
Text warpMinuetText;
|
||||
@ -141,7 +143,8 @@ Text warpRequiemText;
|
||||
Text warpNocturneText;
|
||||
Text warpPreludeText;
|
||||
|
||||
std::string ganonHintLoc;
|
||||
std::string lightArrowHintLoc;
|
||||
std::string sariaHintLoc;
|
||||
std::string dampeHintLoc;
|
||||
|
||||
Text& GetChildAltarText() {
|
||||
@ -168,6 +171,14 @@ Text& GetGregHintText() {
|
||||
return gregText;
|
||||
}
|
||||
|
||||
Text& GetSheikHintText() {
|
||||
return sheikText;
|
||||
}
|
||||
|
||||
Text& GetSariaHintText() {
|
||||
return sariaText;
|
||||
}
|
||||
|
||||
Text& GetWarpMinuetText() {
|
||||
return warpMinuetText;
|
||||
}
|
||||
@ -192,14 +203,18 @@ Text& GetWarpPreludeText() {
|
||||
return warpPreludeText;
|
||||
}
|
||||
|
||||
std::string GetGanonHintLoc() {
|
||||
return ganonHintLoc;
|
||||
std::string GetLightArrowHintLoc() {
|
||||
return lightArrowHintLoc;
|
||||
}
|
||||
|
||||
std::string GetDampeHintLoc() {
|
||||
return dampeHintLoc;
|
||||
}
|
||||
|
||||
std::string GetSariaHintLoc() {
|
||||
return sariaHintLoc;
|
||||
}
|
||||
|
||||
Area* GetHintRegion(const uint32_t area) {
|
||||
|
||||
std::vector<uint32_t> alreadyChecked = {};
|
||||
@ -583,10 +598,10 @@ void CreateGanonText() {
|
||||
auto hint = Hint(LIGHT_ARROW_LOCATION_HINT);
|
||||
if (lightArrowLocation.empty()) {
|
||||
ganonHintText = hint.GetText()+Hint(YOUR_POCKET).GetText();
|
||||
ganonHintLoc = "Link's Pocket";
|
||||
lightArrowHintLoc = "Link's Pocket";
|
||||
} else {
|
||||
ganonHintText = hint.GetText()+GetHintRegion(Location(lightArrowLocation[0])->GetParentRegionKey())->GetHint().GetText();
|
||||
ganonHintLoc = Location(lightArrowLocation[0])->GetName();
|
||||
lightArrowHintLoc = Location(lightArrowLocation[0])->GetName();
|
||||
}
|
||||
ganonHintText = ganonHintText + "!";
|
||||
|
||||
@ -820,19 +835,52 @@ void CreateGregRupeeHint() {
|
||||
|
||||
Text temp1 = Text{
|
||||
"By the way, if you're interested, I saw the shiniest %gGreen Rupee%w somewhere in%g ",
|
||||
"",
|
||||
"Au fait, si ça t'intéresse, j'ai aperçu le plus éclatant des %gRubis Verts%w quelque part à %g",
|
||||
""
|
||||
};
|
||||
|
||||
Text temp2 = {
|
||||
"%w.^It's said to have %rmysterious powers%w...^But then, it could just be another regular rupee.&Oh well.",
|
||||
"",
|
||||
"%w. On dit qu'il possède des pouvoirs mystérieux... Mais bon, ça pourrait juste être un autre rubis ordinaire.",
|
||||
""
|
||||
};
|
||||
|
||||
gregText = temp1 + area + temp2;
|
||||
}
|
||||
|
||||
void CreateSheikText() {
|
||||
//Get the location of the light arrows
|
||||
auto lightArrowLocation = FilterFromPool(allLocations, [](const uint32_t loc){return Location(loc)->GetPlaceduint32_t() == LIGHT_ARROWS;});
|
||||
lightArrowHintLoc = Location(lightArrowLocation[0])->GetName();
|
||||
Text area = GetHintRegion(Location(lightArrowLocation[0])->GetParentRegionKey())->GetHint().GetText();
|
||||
Text temp1 = Text{
|
||||
"I overheard Ganondorf say that he misplaced the %rLight Arrows%w in&%g",
|
||||
"J'ai entendu dire que Ganondorf aurait caché les %rFlèches de Lumière%w dans %g",
|
||||
""
|
||||
};
|
||||
Text temp2 = Text{"%w.", "%w.", "%w."};
|
||||
sheikText = temp1 + area + temp2;
|
||||
}
|
||||
|
||||
void CreateSariaText() {
|
||||
//Get the location of the light arrows
|
||||
auto magicLocation = FilterFromPool(allLocations, [](const uint32_t loc){return Location(loc)->GetPlaceduint32_t() == PROGRESSIVE_MAGIC_METER;});
|
||||
sariaHintLoc = Location(magicLocation[0])->GetName();
|
||||
Text area = GetHintRegion(Location(magicLocation[0])->GetParentRegionKey())->GetHint().GetText();
|
||||
Text temp1 = Text{
|
||||
"Did you feel the %gsurge of magic%w recently? A mysterious bird told me it came from %g",
|
||||
"As-tu récemment ressenti une vague de %gpuissance magique%w? Un mystérieux hibou m'a dit qu'elle provenait du %g",
|
||||
""
|
||||
};
|
||||
Text temp2 = Text{
|
||||
"%w.^You should check that place out, @!$C",
|
||||
"%w. Tu devrais aller y jeter un coup d'oeil, @!$C",
|
||||
"%w.$C"
|
||||
};
|
||||
sariaText = temp1 + area + temp2;
|
||||
}
|
||||
|
||||
|
||||
void CreateWarpSongTexts() {
|
||||
if (!ShuffleWarpSongs) {
|
||||
warpMinuetText = Text();
|
||||
|
@ -206,6 +206,8 @@ extern void CreateMerchantsHints();
|
||||
extern void CreateWarpSongTexts();
|
||||
extern void CreateDampesDiaryText();
|
||||
extern void CreateGregRupeeHint();
|
||||
extern void CreateSheikText();
|
||||
extern void CreateSariaText();
|
||||
extern void CreateGanonText();
|
||||
extern void CreateAltarText();
|
||||
|
||||
@ -215,6 +217,8 @@ Text& GetGanonText();
|
||||
Text& GetGanonHintText();
|
||||
Text& GetDampeHintText();
|
||||
Text& GetGregHintText();
|
||||
Text& GetSheikHintText();
|
||||
Text& GetSariaHintText();
|
||||
|
||||
Text& GetWarpMinuetText();
|
||||
Text& GetWarpBoleroText();
|
||||
@ -224,4 +228,5 @@ Text& GetWarpNocturneText();
|
||||
Text& GetWarpPreludeText();
|
||||
|
||||
std::string GetDampeHintLoc();
|
||||
std::string GetGanonHintLoc();
|
||||
std::string GetLightArrowHintLoc();
|
||||
std::string GetSariaHintLoc();
|
||||
|
@ -316,10 +316,12 @@ namespace Settings {
|
||||
Option ClearerHints = Option::U8 ("Hint Clarity", {"Obscure", "Ambiguous", "Clear"});
|
||||
Option HintDistribution = Option::U8 ("Hint Distribution", {"Useless", "Balanced", "Strong", "Very Strong"}, OptionCategory::Setting, 1); // Balanced
|
||||
Option AltarHintText = Option::Bool("ToT Altar Hint", {"Off", "On"}, OptionCategory::Setting, 1);
|
||||
Option GanondorfHintText = Option::Bool("Ganondorf LA Hint", {"Off", "On"}, OptionCategory::Setting, 1);
|
||||
Option LightArrowHintText = Option::Bool("Light Arrow Hint", {"Off", "On"}, OptionCategory::Setting, 1);
|
||||
Option DampeHintText = Option::Bool("Dampe's Diary Hint", {"Off", "On"}, OptionCategory::Setting, 0);
|
||||
Option GregHintText = Option::Bool("Greg the Rupee Hint", {"Off", "On"}, OptionCategory::Setting, 0);
|
||||
Option WarpSongHints = Option::Bool("Warp Song Hints", {"Off", "On"}, OptionCategory::Setting, 0);
|
||||
Option SariaHintText = Option::Bool("Saria's Hint", {"Off", "On"}, OptionCategory::Setting, 0);
|
||||
Option FrogsHintText = Option::Bool("Frog Ocarina Game Hint", {"Off", "On"}, OptionCategory::Setting, 0);
|
||||
Option WarpSongHints = Option::Bool("Warp Songs Hints", {"Off", "On"}, OptionCategory::Setting, 0);
|
||||
Option Kak10GSHintText = Option::Bool("10 GS Hint", {"Off", "On"}, OptionCategory::Setting, 0);
|
||||
Option Kak20GSHintText = Option::Bool("20 GS Hint", {"Off", "On"}, OptionCategory::Setting, 0);
|
||||
Option Kak30GSHintText = Option::Bool("30 GS Hint", {"Off", "On"}, OptionCategory::Setting, 0);
|
||||
@ -338,15 +340,18 @@ namespace Settings {
|
||||
Option RandomTrapDmg = Option::U8 ("Random Trap Damage", {"Off", "Basic", "Advanced"}, OptionCategory::Setting, 1); // Basic
|
||||
Option BlueFireArrows = Option::Bool("Blue Fire Arrows", {"Off", "On"});
|
||||
Option SunlightArrows = Option::Bool("Sunlight Arrows", {"Off", "On"});
|
||||
|
||||
bool HasNightStart = false;
|
||||
std::vector<Option *> miscOptions = {
|
||||
&GossipStoneHints,
|
||||
&ClearerHints,
|
||||
&HintDistribution,
|
||||
&AltarHintText,
|
||||
&GanondorfHintText,
|
||||
&LightArrowHintText,
|
||||
&DampeHintText,
|
||||
&GregHintText,
|
||||
&SariaHintText,
|
||||
&FrogsHintText,
|
||||
&WarpSongHints,
|
||||
&Kak10GSHintText,
|
||||
&Kak20GSHintText,
|
||||
@ -2338,9 +2343,11 @@ namespace Settings {
|
||||
GossipStoneHints.SetSelectedIndex(cvarSettings[RSK_GOSSIP_STONE_HINTS]);
|
||||
ClearerHints.SetSelectedIndex(cvarSettings[RSK_HINT_CLARITY]);
|
||||
AltarHintText.SetSelectedIndex(cvarSettings[RSK_TOT_ALTAR_HINT]);
|
||||
GanondorfHintText.SetSelectedIndex(cvarSettings[RSK_GANONDORF_LIGHT_ARROWS_HINT]);
|
||||
LightArrowHintText.SetSelectedIndex(cvarSettings[RSK_LIGHT_ARROWS_HINT]);
|
||||
DampeHintText.SetSelectedIndex(cvarSettings[RSK_DAMPES_DIARY_HINT]);
|
||||
GregHintText.SetSelectedIndex(cvarSettings[RSK_GREG_HINT]);
|
||||
SariaHintText.SetSelectedIndex(cvarSettings[RSK_SARIA_HINT]);
|
||||
FrogsHintText.SetSelectedIndex(cvarSettings[RSK_FROGS_HINT]);
|
||||
WarpSongHints.SetSelectedIndex(cvarSettings[RSK_WARP_SONG_HINTS]);
|
||||
Kak10GSHintText.SetSelectedIndex(cvarSettings[RSK_KAK_10_SKULLS_HINT]);
|
||||
Kak20GSHintText.SetSelectedIndex(cvarSettings[RSK_KAK_20_SKULLS_HINT]);
|
||||
|
@ -848,7 +848,7 @@ void UpdateSettings(std::unordered_map<RandomizerSettingKey, uint8_t> cvarSettin
|
||||
extern Option ClearerHints;
|
||||
extern Option HintDistribution;
|
||||
extern Option AltarHintText;
|
||||
extern Option GanondorfHintText;
|
||||
extern Option LightArrowHintText;
|
||||
extern Option DampeHintText;
|
||||
extern Option GregHintText;
|
||||
extern Option Kak10GSHintText;
|
||||
|
@ -670,6 +670,8 @@ static void WriteHints(int language) {
|
||||
std::string unformattedGanonHintText;
|
||||
std::string unformattedDampesText;
|
||||
std::string unformattedGregText;
|
||||
std::string unformattedSheikText;
|
||||
std::string unformattedSariaText;
|
||||
|
||||
switch (language) {
|
||||
case 0:
|
||||
@ -678,6 +680,8 @@ static void WriteHints(int language) {
|
||||
unformattedGanonHintText = GetGanonHintText().GetEnglish();
|
||||
unformattedDampesText = GetDampeHintText().GetEnglish();
|
||||
unformattedGregText = GetGregHintText().GetEnglish();
|
||||
unformattedSheikText = GetSheikHintText().GetEnglish();
|
||||
unformattedSariaText = GetSariaHintText().GetEnglish();
|
||||
jsonData["warpMinuetText"] = GetWarpMinuetText().GetEnglish();
|
||||
jsonData["warpBoleroText"] = GetWarpBoleroText().GetEnglish();
|
||||
jsonData["warpSerenadeText"] = GetWarpSerenadeText().GetEnglish();
|
||||
@ -692,6 +696,8 @@ static void WriteHints(int language) {
|
||||
unformattedGanonHintText = GetGanonHintText().GetFrench();
|
||||
unformattedDampesText = GetDampeHintText().GetFrench();
|
||||
unformattedGregText = GetGregHintText().GetFrench();
|
||||
unformattedSheikText = GetSheikHintText().GetFrench();
|
||||
unformattedSariaText = GetSariaHintText().GetFrench();
|
||||
jsonData["warpMinuetText"] = GetWarpMinuetText().GetFrench();
|
||||
jsonData["warpBoleroText"] = GetWarpBoleroText().GetFrench();
|
||||
jsonData["warpSerenadeText"] = GetWarpSerenadeText().GetFrench();
|
||||
@ -732,14 +738,19 @@ static void WriteHints(int language) {
|
||||
std::string ganonHintText = AutoFormatHintTextString(unformattedGanonHintText);
|
||||
std::string dampesText = AutoFormatHintTextString(unformattedDampesText);
|
||||
std::string gregText = AutoFormatHintTextString(unformattedGregText);
|
||||
std::string sheikText = AutoFormatHintTextString(unformattedSheikText);
|
||||
std::string sariaText = AutoFormatHintTextString(unformattedSariaText);
|
||||
|
||||
jsonData["ganonText"] = ganonText;
|
||||
jsonData["ganonHintText"] = ganonHintText;
|
||||
jsonData["ganonHintLoc"] = GetGanonHintLoc();
|
||||
jsonData["lightArrowHintLoc"] = GetLightArrowHintLoc();
|
||||
jsonData["dampeText"] = dampesText;
|
||||
jsonData["dampeHintLoc"] = GetDampeHintLoc();
|
||||
jsonData["gregText"] = gregText;
|
||||
jsonData["gregLoc"] = GetItemLocation(GREG_RUPEE)->GetName();
|
||||
jsonData["sheikText"] = sheikText;
|
||||
jsonData["sariaText"] = sariaText;
|
||||
jsonData["sariaHintLoc"] = GetSariaHintLoc();
|
||||
|
||||
if (Settings::GossipStoneHints.Is(HINTS_NO_HINTS)) {
|
||||
return;
|
||||
|
@ -323,9 +323,11 @@ std::unordered_map<std::string, RandomizerSettingKey> SpoilerfileSettingNameToEn
|
||||
{ "Misc Settings:Gossip Stone Hints", RSK_GOSSIP_STONE_HINTS },
|
||||
{ "Misc Settings:Hint Clarity", RSK_HINT_CLARITY },
|
||||
{ "Misc Settings:ToT Altar Hint", RSK_TOT_ALTAR_HINT },
|
||||
{ "Misc Settings:Ganondorf LA Hint", RSK_GANONDORF_LIGHT_ARROWS_HINT },
|
||||
{ "Misc Settings:Light Arrow Hint", RSK_LIGHT_ARROWS_HINT },
|
||||
{ "Misc Settings:Dampe's Diary Hint", RSK_DAMPES_DIARY_HINT },
|
||||
{ "Misc Settings:Greg the Rupee Hint", RSK_GREG_HINT },
|
||||
{ "Misc Settings:Saria's Hint", RSK_SARIA_HINT },
|
||||
{ "Misc Settings:Frog Ocarina Game Hint", RSK_FROGS_HINT },
|
||||
{ "Misc Settings:10 GS Hint", RSK_KAK_10_SKULLS_HINT },
|
||||
{ "Misc Settings:20 GS Hint", RSK_KAK_20_SKULLS_HINT },
|
||||
{ "Misc Settings:30 GS Hint", RSK_KAK_30_SKULLS_HINT },
|
||||
@ -437,11 +439,23 @@ void Randomizer::LoadHintLocations(const char* spoilerFileName) {
|
||||
CustomMessageManager::Instance->CreateMessage(
|
||||
Randomizer::hintMessageTableID, TEXT_GANONDORF_NOHINT,
|
||||
CustomMessage(gSaveContext.ganonText, gSaveContext.ganonText, gSaveContext.ganonText));
|
||||
CustomMessageManager::Instance->CreateMessage(
|
||||
Randomizer::hintMessageTableID, TEXT_SHEIK_NEED_HOOK,
|
||||
CustomMessage("{{message}}", "{{message}}", "{{message}}"));
|
||||
CustomMessageManager::Instance->CreateMessage(
|
||||
Randomizer::hintMessageTableID, TEXT_SHEIK_HAVE_HOOK,
|
||||
CustomMessage("{{message}}", "{{message}}", "{{message}}"));
|
||||
CustomMessageManager::Instance->CreateMessage(
|
||||
Randomizer::hintMessageTableID, TEXT_SARIAS_SONG_FACE_TO_FACE,
|
||||
CustomMessage(gSaveContext.sariaText, gSaveContext.sariaText, gSaveContext.sariaText, TEXTBOX_TYPE_BLUE));
|
||||
|
||||
|
||||
this->childAltarText = gSaveContext.childAltarText;
|
||||
this->adultAltarText = gSaveContext.adultAltarText;
|
||||
this->ganonHintText = gSaveContext.ganonHintText;
|
||||
this->ganonText = gSaveContext.ganonText;
|
||||
this->sheikText = gSaveContext.sheikText;
|
||||
this->sariaText = gSaveContext.sariaText;
|
||||
|
||||
for (const auto& hintLocation : gSaveContext.hintLocations) {
|
||||
if(hintLocation.check == RC_LINKS_POCKET) break;
|
||||
@ -468,6 +482,17 @@ void Randomizer::LoadHintLocations(const char* spoilerFileName) {
|
||||
Randomizer::randoMiscHintsTableID, TEXT_CHEST_GAME_PROCEED,
|
||||
CustomMessage(gSaveContext.gregHintText, gSaveContext.gregHintText, gSaveContext.gregHintText)
|
||||
);
|
||||
CustomMessageManager::Instance->CreateMessage(
|
||||
Randomizer::randoMiscHintsTableID, TEXT_FROGS_UNDERWATER,
|
||||
CustomMessage("Some frogs holding&%g{{item}}%w&are looking at you from underwater...",
|
||||
"Unter Wasser gibt es Frösche,&die %g{{item}}%w&bei sich haben und Dich neugierig&beobachten...",
|
||||
"Des grenouilles se trouvant&sous l'eau vous fixent attentivement,&tenant fermement&%r{{item}}%w.", TEXTBOX_TYPE_BLUE)
|
||||
);
|
||||
CustomMessageManager::Instance->CreateMessage(
|
||||
Randomizer::randoMiscHintsTableID, TEXT_SARIAS_SONG_FOREST_SOUNDS,
|
||||
CustomMessage("{{message}}", "{{message}}", "{{message}}", TEXTBOX_TYPE_BLUE)
|
||||
);
|
||||
|
||||
|
||||
CustomMessageManager::Instance->CreateMessage(Randomizer::hintMessageTableID, TEXT_WARP_RANDOM_REPLACED_TEXT,
|
||||
CustomMessage("Warp to&{{location}}?\x1B&%gOK&No%w\x02",
|
||||
@ -848,9 +873,11 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
|
||||
case RSK_SUNLIGHT_ARROWS:
|
||||
case RSK_BOMBCHUS_IN_LOGIC:
|
||||
case RSK_TOT_ALTAR_HINT:
|
||||
case RSK_GANONDORF_LIGHT_ARROWS_HINT:
|
||||
case RSK_LIGHT_ARROWS_HINT:
|
||||
case RSK_DAMPES_DIARY_HINT:
|
||||
case RSK_GREG_HINT:
|
||||
case RSK_SARIA_HINT:
|
||||
case RSK_FROGS_HINT:
|
||||
case RSK_KAK_10_SKULLS_HINT:
|
||||
case RSK_KAK_20_SKULLS_HINT:
|
||||
case RSK_KAK_30_SKULLS_HINT:
|
||||
@ -934,6 +961,7 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
|
||||
} else if(it.value() == "Minimal") {
|
||||
gSaveContext.randoSettings[index].value = RO_ITEM_POOL_MINIMAL;
|
||||
}
|
||||
break;
|
||||
case RSK_ICE_TRAPS:
|
||||
if(it.value() == "Off") {
|
||||
gSaveContext.randoSettings[index].value = RO_ICE_TRAPS_OFF;
|
||||
@ -946,6 +974,7 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
|
||||
} else if(it.value() == "Onslaught") {
|
||||
gSaveContext.randoSettings[index].value = RO_ICE_TRAPS_ONSLAUGHT;
|
||||
}
|
||||
break;
|
||||
case RSK_GOSSIP_STONE_HINTS:
|
||||
if(it.value() == "No Hints") {
|
||||
gSaveContext.randoSettings[index].value = RO_GOSSIP_STONES_NONE;
|
||||
@ -1257,9 +1286,6 @@ std::string FormatJsonHintText(std::string jsonHint) {
|
||||
formattedHintMessage.replace(start_pos, textToReplace.length(), iconString);
|
||||
}
|
||||
}
|
||||
|
||||
formattedHintMessage += 0x02;
|
||||
|
||||
return formattedHintMessage;
|
||||
}
|
||||
|
||||
@ -1299,7 +1325,7 @@ void Randomizer::ParseHintLocationsFile(const char* spoilerFileName) {
|
||||
std::string formattedGanonHintJsonText = FormatJsonHintText(ganonHintJsonText);
|
||||
strncpy(gSaveContext.ganonHintText, formattedGanonHintJsonText.c_str(), sizeof(gSaveContext.ganonHintText) - 1);
|
||||
gSaveContext.ganonHintText[sizeof(gSaveContext.ganonHintText) - 1] = 0;
|
||||
gSaveContext.ganonHintCheck = SpoilerfileCheckNameToEnum[spoilerFileJson["ganonHintLoc"]];
|
||||
gSaveContext.lightArrowHintCheck = SpoilerfileCheckNameToEnum[spoilerFileJson["lightArrowHintLoc"]];
|
||||
|
||||
std::string ganonJsonText = spoilerFileJson["ganonText"].get<std::string>();
|
||||
std::string formattedGanonJsonText = FormatJsonHintText(ganonJsonText);
|
||||
@ -1318,6 +1344,18 @@ void Randomizer::ParseHintLocationsFile(const char* spoilerFileName) {
|
||||
gSaveContext.gregHintText[sizeof(gSaveContext.gregHintText) - 1] = 0;
|
||||
gSaveContext.gregCheck = SpoilerfileCheckNameToEnum[spoilerFileJson["gregLoc"]];
|
||||
|
||||
std::string sheikJsonText = spoilerFileJson["sheikText"].get<std::string>();
|
||||
std::string formattedSheikJsonText = FormatJsonHintText(sheikJsonText);
|
||||
strncpy(gSaveContext.sheikText, formattedSheikJsonText.c_str(), sizeof(gSaveContext.sheikText) - 1);
|
||||
gSaveContext.sheikText[sizeof(gSaveContext.sheikText) - 1] = 0;
|
||||
gSaveContext.lightArrowHintCheck = SpoilerfileCheckNameToEnum[spoilerFileJson["lightArrowHintLoc"]];
|
||||
|
||||
std::string sariaJsonText = spoilerFileJson["sariaText"].get<std::string>();
|
||||
std::string formattedSariaJsonText = FormatJsonHintText(sariaJsonText);
|
||||
strncpy(gSaveContext.sariaText, formattedSariaJsonText.c_str(), sizeof(gSaveContext.sariaText) - 1);
|
||||
gSaveContext.sariaText[sizeof(gSaveContext.sariaText) - 1] = 0;
|
||||
gSaveContext.sariaCheck = SpoilerfileCheckNameToEnum[spoilerFileJson["sariaHintLoc"]];
|
||||
|
||||
std::string warpMinuetJsonText = spoilerFileJson["warpMinuetText"].get<std::string>();
|
||||
strncpy(gSaveContext.warpMinuetText, warpMinuetJsonText.c_str(), sizeof(gSaveContext.warpMinuetText) - 1);
|
||||
gSaveContext.warpMinuetText[sizeof(gSaveContext.warpMinuetText) - 1] = 0;
|
||||
@ -2869,9 +2907,11 @@ void GenerateRandomizerImgui(std::string seed = "") {
|
||||
cvarSettings[RSK_ITEM_POOL] = CVarGetInteger("gRandomizeItemPool", RO_ITEM_POOL_BALANCED);
|
||||
cvarSettings[RSK_ICE_TRAPS] = CVarGetInteger("gRandomizeIceTraps", RO_ICE_TRAPS_NORMAL);
|
||||
cvarSettings[RSK_TOT_ALTAR_HINT] = CVarGetInteger("gRandomizeAltarHint", RO_GENERIC_ON);
|
||||
cvarSettings[RSK_GANONDORF_LIGHT_ARROWS_HINT] = CVarGetInteger("gRandomizeLAHint", RO_GENERIC_ON);
|
||||
cvarSettings[RSK_LIGHT_ARROWS_HINT] = CVarGetInteger("gRandomizeLAHint", RO_GENERIC_ON);
|
||||
cvarSettings[RSK_DAMPES_DIARY_HINT] = CVarGetInteger("gRandomizeDampeHint", RO_GENERIC_OFF);
|
||||
cvarSettings[RSK_GREG_HINT] = CVarGetInteger("gRandomizeGregHint", RO_GENERIC_OFF);
|
||||
cvarSettings[RSK_SARIA_HINT] = CVarGetInteger("gRandomizeSariaHint", RO_GENERIC_OFF);
|
||||
cvarSettings[RSK_FROGS_HINT] = CVarGetInteger("gRandomizeFrogsHint", RO_GENERIC_OFF);
|
||||
cvarSettings[RSK_WARP_SONG_HINTS] = CVarGetInteger("gRandomizeWarpSongText", RO_GENERIC_OFF);
|
||||
cvarSettings[RSK_SCRUB_TEXT_HINT] = CVarGetInteger("gRandomizeScrubText", RO_GENERIC_OFF);
|
||||
cvarSettings[RSK_KAK_10_SKULLS_HINT] = CVarGetInteger("gRandomize10GSHint", RO_GENERIC_OFF);
|
||||
@ -4428,12 +4468,17 @@ void RandomizerSettingsWindow::DrawElement() {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Altar Text", "gRandomizeAltarHint", true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::InsertHelpHoverText("Reading the Temple of Time altar as child will tell you the locations of the Spiritual Stones.\n"
|
||||
"Reading the Temple of Time altar as adult will tell you the locations of the Medallions, as well as the conditions for building the Rainbow Bridge and getting the Boss Key for Ganon's Castle.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Ganondorf (Light Arrows)", "gRandomizeLAHint", true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::InsertHelpHoverText("Talking to Ganondorf in his boss room will tell you the location of the Light Arrows. If this option is enabled and Ganondorf is reachable without Light Arrows, Gossip Stones will never hint the Light Arrows.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Light Arrows", "gRandomizeLAHint", true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::InsertHelpHoverText("Talking to Ganondorf in his boss room or Sheik inside Ganon's Castle (when trials are enabled) will tell you the location of the Light Arrows."
|
||||
"If this option is enabled and Ganondorf is reachable without Light Arrows, Gossip Stones will never hint the Light Arrows.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Dampe's Diary (Hookshot)", "gRandomizeDampeHint", true, false);
|
||||
UIWidgets::InsertHelpHoverText("Reading the diary of Dampé the gravekeeper as adult will tell you the location of one of the Hookshots.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Greg the Green Rupee", "gRandomizeGregHint", true, false);
|
||||
UIWidgets::InsertHelpHoverText("Talking to the chest game owner after buying a key will tell you the location of Greg the Green Rupee.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Saria (Magic)", "gRandomizeSariaHint", true, false);
|
||||
UIWidgets::InsertHelpHoverText("Talking to Saria either in person or through Saria's Song will tell you the location of a progressive magic meter.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Frog Ocarina Game", "gRandomizeFrogsHint", true, false);
|
||||
UIWidgets::InsertHelpHoverText("Standing near the pedestal for the frogs in Zora's River will tell you the reward for the frogs' ocarina game.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Warp Song text", "gRandomizeWarpSongText", true, false, !CVarGetInteger("gRandomizeShuffleWarpSongs", RO_GENERIC_OFF),
|
||||
"This option is disabled since warp songs are not shuffled.", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::InsertHelpHoverText("Playing a warp song will tell you where it leads. (If warp song destinations are vanilla, this is always enabled.)");
|
||||
@ -5188,6 +5233,73 @@ CustomMessage Randomizer::GetWarpSongMessage(u16 textId, bool mysterious) {
|
||||
return messageEntry;
|
||||
}
|
||||
|
||||
CustomMessage Randomizer::GetFrogsMessage(u16 originalTextId) {
|
||||
CustomMessage messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::randoMiscHintsTableID, originalTextId);
|
||||
RandomizerGet frogsGet = this->itemLocations[RC_ZR_FROGS_OCARINA_GAME].rgID;
|
||||
std::array<std::string, LANGUAGE_MAX> frogItemName;
|
||||
if (frogsGet == RG_ICE_TRAP) {
|
||||
frogsGet = this->itemLocations[RC_ZR_FROGS_OCARINA_GAME].fakeRgID;
|
||||
frogItemName = {
|
||||
this->itemLocations[RC_ZR_FROGS_OCARINA_GAME].trickName,
|
||||
this->itemLocations[RC_ZR_FROGS_OCARINA_GAME].trickName,
|
||||
this->itemLocations[RC_ZR_FROGS_OCARINA_GAME].trickName
|
||||
};
|
||||
} else {
|
||||
frogItemName = EnumToSpoilerfileGetName[frogsGet];
|
||||
}
|
||||
messageEntry.Replace("{{item}}", std::move(frogItemName[0]), std::move(frogItemName[1]), std::move(frogItemName[2]));
|
||||
return messageEntry;
|
||||
}
|
||||
|
||||
CustomMessage Randomizer::GetSheikMessage(s16 scene, u16 originalTextId) {
|
||||
CustomMessage messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::hintMessageTableID, originalTextId);
|
||||
switch (scene) {
|
||||
case SCENE_TEMPLE_OF_TIME:
|
||||
if (originalTextId == TEXT_SHEIK_NEED_HOOK) {
|
||||
messageEntry.Replace("{{message}}",
|
||||
"@,&meet me at %gGanon's Castle%w&once you obtain the %rkey to his lair%w.",
|
||||
"@, wir treffen uns bei %gGanons Schloß%w,&sobald Du den %rSchlüssel zu&seinem Verließ%w hast.",
|
||||
"Retrouve-moi au %gChâteau de Ganon%w une&fois que tu auras obtenu la&Mrclé de son repaire%w.");
|
||||
} else {
|
||||
messageEntry.Replace("{{message}}",
|
||||
"The time has come. Prepare yourself.",
|
||||
"Die Zeit ist gekommen.&Mach Dich bereit.",
|
||||
"Le moment est venu @.&Tu ferais bien de te préparer.");
|
||||
}
|
||||
break;
|
||||
case SCENE_INSIDE_GANONS_CASTLE:
|
||||
if (originalTextId == TEXT_SHEIK_NEED_HOOK) {
|
||||
if (INV_CONTENT(ITEM_ARROW_LIGHT) != ITEM_ARROW_LIGHT) {
|
||||
messageEntry.Replace("{{message}}", gSaveContext.sheikText, gSaveContext.sheikText, gSaveContext.sheikText);
|
||||
} else {
|
||||
messageEntry.Replace("{{message}}", "You are still ill-equipped to&face %rGanondorf%w."
|
||||
"^Seek out the %cMaster Sword%w,&%rsomething to hold your arrows%w,&and %gmagic%w to summon the %ylight%w.",
|
||||
"Du bist noch nicht gewappnet um Dich&%rGanondorf%w stellen zu können.^"
|
||||
"Begib Dich auf die Suche nach dem&%cMaster-Schwert%w, %retwas um deine Pfeilen&einen Sinn zu geben%w,^sowie %gdie Magie%w, um das %yLicht%w&herauf beschwören zu können.",
|
||||
"@, tu n'es toujours pas prêt à affronter&%rGanondorf%w.^"
|
||||
"Cherche l'%cÉpée de Légende%w,&%rquelque chose pour ranger tes flèches%w&et de la %gmagie%w pour invoquer la&%ylumière%w.");
|
||||
}
|
||||
} else {
|
||||
messageEntry.Replace("{{message}}",
|
||||
"If you're ready, then proceed.^Good luck.",
|
||||
"Wenn Du bereit bist, so schreite&voran.^Viel Glück.",
|
||||
"Si tu es prêt, tu peux y aller.^Bonne chance.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
return messageEntry;
|
||||
}
|
||||
|
||||
CustomMessage Randomizer::GetSariaMessage(u16 originalTextId) {
|
||||
if (originalTextId == TEXT_SARIA_SFM || originalTextId == TEXT_SARIAS_SONG_FOREST_SOUNDS || TEXT_SARIAS_SONG_FOREST_TEMPLE) {
|
||||
CustomMessage messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::hintMessageTableID, TEXT_SARIAS_SONG_FACE_TO_FACE);
|
||||
CustomMessage messageEntry2 = messageEntry;
|
||||
std::string code = originalTextId == TEXT_SARIA_SFM ? "" : "\x0B";
|
||||
messageEntry2.Replace("$C", std::move(code));
|
||||
return messageEntry2;
|
||||
}
|
||||
}
|
||||
|
||||
CustomMessage Randomizer::GetMerchantMessage(RandomizerInf randomizerInf, u16 textId, bool mysterious) {
|
||||
CustomMessage messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::merchantMessageTableID, textId);
|
||||
RandomizerCheck rc = GetCheckFromRandomizerInf(randomizerInf);
|
||||
|
@ -27,6 +27,8 @@ class Randomizer {
|
||||
std::string ganonHintText;
|
||||
std::string ganonText;
|
||||
std::string dampeText;
|
||||
std::string sheikText;
|
||||
std::string sariaText;
|
||||
std::unordered_map<RandomizerSettingKey, u8> randoSettings;
|
||||
void ParseRandomizerSettingsFile(const char* spoilerFileName);
|
||||
void ParseHintLocationsFile(const char* spoilerFileName);
|
||||
@ -79,6 +81,8 @@ class Randomizer {
|
||||
std::string GetGanonText() const;
|
||||
std::string GetGanonHintText() const;
|
||||
std::string GetDampeText() const;
|
||||
std::string GetSheikText() const;
|
||||
std::string GetSariaText() const;
|
||||
RandomizerCheckObject GetCheckObjectFromActor(s16 actorId, s16 sceneNum, s32 actorParams);
|
||||
ScrubIdentity IdentifyScrub(s32 sceneNum, s32 actorParams, s32 respawnData);
|
||||
ShopItemIdentity IdentifyShopItem(s32 sceneNum, u8 slotIndex);
|
||||
@ -89,6 +93,9 @@ class Randomizer {
|
||||
ItemObtainability GetItemObtainabilityFromRandomizerCheck(RandomizerCheck randomizerCheck);
|
||||
ItemObtainability GetItemObtainabilityFromRandomizerGet(RandomizerGet randomizerCheck);
|
||||
CustomMessage GetWarpSongMessage(u16 textId, bool mysterious = false);
|
||||
CustomMessage GetSheikMessage(s16 scene, u16 originalTextId);
|
||||
CustomMessage GetFrogsMessage(u16 originalTextId);
|
||||
CustomMessage GetSariaMessage(u16 originalTextId);
|
||||
CustomMessage GetMerchantMessage(RandomizerInf randomizerInf, u16 textId, bool mysterious = false);
|
||||
CustomMessage GetCursedSkullMessage(s16 params);
|
||||
CustomMessage GetGoronMessage(u16 index);
|
||||
|
@ -1364,9 +1364,11 @@ typedef enum {
|
||||
RSK_ICE_TRAPS,
|
||||
RSK_GOSSIP_STONE_HINTS,
|
||||
RSK_TOT_ALTAR_HINT,
|
||||
RSK_GANONDORF_LIGHT_ARROWS_HINT,
|
||||
RSK_LIGHT_ARROWS_HINT,
|
||||
RSK_DAMPES_DIARY_HINT,
|
||||
RSK_GREG_HINT,
|
||||
RSK_SARIA_HINT,
|
||||
RSK_FROGS_HINT,
|
||||
RSK_KAK_10_SKULLS_HINT,
|
||||
RSK_KAK_20_SKULLS_HINT,
|
||||
RSK_KAK_30_SKULLS_HINT,
|
||||
|
@ -2041,11 +2041,13 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
? CustomMessageManager::Instance->RetrieveMessage(Randomizer::hintMessageTableID, TEXT_ALTAR_ADULT)
|
||||
: CustomMessageManager::Instance->RetrieveMessage(Randomizer::hintMessageTableID, TEXT_ALTAR_CHILD);
|
||||
} else if (textId == TEXT_GANONDORF) {
|
||||
if (INV_CONTENT(ITEM_ARROW_LIGHT) == ITEM_ARROW_LIGHT || !Randomizer_GetSettingValue(RSK_GANONDORF_LIGHT_ARROWS_HINT)) {
|
||||
if (INV_CONTENT(ITEM_ARROW_LIGHT) == ITEM_ARROW_LIGHT || !Randomizer_GetSettingValue(RSK_LIGHT_ARROWS_HINT)) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::hintMessageTableID, TEXT_GANONDORF_NOHINT);
|
||||
} else {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::hintMessageTableID, TEXT_GANONDORF);
|
||||
}
|
||||
} else if (textId == TEXT_SHEIK_NEED_HOOK || textId == TEXT_SHEIK_HAVE_HOOK) {
|
||||
messageEntry = OTRGlobals::Instance->gRandomizer->GetSheikMessage(gPlayState->sceneNum, textId);
|
||||
// textId: TEXT_SCRUB_RANDOM + (randomizerInf - RAND_INF_SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_LEFT)
|
||||
} else if (textId >= TEXT_SCRUB_RANDOM && textId <= TEXT_SCRUB_RANDOM + NUM_SCRUBS) {
|
||||
RandomizerInf randoInf = (RandomizerInf)((textId - TEXT_SCRUB_RANDOM) + RAND_INF_SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_LEFT);
|
||||
@ -2108,6 +2110,13 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
} else if (textId == 0x3052 || (textId >= 0x3069 && textId <= 0x3070)) { //Fire Temple gorons
|
||||
u16 choice = Random(0, NUM_GORON_MESSAGES);
|
||||
messageEntry = OTRGlobals::Instance->gRandomizer->GetGoronMessage(choice);
|
||||
} else if (Randomizer_GetSettingValue(RSK_FROGS_HINT) && textId == TEXT_FROGS_UNDERWATER) {
|
||||
messageEntry = OTRGlobals::Instance->gRandomizer->GetFrogsMessage(textId);
|
||||
} else if (Randomizer_GetSettingValue(RSK_SARIA_HINT)) {
|
||||
if ((gPlayState->sceneNum == SCENE_SACRED_FOREST_MEADOW && textId == TEXT_SARIA_SFM) || textId == TEXT_SARIAS_SONG_FOREST_SOUNDS ||
|
||||
textId == TEXT_SARIAS_SONG_FOREST_TEMPLE) {
|
||||
messageEntry = OTRGlobals::Instance->gRandomizer->GetSariaMessage(textId);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (textId == TEXT_GS_NO_FREEZE || textId == TEXT_GS_FREEZE) {
|
||||
|
@ -224,6 +224,12 @@ void SaveManager::LoadRandomizerVersion2() {
|
||||
std::string gregHintText;
|
||||
SaveManager::Instance->LoadData("gregHintText", gregHintText);
|
||||
memcpy(gSaveContext.gregHintText, gregHintText.c_str(), gregHintText.length());
|
||||
std::string sheikText;
|
||||
SaveManager::Instance->LoadData("sheikText", sheikText);
|
||||
memcpy(gSaveContext.sheikText, sheikText.c_str(), sheikText.length() + 1);
|
||||
std::string sariaText;
|
||||
SaveManager::Instance->LoadData("sariaText", sariaText);
|
||||
memcpy(gSaveContext.sariaText, sariaText.c_str(), sariaText.length() + 1);
|
||||
std::string warpMinuetText;
|
||||
SaveManager::Instance->LoadData("warpMinuetText", warpMinuetText);
|
||||
memcpy(gSaveContext.warpMinuetText, warpMinuetText.c_str(), warpMinuetText.length());
|
||||
@ -321,6 +327,8 @@ void SaveManager::SaveRandomizer(SaveContext* saveContext, int sectionID, bool f
|
||||
SaveManager::Instance->SaveData("ganonText", saveContext->ganonText);
|
||||
SaveManager::Instance->SaveData("dampeText", saveContext->dampeText);
|
||||
SaveManager::Instance->SaveData("gregHintText", saveContext->gregHintText);
|
||||
SaveManager::Instance->SaveData("sheikText", saveContext->sheikText);
|
||||
SaveManager::Instance->SaveData("sariaText", saveContext->sariaText);
|
||||
SaveManager::Instance->SaveData("warpMinuetText", saveContext->warpMinuetText);
|
||||
SaveManager::Instance->SaveData("warpBoleroText", saveContext->warpBoleroText);
|
||||
SaveManager::Instance->SaveData("warpSerenadeText", saveContext->warpSerenadeText);
|
||||
|
@ -155,6 +155,9 @@ u16 ElfMessage_GetSariaText(PlayState* play) {
|
||||
|
||||
if (!LINK_IS_ADULT) {
|
||||
if (Actor_FindNearby(play, &player->actor, ACTOR_EN_SA, 4, 800.0f) == NULL) {
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SARIA_HINT)) {
|
||||
return 0x161;
|
||||
}
|
||||
msgs = sChildSariaMsgs;
|
||||
} else {
|
||||
return 0x0160; // Special text about Saria preferring to talk to you face-to-face
|
||||
|
@ -146,6 +146,9 @@ u16 func_80AF55E0(PlayState* play, Actor* thisx) {
|
||||
if (reaction != 0) {
|
||||
return reaction;
|
||||
}
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SARIA_HINT)) {
|
||||
return 0x10AD;
|
||||
}
|
||||
if (CHECK_QUEST_ITEM(QUEST_SONG_SARIA)) {
|
||||
return 0x10AD;
|
||||
}
|
||||
|
@ -16,6 +16,9 @@
|
||||
|
||||
#define FLAGS ACTOR_FLAG_UPDATE_WHILE_CULLED
|
||||
|
||||
#define TEXT_SHEIK_NEED_HOOK 0x700F
|
||||
#define TEXT_SHEIK_HAVE_HOOK 0x7010
|
||||
|
||||
void EnXc_Init(Actor* thisx, PlayState* play);
|
||||
void EnXc_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnXc_Update(Actor* thisx, PlayState* play);
|
||||
@ -412,6 +415,21 @@ s32 EnXc_SerenadeCS(EnXc* this, PlayState* play) {
|
||||
void EnXc_DoNothing(EnXc* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnXc_RandoStand(EnXc* this, PlayState* play) {
|
||||
//Replaces Ganondorf Light Arrow hint. also stands in ToT
|
||||
if (play->sceneNum == SCENE_TEMPLE_OF_TIME) {
|
||||
EnXc_ChangeAnimation(this, &gSheikArmsCrossedIdleAnim, ANIMMODE_LOOP, 0.0f, false);
|
||||
} else {
|
||||
EnXc_ChangeAnimation(this, &gSheikIdleAnim, ANIMMODE_LOOP, 0.0f, false);
|
||||
}
|
||||
this->action = SHEIK_ACTION_BLOCK_PEDESTAL;
|
||||
this->drawMode = SHEIK_DRAW_DEFAULT;
|
||||
this->unk_30C = 1;
|
||||
if (!gSaveContext.n64ddFlag) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
void EnXc_SetWalkingSFX(EnXc* this, PlayState* play) {
|
||||
s32 pad[2];
|
||||
u32 sfxId;
|
||||
@ -2225,10 +2243,26 @@ void EnXc_SetupDialogueAction(EnXc* this, PlayState* play) {
|
||||
this->action = SHEIK_ACTION_IN_DIALOGUE;
|
||||
} else {
|
||||
this->actor.flags |= ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY;
|
||||
if (INV_CONTENT(ITEM_HOOKSHOT) != ITEM_NONE) {
|
||||
this->actor.textId = 0x7010;
|
||||
if (gSaveContext.n64ddFlag && gPlayState->sceneNum == SCENE_TEMPLE_OF_TIME) {
|
||||
if (!CHECK_DUNGEON_ITEM(DUNGEON_KEY_BOSS, SCENE_GANONS_TOWER)) {
|
||||
this->actor.textId = TEXT_SHEIK_NEED_HOOK;
|
||||
} else {
|
||||
this->actor.textId = 0x700F;
|
||||
this->actor.textId = TEXT_SHEIK_HAVE_HOOK;
|
||||
}
|
||||
} else if (gSaveContext.n64ddFlag && gPlayState->sceneNum == SCENE_INSIDE_GANONS_CASTLE) {
|
||||
if (CHECK_OWNED_EQUIP(EQUIP_SWORD, 1) && INV_CONTENT(ITEM_ARROW_LIGHT) == ITEM_ARROW_LIGHT &&
|
||||
CUR_CAPACITY(UPG_QUIVER) >= 30 && gSaveContext.isMagicAcquired) {
|
||||
this->actor.textId = TEXT_SHEIK_HAVE_HOOK;
|
||||
} else {
|
||||
this->actor.textId = TEXT_SHEIK_NEED_HOOK;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (INV_CONTENT(ITEM_HOOKSHOT) != ITEM_NONE) {
|
||||
this->actor.textId = 0x7010; //"You have what you need"
|
||||
} else {
|
||||
this->actor.textId = 0x700F; //"You need another skill"
|
||||
}
|
||||
}
|
||||
func_8002F2F4(&this->actor, play);
|
||||
}
|
||||
@ -2401,6 +2435,9 @@ void EnXc_Init(Actor* thisx, PlayState* play) {
|
||||
case SHEIK_TYPE_0:
|
||||
EnXc_DoNothing(this, play);
|
||||
break;
|
||||
case SHEIK_TYPE_RANDO:
|
||||
EnXc_RandoStand(this, play);
|
||||
break;
|
||||
default:
|
||||
osSyncPrintf(VT_FGCOL(RED) " En_Oa2 の arg_data がおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
|
||||
EnXc_DoNothing(this, play);
|
||||
|
@ -10,6 +10,7 @@ typedef void (*EnXcActionFunc)(struct EnXc*, PlayState*);
|
||||
typedef void (*EnXcDrawFunc)(struct Actor*, PlayState*);
|
||||
|
||||
typedef enum {
|
||||
/*-1 */ SHEIK_TYPE_RANDO = -1,
|
||||
/* 0 */ SHEIK_TYPE_0,
|
||||
/* 1 */ SHEIK_TYPE_1,
|
||||
/* 2 */ SHEIK_TYPE_2,
|
||||
|
Loading…
Reference in New Issue
Block a user