From fe7aedc80d5e53b7c1b3ccc2b507b465bdb208a4 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Wed, 24 Aug 2022 15:44:31 -0400 Subject: [PATCH 01/15] Adds getItemEntry for Magic Bean Pack --- .../Enhancements/randomizer/randomizer.cpp | 170 +++++++++++------- soh/src/code/z_parameter.c | 15 +- 2 files changed, 120 insertions(+), 65 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index d13792714..5b6012e1a 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -3878,72 +3878,119 @@ void Randomizer::CreateCustomMessages() { const std::vector getItemMessages = { GIMESSAGE(RG_ICE_TRAP, ITEM_NONE, "\x08\x06\x30You are a %bFOWL%w!\x0E\x20", "\x08\x06\x15 Du bist ein %bDUMMKOPF%w!\x0E\x20", "\x08\x06\x50%bIDIOT%w\x0E\x20"), - GIMESSAGE_NO_GERMAN(RG_BOTTLE_WITH_BLUE_FIRE, ITEM_BLUE_FIRE, - "You got a %rBottle with Blue &Fire%w! Use it to melt Red Ice!", - "Vous obtenez une %rBouteille avec&une Flamme Bleue%w! Utilisez-la&pour faire fondre la %rGlace&Rouge%w!"), + GIMESSAGE_NO_GERMAN( + RG_BOTTLE_WITH_BLUE_FIRE, ITEM_BLUE_FIRE, "You got a %rBottle with Blue &Fire%w! Use it to melt Red Ice!", + "Vous obtenez une %rBouteille avec&une Flamme Bleue%w! Utilisez-la&pour faire fondre la %rGlace&Rouge%w!"), GIMESSAGE_NO_GERMAN(RG_BOTTLE_WITH_BIG_POE, ITEM_BIG_POE, - "You got a %rBig Poe in a Bottle%w!&Sell it to the Ghost Shop!", - "Vous obtenez une %rBouteille avec&une Âme%w! Vendez-la au Marchand&d'Âme"), + "You got a %rBig Poe in a Bottle%w!&Sell it to the Ghost Shop!", + "Vous obtenez une %rBouteille avec&une Âme%w! Vendez-la au Marchand&d'Âme"), GIMESSAGE_NO_GERMAN(RG_BOTTLE_WITH_BLUE_POTION, ITEM_POTION_BLUE, - "You got a %rBottle of Blue Potion%w!&Drink it to replenish your&%ghealth%w and %bmagic%w!", - "Vous obtenez une %rBouteille avec&une Potion Bleue%w! Buvez-la pour&restaurer votre %rénergie vitale%w&ainsi que votre %gmagie%w!"), - GIMESSAGE_NO_GERMAN(RG_BOTTLE_WITH_FISH, ITEM_FISH, - "You got a %rFish in a Bottle%w!&It looks fresh and delicious!&They say Jabu-Jabu loves them!", - "Vous obtenez une %rBouteille avec&un Poisson%w! Il a l'air délicieux!&Il paraîtrait que %bJabu-Jabu %wen&serait friand!"), - GIMESSAGE_NO_GERMAN(RG_BOTTLE_WITH_BUGS, ITEM_BUG, - "You got a %rBug in a Bottle%w!&They love to burrow in&dirt holes!", - "Vous obtenez une %rBouteille avec&des Insectes%w! Ils adorent creuser&dans la terre meuble!"), - GIMESSAGE_NO_GERMAN(RG_BOTTLE_WITH_FAIRY, ITEM_FAIRY, - "You got a %rFairy in a Bottle%w!&Use it wisely!", - "Vous obtenez une %rBouteille avec&une Fée%w! Faites-en bon usage!"), - GIMESSAGE_NO_GERMAN(RG_BOTTLE_WITH_RED_POTION, ITEM_POTION_RED, - "You got a %rBottle of Red Potion%w!&Drink it to replenish your&%ghealth%w!", - "Vous obtenez une %rBouteille avec&une Potion Rouge%w! Buvez-la pour&restaurer votre %rénergie vitale%w!"), - GIMESSAGE_NO_GERMAN(RG_BOTTLE_WITH_GREEN_POTION, ITEM_POTION_GREEN, - "You got a %rBottle of Green Potion%w!&Drink it to replenish your&%bmagic%w!", - "Vous obtenez une %rBouteille avec&une Potion Verte%w! Buvez-la pour&restaurer votre %gmagie%w!"), - GIMESSAGE_NO_GERMAN(RG_BOTTLE_WITH_POE, ITEM_POE, - "You got a %rPoe in a Bottle%w!&That creepy Ghost Shop might&be interested in this...", - "Vous obtenez une %rBouteille avec&un Esprit%w! Ça intéresserait&peut-être le vendeur d'Âme "), + "You got a %rBottle of Blue Potion%w!&Drink it to replenish your&%ghealth%w and %bmagic%w!", + "Vous obtenez une %rBouteille avec&une Potion Bleue%w! Buvez-la pour&restaurer votre " + "%rénergie vitale%w&ainsi que votre %gmagie%w!"), + GIMESSAGE_NO_GERMAN( + RG_BOTTLE_WITH_FISH, ITEM_FISH, + "You got a %rFish in a Bottle%w!&It looks fresh and delicious!&They say Jabu-Jabu loves them!", + "Vous obtenez une %rBouteille avec&un Poisson%w! Il a l'air délicieux!&Il paraîtrait que %bJabu-Jabu " + "%wen&serait friand!"), + GIMESSAGE_NO_GERMAN( + RG_BOTTLE_WITH_BUGS, ITEM_BUG, "You got a %rBug in a Bottle%w!&They love to burrow in&dirt holes!", + "Vous obtenez une %rBouteille avec&des Insectes%w! Ils adorent creuser&dans la terre meuble!"), + GIMESSAGE_NO_GERMAN(RG_BOTTLE_WITH_FAIRY, ITEM_FAIRY, "You got a %rFairy in a Bottle%w!&Use it wisely!", + "Vous obtenez une %rBouteille avec&une Fée%w! Faites-en bon usage!"), + GIMESSAGE_NO_GERMAN( + RG_BOTTLE_WITH_RED_POTION, ITEM_POTION_RED, + "You got a %rBottle of Red Potion%w!&Drink it to replenish your&%ghealth%w!", + "Vous obtenez une %rBouteille avec&une Potion Rouge%w! Buvez-la pour&restaurer votre %rénergie vitale%w!"), + GIMESSAGE_NO_GERMAN( + RG_BOTTLE_WITH_GREEN_POTION, ITEM_POTION_GREEN, + "You got a %rBottle of Green Potion%w!&Drink it to replenish your&%bmagic%w!", + "Vous obtenez une %rBouteille avec&une Potion Verte%w! Buvez-la pour&restaurer votre %gmagie%w!"), + GIMESSAGE_NO_GERMAN( + RG_BOTTLE_WITH_POE, ITEM_POE, + "You got a %rPoe in a Bottle%w!&That creepy Ghost Shop might&be interested in this...", + "Vous obtenez une %rBouteille avec&un Esprit%w! Ça intéresserait&peut-être le vendeur d'Âme "), - GIMESSAGE_NO_GERMAN(RG_GERUDO_FORTRESS_SMALL_KEY, ITEM_KEY_SMALL, "You found a %yThieves Hideout &%wSmall Key!", "Vous obtenez une %rPetite Clé %w&du %yRepaire des Voleurs%w!"), - GIMESSAGE_NO_GERMAN(RG_FOREST_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %gForest Temple &%wSmall Key!", "Vous obtenez une %rPetite Clé %w&du %gTemple de la Forêt%w!"), - GIMESSAGE_NO_GERMAN(RG_FIRE_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %rFire Temple &%wSmall Key!", "Vous obtenez une %rPetite Clé %w&du %rTemple du Feu%w!"), - GIMESSAGE_NO_GERMAN(RG_WATER_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %bWater Temple &%wSmall Key!", "Vous obtenez une %rPetite Clé %w&du %bTemple de l'Eau%w!"), - GIMESSAGE_NO_GERMAN(RG_SPIRIT_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %ySpirit Temple &%wSmall Key!", "Vous obtenez une %rPetite Clé %w&du %yTemple de l'Esprit%w!"), - GIMESSAGE_NO_GERMAN(RG_SHADOW_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %pShadow Temple &%wSmall Key!", "Vous obtenez une %rPetite Clé %w&du %pTemple de l'Ombre%w!"), - GIMESSAGE_NO_GERMAN(RG_BOTTOM_OF_THE_WELL_SMALL_KEY, ITEM_KEY_SMALL, "You found a %pBottom of the &Well %wSmall Key!", "Vous obtenez une %rPetite Clé %w&du %Puits%w!"), - GIMESSAGE_NO_GERMAN(RG_GERUDO_TRAINING_GROUNDS_SMALL_KEY, ITEM_KEY_SMALL, "You found a %yGerudo Training &Grounds %wSmall Key!", "Vous obtenez une %rPetite Clé %w&du %yGymnase Gerudo%w!"), - GIMESSAGE_NO_GERMAN(RG_GANONS_CASTLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %rGanon's Castle &%wSmall Key!", "Vous obtenez une %rPetite Clé %w&du %Château de Ganon%w!"), + GIMESSAGE_NO_GERMAN(RG_GERUDO_FORTRESS_SMALL_KEY, ITEM_KEY_SMALL, "You found a %yThieves Hideout &%wSmall Key!", + "Vous obtenez une %rPetite Clé %w&du %yRepaire des Voleurs%w!"), + GIMESSAGE_NO_GERMAN(RG_FOREST_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %gForest Temple &%wSmall Key!", + "Vous obtenez une %rPetite Clé %w&du %gTemple de la Forêt%w!"), + GIMESSAGE_NO_GERMAN(RG_FIRE_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %rFire Temple &%wSmall Key!", + "Vous obtenez une %rPetite Clé %w&du %rTemple du Feu%w!"), + GIMESSAGE_NO_GERMAN(RG_WATER_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %bWater Temple &%wSmall Key!", + "Vous obtenez une %rPetite Clé %w&du %bTemple de l'Eau%w!"), + GIMESSAGE_NO_GERMAN(RG_SPIRIT_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %ySpirit Temple &%wSmall Key!", + "Vous obtenez une %rPetite Clé %w&du %yTemple de l'Esprit%w!"), + GIMESSAGE_NO_GERMAN(RG_SHADOW_TEMPLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %pShadow Temple &%wSmall Key!", + "Vous obtenez une %rPetite Clé %w&du %pTemple de l'Ombre%w!"), + GIMESSAGE_NO_GERMAN(RG_BOTTOM_OF_THE_WELL_SMALL_KEY, ITEM_KEY_SMALL, + "You found a %pBottom of the &Well %wSmall Key!", + "Vous obtenez une %rPetite Clé %w&du %Puits%w!"), + GIMESSAGE_NO_GERMAN(RG_GERUDO_TRAINING_GROUNDS_SMALL_KEY, ITEM_KEY_SMALL, + "You found a %yGerudo Training &Grounds %wSmall Key!", + "Vous obtenez une %rPetite Clé %w&du %yGymnase Gerudo%w!"), + GIMESSAGE_NO_GERMAN(RG_GANONS_CASTLE_SMALL_KEY, ITEM_KEY_SMALL, "You found a %rGanon's Castle &%wSmall Key!", + "Vous obtenez une %rPetite Clé %w&du %Château de Ganon%w!"), - GIMESSAGE_NO_GERMAN(RG_FOREST_TEMPLE_BOSS_KEY, ITEM_KEY_BOSS, "You found the %gForest Temple &%wBoss Key!", "Vous obtenez la %rClé d'or %wdu&%gTemple de la Forêt%w!"), - GIMESSAGE_NO_GERMAN(RG_FIRE_TEMPLE_BOSS_KEY, ITEM_KEY_BOSS, "You found the %rFire Temple &%wBoss Key!", "Vous obtenez la %rClé d'or %wdu&%rTemple du Feu%w!"), - GIMESSAGE_NO_GERMAN(RG_WATER_TEMPLE_BOSS_KEY, ITEM_KEY_BOSS, "You found the %bWater Temple &%wBoss Key!", "Vous obtenez la %rClé d'or %wdu&%bTemple de l'Eau%w!"), - GIMESSAGE_NO_GERMAN(RG_SPIRIT_TEMPLE_BOSS_KEY, ITEM_KEY_BOSS, "You found the %ySpirit Temple &%wBoss Key!", "Vous obtenez la %rClé d'or %wdu&%yTemple de l'Esprit%w!"), - GIMESSAGE_NO_GERMAN(RG_SHADOW_TEMPLE_BOSS_KEY, ITEM_KEY_BOSS, "You found the %pShadow Temple &%wBoss Key!", "Vous obtenez la %rClé d'or %wdu&%pTemple de l'Ombre%w!"), - GIMESSAGE_NO_GERMAN(RG_GANONS_CASTLE_BOSS_KEY, ITEM_KEY_BOSS, "You found the %rGanon's Castle &%wBoss Key!", "Vous obtenez la %rClé d'or %wdu&%rChâteau de Ganon%w!"), - - GIMESSAGE_NO_GERMAN(RG_DEKU_TREE_MAP, ITEM_DUNGEON_MAP, "You found the %gDeku Tree &%wMap!", "Vous obtenez la %rCarte %wde&l'%gArbre Mojo%w!"), - GIMESSAGE_NO_GERMAN(RG_DODONGOS_CAVERN_MAP, ITEM_DUNGEON_MAP, "You found the %rDodongo's Cavern &%wMap!", "Vous obtenez la %rCarte %wde la&%rCaverne Dodongo%w!"), - GIMESSAGE_NO_GERMAN(RG_JABU_JABUS_BELLY_MAP, ITEM_DUNGEON_MAP, "You found the %bJabu Jabu's Belly &%wMap!", "Vous obtenez la %rCarte %wdu &%bVentre de Jabu-Jabu%w!"), - GIMESSAGE_NO_GERMAN(RG_FOREST_TEMPLE_MAP, ITEM_DUNGEON_MAP, "You found the %gForest Temple &%wMap!", "Vous obtenez la %rCarte %wdu &%gTemple de la Forêt%w!"), - GIMESSAGE_NO_GERMAN(RG_FIRE_TEMPLE_MAP, ITEM_DUNGEON_MAP, "You found the %rFire Temple &%wMap!", "Vous obtenez la %rCarte %wdu &%rTemple du Feu%w!"), - GIMESSAGE_NO_GERMAN(RG_WATER_TEMPLE_MAP, ITEM_DUNGEON_MAP, "You found the %bWater Temple &%wMap!", "Vous obtenez la %rCarte %wdu &%bTemple de l'Eau%w!"), - GIMESSAGE_NO_GERMAN(RG_SPIRIT_TEMPLE_MAP, ITEM_DUNGEON_MAP, "You found the %ySpirit Temple &%wMap!", "Vous obtenez la %rCarte %wdu &%yTemple de l'Esprit%w!"), - GIMESSAGE_NO_GERMAN(RG_SHADOW_TEMPLE_MAP, ITEM_DUNGEON_MAP, "You found the %pShadow Temple &%wMap!", "Vous obtenez la %rCarte %wdu &%pTemple de l'Ombre%w!"), - GIMESSAGE_NO_GERMAN(RG_BOTTOM_OF_THE_WELL_MAP, ITEM_DUNGEON_MAP, "You found the %pBottom of the &Well %wMap!", "Vous obtenez la %rCarte %wdu &%pPuits%w!"), - GIMESSAGE_NO_GERMAN(RG_ICE_CAVERN_MAP, ITEM_DUNGEON_MAP, "You found the %cIce Cavern &%wMap!", "Vous obtenez la %rCarte %wde &la %cCaverne Polaire%w!"), + GIMESSAGE_NO_GERMAN(RG_FOREST_TEMPLE_BOSS_KEY, ITEM_KEY_BOSS, "You found the %gForest Temple &%wBoss Key!", + "Vous obtenez la %rClé d'or %wdu&%gTemple de la Forêt%w!"), + GIMESSAGE_NO_GERMAN(RG_FIRE_TEMPLE_BOSS_KEY, ITEM_KEY_BOSS, "You found the %rFire Temple &%wBoss Key!", + "Vous obtenez la %rClé d'or %wdu&%rTemple du Feu%w!"), + GIMESSAGE_NO_GERMAN(RG_WATER_TEMPLE_BOSS_KEY, ITEM_KEY_BOSS, "You found the %bWater Temple &%wBoss Key!", + "Vous obtenez la %rClé d'or %wdu&%bTemple de l'Eau%w!"), + GIMESSAGE_NO_GERMAN(RG_SPIRIT_TEMPLE_BOSS_KEY, ITEM_KEY_BOSS, "You found the %ySpirit Temple &%wBoss Key!", + "Vous obtenez la %rClé d'or %wdu&%yTemple de l'Esprit%w!"), + GIMESSAGE_NO_GERMAN(RG_SHADOW_TEMPLE_BOSS_KEY, ITEM_KEY_BOSS, "You found the %pShadow Temple &%wBoss Key!", + "Vous obtenez la %rClé d'or %wdu&%pTemple de l'Ombre%w!"), + GIMESSAGE_NO_GERMAN(RG_GANONS_CASTLE_BOSS_KEY, ITEM_KEY_BOSS, "You found the %rGanon's Castle &%wBoss Key!", + "Vous obtenez la %rClé d'or %wdu&%rChâteau de Ganon%w!"), - GIMESSAGE_NO_GERMAN(RG_DEKU_TREE_COMPASS, ITEM_COMPASS, "You found the %gDeku Tree &%wCompass!", "Vous obtenez la %rBoussole %wde&l'%gArbre Mojo%w!"), - GIMESSAGE_NO_GERMAN(RG_DODONGOS_CAVERN_COMPASS, ITEM_COMPASS, "You found the %rDodongo's Cavern &%wCompass!", "Vous obtenez la %rBoussole %wde la&%rCaverne Dodongo%w!"), - GIMESSAGE_NO_GERMAN(RG_JABU_JABUS_BELLY_COMPASS, ITEM_COMPASS, "You found the %bJabu Jabu's Belly &%wCompass!", "Vous obtenez la %rBoussole %wdu &%bVentre de Jabu-Jabu%w!"), - GIMESSAGE_NO_GERMAN(RG_FOREST_TEMPLE_COMPASS, ITEM_COMPASS, "You found the %gForest Temple &%wCompass!", "Vous obtenez la %rBoussole %wdu &%gTemple de la Forêt%w!"), - GIMESSAGE_NO_GERMAN(RG_FIRE_TEMPLE_COMPASS, ITEM_COMPASS, "You found the %rFire Temple &%wCompass!", "Vous obtenez la %rBoussole %wdu &%rTemple du Feu%w!"), - GIMESSAGE_NO_GERMAN(RG_WATER_TEMPLE_COMPASS, ITEM_COMPASS, "You found the %bWater Temple &%wCompass!", "Vous obtenez la %rBoussole %wdu &%bTemple de l'Eau%w!"), - GIMESSAGE_NO_GERMAN(RG_SPIRIT_TEMPLE_COMPASS, ITEM_COMPASS, "You found the %ySpirit Temple &%wCompass!", "Vous obtenez la %rBoussole %wdu &%yTemple de l'Esprit%w!"), - GIMESSAGE_NO_GERMAN(RG_SHADOW_TEMPLE_COMPASS, ITEM_COMPASS, "You found the %pShadow Temple &%wCompass!", "Vous obtenez la %rBoussole %wdu &%pTemple de l'Ombre%w!"), - GIMESSAGE_NO_GERMAN(RG_BOTTOM_OF_THE_WELL_COMPASS, ITEM_COMPASS, "You found the %pBottom of the &Well %wCompass!", "Vous obtenez la %rBoussole %wdu &%pPuits%w!"), - GIMESSAGE_NO_GERMAN(RG_ICE_CAVERN_COMPASS, ITEM_COMPASS, "You found the %cIce Cavern &%wCompass!", "Vous obtenez la %rBoussole %wde &la %cCaverne Polaire%w!"), + GIMESSAGE_NO_GERMAN(RG_DEKU_TREE_MAP, ITEM_DUNGEON_MAP, "You found the %gDeku Tree &%wMap!", + "Vous obtenez la %rCarte %wde&l'%gArbre Mojo%w!"), + GIMESSAGE_NO_GERMAN(RG_DODONGOS_CAVERN_MAP, ITEM_DUNGEON_MAP, "You found the %rDodongo's Cavern &%wMap!", + "Vous obtenez la %rCarte %wde la&%rCaverne Dodongo%w!"), + GIMESSAGE_NO_GERMAN(RG_JABU_JABUS_BELLY_MAP, ITEM_DUNGEON_MAP, "You found the %bJabu Jabu's Belly &%wMap!", + "Vous obtenez la %rCarte %wdu &%bVentre de Jabu-Jabu%w!"), + GIMESSAGE_NO_GERMAN(RG_FOREST_TEMPLE_MAP, ITEM_DUNGEON_MAP, "You found the %gForest Temple &%wMap!", + "Vous obtenez la %rCarte %wdu &%gTemple de la Forêt%w!"), + GIMESSAGE_NO_GERMAN(RG_FIRE_TEMPLE_MAP, ITEM_DUNGEON_MAP, "You found the %rFire Temple &%wMap!", + "Vous obtenez la %rCarte %wdu &%rTemple du Feu%w!"), + GIMESSAGE_NO_GERMAN(RG_WATER_TEMPLE_MAP, ITEM_DUNGEON_MAP, "You found the %bWater Temple &%wMap!", + "Vous obtenez la %rCarte %wdu &%bTemple de l'Eau%w!"), + GIMESSAGE_NO_GERMAN(RG_SPIRIT_TEMPLE_MAP, ITEM_DUNGEON_MAP, "You found the %ySpirit Temple &%wMap!", + "Vous obtenez la %rCarte %wdu &%yTemple de l'Esprit%w!"), + GIMESSAGE_NO_GERMAN(RG_SHADOW_TEMPLE_MAP, ITEM_DUNGEON_MAP, "You found the %pShadow Temple &%wMap!", + "Vous obtenez la %rCarte %wdu &%pTemple de l'Ombre%w!"), + GIMESSAGE_NO_GERMAN(RG_BOTTOM_OF_THE_WELL_MAP, ITEM_DUNGEON_MAP, "You found the %pBottom of the &Well %wMap!", + "Vous obtenez la %rCarte %wdu &%pPuits%w!"), + GIMESSAGE_NO_GERMAN(RG_ICE_CAVERN_MAP, ITEM_DUNGEON_MAP, "You found the %cIce Cavern &%wMap!", + "Vous obtenez la %rCarte %wde &la %cCaverne Polaire%w!"), + + GIMESSAGE_NO_GERMAN(RG_DEKU_TREE_COMPASS, ITEM_COMPASS, "You found the %gDeku Tree &%wCompass!", + "Vous obtenez la %rBoussole %wde&l'%gArbre Mojo%w!"), + GIMESSAGE_NO_GERMAN(RG_DODONGOS_CAVERN_COMPASS, ITEM_COMPASS, "You found the %rDodongo's Cavern &%wCompass!", + "Vous obtenez la %rBoussole %wde la&%rCaverne Dodongo%w!"), + GIMESSAGE_NO_GERMAN(RG_JABU_JABUS_BELLY_COMPASS, ITEM_COMPASS, "You found the %bJabu Jabu's Belly &%wCompass!", + "Vous obtenez la %rBoussole %wdu &%bVentre de Jabu-Jabu%w!"), + GIMESSAGE_NO_GERMAN(RG_FOREST_TEMPLE_COMPASS, ITEM_COMPASS, "You found the %gForest Temple &%wCompass!", + "Vous obtenez la %rBoussole %wdu &%gTemple de la Forêt%w!"), + GIMESSAGE_NO_GERMAN(RG_FIRE_TEMPLE_COMPASS, ITEM_COMPASS, "You found the %rFire Temple &%wCompass!", + "Vous obtenez la %rBoussole %wdu &%rTemple du Feu%w!"), + GIMESSAGE_NO_GERMAN(RG_WATER_TEMPLE_COMPASS, ITEM_COMPASS, "You found the %bWater Temple &%wCompass!", + "Vous obtenez la %rBoussole %wdu &%bTemple de l'Eau%w!"), + GIMESSAGE_NO_GERMAN(RG_SPIRIT_TEMPLE_COMPASS, ITEM_COMPASS, "You found the %ySpirit Temple &%wCompass!", + "Vous obtenez la %rBoussole %wdu &%yTemple de l'Esprit%w!"), + GIMESSAGE_NO_GERMAN(RG_SHADOW_TEMPLE_COMPASS, ITEM_COMPASS, "You found the %pShadow Temple &%wCompass!", + "Vous obtenez la %rBoussole %wdu &%pTemple de l'Ombre%w!"), + GIMESSAGE_NO_GERMAN(RG_BOTTOM_OF_THE_WELL_COMPASS, ITEM_COMPASS, + "You found the %pBottom of the &Well %wCompass!", + "Vous obtenez la %rBoussole %wdu &%pPuits%w!"), + GIMESSAGE_NO_GERMAN(RG_ICE_CAVERN_COMPASS, ITEM_COMPASS, "You found the %cIce Cavern &%wCompass!", + "Vous obtenez la %rBoussole %wde &la %cCaverne Polaire%w!"), + GIMESSAGE(RG_MAGIC_BEAN_PACK, ITEM_BEAN, + "You got a %rPack of Magic Beans%w!&Find a suitable spot for a garden&and plant them. Then, wait for&something fun to happen!", + "Du hast eine %rPackung&Magic Beans%w! Finde&einen geeigneten Platz fur einen&Garten und pflanze sie. Dann^warte auf etwas Lustiges passiert!", + "Vous avez un %rPack de&haricots magiques%w ! Trouvez&un endroit convenable pour un&jardin et plantez-les.^Ensuite, attendez quelque&chose d'amusant doit arriver !") }; CreateGetItemMessages(getItemMessages); CreateScrubMessages(); @@ -4043,6 +4090,7 @@ void InitRandoItemTable() { GET_ITEM(RG_SHADOW_TEMPLE_COMPASS, OBJECT_GI_COMPASS, GID_COMPASS, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, MOD_RANDOMIZER, RG_SHADOW_TEMPLE_COMPASS), GET_ITEM(RG_BOTTOM_OF_THE_WELL_COMPASS, OBJECT_GI_COMPASS, GID_COMPASS, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, MOD_RANDOMIZER, RG_BOTTOM_OF_THE_WELL_COMPASS), GET_ITEM(RG_ICE_CAVERN_COMPASS, OBJECT_GI_COMPASS, GID_COMPASS, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, MOD_RANDOMIZER, RG_ICE_CAVERN_COMPASS), + GET_ITEM(RG_MAGIC_BEAN_PACK, OBJECT_GI_BEAN, GID_BEAN, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, MOD_RANDOMIZER, RG_MAGIC_BEAN_PACK) }; ItemTableManager::Instance->AddItemTable(MOD_RANDOMIZER); for (int i = 0; i < ARRAY_COUNT(extendedVanillaGetItemTable); i++) { diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index bc8fa8149..acad4d874 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -2177,6 +2177,14 @@ u16 Randomizer_Item_Give(GlobalContext* globalCtx, GetItemEntry giEntry) { return RG_NONE; } + if (item == RG_MAGIC_BEAN_PACK) { + if (gSaveContext.inventory.items[SLOT(ITEM_BEAN)] == ITEM_NONE) { + INV_CONTENT(ITEM_BEAN) = ITEM_BEAN; + AMMO(ITEM_BEAN) = 10; + BEANS_BOUGHT = 10; + } + } + if (item == RG_DOUBLE_DEFENSE) { gSaveContext.doubleDefense = true; gSaveContext.inventory.defenseHearts = 20; @@ -2223,9 +2231,9 @@ u16 Randomizer_Item_Give(GlobalContext* globalCtx, GetItemEntry giEntry) { } } } else if ((item >= RG_FOREST_TEMPLE_SMALL_KEY && item <= RG_GANONS_CASTLE_SMALL_KEY) || - (item >= RG_FOREST_TEMPLE_BOSS_KEY && item <= RG_GANONS_CASTLE_BOSS_KEY) || - (item >= RG_DEKU_TREE_MAP && item <= RG_ICE_CAVERN_MAP) || - (item >= RG_DEKU_TREE_COMPASS && item <= RG_ICE_CAVERN_COMPASS)) { + (item >= RG_FOREST_TEMPLE_BOSS_KEY && item <= RG_GANONS_CASTLE_BOSS_KEY) || + (item >= RG_DEKU_TREE_MAP && item <= RG_ICE_CAVERN_MAP) || + (item >= RG_DEKU_TREE_COMPASS && item <= RG_ICE_CAVERN_COMPASS)) { int mapIndex = gSaveContext.mapIndex; switch (item) { case RG_DEKU_TREE_MAP: @@ -2323,7 +2331,6 @@ u16 Randomizer_Item_Give(GlobalContext* globalCtx, GetItemEntry giEntry) { return temp; } - u8 Item_CheckObtainability(u8 item) { s16 i; s16 slot = SLOT(item); From adf465c1a05f8179dc6cf6a56f53334ba72bc927 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Wed, 24 Aug 2022 17:20:45 -0400 Subject: [PATCH 02/15] Sets up Magic Bean Salesman to sell a rando check for 60 rupees. --- .../Enhancements/randomizer/randomizerTypes.h | 3 ++- soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c | 21 +++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizerTypes.h b/soh/soh/Enhancements/randomizer/randomizerTypes.h index 21635278c..14e5ae34a 100644 --- a/soh/soh/Enhancements/randomizer/randomizerTypes.h +++ b/soh/soh/Enhancements/randomizer/randomizerTypes.h @@ -1013,5 +1013,6 @@ typedef enum { RSK_COMPLETE_MASK_QUEST, RSK_ENABLE_GLITCH_CUTSCENES, RSK_SKULLS_SUNS_SONG, - RSK_SHUFFLE_ADULT_TRADE + RSK_SHUFFLE_ADULT_TRADE, + RSK_SHUFFLE_MAGIC_BEANS } RandomizerSettingKey; diff --git a/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c index 04919761e..dc4dc61ca 100644 --- a/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -125,11 +125,19 @@ void EnMs_Talk(EnMs* this, GlobalContext* globalCtx) { } else if (Message_ShouldAdvance(globalCtx)) { switch (globalCtx->msgCtx.choiceIndex) { case 0: // yes - if (gSaveContext.rupees < sPrices[BEANS_BOUGHT]) { + if (gSaveContext.rupees < + ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) + ? 60 + : sPrices[BEANS_BOUGHT])) { Message_ContinueTextbox(globalCtx, 0x4069); // not enough rupees text return; } - func_8002F434(&this->actor, globalCtx, GI_BEAN, 90.0f, 10.0f); + if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) { + GiveItemEntryFromActor(&this->actor, globalCtx, + Randomizer_GetItemFromKnownCheck(RC_ZR_MAGIC_BEAN_SALESMAN, GI_BEAN), 90.0f, 10.0f); + } else { + func_8002F434(&this->actor, globalCtx, GI_BEAN, 90.0f, 10.0f); + } this->actionFunc = EnMs_Sell; return; case 1: // no @@ -142,11 +150,16 @@ void EnMs_Talk(EnMs* this, GlobalContext* globalCtx) { void EnMs_Sell(EnMs* this, GlobalContext* globalCtx) { if (Actor_HasParent(&this->actor, globalCtx)) { - Rupees_ChangeBy(-sPrices[BEANS_BOUGHT]); + Rupees_ChangeBy((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? 60 : -sPrices[BEANS_BOUGHT]); this->actor.parent = NULL; this->actionFunc = EnMs_TalkAfterPurchase; } else { - func_8002F434(&this->actor, globalCtx, GI_BEAN, 90.0f, 10.0f); + if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) { + GiveItemEntryFromActor(&this->actor, globalCtx, + Randomizer_GetItemFromKnownCheck(RC_ZR_MAGIC_BEAN_SALESMAN, GI_BEAN), 90.0f, 10.0f); + } else { + func_8002F434(&this->actor, globalCtx, GI_BEAN, 90.0f, 10.0f); + } } } From c4de29b7f1aeeeb96a1337b1020b7558c0e21022 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Wed, 24 Aug 2022 17:24:50 -0400 Subject: [PATCH 03/15] Correctly sets `BEANS_BOUGHT` as a "flag" for the bean salesman --- soh/src/code/z_parameter.c | 1 - soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index acad4d874..7548c0fa7 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -2181,7 +2181,6 @@ u16 Randomizer_Item_Give(GlobalContext* globalCtx, GetItemEntry giEntry) { if (gSaveContext.inventory.items[SLOT(ITEM_BEAN)] == ITEM_NONE) { INV_CONTENT(ITEM_BEAN) = ITEM_BEAN; AMMO(ITEM_BEAN) = 10; - BEANS_BOUGHT = 10; } } diff --git a/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c index dc4dc61ca..5c8a1807b 100644 --- a/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -157,6 +157,7 @@ void EnMs_Sell(EnMs* this, GlobalContext* globalCtx) { if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) { GiveItemEntryFromActor(&this->actor, globalCtx, Randomizer_GetItemFromKnownCheck(RC_ZR_MAGIC_BEAN_SALESMAN, GI_BEAN), 90.0f, 10.0f); + BEANS_BOUGHT = 10; } else { func_8002F434(&this->actor, globalCtx, GI_BEAN, 90.0f, 10.0f); } From db6a39719501c76bc256896be73ed67ac78454b9 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Wed, 24 Aug 2022 17:58:01 -0400 Subject: [PATCH 04/15] Adds new text for the bean salesman --- soh/soh/Enhancements/randomizer/randomizer.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 5b6012e1a..69da8fa03 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -3734,6 +3734,17 @@ void CreateScrubMessages() { std::to_string(price) + " Rubis%w!\x07\x10\xA3" }); } + customMessageManager->CreateMessage(Randomizer::scrubMessageTableID, 0x405E, + { + TEXTBOX_TYPE_BLACK, + TEXTBOX_POS_BOTTOM, + "I tried to be a magic bean salesman,&but it turns out my marketing skills&weren't worth beans!^Anyway, want to buy my&" + "%gmysterious item%w for 60 Rupees?\x1B&%gYes&No%w", + "I tried to be a magic bean salesman,&but it turns out my marketing skills&weren't worth beans!^Anyway, want to buy my&" + "%gmysterious item%w for 60 Rupees?\x1B&%gYes&No%w", + "I tried to be a magic bean salesman,&but it turns out my marketing skills&weren't worth beans!^Anyway, want to buy my&" + "%gmysterious item%w for 60 Rupees?\x1B&%gYes&No%w", + }); } void CreateRupeeMessages() { From ef1b662bf4eac3ae5d3d9c3d57ef10c46f4341f3 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 25 Aug 2022 09:42:15 -0400 Subject: [PATCH 05/15] Finishes wiring up bean salesman settings and text. --- soh/soh/Enhancements/custom-message/CustomMessageTypes.h | 3 ++- soh/soh/Enhancements/randomizer/3drando/settings.cpp | 1 + soh/soh/Enhancements/randomizer/randomizer.cpp | 8 ++++++++ soh/soh/OTRGlobals.cpp | 2 ++ soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c | 3 ++- 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/custom-message/CustomMessageTypes.h b/soh/soh/Enhancements/custom-message/CustomMessageTypes.h index b38b5fc80..d82cd84a9 100644 --- a/soh/soh/Enhancements/custom-message/CustomMessageTypes.h +++ b/soh/soh/Enhancements/custom-message/CustomMessageTypes.h @@ -15,7 +15,8 @@ typedef enum { TEXT_BLUE_RUPEE = 0xCC, TEXT_RED_RUPEE = 0xF0, TEXT_PURPLE_RUPEE = 0xF1, - TEXT_HUGE_RUPEE = 0xF2 + TEXT_HUGE_RUPEE = 0xF2, + TEXT_BEAN_SALESEMAN = 0x405E } TextIDs; #ifdef __cplusplus diff --git a/soh/soh/Enhancements/randomizer/3drando/settings.cpp b/soh/soh/Enhancements/randomizer/3drando/settings.cpp index 51eaff18b..7df0be90a 100644 --- a/soh/soh/Enhancements/randomizer/3drando/settings.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/settings.cpp @@ -2551,6 +2551,7 @@ namespace Settings { ShuffleFrogSongRupees.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_FROG_SONG_RUPEES]); ShuffleAdultTradeQuest.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_ADULT_TRADE]); + ShuffleMagicBeans.SetSelectedIndex(cvarSettings[RSK_SHUFFLE_MAGIC_BEANS]); // the checkbox works because 0 is "Off" and 1 is "Fairy Ocarina" StartingOcarina.SetSelectedIndex(cvarSettings[RSK_STARTING_OCARINA]); diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 69da8fa03..528527922 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -548,6 +548,7 @@ std::unordered_map SpoilerfileSettingNameToEn { "Shuffle Settings:Shuffle Cows", RSK_SHUFFLE_COWS }, { "Shuffle Settings:Tokensanity", RSK_SHUFFLE_TOKENS }, { "Shuffle Settings:Shuffle Adult Trade", RSK_SHUFFLE_ADULT_TRADE }, + { "Shuffle Settings:Shuffle Magic Beans", RSK_SHUFFLE_MAGIC_BEANS}, { "Start with Deku Shield", RSK_STARTING_DEKU_SHIELD }, { "Start with Kokiri Sword", RSK_STARTING_KOKIRI_SWORD }, { "Start with Fairy Ocarina", RSK_STARTING_OCARINA }, @@ -774,6 +775,7 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) { case RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD: case RSK_SHUFFLE_COWS: case RSK_SHUFFLE_ADULT_TRADE: + case RSK_SHUFFLE_MAGIC_BEANS: case RSK_RANDOM_TRIALS: case RSK_STARTING_DEKU_SHIELD: case RSK_STARTING_KOKIRI_SWORD: @@ -2616,6 +2618,7 @@ void GenerateRandomizerImgui() { cvarSettings[RSK_SHUFFLE_TOKENS] = CVar_GetS32("gRandomizeShuffleTokens", 0); cvarSettings[RSK_SHUFFLE_COWS] = CVar_GetS32("gRandomizeShuffleCows", 0); cvarSettings[RSK_SHUFFLE_ADULT_TRADE] = CVar_GetS32("gRandomizeShuffleAdultTrade", 0); + cvarSettings[RSK_SHUFFLE_MAGIC_BEANS] = CVar_GetS32("gRandomizeShuffleBeans", 0); cvarSettings[RSK_SKIP_CHILD_ZELDA] = CVar_GetS32("gRandomizeSkipChildZelda", 0); // if we skip child zelda, we start with zelda's letter, and malon starts @@ -3149,6 +3152,11 @@ void DrawRandoEditor(bool& open) { "If disabled, only the Claim Check will be found in the pool."); PaddedSeparator(); + SohImGui::EnhancementCheckbox(Settings::ShuffleMagicBeans.GetName().c_str(), "gRandomizeShuffleBeans"); + InsertHelpHoverText("Enabling this adds a pack of 10 beans to the item pool and changes the Magic Bean Salesman to sell a" + "random item at a price of 60 rupees."); + PaddedSeparator(); + if (CVar_GetS32("gRandomizeStartingKokiriSword", 0) == 0) { // Shuffle Kokiri Sword SohImGui::EnhancementCheckbox(Settings::ShuffleKokiriSword.GetName().c_str(), diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 18d20ee00..f2d3c4844 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1727,6 +1727,8 @@ extern "C" int CustomMessage_RetrieveIfExists(GlobalContext* globalCtx) { // In rando, replace Navi's general overworld hints with rando-related gameplay tips } else if (CVar_GetS32("gRandoRelevantNavi", 1) && textId >= 0x0140 && textId <= 0x015F) { messageEntry = Randomizer_GetNaviMessage(); + } else if (Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS) && textId == TEXT_BEAN_SALESEMAN) { + messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::scrubMessageTableID, TEXT_BEAN_SALESEMAN); } } if (textId == TEXT_GS_NO_FREEZE || textId == TEXT_GS_FREEZE) { diff --git a/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c index 5c8a1807b..d90e54244 100644 --- a/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -152,7 +152,8 @@ void EnMs_Sell(EnMs* this, GlobalContext* globalCtx) { if (Actor_HasParent(&this->actor, globalCtx)) { Rupees_ChangeBy((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? 60 : -sPrices[BEANS_BOUGHT]); this->actor.parent = NULL; - this->actionFunc = EnMs_TalkAfterPurchase; + this->actionFunc = + (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? EnMs_Wait : EnMs_TalkAfterPurchase; } else { if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) { GiveItemEntryFromActor(&this->actor, globalCtx, From 5842beeb55d447b28af2204bb002fe633dfda06b Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 25 Aug 2022 10:11:35 -0400 Subject: [PATCH 06/15] Fixes Bean Pack item from chest. --- soh/soh/Enhancements/randomizer/randomizer.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 528527922..0f37eee73 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -1198,8 +1198,6 @@ s16 Randomizer::GetItemFromGet(RandomizerGet randoGet, GetItemID ogItemId) { case RG_MAGIC_BEAN: return GI_BEAN; - case RG_MAGIC_BEAN_PACK: - return GI_BEAN; //todo make it 10 of them case RG_WEIRD_EGG: return GI_WEIRD_EGG; From 00838cb5b60a123c4d06f220840e559f805b886a Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 25 Aug 2022 12:39:34 -0400 Subject: [PATCH 07/15] Adds french text for the bean salesman --- soh/soh/Enhancements/randomizer/randomizer.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 0f37eee73..452112552 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -3740,16 +3740,18 @@ void CreateScrubMessages() { std::to_string(price) + " Rubis%w!\x07\x10\xA3" }); } - customMessageManager->CreateMessage(Randomizer::scrubMessageTableID, 0x405E, + customMessageManager->CreateMessage( + Randomizer::scrubMessageTableID, 0x405E, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM, - "I tried to be a magic bean salesman,&but it turns out my marketing skills&weren't worth beans!^Anyway, want to buy my&" - "%gmysterious item%w for 60 Rupees?\x1B&%gYes&No%w", - "I tried to be a magic bean salesman,&but it turns out my marketing skills&weren't worth beans!^Anyway, want to buy my&" - "%gmysterious item%w for 60 Rupees?\x1B&%gYes&No%w", - "I tried to be a magic bean salesman,&but it turns out my marketing skills&weren't worth beans!^Anyway, want to buy my&" - "%gmysterious item%w for 60 Rupees?\x1B&%gYes&No%w", + "I tried to be a magic bean salesman,&but it turns out my marketing skills&weren't worth beans!^Anyway, " + "want to buy my&%gmysterious item%w for 60 Rupees?\x1B&%gYes&No%w", + "I tried to be a magic bean salesman,&but it turns out my marketing skills&weren't worth beans!^Anyway, " + "want to buy my&%gmysterious item%w for 60 Rupees?\x1B&%gYes&No%w", + "J'ai essayé d'être un vendeur de&haricots magiques, mais j'étais&mauvais au niveau du marketing et&ça me " + "courait sur le haricot...^Enfin bref, ça te dirait de m'acheter un&" + "%gobjet mystérieux%w pour 60 Rubis?\x1B&%gOui&Non%w", }); } From 6ab13f389b9e4371d0dd1dec08d1cdec719d3328 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 25 Aug 2022 12:43:19 -0400 Subject: [PATCH 08/15] Fixes salesman to properly take 60 rupees from you. --- soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c index d90e54244..9f67a21fc 100644 --- a/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -150,7 +150,7 @@ void EnMs_Talk(EnMs* this, GlobalContext* globalCtx) { void EnMs_Sell(EnMs* this, GlobalContext* globalCtx) { if (Actor_HasParent(&this->actor, globalCtx)) { - Rupees_ChangeBy((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? 60 : -sPrices[BEANS_BOUGHT]); + Rupees_ChangeBy((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? -60 : -sPrices[BEANS_BOUGHT]); this->actor.parent = NULL; this->actionFunc = (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? EnMs_Wait : EnMs_TalkAfterPurchase; From efd4ceb636a5c953a633c7ea703799e866f90b9f Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 25 Aug 2022 12:46:08 -0400 Subject: [PATCH 09/15] Colors keywords in bean salesman text. --- soh/soh/Enhancements/randomizer/randomizer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 452112552..66ecbc7d9 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -3745,11 +3745,11 @@ void CreateScrubMessages() { { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM, - "I tried to be a magic bean salesman,&but it turns out my marketing skills&weren't worth beans!^Anyway, " + "I tried to be a %rmagic bean%w salesman,&but it turns out my marketing skills&weren't worth beans!^Anyway, " "want to buy my&%gmysterious item%w for 60 Rupees?\x1B&%gYes&No%w", - "I tried to be a magic bean salesman,&but it turns out my marketing skills&weren't worth beans!^Anyway, " + "I tried to be a %rmagic bean%w salesman,&but it turns out my marketing skills&weren't worth beans!^Anyway, " "want to buy my&%gmysterious item%w for 60 Rupees?\x1B&%gYes&No%w", - "J'ai essayé d'être un vendeur de&haricots magiques, mais j'étais&mauvais au niveau du marketing et&ça me " + "J'ai essayé d'être un vendeur de&%rharicots magiques%w, mais j'étais&mauvais au niveau du marketing et&ça me " "courait sur le haricot...^Enfin bref, ça te dirait de m'acheter un&" "%gobjet mystérieux%w pour 60 Rubis?\x1B&%gOui&Non%w", }); From 3da197f0cdd7ef7f6bcf6c651f73e75a97a25503 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 25 Aug 2022 14:39:12 -0400 Subject: [PATCH 10/15] Removes some magic numbers --- soh/soh/Enhancements/custom-message/CustomMessageTypes.h | 2 +- soh/soh/Enhancements/randomizer/randomizer.cpp | 2 +- soh/soh/OTRGlobals.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/soh/soh/Enhancements/custom-message/CustomMessageTypes.h b/soh/soh/Enhancements/custom-message/CustomMessageTypes.h index d82cd84a9..dff85f415 100644 --- a/soh/soh/Enhancements/custom-message/CustomMessageTypes.h +++ b/soh/soh/Enhancements/custom-message/CustomMessageTypes.h @@ -16,7 +16,7 @@ typedef enum { TEXT_RED_RUPEE = 0xF0, TEXT_PURPLE_RUPEE = 0xF1, TEXT_HUGE_RUPEE = 0xF2, - TEXT_BEAN_SALESEMAN = 0x405E + TEXT_BEAN_SALESMAN = 0x405E } TextIDs; #ifdef __cplusplus diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 66ecbc7d9..72533c3c4 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -3741,7 +3741,7 @@ void CreateScrubMessages() { }); } customMessageManager->CreateMessage( - Randomizer::scrubMessageTableID, 0x405E, + Randomizer::scrubMessageTableID, TEXT_BEAN_SALESMAN, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM, diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index f2d3c4844..59d0bbad9 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1727,8 +1727,8 @@ extern "C" int CustomMessage_RetrieveIfExists(GlobalContext* globalCtx) { // In rando, replace Navi's general overworld hints with rando-related gameplay tips } else if (CVar_GetS32("gRandoRelevantNavi", 1) && textId >= 0x0140 && textId <= 0x015F) { messageEntry = Randomizer_GetNaviMessage(); - } else if (Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS) && textId == TEXT_BEAN_SALESEMAN) { - messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::scrubMessageTableID, TEXT_BEAN_SALESEMAN); + } else if (Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS) && textId == TEXT_BEAN_SALESMAN) { + messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::scrubMessageTableID, TEXT_BEAN_SALESMAN); } } if (textId == TEXT_GS_NO_FREEZE || textId == TEXT_GS_FREEZE) { From 5043309c63f3d25afdf2e73951dfb0fe3e647da6 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 25 Aug 2022 16:43:57 -0400 Subject: [PATCH 11/15] Adds basic german text for bean salesman --- soh/soh/Enhancements/randomizer/randomizer.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 72533c3c4..2557d84a7 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -3745,12 +3745,11 @@ void CreateScrubMessages() { { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM, - "I tried to be a %rmagic bean%w salesman,&but it turns out my marketing skills&weren't worth beans!^Anyway, " - "want to buy my&%gmysterious item%w for 60 Rupees?\x1B&%gYes&No%w", - "I tried to be a %rmagic bean%w salesman,&but it turns out my marketing skills&weren't worth beans!^Anyway, " - "want to buy my&%gmysterious item%w for 60 Rupees?\x1B&%gYes&No%w", - "J'ai essayé d'être un vendeur de&%rharicots magiques%w, mais j'étais&mauvais au niveau du marketing et&ça me " - "courait sur le haricot...^Enfin bref, ça te dirait de m'acheter un&" + "I tried to be a %rmagic bean%w salesman,&but it turns out my marketing skills&weren't worth " + "beans!^Anyway, want to buy my&%gmysterious item%w for 60 Rupees?\x1B&%gYes&No%w", + "Möchten Sie einen geheimnisvollen& Gegenstand für 60 Rubine?\x1B&%gJa&Nein%w", + "J'ai essayé d'être un vendeur de&%rharicots magiques%w, mais j'étais&mauvais au niveau du marketing et&ça " + "me courait sur le haricot...^Enfin bref, ça te dirait de m'acheter un&" "%gobjet mystérieux%w pour 60 Rubis?\x1B&%gOui&Non%w", }); } From 71e7fb9d70cfe588de5bd2838e49d8d0c8fd32a2 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 25 Aug 2022 18:02:00 -0400 Subject: [PATCH 12/15] Merge rando-next and rename scrub message table to merchant message table --- soh/soh/Enhancements/randomizer/randomizer.cpp | 14 +++++++------- soh/soh/Enhancements/randomizer/randomizer.h | 2 +- soh/soh/OTRGlobals.cpp | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index ac0072e3d..4fd2a123d 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -32,7 +32,7 @@ u8 generated; const std::string Randomizer::getItemMessageTableID = "Randomizer"; const std::string Randomizer::hintMessageTableID = "RandomizerHints"; -const std::string Randomizer::scrubMessageTableID = "RandomizerScrubs"; +const std::string Randomizer::merchantMessageTableID = "RandomizerScrubs"; const std::string Randomizer::rupeeMessageTableID = "RandomizerRupees"; const std::string Randomizer::NaviRandoMessageTableID = "RandomizerNavi"; @@ -4030,10 +4030,10 @@ void CreateGetItemMessages(std::vector messageEntries) { // Currently these are generated at runtime, one for each price between 0-95. We're soon going to migrate this // to being generated at save load, with only messages specific to each scrub. -void CreateScrubMessages() { +void CreateMerchantMessages() { CustomMessageManager* customMessageManager = CustomMessageManager::Instance; - customMessageManager->AddCustomMessageTable(Randomizer::scrubMessageTableID); - customMessageManager->CreateMessage(Randomizer::scrubMessageTableID, 0, + customMessageManager->AddCustomMessageTable(Randomizer::merchantMessageTableID); + customMessageManager->CreateMessage(Randomizer::merchantMessageTableID, 0, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM, "\x12\x38\x82\All right! You win! In return for&sparing me, I will give you a&%gmysterious item%w!&Please, take it!\x07\x10\xA3", "\x12\x38\x82\In Ordnung! Du gewinnst! Im Austausch&dafür, dass du mich verschont hast,&werde ich dir einen %gmysteriösen&Gegenstand%w geben! Bitte nimm ihn!\x07\x10\xA3", @@ -4041,7 +4041,7 @@ void CreateScrubMessages() { }); for (u32 price = 5; price <= 95; price += 5) { - customMessageManager->CreateMessage(Randomizer::scrubMessageTableID, price, + customMessageManager->CreateMessage(Randomizer::merchantMessageTableID, price, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM, "\x12\x38\x82\All right! You win! In return for&sparing me, I will sell you a&%gmysterious item%w!&%r" + std::to_string(price) + " Rupees%w it is!\x07\x10\xA3", @@ -4053,7 +4053,7 @@ void CreateScrubMessages() { }); } customMessageManager->CreateMessage( - Randomizer::scrubMessageTableID, TEXT_BEAN_SALESMAN, + Randomizer::merchantMessageTableID, TEXT_BEAN_SALESMAN, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM, @@ -4323,7 +4323,7 @@ void Randomizer::CreateCustomMessages() { "Vous avez un %rPack de&haricots magiques%w ! Trouvez&un endroit convenable pour un&jardin et plantez-les.^Ensuite, attendez quelque&chose d'amusant doit arriver !") }; CreateGetItemMessages(getItemMessages); - CreateScrubMessages(); + CreateMerchantMessages(); CreateRupeeMessages(); CreateNaviRandoMessages(); } diff --git a/soh/soh/Enhancements/randomizer/randomizer.h b/soh/soh/Enhancements/randomizer/randomizer.h index c5df36e2c..8b467a699 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.h +++ b/soh/soh/Enhancements/randomizer/randomizer.h @@ -34,7 +34,7 @@ class Randomizer { static const std::string getItemMessageTableID; static const std::string hintMessageTableID; - static const std::string scrubMessageTableID; + static const std::string merchantMessageTableID; static const std::string rupeeMessageTableID; static const std::string NaviRandoMessageTableID; diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index e55f4d9fa..d6f20e9a4 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1583,7 +1583,7 @@ extern "C" ScrubIdentity Randomizer_IdentifyScrub(s32 sceneNum, s32 actorParams, } extern "C" CustomMessageEntry Randomizer_GetScrubMessage(s16 itemPrice) { - return CustomMessageManager::Instance->RetrieveMessage(Randomizer::scrubMessageTableID, itemPrice); + return CustomMessageManager::Instance->RetrieveMessage(Randomizer::merchantMessageTableID, itemPrice); } extern "C" CustomMessageEntry Randomizer_GetNaviMessage() { @@ -1722,7 +1722,7 @@ extern "C" int CustomMessage_RetrieveIfExists(GlobalContext* globalCtx) { } else if (CVar_GetS32("gRandoRelevantNavi", 1) && textId >= 0x0140 && textId <= 0x015F) { messageEntry = Randomizer_GetNaviMessage(); } else if (Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS) && textId == TEXT_BEAN_SALESMAN) { - messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::scrubMessageTableID, TEXT_BEAN_SALESMAN); + messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::merchantMessageTableID, TEXT_BEAN_SALESMAN); } } if (textId == TEXT_GS_NO_FREEZE || textId == TEXT_GS_FREEZE) { From 4a51ab31872468f0624ac56fad4d9c265e4a29ce Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 25 Aug 2022 20:42:34 -0400 Subject: [PATCH 13/15] Fixes bug where Bean Pack was also granting blue potion --- soh/src/code/z_parameter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index be3bf8253..1c0a2db87 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -2186,6 +2186,7 @@ u16 Randomizer_Item_Give(GlobalContext* globalCtx, GetItemEntry giEntry) { INV_CONTENT(ITEM_BEAN) = ITEM_BEAN; AMMO(ITEM_BEAN) = 10; } + return RG_NONE; } if (item == RG_DOUBLE_DEFENSE) { From 9148fa5aecac359d73df84875e0e93b6fd9208dd Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Thu, 25 Aug 2022 20:48:28 -0400 Subject: [PATCH 14/15] Adds custom particles to Freestanding Bean Pack item. --- soh/soh/Enhancements/randomizer/randomizer.cpp | 2 +- soh/src/code/z_en_item00.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index 4fd2a123d..b3120c3c2 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -4059,7 +4059,7 @@ void CreateMerchantMessages() { TEXTBOX_POS_BOTTOM, "I tried to be a %rmagic bean%w salesman,&but it turns out my marketing skills&weren't worth " "beans!^Anyway, want to buy my&%gmysterious item%w for 60 Rupees?\x1B&%gYes&No%w", - "Möchten Sie einen geheimnisvollen& Gegenstand für 60 Rubine?\x1B&%gJa&Nein%w", + "Möchten Sie einen geheimnisvollen&Gegenstand für 60 Rubine?\x1B&%gJa&Nein%w", "J'ai essayé d'être un vendeur de&%rharicots magiques%w, mais j'étais&mauvais au niveau du marketing et&ça " "me courait sur le haricot...^Enfin bref, ça te dirait de m'acheter un&" "%gobjet mystérieux%w pour 60 Rubis?\x1B&%gOui&Non%w", diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index 89e1c9df7..95375ea48 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -1290,6 +1290,7 @@ void EnItem00_CustomItemsParticles(Actor* Parent, GlobalContext* globalCtx, GetI switch (giEntry.itemId) { case RG_MAGIC_SINGLE: case RG_MAGIC_DOUBLE: + case RG_MAGIC_BEAN_PACK: color_slot = 0; break; case RG_DOUBLE_DEFENSE: From 53531c4481123e448f731f01d5152ac0bd5cf049 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Fri, 26 Aug 2022 01:17:51 -0400 Subject: [PATCH 15/15] Cleanup --- soh/soh/Enhancements/randomizer/randomizer.cpp | 2 +- soh/src/code/z_parameter.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index b3120c3c2..2d7798e20 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -32,7 +32,7 @@ u8 generated; const std::string Randomizer::getItemMessageTableID = "Randomizer"; const std::string Randomizer::hintMessageTableID = "RandomizerHints"; -const std::string Randomizer::merchantMessageTableID = "RandomizerScrubs"; +const std::string Randomizer::merchantMessageTableID = "RandomizerMerchants"; const std::string Randomizer::rupeeMessageTableID = "RandomizerRupees"; const std::string Randomizer::NaviRandoMessageTableID = "RandomizerNavi"; diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index 1c0a2db87..73044df27 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -2182,7 +2182,7 @@ u16 Randomizer_Item_Give(GlobalContext* globalCtx, GetItemEntry giEntry) { } if (item == RG_MAGIC_BEAN_PACK) { - if (gSaveContext.inventory.items[SLOT(ITEM_BEAN)] == ITEM_NONE) { + if (INV_CONTENT(ITEM_BEAN) == ITEM_NONE) { INV_CONTENT(ITEM_BEAN) = ITEM_BEAN; AMMO(ITEM_BEAN) = 10; }