Skip to content

Commit

Permalink
THE BIG ONE (TM):
Browse files Browse the repository at this point in the history
In Locations: Reworked name conventions.
In init: Added settings to specify ISO input path and added generate_output to (hopefully) patch the ISO using py_randomprime.
Created config which provides the settings needed to patch the ISO.
  • Loading branch information
Electro1512 committed May 13, 2024
1 parent ef5f272 commit d1a11b6
Show file tree
Hide file tree
Showing 4 changed files with 1,929 additions and 102 deletions.
2 changes: 1 addition & 1 deletion .run/Archipelago Unittests.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Archipelago Unittests" type="tests" factoryName="Unittests">
<module name="Archipelago" />
<module name="Archipelago-MetroidPrime" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SDK_HOME" value="" />
Expand Down
200 changes: 100 additions & 100 deletions worlds/metroidprime/Locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,118 +7,118 @@ class MetroidPrimeLocation(Location):


chozo_location_table = {
'CR Main Plaza - Half-Pipe': 5031100,
'CR Main Plaza - Grapple Ledge': 5031101,
'CR Main Plaza - Tree': 5031102,
'CR Main Plaza - Locked Door': 5031103,
'CR Ruined Fountain': 5031104,
'CR Ruined Shrine - Plated Beetle': 5031105,
'CR Ruined Shrine - Half-Pipe': 5031106,
'CR Ruined Shrine - Lower Tunnel': 5031107,
'CR Vault': 5031108,
'CR Training Chamber': 5031109,
'CR Ruined Nursery': 5031110,
'CR Training Chamber Access': 5031111,
'CR Magma Pool': 5031112,
'CR Tower of Light': 5031113,
'CR Tower Chamber': 5031114,
'CR Ruined Gallery - Missile Wall': 5031115,
'CR Ruined Gallery - Tunnel': 5031116,
'CR Transport Access North': 5031117,
'CR Gathering Hall': 5031118,
'CR Hive Totem': 5031119,
'CR Sunchamber - Flaaghra': 5031120,
'CR Sunchamber - Ghosts': 5031121,
'CR Watery Hall Access': 5031122,
'CR Watery Hall - Scan Puzzle': 5031123,
'CR Watery Hall - Underwater': 5031124,
'CR Dynamo - Lower': 5031125,
'CR Dynamo - Spider Track': 5031126,
'CR Burn Dome - Missile': 5031127,
'CR Burn Dome - Incinerator Drone': 5031128,
'CR Furnace - Spider Tracks': 5031129,
'CR Furnace - Inside Furnace': 5031130,
'CR Hall of the Elders': 5031131,
'CR Crossway': 5031132,
'CR Elder Chamber': 5031133,
'CR Antechamber': 5031134
'Chozo Ruins: Main Plaza - Half-Pipe': 5031100,
'Chozo Ruins: Main Plaza - Grapple Ledge': 5031101,
'Chozo Ruins: Main Plaza - Tree': 5031102,
'Chozo Ruins: Main Plaza - Locked Door': 5031103,
'Chozo Ruins: Ruined Fountain': 5031104,
'Chozo Ruins: Ruined Shrine - Plated Beetle': 5031105,
'Chozo Ruins: Ruined Shrine - Half-Pipe': 5031106,
'Chozo Ruins: Ruined Shrine - Lower Tunnel': 5031107,
'Chozo Ruins: Vault': 5031108,
'Chozo Ruins: Training Chamber': 5031109,
'Chozo Ruins: Ruined Nursery': 5031110,
'Chozo Ruins: Training Chamber Access': 5031111,
'Chozo Ruins: Magma Pool': 5031112,
'Chozo Ruins: Tower of Light': 5031113,
'Chozo Ruins: Tower Chamber': 5031114,
'Chozo Ruins: Ruined Gallery - Missile Wall': 5031115,
'Chozo Ruins: Ruined Gallery - Tunnel': 5031116,
'Chozo Ruins: Transport Access North': 5031117,
'Chozo Ruins: Gathering Hall': 5031118,
'Chozo Ruins: Hive Totem': 5031119,
'Chozo Ruins: Sunchamber - Flaaghra': 5031120,
'Chozo Ruins: Sunchamber - Ghosts': 5031121,
'Chozo Ruins: Watery Hall Access': 5031122,
'Chozo Ruins: Watery Hall - Scan Puzzle': 5031123,
'Chozo Ruins: Watery Hall - Underwater': 5031124,
'Chozo Ruins: Dynamo - Lower': 5031125,
'Chozo Ruins: Dynamo - Spider Track': 5031126,
'Chozo Ruins: Burn Dome - Missile': 5031127,
'Chozo Ruins: Burn Dome - Incinerator Drone': 5031128,
'Chozo Ruins: Furnace - Spider Tracks': 5031129,
'Chozo Ruins: Furnace - Inside Furnace': 5031130,
'Chozo Ruins: Hall of the Elders': 5031131,
'Chozo Ruins: Crossway': 5031132,
'Chozo Ruins: Elder Chamber': 5031133,
'Chozo Ruins: Antechamber': 5031134
}

phen_location_table = {
'PD Phendrana Shorelines - Behind Ice': 5031135,
'PD Phendrana Shorelines - Spider Track': 5031136,
'PD Chozo Ice Temple': 5031137,
'PD Ice Ruins West': 5031138,
'PD Ice Ruins East - Behind Ice': 5031139,
'PD Ice Ruins East - Spider Track': 5031140,
'PD Chapel of the Elders': 5031141,
'PD Ruined Courtyard': 5031142,
'PD Phendrana Canyon': 5031143,
'PD Quarantine Cave': 5031144,
'PD Research Lab Hydra': 5031145,
'PD Quarantine Monitor': 5031146,
'PD Observatory': 5031147,
'PD Transport Access': 5031148,
'PD Control Tower': 5031149,
'PD Research Core': 5031150,
'PD Frost Cave': 5031151,
'PD Research Lab Aether - Tank': 5031152,
'PD Research Lab Aether - Morph Track': 5031153,
'PD Gravity Chamber - Underwater': 5031154,
'PD Gravity Chamber - Grapple Ledge': 5031155,
'PD Storage Cave': 5031156,
'PD Security Cave': 5031157
'Phendrana Drifts: Phendrana Shorelines - Behind Ice': 5031135,
'Phendrana Drifts: Phendrana Shorelines - Spider Track': 5031136,
'Phendrana Drifts: Chozo Ice Temple': 5031137,
'Phendrana Drifts: Ice Ruins West': 5031138,
'Phendrana Drifts: Ice Ruins East - Behind Ice': 5031139,
'Phendrana Drifts: Ice Ruins East - Spider Track': 5031140,
'Phendrana Drifts: Chapel of the Elders': 5031141,
'Phendrana Drifts: Ruined Courtyard': 5031142,
'Phendrana Drifts: Phendrana Canyon': 5031143,
'Phendrana Drifts: Quarantine Cave': 5031144,
'Phendrana Drifts: Research Lab Hydra': 5031145,
'Phendrana Drifts: Quarantine Monitor': 5031146,
'Phendrana Drifts: Observatory': 5031147,
'Phendrana Drifts: Transport Access': 5031148,
'Phendrana Drifts: Control Tower': 5031149,
'Phendrana Drifts: Research Core': 5031150,
'Phendrana Drifts: Frost Cave': 5031151,
'Phendrana Drifts: Research Lab Aether - Tank': 5031152,
'Phendrana Drifts: Research Lab Aether - Morph Track': 5031153,
'Phendrana Drifts: Gravity Chamber - Underwater': 5031154,
'Phendrana Drifts: Gravity Chamber - Grapple Ledge': 5031155,
'Phendrana Drifts: Storage Cave': 5031156,
'Phendrana Drifts: Security Cave': 5031157
}

tallon_location_table = {
'TO Landing Site': 5031158,
'TO Alcove': 5031159,
'TO Frigate Crash Site': 5031160,
'TO Overgrown Cavern': 5031161,
'TO Root Cave': 5031162,
'TO Artifact Temple': 5031163,
'TO Transport Tunnel B': 5031164,
'TO Arbor Chamber': 5031165,
'TO Cargo Freight Lift to Deck Gamma': 5031166,
'TO Biohazard Containment': 5031167,
'TO Hydro Access Tunnel': 5031168,
'TO Great Tree Chamber': 5031169,
'TO Life Grove Tunnel': 5031170,
'TO Life Grove - Start': 5031171,
'TO Life Grove - Underwater Spinner': 5031172
'Tallon Overworld: Landing Site': 5031158,
'Tallon Overworld: Alcove': 5031159,
'Tallon Overworld: Frigate Crash Site': 5031160,
'Tallon Overworld: Overgrown Cavern': 5031161,
'Tallon Overworld: Root Cave': 5031162,
'Tallon Overworld: Artifact Temple': 5031163,
'Tallon Overworld: Transport Tunnel B': 5031164,
'Tallon Overworld: Arbor Chamber': 5031165,
'Tallon Overworld: Cargo Freight Lift to Deck Gamma': 5031166,
'Tallon Overworld: Biohazard Containment': 5031167,
'Tallon Overworld: Hydro Access Tunnel': 5031168,
'Tallon Overworld: Great Tree Chamber': 5031169,
'Tallon Overworld: Life Grove Tunnel': 5031170,
'Tallon Overworld: Life Grove - Start': 5031171,
'Tallon Overworld: Life Grove - Underwater Spinner': 5031172
}

mines_location_table = {
'PM Main Quarry': 5031173,
'PM Security Access A': 5031174,
'PM Storage Depot B': 5031175,
'PM Storage Depot A': 5031176,
'PM Elite Research - Phazon Elite': 5031177,
'PM Elite Research - Laser': 5031178,
'PM Elite Control Access': 5031179,
'PM Ventilation Shaft': 5031180,
'PM Phazon Processing Center': 5031181,
'PM Processing Center Access': 5031182,
'PM Elite Quarters': 5031183,
'PM Central Dynamo': 5031184,
'PM Metroid Quarantine B': 5031185,
'PM Metroid Quarantine A': 5031186,
'PM Fungal Hall B': 5031187,
'PM Phazon Mining Tunnel': 5031188,
'PM Fungal Hall Access': 5031189
'Phazon Mines: Main Quarry': 5031173,
'Phazon Mines: Security Access A': 5031174,
'Phazon Mines: Storage Depot B': 5031175,
'Phazon Mines: Storage Depot A': 5031176,
'Phazon Mines: Elite Research - Phazon Elite': 5031177,
'Phazon Mines: Elite Research - Laser': 5031178,
'Phazon Mines: Elite Control Access': 5031179,
'Phazon Mines: Ventilation Shaft': 5031180,
'Phazon Mines: Phazon Processing Center': 5031181,
'Phazon Mines: Processing Center Access': 5031182,
'Phazon Mines: Elite Quarters': 5031183,
'Phazon Mines: Central Dynamo': 5031184,
'Phazon Mines: Metroid Quarantine B': 5031185,
'Phazon Mines: Metroid Quarantine A': 5031186,
'Phazon Mines: Fungal Hall B': 5031187,
'Phazon Mines: Phazon Mining Tunnel': 5031188,
'Phazon Mines: Fungal Hall Access': 5031189
}

magmoor_location_table = {
'MC Lava Lake': 5031190,
'MC Triclops Pit': 5031191,
'MC Storage Cavern': 5031192,
'MC Transport Tunnel A': 5031193,
'MC Warrior Shrine': 5031194,
'MC Shore Tunnel': 5031195,
'MC Fiery Shores - Morph Track': 5031196,
'MC Fiery Shores - Warrior Shrine Tunnel': 5031197,
'MC Plasma Processing': 5031198,
'MC Magmoor Workstation': 5031199
'Magmoor Caverns: Lava Lake': 5031190,
'Magmoor Caverns: Triclops Pit': 5031191,
'Magmoor Caverns: Storage Cavern': 5031192,
'Magmoor Caverns: Transport Tunnel A': 5031193,
'Magmoor Caverns: Warrior Shrine': 5031194,
'Magmoor Caverns: Shore Tunnel': 5031195,
'Magmoor Caverns: Fiery Shores - Morph Track': 5031196,
'Magmoor Caverns: Fiery Shores - Warrior Shrine Tunnel': 5031197,
'Magmoor Caverns: Plasma Processing': 5031198,
'Magmoor Caverns: Magmoor Workstation': 5031199
}

every_location: dict[str, int] = {
Expand Down
18 changes: 17 additions & 1 deletion worlds/metroidprime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,20 @@
from .Locations import every_location
from .Regions import create_regions
from .Rules import set_rules
from .config import make_config
from worlds.AutoWorld import World
from ..AutoWorld import WebWorld
import py_randomprime
import settings


class MetroidPrimeSettings(settings.Group):
class RomFile(settings.UserFilePath):
"""File name of the Metroid Prime ISO"""
description = "Metroid Prime (US) v1.0 ISO file"
copy_to = "prime.iso"

rom_file: RomFile = RomFile.copy_to


class MetroidPrimeWeb(WebWorld):
Expand All @@ -16,7 +28,7 @@ class MetroidPrimeWeb(WebWorld):
"English",
"setup.md",
"setup/en",
["Electro15, UltiNaruto"]
["Electro15", "hesto2"]

This comment has been minimized.

Copy link
@hesto2

hesto2 May 13, 2024

Collaborator

<3

)]


Expand Down Expand Up @@ -101,6 +113,10 @@ def set_rules(self) -> None:
self.multiworld.completion_condition[self.player] = lambda state: (
state.can_reach("Mission Complete", "Region", self.player))

def generate_output(self) -> None:
configjson = make_config(self, self.options)
py_randomprime.patch_iso(self.settings.rom_file, "prime_out.iso", configjson)

def fill_slot_data(self) -> Dict[str, Any]:

slot_data: Dict[str, Any] = {
Expand Down
Loading

0 comments on commit d1a11b6

Please sign in to comment.