Skip to content

Commit

Permalink
Cut a full release when pushing a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Apr 3, 2024
1 parent e942fd2 commit 59ba395
Show file tree
Hide file tree
Showing 4 changed files with 229 additions and 7 deletions.
125 changes: 118 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,29 @@ on:
tags: ['v*.*.*']

jobs:
version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- id: version
run: |
ver="${{ github.ref_name }}"
if [[ "$ver" == v* ]]; then
ver="${ver:1}"
fi
echo "version=$ver" >> "$GITHUB_OUTPUT"
build-mod:
env:
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: microsoft/setup-msbuild@v2

# From https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
Expand All @@ -27,19 +40,20 @@ jobs:
working-directory: archipelago-client
- name: Build mod
run: msbuild archipelago-client\archipelago-client.vcxproj -verbosity:diag '-property:Configuration=Release;Platform=x64'

- uses: actions/upload-artifact@v4
with:
name: archipelago.dll
path: archipelago-client\x64\Release\archipelago.dll
if-no-files-found: error

build-static:
runs-on: windows-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
repository: nex3/SoulsRandomizers
ref: archipelago-server
ref: ${{ github.ref_name }}
path: SoulsRandomizers
- uses: actions/checkout@v4
with:
Expand All @@ -53,14 +67,111 @@ jobs:
ref: dsms
path: SoulsFormats
- uses: microsoft/setup-msbuild@v2

- name: Install dependencies
run: dotnet restore SoulsRandomizers\SoulsRandomizers.sln

- name: Build randomizer
run: msbuild SoulsRandomizers\DS3Randomizer\DS3Randomizer.csproj '-property:Configuration=Release (Archipelago);PublishDir=bin\publish;PublishProtocol=FileSystem;_TargetId=Folder' '-t:Build;Publish'

- uses: actions/upload-artifact@v4
with:
name: DS3Randomizer.exe
path: SoulsRandomizers\DS3Randomizer\bin\publish\DS3Randomizer.exe
if-no-files-found: error

build-yaml:
runs-on: windows-latest
needs: [version]
steps:
- uses: actions/checkout@v4
with:
repository: nex3/Archipelago
ref: ds3-${{ jobs.version.outputs.version }}

- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-subtests pytest-xdist
python ModuleUpdate.py --yes --force --append "WebHostLib\requirements.txt"
- name: Generate YAML
run: |
python Launcher.py 'Generate Template Options'
Move-Item -Path 'Players\Templates\Dark Souls III.yaml' -Destination 'Dark Souls III Options Template.yaml'
- uses: actions/upload-artifact@v4
with:
name: Dark Souls III Options Template.yaml
path: Dark Souls III Options Template.yaml
if-no-files-found: error

build-zip:
runs-on: windows-latest
needs: [version, build-mod, build-static, build-yaml]
env:
dir: DS3 Archipelago ${{ jobs.version.outputs.version }}

steps:
- uses: actions/checkout@v4
with:
path: Dark-Souls-III-Archipelago-client

- uses: actions/checkout@v4
with:
repository: nex3/SoulsRandomizers
ref: archipelago-server
path: SoulsRandomizers

- name: Download static files
run: |
Invoke-WebRequest -OutFile old.zip -Uri 'https://github.com/nex3/Dark-Souls-III-Archipelago-client/releases/download/v3.0.0-beta.1/DS3.Archipelago.2.3.0-beta.1.zip'
Expand-Archive old.zip -DestinationPath .
- name: Download ModEngine2
run: |
Invoke-WebRequest -OutFile ME2.zip -Uri 'https://github.com/soulsmods/ModEngine2/releases/download/release-2.1.0/ModEngine-2.1.0.0-win64.zip'
Expand-Archive ME2.zip -DestinationPath .
- name: Download Archipelago repo
run: |
Invoke-WebRequest -OutFile Archipelago.zip -Uri "https://github.com/nex3/Archipelago/archive/refs/tags/ds3-$tag.zip"
Expand-Archive Archipelago.zip .
- name: Assemble release
run: |
Move-Item -Path Dark-Souls-III-Archipelago-client\release -Destination $env:dir
mkdir -p $env:dir\randomizer\spoiler_logs
Move-Item -Path SoulsRandomizers\dist $env:dir\randomizer
Move-Item -Path 'DS3 Archipelago 2.3.0-beta.1\randomizer\presets', 'DS3 Archipelago 2.3.0-beta.1\randomizer\script', 'DS3 Archipelago 2.3.0-beta.1\randomizer\sfx' -Destination $env:dir\randomizer
Move-Item -Path ModEngine-*\modengine2, ModEngine-*\launchmod_darksouls3.bat, ModEngine-*\modengine2_launcher.exe -Destination $env:dir
Move-Item -Path Archipelago-* -Destination $env:dir\archipelago
- name: Download archipelago.dll
uses: actions/download-artifact@v4
with:
name: archipelago.dll
path: ${{ env.dir }}

- name: Download DS3Randomizer.exe
uses: actions/download-artifact@v4
with:
name: DS3Randomizer.exe
path: ${{ env.dir }}/randomizer

- name: Download YAML
uses: actions/download-artifact@v4
with:
name: Dark Souls III Options Template.yaml
path: ${{ env.dir }}

- name: Zip release
run: Compress-Archive -Path $env:dir -DestinationPath "${{ env.dir }}.zip"

- uses: softprops/action-gh-release@v2
with:
body_path: ${{ env.dir }}/README.txt
files: ${{ env.dir }}.zip
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ mono_crash.*
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
!/release
[Rr]eleases/
x64/
x86/
Expand Down
97 changes: 97 additions & 0 deletions release/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Dark Souls III Archipelago Randomizer 3.0.0-beta.6

This is a preview release of a new architecture for randomizing Dark Souls III for the Archipelago multiworld randomizer. It has a number of major feature improvements over the old 2.x.x line, including:

* Support for randomizing all item locations, not just unique items, without needing progressive pickup lists.

* Support for randomizing items in shops, starting loadouts, Path of the Dragon, and more.

* Built-in integration with the enemy randomizer, including consistent seeding for races and configuration via the web interface and the standard Archipelago YAML file.

* Support for the latest patch for Dark Souls III, 1.15.2. Note that older patches are currently *not* supported, although if ModEngine2 ever adds support they should work fine.

* Optional smooth distribution for upgrade items, upgraded weapons, and soul items so you're more likely to see weaker items earlier and more powerful items later.

* More detailed location names that indicate where a location is, not just what it replaces.

* Other players' item names are visible in DS3.

* If you pick up items while offline, they'll still send once you reconnect.

* Many more improvements.

## Generating a Multiworld

To use this preview, you must generate your multiworld with my fork of Archipelago, located in the `archipelago` directory of the release below. See [the "Running From Source" documentation] for more details. Once you've generated a ZIP file, upload it to https://archipelago.gg/uploads and you're good to go. (Unfortunately running from an `.apworld` file won't work until [this pull request] is merged and released.)

[the "Running From Source" documentation]: https://github.com/nex3/Archipelago/blob/ds3-3.0.0-beta.4/docs/running%20from%20source.md
[this pull request]: https://github.com/ArchipelagoMW/Archipelago/pull/2403

Note that not all YAML fields for Dark Souls III's 2.x.x Archipelago randomizer are supported as-is, and some new fields are available. Consider generating a new YAML configuration using the `Dark Souls III Options Template.yaml` file included in this release.

The following options have been removed:

* `enable_boss_locations` is now controlled by the `soul_locations` option.

* `enable_progressive_locations` was removed because all locations are now individually randomized rather than replaced with a progressive list.

* `pool_type` has been removed. Since there are no longer any non-randomized items in randomized categories, there's not a meaningful distinction between "shuffle" and "various" mode.

In addition, the following options have changed:

* `enable_*_locations` options have all been deprecated. Instead, there are a number of named location groups that you can add to the `exclude_locations` option to prevent them from containing important items. These location groups are:

* Prominent: A small number of locations that are in very obvious locations. Mostly boss drops. Ideal for setting as priority locations.
* Progression: Locations that contain items in vanilla which unlock other locations.
* Boss Rewards: Boss drops. Does not include soul transfusions or shop items.
* Miniboss Rewards: Miniboss drops. Only includes enemies considered minibosses by the enemy randomizer.
* Mimic Rewards: "Drops from enemies that are mimics in vanilla.
* Hostile NPC Rewards: "Drops from NPCs that are hostile to you. This includes scripted invaders and initially-friendly NPCs that must be fought as part of their quest.
* Friendly NPC Rewards: Items given by friendly NPCs as part of their quests or from non-violent interaction.
* Upgrade: Locations that contain upgrade items in vanilla, including titanite, gems, and Shriving Stones.
* Small Souls: Locations that contain soul items in vanilla, not including boss souls.
* Boss Souls: Locations that contain boss souls in vanilla, as well as Soul of Rosaria.
* Unique: Locations that contain items in vanilla that are unique per NG cycle, such as scrolls, keys, ashes, and so on. Doesn't cover equipment, spells, or souls.
* Healing: Locations that contain Undead Bone Shards and Estus Shards in vanilla.
* Miscellaneous: Locations that contain generic stackable items in vanilla, such as arrows, firebombs, buffs, and so on.
* Hidden: Locations that are particularly difficult to find, such as behind illusory walls, down hidden drops, and so on. Does not include large locations like Untended Graves or Archdragon Peak.
* Weapons: Locations that contain weapons in vanilla.
* Shields: Locations that contain shields in vanilla.
* Armor: Locations that contain armor in vanilla.
* Rings: Locations that contain rings in vanilla.
* Spells: Locations that contain spells in vanilla.

By default, the Hidden, Small Crystal Lizards, Upgrade, Small Souls, and Miscellaneous groups are in `exclude_locations`. Once you've chosen your excluded locations, you can set `excluded_locations: unrandomized` to preserve the default vanilla item placements for all excluded locations.

* The location names used in options like `exclude_locations` have changed. A full description of each location is included in `dark_souls_3.apworld`. To see it, run Archipelago's WebHost and go to http://localhost/tutorial/Dark%20Souls%20III/locations/en.

## Running the Offline Randomizer

Once you've generated a multiworld, uploaded it to archipelago.gg, and started a room for it, you need to run the "offline" randomizer (so called because it's run before you start playing) once to get your game ready for Archipelago. To do so:

* Run `randomizer\DS3Randomizer.exe` in this directory.
* Click "Load Archipelago run" in the lower right.
* Input your Archipelago room URL (such as "archipelago.gg:12345"), your slot name, and your password if you're running a password-protected session.
* Click "Load".

It may take a minute or two to run. Once it's done, it'll say "Archipelago config loaded" in the lower left of the main window.

## Running Dark Souls 3

Now you're ready to start playing! Run `launchmod_darksouls3.bat` to start the game, input your Archipelago URL and slot name in the command prompt, and have fun!

**Note:** Do _not_ run `modengine2_launcher.exe` directly, it will not work.

## Acknowledgements

This release stands on the shoulders of many people who have worked tirelessly to help you have fun with random Dark Souls. In particular, it uses:

* The original Archipelago mod and server code by Marechal-L and many other contributors, which is the foundation of the whole thing.

* The single-player "offline" randomizer by thefifthmatt a.k.a. gracenotes, which is incredibly impressive in its own right.

* ModEngine2 by grayttierney and katalash, which not only makes the "offline" randomizer possible in the first place but also makes it easy to combine mods in creative ways.

* All the incredible and thankless reverse engineering, documentation, and tooling work done by countless people at The Grand Archives, in the ?ServerName? discord, and across the internet.

* Debugging help from members of the Archipelago discord server, particularly Exempt-Medic.
13 changes: 13 additions & 0 deletions release/config_darksouls3.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[modengine]
debug = false
external_dlls = ["archipelago.dll"]

[extension.mod_loader]
enabled = true
loose_params = false
mods = [
{ enabled = true, name = "randomizer", path = "randomizer" }
]

[extension.archipelago]
enabled = true

0 comments on commit 59ba395

Please sign in to comment.