Skip to content

Commit ab9f376

Browse files
Marechal-LBr00ty
andauthored
DS3: Use slot_data instead of the external Json file (#1155)
* Update items_data.py added `Red and White Round Shield`, `Crystal Scroll`, `Magic Stoneplate Ring`, and `Outrider Knight` gear. * Update locations_data.py Added `US: Red and White Round Shield`, `CKG: Magic Stoneplate Ring`, `GA: Outrider Knight` set, and `GA: Crystal Scroll` * Update __init__.py Add `Karla's Ashes` requirements * Update items_data.py Add `Irithyll Rapier, Hollow's Ashes, Irina's Ashes, Karla's Ashes, Cornyx's Ashes, and Orbeck's Ashes` * Update locations_data.py Add `Irithyll Rapier, Hollow's Ashes, Irina's Ashes, Karla's Ashes, Orbeck's Ashes, and Cornyx's Ashes` * Update items_data.py removed "hollows ashes" * Update locations_data.py remove "hollows ashes" * Revert "WebHost: Add the DarkSouls3 entry to upload and download the client file" This reverts commit 5e7c2d4. * ds3: Use fill_slot_data instead of generate_output * DS3: Increment data_version * DS3: Fix item name in rule * DS3: Set required client version to 0.3.6 and added offsets between items and location tables for backward compatibility * DS3: Resolve Python 3.8 compatibility * DS3: Removed useless region for locations IDs consistency * DS3: Changed i in loop * DS3: Remove AP.json from the documentation * DS3: Put back json upload and download * DS3: Avoid empty downloads (cherry picked from commit c4c4851) Co-authored-by: Br00ty <83629348+Br00ty@users.noreply.github.com>
1 parent bf142b3 commit ab9f376

File tree

4 files changed

+14
-23
lines changed

4 files changed

+14
-23
lines changed

WebHostLib/templates/macros.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
{% elif patch.game | supports_apdeltapatch %}
4444
<a href="{{ url_for("download_patch", patch_id=patch.id, room_id=room.id) }}" download>
4545
Download Patch File...</a>
46-
{% elif patch.game == "Dark Souls III" %}
46+
{% elif patch.game == "Dark Souls III" and patch.data %}
4747
<a href="{{ url_for("download_slot_file", room_id=room.id, player_id=patch.player_id) }}" download>
4848
Download JSON File...</a>
4949
{% else %}

worlds/dark_souls_3/__init__.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# world/dark_souls_3/__init__.py
22
import json
33
import os
4+
from typing import Dict
45

56
from .Items import DarkSouls3Item
67
from .Locations import DarkSouls3Location
@@ -237,7 +238,9 @@ def generate_basic(self):
237238
for i in range(item_pool_len, total_required_locations):
238239
self.multiworld.itempool += [self.create_item("Soul of an Intrepid Hero")]
239240

240-
def generate_output(self, output_directory: str):
241+
def fill_slot_data(self) -> Dict[str, object]:
242+
slot_data: Dict[str, object] = {}
243+
241244
# Depending on the specified option, modify items hexadecimal value to add an upgrade level
242245
item_dictionary_copy = item_dictionary.copy()
243246
if self.multiworld.randomize_weapons_level[self.player]:
@@ -271,7 +274,7 @@ def generate_output(self, output_directory: str):
271274
else:
272275
locations_target.append(0)
273276

274-
data = {
277+
slot_data = {
275278
"options": {
276279
"auto_equip": self.multiworld.auto_equip[self.player].value,
277280
"lock_equip": self.multiworld.lock_equip[self.player].value,
@@ -287,7 +290,4 @@ def generate_output(self, output_directory: str):
287290
"itemsAddress": items_address
288291
}
289292

290-
# generate the file
291-
filename = f"AP-{self.multiworld.seed_name}-P{self.player}-{self.multiworld.player_name[self.player]}.json"
292-
with open(os.path.join(output_directory, filename), 'w') as outfile:
293-
json.dump(data, outfile)
293+
return slot_data

worlds/dark_souls_3/docs/setup_en.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
## General Concept
99

1010
The Dark Souls III AP Client is a dinput8.dll triggered when launching Dark Souls III. This .dll file will launch a command
11-
prompt where you can read information about your run and write any command to interact with the Archipelago server.
12-
13-
The randomization is performed by the AP.json file, an output file generated by the Archipelago server.
11+
prompt where you can read information about your run and write any command to interact with the Archipelago server.
1412

1513
## Installation Procedures
1614

@@ -19,15 +17,13 @@ The randomization is performed by the AP.json file, an output file generated by
1917
</span>
2018
This client has only been tested with the Official Steam version of the game (v1.15/1.35) not matter which DLCs are installed.
2119

22-
Get the dinput8.dll from the [Dark Souls III AP Client](https://github.com/Marechal-L/Dark-Souls-III-Archipelago-client/releases).
23-
Then you need to add the two following files at the root folder of your game (e.g. "SteamLibrary\steamapps\common\DARK SOULS III\Game"):
24-
- **dinput8.dll**
25-
- **AP.json** : The .json file downloaded from the multiworld room or provided by the host, named AP-{ROOM_ID}.json, has to be renamed to AP.json.
20+
Get the dinput8.dll from the [Dark Souls III AP Client](https://github.com/Marechal-L/Dark-Souls-III-Archipelago-client/releases) and
21+
add it at the root folder of your game (e.g. "SteamLibrary\steamapps\common\DARK SOULS III\Game")
2622

2723
## Joining a MultiWorld Game
2824

2925
1. Run DarkSoulsIII.exe or run the game through Steam
30-
2. Type in "/connect {SERVER_IP}:{SERVER_PORT}" in the "Windows Command Prompt" that opened
26+
2. Type in "/connect {SERVER_IP}:{SERVER_PORT} {SLOT_NAME}" in the "Windows Command Prompt" that opened
3127
3. Once connected, create a new game, choose a class and wait for the others before starting
3228
4. You can quit and launch at anytime during a game
3329

worlds/dark_souls_3/docs/setup_fr.md

+3-8
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,20 @@
1010
Le client Archipelago de Dark Souls III est un fichier dinput8.dll. Cette .dll va lancer une invite de commande Windows
1111
permettant de lire des informations de la partie et écrire des commandes pour intéragir avec le serveur Archipelago.
1212

13-
Le mélange des objets est réalisé par le fichier AP.json, un fichier généré par le serveur Archipelago.
14-
1513
## Procédures d'installation
1614

1715
<span style="color:tomato">
1816
**Il y a des risques de bannissement permanent des serveurs FromSoftware si ce mod est utilisé en ligne.**
1917
</span>
2018
Ce client a été testé sur la version Steam officielle du jeu (v1.15/1.35), peu importe les DLCs actuellement installés.
2119

22-
Télécharger le fichier dinput8.dll disponible dans le [Client AP de Dark Souls III](https://github.com/Marechal-L/Dark-Souls-III-Archipelago-client/releases).
23-
Vous devez ensuite ajouter les deux fichiers suivants à la racine du jeu
24-
(ex: "SteamLibrary\steamapps\common\DARK SOULS III\Game"):
25-
- **dinput8.dll**
26-
- **AP.json** : Le fichier .json téléchargé depuis la <em>room</em> ou donné par l'hôte de la partie, nommé AP-{ROOM_ID}.json, doit être renommé en AP.json.
20+
Télécharger le fichier dinput8.dll disponible dans le [Client AP de Dark Souls III](https://github.com/Marechal-L/Dark-Souls-III-Archipelago-client/releases) et
21+
placez-le à la racine du jeu (ex: "SteamLibrary\steamapps\common\DARK SOULS III\Game")
2722

2823
## Rejoindre une partie Multiworld
2924

3025
1. Lancer DarkSoulsIII.exe ou lancer le jeu depuis Steam
31-
2. Ecrire "/connect {SERVER_IP}:{SERVER_PORT}" dans l'invite de commande Windows ouverte au lancement du jeu
26+
2. Ecrire "/connect {SERVER_IP}:{SERVER_PORT} {SLOT_NAME}" dans l'invite de commande Windows ouverte au lancement du jeu
3227
3. Une fois connecté, créez une nouvelle partie, choisissez une classe et attendez que les autres soient prêts avant de lancer
3328
4. Vous pouvez quitter et lancer le jeu n'importe quand pendant une partie
3429

0 commit comments

Comments
 (0)