From a675849bebd0768cf8ac4450cb6b63f0781bcb98 Mon Sep 17 00:00:00 2001 From: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> Date: Wed, 7 Aug 2024 11:47:21 -0400 Subject: [PATCH] Remove "Bundle of", Add location name groups, set better default RootDirectory for new players. --- worlds/jakanddaxter/Items.py | 40 ++++++++++++++-------------- worlds/jakanddaxter/__init__.py | 19 +++++++++++-- worlds/jakanddaxter/docs/setup_en.md | 26 +++++++++--------- 3 files changed, 50 insertions(+), 35 deletions(-) diff --git a/worlds/jakanddaxter/Items.py b/worlds/jakanddaxter/Items.py index 28574b14ca..3a2efba676 100644 --- a/worlds/jakanddaxter/Items.py +++ b/worlds/jakanddaxter/Items.py @@ -42,26 +42,26 @@ scout_item_table = { # These items are only used by Orbsanity, and only one of these # items will be used corresponding to the chosen bundle size. orb_item_table = { - 1: "Precursor Orb", - 2: "Bundle of 2 Precursor Orbs", - 4: "Bundle of 4 Precursor Orbs", - 5: "Bundle of 5 Precursor Orbs", - 8: "Bundle of 8 Precursor Orbs", - 10: "Bundle of 10 Precursor Orbs", - 16: "Bundle of 16 Precursor Orbs", - 20: "Bundle of 20 Precursor Orbs", - 25: "Bundle of 25 Precursor Orbs", - 40: "Bundle of 40 Precursor Orbs", - 50: "Bundle of 50 Precursor Orbs", - 80: "Bundle of 80 Precursor Orbs", - 100: "Bundle of 100 Precursor Orbs", - 125: "Bundle of 125 Precursor Orbs", - 200: "Bundle of 200 Precursor Orbs", - 250: "Bundle of 250 Precursor Orbs", - 400: "Bundle of 400 Precursor Orbs", - 500: "Bundle of 500 Precursor Orbs", - 1000: "Bundle of 1000 Precursor Orbs", - 2000: "Bundle of 2000 Precursor Orbs", + 1: "1 Precursor Orb", + 2: "2 Precursor Orbs", + 4: "4 Precursor Orbs", + 5: "5 Precursor Orbs", + 8: "8 Precursor Orbs", + 10: "10 Precursor Orbs", + 16: "16 Precursor Orbs", + 20: "20 Precursor Orbs", + 25: "25 Precursor Orbs", + 40: "40 Precursor Orbs", + 50: "50 Precursor Orbs", + 80: "80 Precursor Orbs", + 100: "100 Precursor Orbs", + 125: "125 Precursor Orbs", + 200: "200 Precursor Orbs", + 250: "250 Precursor Orbs", + 400: "400 Precursor Orbs", + 500: "500 Precursor Orbs", + 1000: "1000 Precursor Orbs", + 2000: "2000 Precursor Orbs", } # These are special items representing unique unlocks in the world. Notice that their Item ID equals their diff --git a/worlds/jakanddaxter/__init__.py b/worlds/jakanddaxter/__init__.py index 733539fd9c..7d3339472c 100644 --- a/worlds/jakanddaxter/__init__.py +++ b/worlds/jakanddaxter/__init__.py @@ -32,10 +32,11 @@ icon_paths["egg"] = local_path("worlds", "jakanddaxter", "icons", "egg.png") class JakAndDaxterSettings(settings.Group): class RootDirectory(settings.UserFolderPath): - """Path to folder containing the ArchipelaGOAL mod executables (gk.exe and goalc.exe).""" + """Path to folder containing the ArchipelaGOAL mod executables (gk.exe and goalc.exe). + Ensure this path contains forward slashes (/) only.""" description = "ArchipelaGOAL Root Directory" - root_directory: RootDirectory = RootDirectory("D:/Files/Repositories/ArchipelaGOAL/out/build/Release/bin") + root_directory: RootDirectory = RootDirectory("%appdata%/OpenGOAL-Mods/archipelagoal") class JakAndDaxterWebWorld(WebWorld): @@ -89,6 +90,20 @@ class JakAndDaxterWorld(World): "Precursor Orbs": {item_table[k]: k for k in item_table if k in range(jak1_id + Orbs.orb_offset, jak1_max)}, } + location_name_groups = { + "Power Cells": {location_table[k]: k for k in location_table + if k in range(jak1_id, jak1_id + Scouts.fly_offset)}, + "Scout Flies": {location_table[k]: k for k in location_table + if k in range(jak1_id + Scouts.fly_offset, jak1_id + Specials.special_offset)}, + "Specials": {location_table[k]: k for k in location_table + if k in range(jak1_id + Specials.special_offset, jak1_id + Caches.orb_cache_offset)}, + "Orb Caches": {location_table[k]: k for k in location_table + if k in range(jak1_id + Caches.orb_cache_offset, jak1_id + Orbs.orb_offset)}, + "Precursor Orbs": {location_table[k]: k for k in location_table + if k in range(jak1_id + Orbs.orb_offset, jak1_max)}, + "Trades": {location_table[k]: k for k in location_table + if k in {Cells.to_ap_id(t) for t in {11, 12, 31, 32, 33, 96, 97, 98, 99, 13, 14, 34, 35, 100, 101}}}, + } # This will also set Locations, Location access rules, Region access rules, etc. def create_regions(self) -> None: diff --git a/worlds/jakanddaxter/docs/setup_en.md b/worlds/jakanddaxter/docs/setup_en.md index 6ccc0279d1..6933d2b51b 100644 --- a/worlds/jakanddaxter/docs/setup_en.md +++ b/worlds/jakanddaxter/docs/setup_en.md @@ -26,8 +26,8 @@ At this time, this method of setup works on Windows only, but Linux support is a - Click `View Folder`. - In the new file explorer window, take note of the current path. It should contain `gk.exe` and `goalc.exe`. - Verify that the mod launcher copied the extracted ISO files to the mod directory: - - `C:\Users\\AppData\Roaming\OpenGOAL-Mods\archipelagoal\iso_data` should have *all* the same files as - - `C:\Users\\AppData\Roaming\OpenGOAL-Mods\_iso_data`, if it doesn't, copy those files over manually. + - `%appdata%/OpenGOAL-Mods/archipelagoal/iso_data` should have *all* the same files as + - `%appdata%/OpenGOAL-Mods/_iso_data`, if it doesn't, copy those files over manually. - And then `Recompile` if you needed to copy the files over. - **DO NOT PLAY AN ARCHIPELAGO GAME THROUGH THE MOD LAUNCHER.** It will run in retail mode, which is incompatible with Archipelago. We need it to run in debug mode (see below). @@ -41,15 +41,15 @@ At this time, this method of setup works on Windows only, but Linux support is a - In the text file that opens, enter the name you want and remember it for later. - Save this file in `Archipelago/players`. You can now close the file. - Back in the Archipelago Launcher, click `Open host.yaml`. -- In the text file that opens, search for `jakanddaxter_options`. If you do not see it, you will need it add it. - - Change (or add) the `root_directory` entry and provide the path you noted earlier containing `gk.exe` and `goalc.exe`. - - **CHANGE ALL BACKSLASHES `\ ` TO FORWARD SLASHES `/ `.** - - The result should look like this. You can now save and close the file. +- In the text file that opens, search for `jakanddaxter_options`. + - You should see the block of YAML below. If you do not see it, you will need to add it. + - If the default path does not contain `gk.exe` and `goalc.exe`, you will need to provide the path you noted earlier. **MAKE SURE YOU CHANGE ALL BACKSLASHES `\ ` TO FORWARD SLASHES `/ `.** ``` jakanddaxter_options: # Path to folder containing the ArchipelaGOAL mod executables (gk.exe and goalc.exe). - root_directory: "C:/Users//AppData/Roaming/OpenGOAL-Mods/archipelagoal" + # Ensure this path contains forward slashes (/) only. + root_directory: "%appdata%/OpenGOAL-Mods/archipelagoal" ``` - Back in the Launcher, from the left-most list, click `Generate`. A window will appear to generate your seed and close itself. @@ -108,8 +108,8 @@ jakanddaxter_options: Input file iso_data/jak1/MUS/TWEAKVAL.MUS does not exist. ``` - If this occurs, you may need to copy the extracted data to the mod folder manually. - - From a location like this: `C:\Users\\AppData\Roaming\OpenGOAL-Mods\_iso_data` - - To a location like this: `C:\Users\\AppData\Roaming\OpenGOAL-Mods\archipelagoal\iso_data` + - From a location like this: `%appdata%/OpenGOAL-Mods/_iso_data` + - To a location like this: `%appdata%/OpenGOAL-Mods/archipelagoal/iso_data` - Then try clicking `Recompile` in the Mod Launcher (ensure you have selected the right mod first!) ***Game Failure*** @@ -136,10 +136,10 @@ PAL versions of the game seem to require additional troubleshooting/setup in ord - If you have `-- Compilation Error! --` after pressing `Recompile` or Launching the ArchipelaGOAL mod. Try this: - Remove these folders if you have them: - - `%appdata%\OpenGOAL-Mods\iso_data` - - `%appdata%\OpenGOAL-Mods\archipelagoal\iso_data` - - `%appdata%\OpenGOAL-Mods\archipelagoal\data\iso_data` - - Place Jak1 ISO in: `%appdata%\OpenGOAL-Mods\archipelagoal` rename it to `JakAndDaxter.iso` + - `%appdata%/OpenGOAL-Mods/iso_data` + - `%appdata%/OpenGOAL-Mods/archipelagoal/iso_data` + - `%appdata%/OpenGOAL-Mods/archipelagoal/data/iso_data` + - Place Jak1 ISO in: `%appdata%/OpenGOAL-Mods/archipelagoal` rename it to `JakAndDaxter.iso` - Type "CMD" in Windows search, Right click Command Prompt, and pick "Run as Administrator" - Run: `cd %appdata%\OpenGOAL-Mods\archipelagoal` - Then run: `extractor.exe --extract --extract-path .\data\iso_data "JakAndDaxter.iso"`