From 0cbee4ac3ef76ea663bb05448157233b068af6c9 Mon Sep 17 00:00:00 2001 From: Ludovic Marechal Date: Wed, 9 Nov 2022 01:17:43 +0100 Subject: [PATCH] DS3: Add progressive locations, fix the randomize_weapons_level option and add some options ( Deathlink ) (#1206) * 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 5e7c2d4cee485e373ffe60932134013548192c8e. * ds3: setup progressive locations * ds3: Use fill_slot_data instead of generate_output * ds3: Add no_spell_requirements, no_equip_load and death_link option * ds3: Add some progressive locations * 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 * DS3: Fix randomize_weapons_level option * DS3: Remove options duplicate entries * DS3: Change location rule according to review Co-authored-by: Br00ty <83629348+Br00ty@users.noreply.github.com> --- worlds/dark_souls_3/Options.py | 15 ++++++++++++- worlds/dark_souls_3/__init__.py | 17 +++++++++----- worlds/dark_souls_3/data/items_data.py | 16 +++++++++++++ worlds/dark_souls_3/data/locations_data.py | 26 ++++++++++++++++++++-- 4 files changed, 65 insertions(+), 9 deletions(-) diff --git a/worlds/dark_souls_3/Options.py b/worlds/dark_souls_3/Options.py index 6b52cf53..54c43143 100644 --- a/worlds/dark_souls_3/Options.py +++ b/worlds/dark_souls_3/Options.py @@ -1,5 +1,5 @@ import typing -from Options import Toggle, Option +from Options import Toggle, Option, DeathLink class AutoEquipOption(Toggle): @@ -19,6 +19,16 @@ class NoWeaponRequirementsOption(Toggle): display_name = "No Weapon Requirements" +class NoSpellRequirementsOption(Toggle): + """Disable the spell requirements permitting you to use any spell""" + display_name = "No Spell Requirements" + + +class NoEquipLoadOption(Toggle): + """Disable the equip load constraint from the game""" + display_name = "No Equip load" + + class RandomizeWeaponsLevelOption(Toggle): """Enable this option to upgrade 33% ( based on the probability chance ) of the pool of weapons to a random value between +1 and +5/+10""" @@ -37,5 +47,8 @@ dark_souls_options: typing.Dict[str, type(Option)] = { "no_weapon_requirements": NoWeaponRequirementsOption, "randomize_weapons_level": RandomizeWeaponsLevelOption, "late_basin_of_vows": LateBasinOfVowsOption, + "no_spell_requirements": NoSpellRequirementsOption, + "no_equip_load": NoEquipLoadOption, + "death_link": DeathLink, } diff --git a/worlds/dark_souls_3/__init__.py b/worlds/dark_souls_3/__init__.py index e13329ea..15e3dc76 100644 --- a/worlds/dark_souls_3/__init__.py +++ b/worlds/dark_souls_3/__init__.py @@ -12,10 +12,10 @@ from .data.locations_data import location_dictionary, fire_link_shrine_table, \ undead_settlement_table, road_of_sacrifice_table, consumed_king_garden_table, cathedral_of_the_deep_table, \ farron_keep_table, catacombs_of_carthus_table, smouldering_lake_table, irithyll_of_the_boreal_valley_table, \ irithyll_dungeon_table, profaned_capital_table, anor_londo_table, lothric_castle_table, grand_archives_table, \ - untended_graves_table, archdragon_peak_table, firelink_shrine_bell_tower_table + untended_graves_table, archdragon_peak_table, firelink_shrine_bell_tower_table, progressive_locations from ..AutoWorld import World, WebWorld from BaseClasses import MultiWorld, Location, Region, Item, RegionType, Entrance, Tutorial, ItemClassification -from ..generic.Rules import set_rule +from ..generic.Rules import set_rule, add_item_rule class DarkSouls3Web(WebWorld): @@ -79,8 +79,8 @@ class DarkSouls3World(World): return DarkSouls3Item(name, item_classification, data, self.player) def create_regions(self): - menu_region = Region("Menu", RegionType.Generic, "Menu", self.player) - self.multiworld.regions.append(menu_region) + + menu_region = self.create_region("Menu", progressive_locations) # Create all Vanilla regions of Dark Souls III firelink_shrine_region = self.create_region("Firelink Shrine", fire_link_shrine_table) @@ -163,6 +163,8 @@ class DarkSouls3World(World): if location_table: for name, address in location_table.items(): location = DarkSouls3Location(self.player, name, self.location_name_to_id[name], new_region) + if region_name == "Menu": + add_item_rule(location, lambda item: not item.advancement) new_region.locations.append(location) self.multiworld.regions.append(new_region) return new_region @@ -264,13 +266,13 @@ class DarkSouls3World(World): for location in self.multiworld.get_filled_locations(): if location.item.player == self.player: items_id.append(location.item.code) - items_address.append(item_dictionary[location.item.name]) + items_address.append(item_dictionary_copy[location.item.name]) if location.player == self.player: locations_address.append(location_dictionary[location.name]) locations_id.append(location.address) if location.item.player == self.player: - locations_target.append(item_dictionary[location.item.name]) + locations_target.append(item_dictionary_copy[location.item.name]) else: locations_target.append(0) @@ -279,6 +281,9 @@ class DarkSouls3World(World): "auto_equip": self.multiworld.auto_equip[self.player].value, "lock_equip": self.multiworld.lock_equip[self.player].value, "no_weapon_requirements": self.multiworld.no_weapon_requirements[self.player].value, + "death_link": self.multiworld.death_link[self.player].value, + "no_spell_requirements": self.multiworld.no_spell_requirements[self.player].value, + "no_equip_load": self.multiworld.no_equip_load[self.player].value, }, "seed": self.multiworld.seed_name, # to verify the server's multiworld "slot": self.multiworld.player_name[self.player], # to connect to server diff --git a/worlds/dark_souls_3/data/items_data.py b/worlds/dark_souls_3/data/items_data.py index be215bd3..c3f2c682 100644 --- a/worlds/dark_souls_3/data/items_data.py +++ b/worlds/dark_souls_3/data/items_data.py @@ -152,6 +152,22 @@ goods_table = { "Soul of Boreal Valley Vordt": 0x400002CF, "Soul of a Stray Demon": 0x400002E7, "Soul of a Demon": 0x400002E3, + + # Upgrade materials + **{"Titanite Shard #"+str(i): 0x400003E8 for i in range(1, 11)}, + **{"Large Titanite Shard #"+str(i): 0x400003E9 for i in range(1, 11)}, + **{"Titanite Chunk #"+str(i): 0x400003EA for i in range(1, 6)}, + **{"Titanite Slab #"+str(i): 0x400003EB for i in range(1, 4)}, + + # Healing + **{"Estus Shard #"+str(i): 0x4000085D for i in range(1, 16)}, + **{"Undead Bone Shard #"+str(i): 0x4000085F for i in range(1, 6)}, + + # Souls + **{"Soul of a Great Champion #"+str(i): 0x400001A4 for i in range(1, 3)}, + **{"Soul of a Champion #"+str(i): 0x400001A3 for i in range(1, 5)}, + **{"Soul of a Venerable Old Hand #"+str(i): 0x400001A2 for i in range(1, 5)}, + **{"Soul of a Crestfallen Knight #"+str(i): 0x40000199 for i in range(1, 11)}, } armor_table = { diff --git a/worlds/dark_souls_3/data/locations_data.py b/worlds/dark_souls_3/data/locations_data.py index f2560673..654c7f09 100644 --- a/worlds/dark_souls_3/data/locations_data.py +++ b/worlds/dark_souls_3/data/locations_data.py @@ -437,12 +437,34 @@ archdragon_peak_table = { "AP: Havel's Greatshield": 0x013376F0, } +progressive_locations = { + # Upgrade materials + **{"Titanite Shard #"+str(i): 0x400003E8 for i in range(1, 11)}, + **{"Large Titanite Shard #"+str(i): 0x400003E9 for i in range(1, 11)}, + **{"Titanite Chunk #"+str(i): 0x400003EA for i in range(1, 6)}, + **{"Titanite Slab #"+str(i): 0x400003EB for i in range(1, 4)}, + + # Healing + **{"Estus Shard #"+str(i): 0x4000085D for i in range(1, 16)}, + **{"Undead Bone Shard #"+str(i): 0x4000085F for i in range(1, 6)}, + + # Items + **{"Firebomb #"+str(i): 0x40000124 for i in range(1, 5)}, + **{"Throwing Knife #"+str(i): 0x40000136 for i in range(1, 3)}, + + # Souls + **{"Soul of a Deserted Corpse #" + str(i): 0x40000191 for i in range(1, 6)}, + **{"Large Soul of a Deserted Corpse #" + str(i): 0x40000192 for i in range(1, 6)}, + **{"Soul of an Unknown Traveler #" + str(i): 0x40000193 for i in range(1, 6)}, + **{"Large Soul of an Unknown Traveler #" + str(i): 0x40000194 for i in range(1, 6)}, +} + location_tables = [fire_link_shrine_table, firelink_shrine_bell_tower_table, high_wall_of_lothric, undead_settlement_table, road_of_sacrifice_table, cathedral_of_the_deep_table, farron_keep_table, catacombs_of_carthus_table, smouldering_lake_table, irithyll_of_the_boreal_valley_table, irithyll_dungeon_table, profaned_capital_table, anor_londo_table, lothric_castle_table, consumed_king_garden_table, - grand_archives_table, untended_graves_table, archdragon_peak_table] + grand_archives_table, untended_graves_table, archdragon_peak_table, progressive_locations] location_dictionary = {**fire_link_shrine_table, **firelink_shrine_bell_tower_table, **high_wall_of_lothric, **undead_settlement_table, **road_of_sacrifice_table, **cathedral_of_the_deep_table, **farron_keep_table, **catacombs_of_carthus_table, **smouldering_lake_table, **irithyll_of_the_boreal_valley_table, **irithyll_dungeon_table, **profaned_capital_table, **anor_londo_table, **lothric_castle_table, **consumed_king_garden_table, - **grand_archives_table, **untended_graves_table, **archdragon_peak_table} + **grand_archives_table, **untended_graves_table, **archdragon_peak_table, **progressive_locations}