Skip to content

Commit

Permalink
LADX: Open Mabe Option (#3964)
Browse files Browse the repository at this point in the history
* open mabe option
swaps east mabe rocks for bushes

* add open mabe to slot data

* use upstream overworld option
Instead of a standalone option, use upstream's "overworld" option, which we don't use yet but it leaves better space for the future

* use ladxr_setting for consistency

* newline
  • Loading branch information
threeandthreee authored Dec 20, 2024
1 parent 7c8d102 commit e1a1cd1
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 22 deletions.
9 changes: 5 additions & 4 deletions worlds/ladx/LADXR/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,14 @@

from .patches import bank34
from .utils import formatText
from ..Options import TrendyGame, Palette, Warps
from .roomEditor import RoomEditor, Object
from .patches.aesthetics import rgb_to_bin, bin_to_rgb

from .locations.keyLocation import KeyLocation

from BaseClasses import ItemClassification
from ..Locations import LinksAwakeningLocation
from ..Options import TrendyGame, Palette, MusicChangeCondition, BootsControls
from ..Options import TrendyGame, Palette, MusicChangeCondition, Warps

if TYPE_CHECKING:
from .. import LinksAwakeningWorld
Expand Down Expand Up @@ -156,6 +155,8 @@ def generateRom(args, world: "LinksAwakeningWorld"):
if not world.ladxr_settings.rooster:
patches.maptweaks.tweakMap(rom)
patches.maptweaks.tweakBirdKeyRoom(rom)
if world.ladxr_settings.overworld == "openmabe":
patches.maptweaks.openMabe(rom)
patches.chest.fixChests(rom)
patches.shop.fixShop(rom)
patches.rooster.patchRooster(rom)
Expand Down Expand Up @@ -247,7 +248,7 @@ def generateRom(args, world: "LinksAwakeningWorld"):
patches.core.quickswap(rom, 1)
elif world.ladxr_settings.quickswap == 'b':
patches.core.quickswap(rom, 0)

patches.core.addBootsControls(rom, world.options.boots_controls)


Expand Down Expand Up @@ -397,7 +398,7 @@ def gen_hint():
# Then put new text in
for bucket_idx, (orig_idx, data) in enumerate(bucket):
rom.texts[shuffled[bucket_idx][0]] = data


if world.options.trendy_game != TrendyGame.option_normal:

Expand Down
7 changes: 6 additions & 1 deletion worlds/ladx/LADXR/logic/overworld.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@ def __init__(self, options, world_setup, r):
self._addEntrance("moblin_cave", graveyard, moblin_cave, None)

# "Ukuku Prairie"
ukuku_prairie = Location().connect(mabe_village, POWER_BRACELET).connect(graveyard, POWER_BRACELET)
ukuku_prairie = Location()
if options.overworld == "openmabe":
ukuku_prairie.connect(mabe_village, r.bush)
else:
ukuku_prairie.connect(mabe_village, POWER_BRACELET)
ukuku_prairie.connect(graveyard, POWER_BRACELET)
ukuku_prairie.connect(Location().add(TradeSequenceItem(0x07B, TRADING_ITEM_STICK)), TRADING_ITEM_BANANAS)
ukuku_prairie.connect(Location().add(TradeSequenceItem(0x087, TRADING_ITEM_HONEYCOMB)), TRADING_ITEM_STICK)
self._addEntrance("prairie_left_phone", ukuku_prairie, None, None)
Expand Down
9 changes: 9 additions & 0 deletions worlds/ladx/LADXR/patches/maptweaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,12 @@ def tweakBirdKeyRoom(rom):
re.moveObject(2, 5, 3, 6)
re.addEntity(3, 5, 0x9D)
re.store(rom)


def openMabe(rom):
# replaces rocks on east side of Mabe Village with bushes
re = RoomEditor(rom, 0x094)
re.changeObject(5, 1, 0x5C)
re.overlay[5 + 1 * 10] = 0x5C
re.overlay[5 + 2 * 10] = 0x5C
re.store(rom)
2 changes: 1 addition & 1 deletion worlds/ladx/LADXR/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def __init__(self, ap_options):
[Never] you can never steal from the shop."""),
Setting('bowwow', 'Special', 'g', 'Good boy mode', options=[('normal', '', 'Disabled'), ('always', 'a', 'Enabled'), ('swordless', 's', 'Enabled (swordless)')], default='normal',
description='Allows BowWow to be taken into any area, damage bosses and more enemies. If enabled you always start with bowwow. Swordless option removes the swords from the game and requires you to beat the game without a sword and just bowwow.'),
Setting('overworld', 'Special', 'O', 'Overworld', options=[('normal', '', 'Normal'), ('dungeondive', 'D', 'Dungeon dive'), ('nodungeons', 'N', 'No dungeons'), ('random', 'R', 'Randomized')], default='normal',
Setting('overworld', 'Special', 'O', 'Overworld', options=[('normal', '', 'Normal'), ('dungeondive', 'D', 'Dungeon dive'), ('nodungeons', 'N', 'No dungeons'), ('random', 'R', 'Randomized'), ('openmabe', 'M', 'Open Mabe')], default='normal',
description="""
[Dungeon Dive] Create a different overworld where all the dungeons are directly accessible and almost no chests are located in the overworld.
[No dungeons] All dungeons only consist of a boss fight and a instrument reward. Rest of the dungeon is removed.
Expand Down
30 changes: 14 additions & 16 deletions worlds/ladx/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class TextShuffle(DefaultOffToggle):

class Rooster(DefaultOnToggle, LADXROption):
"""
[On] Adds the rooster to the item pool.
[On] Adds the rooster to the item pool.
[Off] The rooster spot is still a check giving an item. But you will never find the rooster. In that case, any rooster spot is accessible without rooster by other means.
"""
display_name = "Rooster"
Expand All @@ -70,7 +70,7 @@ class Boomerang(Choice):
[Gift] The boomerang salesman will give you a random item, and the boomerang is shuffled.
"""
display_name = "Boomerang"

normal = 0
gift = 1
default = gift
Expand Down Expand Up @@ -156,7 +156,7 @@ class ShuffleSmallKeys(DungeonItemShuffle):
[Own Dungeons] The item will be within a dungeon in your world
[Own World] The item will be somewhere in your world
[Any World] The item could be anywhere
[Different World] The item will be somewhere in another world
[Different World] The item will be somewhere in another world
"""
display_name = "Shuffle Small Keys"
ladxr_item = "KEY"
Expand Down Expand Up @@ -223,7 +223,7 @@ class Goal(Choice, LADXROption):
The Goal of the game
[Instruments] The Wind Fish's Egg will only open if you have the required number of Instruments of the Sirens, and play the Ballad of the Wind Fish.
[Seashells] The Egg will open when you bring 20 seashells. The Ballad and Ocarina are not needed.
[Open] The Egg will start pre-opened.
[Open] The Egg will start pre-opened.
"""
display_name = "Goal"
ladxr_name = "goal"
Expand Down Expand Up @@ -313,15 +313,12 @@ class Bowwow(Choice):

class Overworld(Choice, LADXROption):
"""
[Dungeon Dive] Create a different overworld where all the dungeons are directly accessible and almost no chests are located in the overworld.
[Tiny dungeons] All dungeons only consist of a boss fight and a instrument reward. Rest of the dungeon is removed.
[Open Mabe] Replaces rock on the east side of Mabe Village with bushes, allowing access to Ukuku Prairie without Power Bracelet.
"""
display_name = "Overworld"
ladxr_name = "overworld"
option_normal = 0
option_dungeon_dive = 1
option_tiny_dungeons = 2
# option_shuffled = 3
option_open_mabe = 1
default = option_normal


Expand Down Expand Up @@ -472,7 +469,7 @@ def to_ladxr_option(self, all_options):

class Palette(Choice):
"""
Sets the palette for the game.
Sets the palette for the game.
Note: A few places aren't patched, such as the menu and a few color dungeon tiles.
[Normal] The vanilla palette
[1-Bit] One bit of color per channel
Expand Down Expand Up @@ -530,7 +527,6 @@ class InGameHints(DefaultOnToggle):
display_name = "In-game Hints"



class ForeignItemIcons(Choice):
"""
Choose how to display foreign items.
Expand Down Expand Up @@ -562,6 +558,7 @@ class ForeignItemIcons(Choice):
OptionGroup("Miscellaneous", [
TradeQuest,
Rooster,
Overworld,
TrendyGame,
InGameHints,
NagMessages,
Expand Down Expand Up @@ -591,12 +588,12 @@ class ForeignItemIcons(Choice):
@dataclass
class LinksAwakeningOptions(PerGameCommonOptions):
logic: Logic
# 'heartpiece': DefaultOnToggle, # description='Includes heart pieces in the item pool'),
# 'seashells': DefaultOnToggle, # description='Randomizes the secret sea shells hiding in the ground/trees. (chest are always randomized)'),
# 'heartcontainers': DefaultOnToggle, # description='Includes boss heart container drops in the item pool'),
# 'instruments': DefaultOffToggle, # description='Instruments are placed on random locations, dungeon goal will just contain a random item.'),
# 'heartpiece': DefaultOnToggle, # description='Includes heart pieces in the item pool'),
# 'seashells': DefaultOnToggle, # description='Randomizes the secret sea shells hiding in the ground/trees. (chest are always randomized)'),
# 'heartcontainers': DefaultOnToggle, # description='Includes boss heart container drops in the item pool'),
# 'instruments': DefaultOffToggle, # description='Instruments are placed on random locations, dungeon goal will just contain a random item.'),
tradequest: TradeQuest # description='Trade quest items are randomized, each NPC takes its normal trade quest item, but gives a random item'),
# 'witch': DefaultOnToggle, # description='Adds both the toadstool and the reward for giving the toadstool to the witch to the item pool'),
# 'witch': DefaultOnToggle, # description='Adds both the toadstool and the reward for giving the toadstool to the witch to the item pool'),
rooster: Rooster # description='Adds the rooster to the item pool. Without this option, the rooster spot is still a check giving an item. But you will never find the rooster. Any rooster spot is accessible without rooster by other means.'),
# 'boomerang': Boomerang,
# 'randomstartlocation': DefaultOffToggle, # 'Randomize where your starting house is located'),
Expand Down Expand Up @@ -633,6 +630,7 @@ class LinksAwakeningOptions(PerGameCommonOptions):
text_mode: TextMode
no_flash: NoFlash
in_game_hints: InGameHints
overworld: Overworld

warp_improvements: Removed
additional_warp_points: Removed
1 change: 1 addition & 0 deletions worlds/ladx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ def fill_slot_data(self):
"shuffle_instruments",
"nag_messages",
"hard_mode",
"overworld",
]

# use the default behaviour to grab options
Expand Down

0 comments on commit e1a1cd1

Please sign in to comment.