From 80ed9f1a8ce59d8e43644f0e1a52525fca7c1135 Mon Sep 17 00:00:00 2001 From: gymnast86 Date: Mon, 17 Jun 2024 01:06:20 -0700 Subject: [PATCH 01/13] slightly modify expected formatting --- logic/Plandomizer.cpp | 43 ++++++++++----------- logic/data/plandomizer_example.yaml | 60 +++++++++++++++-------------- 2 files changed, 51 insertions(+), 52 deletions(-) diff --git a/logic/Plandomizer.cpp b/logic/Plandomizer.cpp index d0eb749b..7fba738c 100644 --- a/logic/Plandomizer.cpp +++ b/logic/Plandomizer.cpp @@ -29,32 +29,29 @@ PlandomizerError loadPlandomizer(std::string& plandoFilepath, std::vector(); - } - if (ref[worldName]["extra progression locations"] && ref[worldName]["extra progression locations"].IsSequence()) - { - extraProgressionLocations = ref[worldName]["extra progression locations"]; - } - if (ref[worldName]["random starting item pool"] && ref[worldName]["random starting item pool"].IsSequence()) - { - randomStartingItemPool = ref[worldName]["random starting item pool"]; - } + if (plandoTree[worldName]["entrances"] && plandoTree[worldName]["entrances"].IsMap()) + { + plandoEntrances = plandoTree[worldName]["entrances"]; + } + if (plandoTree[worldName]["starting island"] && plandoTree[worldName]["starting island"].IsScalar()) + { + plandoStartingIsland = plandoTree[worldName]["starting island"].as(); + } + if (plandoTree[worldName]["extra progression locations"] && plandoTree[worldName]["extra progression locations"].IsSequence()) + { + extraProgressionLocations = plandoTree[worldName]["extra progression locations"]; + } + if (plandoTree[worldName]["random starting item pool"] && plandoTree[worldName]["random starting item pool"].IsSequence()) + { + randomStartingItemPool = plandoTree[worldName]["random starting item pool"]; } } diff --git a/logic/data/plandomizer_example.yaml b/logic/data/plandomizer_example.yaml index 44c9b869..7c4ab3db 100644 --- a/logic/data/plandomizer_example.yaml +++ b/logic/data/plandomizer_example.yaml @@ -6,18 +6,18 @@ # All plandomized elements must be under a "World 1" element at the start of the # plandomizer file like this -- World 1: - # ...everything else... +World 1: + # ...everything else... # LOCATIONS # All plandomized locations are defined under a "locations" element and consist # of the location name followed by a colon(:) and the item name you want placed # at that location. The following example places Bombs at Windfall Island - Maggie Free Item # and Power Bracelets at Wind Temple - Wizzrobe Mini Boss. -- World 1: - locations: - Windfall Island - Maggie Free Item: Bombs - Wind Temple - Wizzrobe Mini Boss: Power Bracelets +World 1: + locations: + Windfall Island - Maggie Free Item: Bombs + Wind Temple - Wizzrobe Mini Boss: Power Bracelets # NAMES # As a general rule, capitalize the first letter of all item names except for @@ -37,7 +37,7 @@ # if you have race mode enabled and have the number of race mode dungeons set to 2, # then placing a Progressive Bow at Earth Temple - Stalfos Mini Boss will automatically # make Earth Temple one of the two race mode dungeons: - Earth Temple - Stalfos Mini Boss: Progressive Bow +Earth Temple - Stalfos Mini Boss: Progressive Bow # If you place major items in more dungeons than you have set as the number of # dungeons for race mode, you'll get a Plandomizer Error and the seed won't generate. # @@ -56,10 +56,10 @@ # switches the entrances between Link and Orca's houses on Outset Island. Note that # when plandomizing entrances, the entrance randomizer setting for the entrances you're # attempting to plandomize must be turned on. -- World 1: - entrances: - Outset Island -> Outset Link's House: Outset Orca's House from Outset Island - Outset Island -> Outset Orca's House: Outset Link's House from Outset Island +World 1: + entrances: + Outset Island -> Outset Link's House: Outset Orca's House from Outset Island + Outset Island -> Outset Orca's House: Outset Link's House from Outset Island # The original entrance must be in the format " -> ", and # the replacement entrance must be in the format " from ". # The spaces around the arrow and the word "from" are important to include. These @@ -71,8 +71,8 @@ # STARTING ISLAND # You can also set the starting island if you want to. For a list of island names, see # https://github.com/SuperDude88/TWWHD-Randomizer/blob/dev-2/logic/Area.cpp#L217 -- World 1: - starting island: Five Eye Reef +World 1: + starting island: Five Eye Reef # EXTRA PROGRESSION LOCATIONS # For more fine-tuned control over which locations are in logic, you can specify extra @@ -80,11 +80,13 @@ # element. For example, if we don't have spoils trading or long sidequests enabled # but we still want to have the Windfall potion sellers checks as potential # progression locations, we can type: -- World 1: - extra progression locations: +World 1: + extra progression locations: - Windfall Island - Potion Shop 15 Blue Chu - Windfall Island - Potion Shop 15 Green Chu +# Alternatively, to disable specific locations, you can plandomizer junk on them + # MULTIWORLD PLANDOMIZER (Note: currently multiworld is not an option in the randomizer # and is not actively being developed, but the filling algorithm was made to support # multiworld incase it ever happens in the future.) @@ -93,22 +95,22 @@ # the locations will be for. For example, if we want place the Telescope at # Outset Island - Under Link's House in World 1 and the Bait Bag at # Gale Isle - Sunken Treasure in World 2, then we'd type -- World 1: - locations: - Outset Island - Under Link's House: Telescope - World 2: - locations: - Gale Isle - Sunken Treasure: Bait Bag +World 1: + locations: + Outset Island - Under Link's House: Telescope +World 2: + locations: + Gale Isle - Sunken Treasure: Bait Bag # Using this format, the item being plandomized will be for the world that the # location is currently under. If we want to specify the item for a different # world we can use the "item" and "world" elements to do so. For example, if we want # to place Bombs for World 1 at World 2's Hyrule Castle - Sword Chamber Chest # and the Hero's Charm for World 1 at World 2's Ganon's Tower - Maze Chest we would type: -- World 2: - locations: - Hyrule Castle - Sword Chamber Chest: - item: Bombs - world: 1 - Ganon's Tower - Maze Chest: - item: Hero's Charm - world: 1 +World 2: + locations: + Hyrule Castle - Sword Chamber Chest: + item: Bombs + world: 1 + Ganon's Tower - Maze Chest: + item: Hero's Charm + world: 1 From 0dcbe686eddb0bc6def31af2ef526b7aefdf0420 Mon Sep 17 00:00:00 2001 From: gymnast86 Date: Mon, 17 Jun 2024 01:18:04 -0700 Subject: [PATCH 02/13] update tests workflow for push --- .github/workflows/run_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 13c62e54..929b6a60 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -1,6 +1,7 @@ name: Run Logic Tests on: + - push - pull_request jobs: From 3087b19e61bfcb18cbb09f5e6045b59780a1a949 Mon Sep 17 00:00:00 2001 From: gymnast86 Date: Mon, 17 Jun 2024 01:38:12 -0700 Subject: [PATCH 03/13] try killing XProtectBehaviorService on mac builds --- .github/workflows/build_mac.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_mac.yml b/.github/workflows/build_mac.yml index faa3a243..cf5419fa 100644 --- a/.github/workflows/build_mac.yml +++ b/.github/workflows/build_mac.yml @@ -77,6 +77,8 @@ jobs: mkdir dmg_contents cp ../gui/mac_user_instructions.txt ./dmg_contents/READ_THIS_FIRST.txt cp -R wwhd_rando.app ./dmg_contents/wwhd_rando.app + echo killing...; sudo pkill -9 XProtect >/dev/null || true; + echo waiting...; while pgrep XProtect; do sleep 3; done; hdiutil create -srcfolder ./dmg_contents wwhd_rando - name: Get Version From 0d6a2d381e9cb3cf15ea8fd0f901800fad36591a Mon Sep 17 00:00:00 2001 From: gymnast86 Date: Mon, 17 Jun 2024 01:53:50 -0700 Subject: [PATCH 04/13] release workflow tweak --- .github/workflows/build_release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index eccd1a26..93380e85 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -53,4 +53,6 @@ jobs: - name: Attach Files env: GITHUB_TOKEN: ${{ github.TOKEN }} - run: gh release upload ${{ github.event.release.tag_name }} wwhd_rando_${{ github.event.release.tag_name }}_windows.zip wwhd_rando_${{ github.event.release.tag_name }}.wuhb + run: | + ls -R + gh release upload ${{ github.event.release.tag_name }} wwhd_rando_${{ github.event.release.tag_name }}_windows wwhd_rando_${{ github.event.release.tag_name }}.wuhb wwhd_rando_${{ github.event.release.tag_name }}_mac.dmg From ba1111674b7aeca800a5a1ead845788b7e30cd87 Mon Sep 17 00:00:00 2001 From: gymnast86 Date: Mon, 17 Jun 2024 02:25:34 -0700 Subject: [PATCH 05/13] more tweaking --- .github/workflows/build_release.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 93380e85..de80c073 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -35,20 +35,20 @@ jobs: runs-on: ubuntu-latest steps: - - name: Download Windows Artifact + - name: Download Artifacts uses: actions/download-artifact@v4 - with: - name: wwhd_rando_${{ github.event.release.tag_name }}_windows # pass name so it doesn't get put in a folder + # with: + # name: wwhd_rando_${{ github.event.release.tag_name }}_windows # pass name so it doesn't get put in a folder - - name: Download Wii U Artifact - uses: actions/download-artifact@v4 - with: - name: wwhd_rando_${{ github.event.release.tag_name }}.wuhb # pass name so it doesn't get put in a folder + # - name: Download Wii U Artifact + # uses: actions/download-artifact@v4 + # with: + # name: wwhd_rando_${{ github.event.release.tag_name }}.wuhb # pass name so it doesn't get put in a folder - - name: Download Mac OS Artifact - uses: actions/download-artifact@v4 - with: - name: wwhd_rando_${{ github.event.release.tag_name }}_mac.dmg # pass name so it doesn't get put in a folder + # - name: Download Mac OS Artifact + # uses: actions/download-artifact@v4 + # with: + # name: wwhd_rando_${{ github.event.release.tag_name }}_mac.dmg # pass name so it doesn't get put in a folder - name: Attach Files env: From 519d1e716d6993e90ce818550e18d9c717184da7 Mon Sep 17 00:00:00 2001 From: gymnast86 Date: Mon, 17 Jun 2024 02:54:07 -0700 Subject: [PATCH 06/13] more tweaking --- .github/workflows/build_release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index de80c073..905f7d29 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -50,9 +50,15 @@ jobs: # with: # name: wwhd_rando_${{ github.event.release.tag_name }}_mac.dmg # pass name so it doesn't get put in a folder + - name: Zip windows file + uses: montudor/action-zip@v1 + args: zip -qq -r wwhd_rando_${{ github.event.release.tag_name }}_windows.zip wwhd_rando_${{ github.event.release.tag_name }}_windows + - name: Attach Files env: GITHUB_TOKEN: ${{ github.TOKEN }} run: | ls -R - gh release upload ${{ github.event.release.tag_name }} wwhd_rando_${{ github.event.release.tag_name }}_windows wwhd_rando_${{ github.event.release.tag_name }}.wuhb wwhd_rando_${{ github.event.release.tag_name }}_mac.dmg + mv wwhd_rando_${{ github.event.release.tag_name }}.wuhb/wwhd_rando.wuhb wwhd_rando_${{ github.event.release.tag_name }}.wuhb + mv wwhd_rando_${{ github.event.release.tag_name }}_mac.dmg/wwhd_rando.dmg wwhd_rando_${{ github.event.release.tag_name }}_mac.dmg + gh release upload ${{ github.event.release.tag_name }} wwhd_rando_${{ github.event.release.tag_name }}_windows.zip wwhd_rando_${{ github.event.release.tag_name }}.wuhb wwhd_rando_${{ github.event.release.tag_name }}_mac.dmg From 67f3f389fadc12afa4a961cbd3105c58ce287b99 Mon Sep 17 00:00:00 2001 From: gymnast86 Date: Mon, 17 Jun 2024 02:55:30 -0700 Subject: [PATCH 07/13] forgot "with" --- .github/workflows/build_release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 905f7d29..a94d41d9 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -52,6 +52,7 @@ jobs: - name: Zip windows file uses: montudor/action-zip@v1 + with: args: zip -qq -r wwhd_rando_${{ github.event.release.tag_name }}_windows.zip wwhd_rando_${{ github.event.release.tag_name }}_windows - name: Attach Files From 2f42497a3866b9b255eb6f509429b2b889d7bb2a Mon Sep 17 00:00:00 2001 From: gymnast86 Date: Mon, 17 Jun 2024 03:16:34 -0700 Subject: [PATCH 08/13] fix ctmc keys --- command/WriteLocations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/WriteLocations.cpp b/command/WriteLocations.cpp index e3e157e0..d3e7a6e4 100644 --- a/command/WriteLocations.cpp +++ b/command/WriteLocations.cpp @@ -143,7 +143,7 @@ ModificationError ModifyChest::writeLocation(const Item& item) { } ModificationError ModifyChest::setCTMCType(ACTR& chest, const Item& item) { - if(item.anyInstancesAreMajor()) { + if(item.anyInstancesAreMajor() && !gameItemToName(item.getGameItemId()).ends_with("Key")) { LOG_AND_RETURN_IF_ERR(setParam(chest, 0x00F00000, uint8_t(2))) // Metal chests for progress items (excluding keys) return ModificationError::NONE; } From ba2fd9aaa3e316013cd6726b3d66c6e7e0562577 Mon Sep 17 00:00:00 2001 From: gymnast86 Date: Mon, 17 Jun 2024 03:23:11 -0700 Subject: [PATCH 09/13] another tweak --- .github/workflows/build_release.yml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index a94d41d9..8cb11729 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -35,20 +35,24 @@ jobs: runs-on: ubuntu-latest steps: + - name: Create Folder for Windows Files + run: mkdir wwhd_rando_${{ github.event.release.tag_name }}_windows + - name: Download Artifacts uses: actions/download-artifact@v4 - # with: - # name: wwhd_rando_${{ github.event.release.tag_name }}_windows # pass name so it doesn't get put in a folder + working-directory: ${{ github.workspace }}/wwhd_rando_${{ github.event.release.tag_name }}_windows + with: + name: wwhd_rando_${{ github.event.release.tag_name }}_windows # pass name so it doesn't get put in a folder - # - name: Download Wii U Artifact - # uses: actions/download-artifact@v4 - # with: - # name: wwhd_rando_${{ github.event.release.tag_name }}.wuhb # pass name so it doesn't get put in a folder + - name: Download Wii U Artifact + uses: actions/download-artifact@v4 + with: + name: wwhd_rando_${{ github.event.release.tag_name }}.wuhb # pass name so it doesn't get put in a folder - # - name: Download Mac OS Artifact - # uses: actions/download-artifact@v4 - # with: - # name: wwhd_rando_${{ github.event.release.tag_name }}_mac.dmg # pass name so it doesn't get put in a folder + - name: Download Mac OS Artifact + uses: actions/download-artifact@v4 + with: + name: wwhd_rando_${{ github.event.release.tag_name }}_mac.dmg # pass name so it doesn't get put in a folder - name: Zip windows file uses: montudor/action-zip@v1 @@ -60,6 +64,6 @@ jobs: GITHUB_TOKEN: ${{ github.TOKEN }} run: | ls -R - mv wwhd_rando_${{ github.event.release.tag_name }}.wuhb/wwhd_rando.wuhb wwhd_rando_${{ github.event.release.tag_name }}.wuhb - mv wwhd_rando_${{ github.event.release.tag_name }}_mac.dmg/wwhd_rando.dmg wwhd_rando_${{ github.event.release.tag_name }}_mac.dmg + mv wwhd_rando.wuhb wwhd_rando_${{ github.event.release.tag_name }}.wuhb + mv wwhd_rando.dmg wwhd_rando_${{ github.event.release.tag_name }}_mac.dmg gh release upload ${{ github.event.release.tag_name }} wwhd_rando_${{ github.event.release.tag_name }}_windows.zip wwhd_rando_${{ github.event.release.tag_name }}.wuhb wwhd_rando_${{ github.event.release.tag_name }}_mac.dmg From 276a0be29aa04509dba4276ff12a633c3536d08a Mon Sep 17 00:00:00 2001 From: gymnast86 Date: Mon, 17 Jun 2024 03:25:55 -0700 Subject: [PATCH 10/13] more tweaks --- .github/workflows/build_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 8cb11729..9bc29667 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -40,7 +40,7 @@ jobs: - name: Download Artifacts uses: actions/download-artifact@v4 - working-directory: ${{ github.workspace }}/wwhd_rando_${{ github.event.release.tag_name }}_windows + path: wwhd_rando_${{ github.event.release.tag_name }}_windows with: name: wwhd_rando_${{ github.event.release.tag_name }}_windows # pass name so it doesn't get put in a folder From f613d554cf51e701c6130229724bbce8b229ed91 Mon Sep 17 00:00:00 2001 From: gymnast86 Date: Mon, 17 Jun 2024 03:26:52 -0700 Subject: [PATCH 11/13] path --- .github/workflows/build_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 9bc29667..af8c89b6 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -40,7 +40,7 @@ jobs: - name: Download Artifacts uses: actions/download-artifact@v4 - path: wwhd_rando_${{ github.event.release.tag_name }}_windows + path: ${{ github.workspace }}/wwhd_rando_${{ github.event.release.tag_name }}_windows with: name: wwhd_rando_${{ github.event.release.tag_name }}_windows # pass name so it doesn't get put in a folder From 65064f058d54112625d83f1b5ea5f5dd14f2e58a Mon Sep 17 00:00:00 2001 From: gymnast86 Date: Mon, 17 Jun 2024 03:28:36 -0700 Subject: [PATCH 12/13] path again --- .github/workflows/build_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index af8c89b6..3883a38e 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -40,8 +40,8 @@ jobs: - name: Download Artifacts uses: actions/download-artifact@v4 - path: ${{ github.workspace }}/wwhd_rando_${{ github.event.release.tag_name }}_windows with: + path: ${{ github.workspace }}/wwhd_rando_${{ github.event.release.tag_name }}_windows name: wwhd_rando_${{ github.event.release.tag_name }}_windows # pass name so it doesn't get put in a folder - name: Download Wii U Artifact From 17950dcc97694a37b3aaee4e8cfba13c0ef270f6 Mon Sep 17 00:00:00 2001 From: gymnast86 Date: Mon, 17 Jun 2024 03:50:36 -0700 Subject: [PATCH 13/13] tweaks...again --- .github/workflows/build_release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 3883a38e..79f7ea0e 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -35,6 +35,10 @@ jobs: runs-on: ubuntu-latest steps: + # Will make the later gh release command work + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Create Folder for Windows Files run: mkdir wwhd_rando_${{ github.event.release.tag_name }}_windows