-
Notifications
You must be signed in to change notification settings - Fork 703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Super Mario land 2: implement new game #2730
Open
Alchav
wants to merge
135
commits into
ArchipelagoMW:main
Choose a base branch
from
Alchav:mario-land-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 27 commits
Commits
Show all changes
135 commits
Select commit
Hold shift + click to select a range
63cf1e1
Super Mario Land 2!
Alchav 08b27a4
Bring in features from SML2R
Alchav df5b3e1
Many things
Alchav f76215e
Auto scroll option fixes
Alchav 0453a15
Vanilla coins built into rom
Alchav d3d651e
Bosses location name group
Alchav 42b4150
Add host.yaml settings for rom name
Alchav e97633c
Auto Scroll Trap
Alchav bb2622a
Exclude Level 10 from auto scroll
Alchav d280a3f
Mario Land 2 second release
Alchav e7057d5
Golden Coins Required option and midway bells protection
Alchav 6361e95
Open World, third release
Alchav 8830077
Super Mario Land 2 version 4 release
Alchav 32a3ea2
Super Mario Land 2 version 5 release
Alchav c020676
Docs and finishing touches
Alchav 5b5d7a0
Fix Hippo Zone
Alchav 8b55b53
Pipe Traversal
Alchav 1d6ce1a
EnergyLink
Alchav 7bc39b1
Fix EnergyLink hopefully
Alchav 9adf476
Fix Tree Zone 2 midway bell item
Alchav 450e758
Version 9 release: shuffle secret exits
Alchav 0df91e6
SML2R Sprite Randomizer fix
Alchav 0e6475a
Fix Pumpkin Zone secret levels
Alchav 09d6461
Update SML2 Docs
Alchav 7d0e9a9
Special Thanks
Alchav 4ea35a4
Fix Macro Zone 1 Secret Exit
Alchav 07a5b82
SML2 finishing touches
Alchav f94da4c
Update worlds/marioland2/docs/en_Super Mario Land 2.md
Alchav c63cba9
Update worlds/marioland2/docs/setup_en.md
Alchav 46900e0
Update worlds/marioland2/docs/setup_en.md
Alchav e648a74
Update readme and codeowners
Alchav 2a1e7be
Merge remote-tracking branch 'origin/mario-land-2' into mario-land-2
Alchav 6076bbf
Python 3.8 compatibility fix
Alchav 33b197e
Pumpkin Zone 2 secret exit fix
Alchav 3c542e3
Fix client bug when energy link disabled
Alchav 9b8f1ce
Add SML2 description
Alchav ce26609
Merge branch 'main' into mario-land-2
Alchav 7185952
remove backwards compatibility energy link test
Alchav cf0417a
remove unnecessary logic
Alchav 22b80a4
Merge remote-tracking branch 'origin/mario-land-2' into mario-land-2
Alchav ce6bb78
Merge branch 'main' into mario-land-2
Alchav 9318b71
Options dataclass
Alchav 8ee62b5
Merge branch 'main' into mario-land-2
Alchav d9e261b
Coinsanity!
Alchav 195c93a
Re-order options
Alchav 3d87fc0
Random coinsanity checks instead of exact divisions
Alchav d6815ea
Rename Coinsanity to Shuffle Golden Coins
Alchav a4c78d6
Item Name Group fix
Alchav 2882669
Location Name Group fix
Alchav a72bd17
Auto Scroll Mode
Alchav 732dc12
Macro Zone 1 logic
Alchav d1ff939
Move space zone 2 boss logic to logic file
Alchav 7c7c406
Write second auto scroll table if not trapped
Alchav bb1284d
Add item name groups
Alchav 2444096
Rename options and fix up some things
Alchav c512b5c
Traps or Cancel Items
Alchav 21edc9f
Adjust Mushroom Zone logic
Alchav 0d94b12
Merge branch 'main' into mario-land-2-coinsanity
Alchav a1ec2cd
Begin sprite randomizer rewrite
Alchav 354accd
Randomize platforms
Alchav d21f710
Mario's Castle Midway Bell
Alchav 8c6e31c
Chaos auto scroll option
Alchav 457c44d
Code cleanup
Alchav b818846
Sprite Randomizer fixes
Alchav 7260d22
Space Zone Secret Course coin logic function name fix
Alchav cdee96d
1 Coin locations logic fix
Alchav a40ecca
Swim renamed to Water Physics
Alchav 946ffd5
Merge branch 'mario-land-2-coinsanity' into mario-land-2
Alchav 0049db8
Merge branch 'main' into mario-land-2
Alchav 7bf1c3d
Update worlds/marioland2/docs/setup_en.md
Alchav df92408
Update worlds/marioland2/docs/setup_en.md
Alchav 3b4bc52
Update worlds/marioland2/options.py
Alchav 3e31f93
Remove hard logic comment
Alchav 2402e26
Merge remote-tracking branch 'origin/mario-land-2' into mario-land-2
Alchav e295011
Check randomize enemies/platform options
Alchav cde24f6
Logic updates
Alchav 3f5f25a
Turtle Zone 2 coin logic adjustment
Alchav 4981e0d
Merge branch 'main' into mario-land-2
Alchav 0824b53
Remove BizHawkClientContext import
Alchav 7d7a577
Can't reach some coins without water physics if you are small
Alchav 1e4ad7f
Fix item name mistakes
Alchav c42b746
Merge branch 'mario-land-2-coinsanity' into mario-land-2
Alchav ff896ad
Update worlds/marioland2/options.py
Alchav 3f83955
Update README.md
Alchav a668a23
Update worlds/marioland2/docs/en_Super Mario Land 2.md
Alchav 380418c
Update worlds/marioland2/options.py
Alchav fbf5f19
Update worlds/marioland2/options.py
Alchav d0d51bb
Reformat docstrings
Alchav 0620ca5
Reformat Location Rules
Alchav 8ef9388
Further fix Turtle Zone 2 logic
Alchav e4261dd
Macro Zone 3 Midway Bell coin logic
b363b69
Update worlds/marioland2/docs/en_Super Mario Land 2.md
Alchav 7702088
Merge branch 'main' into mario-land-2
Alchav 8b0f92d
Merge branch 'refs/heads/main' into mario-land-2
973f614
Fix Tree Zone 4 coin logic
6cdfd80
Move all location access rule logic to logic.py
3394101
Merge remote-tracking branch 'origin/mario-land-2' into mario-land-2
877b0b9
Double Quotes
e7d4e5a
Locations -> Full
d3cceca
More Locations -> Full
b70dbdf
use has_from_list_unique
Alchav bc558d7
use self.player_name
Alchav e8c5f8a
More self.player_name
d53431c
Merge remote-tracking branch 'origin/mario-land-2' into mario-land-2
6691a3c
Merge branch 'main' into mario-land-2
Alchav 859f3bc
Fix unbeatable scroll levels not being forced cancellable on chaos
e71c226
Merge remote-tracking branch 'origin/mario-land-2' into mario-land-2
aae1b28
Update auto_scroll_max
f7c3a8c
Update worlds/marioland2/logic.py
Alchav 7fabe1c
Fix Space Zone 1 coin logic
52fea1f
Fix non-coin rule function name generation
da43bda
Tree zone 4 exit rewrite
Alchav 4c53035
Update worlds/marioland2/logic.py
Alchav 2892855
Logic fixes
7c39ea9
Merge remote-tracking branch 'origin/mario-land-2' into mario-land-2
c27f5be
Pumpkin Zone Secret Course 1 return false
c1504c7
Macro Zone 2 return false
7d5a682
Update worlds/marioland2/__init__.py
Alchav 94e58b2
Update worlds/marioland2/__init__.py
Alchav 010c96a
Update worlds/marioland2/logic.py
Alchav da3a7c5
Update worlds/marioland2/logic.py
Alchav 2e6226f
Update worlds/marioland2/logic.py
Alchav 6126df2
Cleanup
d9914fe
Merge remote-tracking branch 'origin/mario-land-2' into mario-land-2
5519685
increase number of filler coin items
47a3ee3
Adjust Mario Zone 3 auto scroll max
34676d2
ItemsAccessibility
bafe770
Corrections to Mario Zone 4 logic and Pumpkin Zone 1 auto scroll max
d1f136b
Pumpkin Zone 1 unbeatable with Midway Bells unshuffled
89fb55c
Merge branch 'refs/heads/main' into mario-land-2
74c6e9f
SML2: whole lotta coin items
9ca800e
Start at ID 1
f9d8f3d
Merge branch 'refs/heads/main' into mario-land-2
fc5af14
Merge branch 'main' into mario-land-2
Alchav 6c2b4e5
fix merge conflict mistake
Alchav File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022-2023 Alex "Alchav" Avery | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
import base64 | ||
import logging | ||
|
||
from NetUtils import ClientStatus | ||
from worlds._bizhawk.client import BizHawkClient, BizHawkClientContext | ||
from worlds._bizhawk import read, write, guarded_write | ||
|
||
from .rom_addresses import rom_addresses | ||
|
||
logger = logging.getLogger("Client") | ||
|
||
BANK_EXCHANGE_RATE = 20000000000 | ||
|
||
|
||
class MarioLand2Client(BizHawkClient): | ||
system = ("GB", "SGB") | ||
patch_suffix = ".apsml2" | ||
game = "Super Mario Land 2" | ||
|
||
def __init__(self): | ||
super().__init__() | ||
self.locations_array = [] | ||
|
||
async def validate_rom(self, ctx): | ||
game_name = await read(ctx.bizhawk_ctx, [(0x134, 10, "ROM")]) | ||
game_name = game_name[0].decode("ascii") | ||
if game_name == "MARIOLAND2": | ||
ctx.game = self.game | ||
ctx.items_handling = 0b111 | ||
return True | ||
return False | ||
|
||
async def set_auth(self, ctx): | ||
auth_name = await read(ctx.bizhawk_ctx, [(0x77777, 21, "ROM")]) | ||
auth_name = base64.b64encode(auth_name[0]).decode() | ||
ctx.auth = auth_name | ||
|
||
async def game_watcher(self, ctx: BizHawkClientContext): | ||
from . import START_IDS | ||
from .items import items | ||
from .locations import locations | ||
|
||
(game_loaded_check, level_data, music, auto_scroll_enabled, auto_scroll_levels, current_level, midway_point, | ||
bcd_lives) = \ | ||
await read(ctx.bizhawk_ctx, [(0x0046, 10, "CartRAM"), (0x0848, 42, "CartRAM"), (0x0469, 1, "CartRAM"), | ||
(rom_addresses["Auto_Scroll_Disable"], 1, "ROM"), | ||
(rom_addresses["Auto_Scroll_Levels"], 32, "ROM"), | ||
(0x0269, 1, "CartRAM"), | ||
(0x02A0, 1, "CartRAM"), | ||
(0x022C, 1, "CartRAM")]) | ||
|
||
current_level = int.from_bytes(current_level) | ||
midway_point = int.from_bytes(midway_point) | ||
music = int.from_bytes(music) | ||
auto_scroll_enabled = int.from_bytes(auto_scroll_enabled) | ||
level_data = list(level_data) | ||
lives = bcd_lives.hex() | ||
|
||
# there is no music in the title screen demos, this is how we guard against anything in the demos registering. | ||
if game_loaded_check != b'\x124Vx\xff\xff\xff\xff\xff\xff' or music == 0: | ||
return | ||
|
||
items_received = [list(items.keys())[item.item - START_IDS] for item in ctx.items_received] | ||
|
||
level_progression = { | ||
"Space Zone Progression", | ||
"Tree Zone Progression", | ||
"Macro Zone Progression", | ||
"Pumpkin Zone Progression", | ||
"Mario Zone Progression", | ||
"Turtle Zone Progression", | ||
} | ||
for level_item in level_progression: | ||
for _ in range(items_received.count(level_item + " x2")): | ||
items_received += ([level_item] * 2) | ||
|
||
if "Pipe Traversal" in items_received: | ||
items_received += ["Pipe Traversal - Left", "Pipe Traversal - Right", | ||
"Pipe Traversal - Up", "Pipe Traversal - Down"] | ||
|
||
locations_checked = [] | ||
modified_level_data = level_data.copy() | ||
for ID, (location, data) in enumerate(locations.items(), START_IDS): | ||
if "clear_condition" in data: | ||
if items_received.count(data["clear_condition"][0]) >= data["clear_condition"][1]: | ||
modified_level_data[data["ram_index"]] |= (0x08 if data["type"] == "bell" | ||
else 0x01 if data["type"] == "secret" else 0x80) | ||
|
||
if data["type"] == "level" and level_data[data["ram_index"]] & 0x40: | ||
locations_checked.append(ID) | ||
if data["type"] == "secret" and level_data[data["ram_index"]] & 0x02: | ||
locations_checked.append(ID) | ||
elif data["type"] == "bell" and data["id"] == current_level and midway_point == 0xFF: | ||
locations_checked.append(ID) | ||
|
||
if ctx.slot_data: | ||
total_stars = ctx.slot_data["stars"] | ||
else: | ||
total_stars = 5 | ||
|
||
invincibility_length = int((832.0 / (total_stars + 1)) | ||
* (items_received.count("Super Star Duration Increase") + 1)) | ||
|
||
if "Easy Mode" in items_received: | ||
difficulty_mode = 1 | ||
elif "Normal Mode" in items_received: | ||
difficulty_mode = 0 | ||
elif ctx.slot_data: | ||
difficulty_mode = ctx.slot_data["mode"] & 1 | ||
else: | ||
difficulty_mode = 0 | ||
|
||
new_lives = int(lives) | ||
energy_link_add = None | ||
# TODO: temporary check to ensure energy_link key for backwards compatibility | ||
if ctx.slot_data and "energy_link" in ctx.slot_data and ctx.slot_data["energy_link"]: | ||
if new_lives == 0: | ||
if (f"EnergyLink{ctx.team}" in ctx.stored_data | ||
and ctx.stored_data[f"EnergyLink{ctx.team}"] | ||
and ctx.stored_data[f"EnergyLink{ctx.team}"] >= BANK_EXCHANGE_RATE): | ||
new_lives = 1 | ||
energy_link_add = -BANK_EXCHANGE_RATE | ||
elif new_lives > 1: | ||
energy_link_add = BANK_EXCHANGE_RATE * (new_lives - 1) | ||
new_lives = 1 | ||
# convert back to binary-coded-decimal | ||
new_lives = int(str(new_lives), 16) | ||
|
||
data_writes = [ | ||
(rom_addresses["Space_Physics"], [0x7e] if "Space Physics" in items_received else [0xaf], "ROM"), | ||
(rom_addresses["Get_Hurt_To_Big_Mario"], [1] if "Mushroom" in items_received else [0], "ROM"), | ||
(rom_addresses["Get_Mushroom_A"], [0xea, 0x16, 0xa2] if "Mushroom" in items_received else [0, 0, 0], "ROM"), | ||
(rom_addresses["Get_Mushroom_B"], [0xea, 0x16, 0xa2] if "Mushroom" in items_received else [0, 0, 0], "ROM"), | ||
(rom_addresses["Get_Mushroom_C"], [00] if "Mushroom" in items_received else [0xd8], "ROM"), | ||
(rom_addresses["Get_Carrot_A"], [0xea, 0x16, 0xa2] if "Carrot" in items_received else [0, 0, 0], "ROM"), | ||
(rom_addresses["Get_Carrot_B"], [0xea, 0x16, 0xa2] if "Carrot" in items_received else [0, 0, 0], "ROM"), | ||
(rom_addresses["Get_Carrot_C"], [00] if "Carrot" in items_received else [0xc8], "ROM"), | ||
(rom_addresses["Get_Fire_Flower_A"], [0xea, 0x16, 0xa2] if "Fire Flower" in items_received else [0, 0, 0], "ROM"), | ||
(rom_addresses["Get_Fire_Flower_B"], [0xea, 0x16, 0xa2] if "Fire Flower" in items_received else [0, 0, 0], "ROM"), | ||
(rom_addresses["Get_Fire_Flower_C"], [00] if "Fire Flower" in items_received else [0xc8], "ROM"), | ||
(rom_addresses["Invincibility_Star_A"], [(invincibility_length >> 8) + 1], "ROM"), | ||
(rom_addresses["Invincibility_Star_B"], [invincibility_length & 0xFF], "ROM"), | ||
(rom_addresses["Enable_Bubble"], [0xcb, 0xd7] if "Hippo Bubble" in items_received else [0, 0], "ROM"), | ||
(rom_addresses["Enable_Swim"], [0xcb, 0xcf] if "Swim" in items_received else [0, 0], "ROM"), | ||
(rom_addresses["Pipe_Traversal_A"], [16] if "Pipe Traversal - Down" in items_received else [0], "ROM"), | ||
(rom_addresses["Pipe_Traversal_B"], [32] if "Pipe Traversal - Up" in items_received else [10], "ROM"), | ||
(rom_addresses["Pipe_Traversal_C"], [48] if "Pipe Traversal - Right" in items_received else [0], "ROM"), | ||
(rom_addresses["Pipe_Traversal_D"], [64] if "Pipe Traversal - Left" in items_received else [0], "ROM"), | ||
(rom_addresses["Pipe_Traversal_SFX_A"], [5] if "Pipe Traversal - Down" in items_received else [0], "ROM"), | ||
(rom_addresses["Pipe_Traversal_SFX_B"], [5] if "Pipe Traversal - Up" in items_received else [0], "ROM"), | ||
(rom_addresses["Pipe_Traversal_SFX_C"], [5] if "Pipe Traversal - Right" in items_received else [0], "ROM"), | ||
(rom_addresses["Pipe_Traversal_SFX_D"], [5] if "Pipe Traversal - Left" in items_received else [0], "ROM"), | ||
(0x022c, [new_lives], "CartRAM"), | ||
(0x02E4, [difficulty_mode], "CartRAM"), | ||
(0x0848, modified_level_data, "CartRAM") | ||
] | ||
|
||
if midway_point == 0xFF and ctx.slot_data and ctx.slot_data["midway_bells"]: | ||
# after registering the check for the midway bell, clear the value just for safety. | ||
data_writes.append((0x02A0, [0], "CartRAM")) | ||
|
||
if "Auto Scroll" in items_received: | ||
if auto_scroll_enabled == 0xaf: # auto scroll has not yet been enabled | ||
data_writes.append((rom_addresses["Auto_Scroll_Disable"], [0x7e], "ROM")) | ||
# if the current level is an auto scroll level, turn on auto scrolling now | ||
if auto_scroll_levels[current_level] == 1: | ||
data_writes.append((0x02C8, [0x01], "CartRAM")) | ||
|
||
success = await guarded_write(ctx.bizhawk_ctx, data_writes, [(0x0848, level_data, "CartRAM"), | ||
(0x022C, [int.from_bytes(bcd_lives)], "CartRAM")]) | ||
|
||
if success and energy_link_add is not None: | ||
await ctx.send_msgs([{ | ||
"cmd": "Set", "key": f"EnergyLink{ctx.team}", "operations": | ||
[{"operation": "add", "value": energy_link_add}, | ||
{"operation": "max", "value": 0}], | ||
}]) | ||
|
||
if not ctx.server or not ctx.server.socket.open or ctx.server.socket.closed: | ||
return | ||
|
||
if locations_checked and locations_checked != self.locations_array: | ||
self.locations_array = locations_checked | ||
await ctx.send_msgs([{"cmd": "LocationChecks", "locations": locations_checked}]) | ||
|
||
if music == 0x18: | ||
await ctx.send_msgs([{"cmd": "StatusUpdate", "status": ClientStatus.CLIENT_GOAL}]) | ||
ctx.finished_game = True | ||
|
||
def on_package(self, ctx: BizHawkClientContext, cmd: str, args: dict): | ||
super().on_package(ctx, cmd, args) | ||
if cmd == 'Connected': | ||
ctx.set_notify(f"EnergyLink{ctx.team}") | ||
if ctx.slot_data and "energy_link" in ctx.slot_data and ctx.slot_data["energy_link"] and ctx.ui: | ||
ctx.ui.enable_energy_link() | ||
ctx.ui.energy_link_label.text = "Lives: Standby" | ||
elif cmd == "SetReply" and args["key"].startswith("EnergyLink"): | ||
if ctx.ui: | ||
ctx.ui.energy_link_label.text = f"Lives: {int(args['value'] / BANK_EXCHANGE_RATE)}" | ||
elif cmd == "Retrieved": | ||
if f"EnergyLink{ctx.team}" in args["keys"] and args['keys'][f'EnergyLink{ctx.team}'] and ctx.ui: | ||
ctx.ui.energy_link_label.text = f"Lives: {int(args['keys'][f'EnergyLink{ctx.team}'] / BANK_EXCHANGE_RATE)}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Super Mario Land 2: 6 Golden Coins | ||
|
||
## Where is the settings page? | ||
|
||
The [player settings page for this game](../player-settings) contains all the options you need to configure and export a | ||
config file. | ||
Alchav marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## What items and locations get shuffled? | ||
|
||
Completing a level's exits results in a location check instead of automatically bringing you to the next level. | ||
Where there are secret exits, the secret exit will be a separate location check. There is one exception, Hippo Zone, | ||
that does not have a separate check for its secret exit. The Hippo Zone secret exit will still bring you to the Space | ||
Zone. | ||
|
||
Unlocking paths to new levels requires finding or receiving Zone Progression items. For example, receiving the first | ||
"Turtle Zone Progression" will unlock the path from Turtle Zone 1 to Turtle Zone 2. Paths to secret levels are separate | ||
items, so Turtle Zone Secret will open the path from Turtle Zone 2 to the Turtle Zone Secret Course. | ||
|
||
Mario Zone, Pumpkin Zone, Tree Zone, and Macro Zone each have one "Zone Progression x2" item that opens two paths at | ||
once. | ||
|
||
The path from Tree Zone 2 to the branch to Tree Zone 3 and 4 is one unlock, so both levels will open at this point. | ||
|
||
Besides the zone progression unlocks, the following items are always shuffled: | ||
- Mushroom: required to become Big Mario. If you are Fire or Bunny Mario and take damage, and have not obtained the | ||
Mushroom, you will drop straight down to Small Mario. | ||
- Fire Flower: required to become Fire Mario. | ||
- Carrot: required to become Bunny Mario. | ||
- Swim: Mario will fall through water as though it is air until this is obtained. | ||
- Hippo Bubble: required to use the bubbles in Hippo Zone to fly. | ||
- Space Physics: the Space Zone levels will have normal gravity until this is obtained. | ||
- Super Star Duration Increase: you begin with a drastically lowered invincibility star duration, and these items will | ||
increase it. This is the main filler item and the number of them appearing in the item pool depends on your settings. | ||
|
||
Additionally, the following items can be shuffled depending on your YAML settings: | ||
Alchav marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- The 6 Golden Coins: note that the game will still show you the coin being sent to the castle when defeating a boss | ||
regardless of whether the coin is actually obtained in that location. | ||
- Midway Bells: ringing bells results in a location check, and the midway check points are shuffled as items. | ||
Note that you may have to backtrack from the midway point to reach some secret exits! | ||
- Normal Mode/Easy Mode: you can start the game in Normal Mode with an Easy Mode "upgrade" in the item pool, or start in | ||
Easy Mode with a Normal Mode "trap" item, swapping the difficulty. | ||
- Auto Scroll: auto-scrolling levels can be set to not auto scroll until this trap item is received. | ||
- Pipe Traversal: required to enter pipes. Can also be split into 4 items, each enabling pipe entry from a different | ||
direction. | ||
|
||
|
||
## When the player receives an item, what happens? | ||
|
||
There is no in-game indication that an item has been received. You will need to watch the client to be sure you're aware | ||
of the items you've received. | ||
|
||
## Special Thanks to: | ||
|
||
- [froggestspirit](https://github.com/froggestspirit) for his Super Mario Land 2 disassembly. While very incomplete, it | ||
had enough memory values mapped out to make my work significantly easier. | ||
- [slashinfty](https://github.com/slashinfty), the author of the | ||
[Super Mario Land 2 Randomizer](https://sml2r.download/) for permitting me to port features such as Randomize Enemies | ||
and Randomize Platforms directly from it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Setup Guide for Super Mario Land 2: 6 Golden Coins | ||
|
||
## Important | ||
|
||
As we are using BizHawk, this guide is only applicable to Windows and Linux systems. | ||
|
||
## Required Software | ||
|
||
- BizHawk: [BizHawk Releases from TASVideos](https://tasvideos.org/BizHawk/ReleaseHistory) | ||
- Version 2.9.1 is recommended. | ||
- Detailed installation instructions for BizHawk can be found at the above link. | ||
- Windows users must run the prereq installer first, which can also be found at the above link. | ||
- The built-in Archipelago client, which can be installed [here](https://github.com/ArchipelagoMW/Archipelago/releases) | ||
- A Super Mario Land 2: 6 Golden Coins version 1.0 ROM file. The Archipelago community cannot provide this. | ||
|
||
## Configuring BizHawk | ||
|
||
Once BizHawk has been installed, open EmuHawk and change the following settings: | ||
|
||
- Under Config > Customize > Advanced, make sure the box for AutoSaveRAM is checked, and click the 5s button. | ||
This reduces the possibility of losing save data in emulator crashes. | ||
- Under Config > Customize, check the "Run in background" box. This will prevent disconnecting from the client while | ||
EmuHawk is running in the background. | ||
|
||
It is strongly recommended to associate GB rom extensions (\*.gb) to the EmuHawk we've just installed. | ||
Alchav marked this conversation as resolved.
Show resolved
Hide resolved
|
||
To do so, we simply have to search any Gameboy rom we happened to own, right click and select "Open with...", unfold | ||
Alchav marked this conversation as resolved.
Show resolved
Hide resolved
|
||
the list that appears and select the bottom option "Look for another application", then browse to the BizHawk folder | ||
and select EmuHawk.exe. | ||
|
||
## Configuring your YAML file | ||
|
||
### What is a YAML file and why do I need one? | ||
|
||
Your YAML file contains a set of configuration options which provide the generator with information about how it should | ||
generate your game. Each player of a multiworld will provide their own YAML file. This setup allows each player to enjoy | ||
an experience customized for their taste, and different players in the same multiworld can all have different options. | ||
|
||
### Where do I get a YAML file? | ||
|
||
You can generate a yaml or download a template by visiting the [Super Mario Land 2 Player Settings Page](/games/Super%20Mario%20Land%202/player-settings) | ||
Alchav marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Joining a MultiWorld Game | ||
|
||
### Generating and Patching a Game | ||
|
||
1. Create your settings file (YAML). | ||
Alchav marked this conversation as resolved.
Show resolved
Hide resolved
|
||
2. Follow the general Archipelago instructions for [generating a game](../../Archipelago/setup/en#generating-a-game). | ||
This will generate an output file for you. Your patch file will have a `.apsml2` file extension. | ||
3. Open `ArchipelagoLauncher.exe` | ||
4. Select "Open Patch" on the left side and select your patch file. | ||
5. If this is your first time patching, you will be prompted to locate your vanilla ROM. | ||
6. A patched `.gb` file will be created in the same place as the patch file. | ||
7. On your first time opening a patch with BizHawk Client, you will also be asked to locate `EmuHawk.exe` in your | ||
BizHawk install. | ||
|
||
You must connect Super Mario Land 2 to a server, even for a single player game, or progress cannot be made. | ||
|
||
### Connect to the Multiserver | ||
|
||
By default, opening a patch file will do steps 1-5 below for you automatically. Even so, keep them in your memory just | ||
in case you have to close and reopen a window mid-game for some reason. | ||
|
||
1. Super Mario Land 2 uses Archipelago's BizHawk Client. If the client isn't still open from when you patched your | ||
game, you can re-open it from the launcher. | ||
2. Ensure EmuHawk is running the patched ROM. | ||
3. In EmuHawk, go to `Tools > Lua Console`. This window must stay open while playing. | ||
4. In the Lua Console window, go to `Script > Open Script…`. | ||
5. Navigate to your Archipelago install folder and open `data/lua/connector_bizhawk_generic.lua`. | ||
6. The emulator may freeze every few seconds until it manages to connect to the client. This is expected. The BizHawk | ||
Client window should indicate that it connected and recognized Super Mario Land 2. | ||
7. To connect the client to the server, enter your room's address and port (e.g. `archipelago.gg:38281`) into the | ||
top text field of the client and click Connect. | ||
|
||
To connect the client to the multiserver simply put `<address>:<port>` on the textfield on top and press enter (if the | ||
server uses password, type in the bottom textfield `/connect <address>:<port> [password]`) | ||
Comment on lines
+74
to
+75
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Examples of these would be helpful, since it comes up a lot |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of the spacing in this file is inconsistent and difficult to read properly, fixing it would be helpful