Author SHA1 Message Date
karafruit 6fe0c233a8 Re-add vanilla_placements yamls 2026-05-25 00:21:55 -05:00
karafruit 5f1c08920f Update baserom 2026-05-25 00:17:48 -05:00
karafruit 57db996f27 Merge branch 'fouton_vanilla' into beta 2026-05-24 17:20:30 -05:00
karafruit 5af7073ed1 Add bumper to enemy_deny 2026-05-24 17:16:51 -05:00
karafruit 33cd2d076c Change intro text for mystery 2026-05-24 08:56:21 -05:00
karafruit cd5bc9a206 Update standard escape ammo refills to be more consistent 2026-05-19 22:46:00 -05:00
karafruit 78819bbd9d Update standard escape ammo refills to be more consistent 2026-05-19 22:45:15 -05:00
karafruit b2d2aae61a Add RainDeathRefill spots to no_escape_assist 2026-05-19 20:33:23 -05:00
karafruit 320e518519 Add no_escape_assist patch 2026-05-19 20:30:30 -05:00
karafruit c39a31b299 Add all_starting patch 2026-05-17 15:08:46 -05:00
karafruit 0ef55c5f6a Merge branch 'beta' into fouton_vanilla 2026-05-16 22:21:40 -05:00
karafruit fb57e9fd34 Fix some enemy denials being overwritten 2026-05-16 22:18:51 -05:00
karafruit ab2e8f7818 Update baserom and enemy_deny.yaml 2026-05-16 21:29:42 -05:00
karafruit 151765d8d2 Fix broken patches arg 2026-05-15 21:53:28 -05:00
karafruit 1ae9da59bb Fix Sword and Shield item 2026-05-14 23:52:59 -05:00
karafruit 84270544bf vanilla with universal keys 2026-05-14 22:28:41 -05:00
karafruit 8ae1aefcf3 Add prize pack info to vanilla_placements 2026-05-14 22:09:49 -05:00
karafruit 821c0ee46e Remove accidentally .bak file 2026-05-14 21:36:27 -05:00
karafruit a946c2b3b0 Allow applying patches to rom from CLI 2026-05-14 21:23:10 -05:00
karafruit ec89afaa5e Fix up junk items in vanilla_placements 2026-05-14 20:05:39 -05:00
karafruit d530b68e86 Fix crystal numbers 2026-05-14 10:31:03 -05:00
karafruit 924bd7a616 Start of attempt for vanilla item placements 2026-05-14 00:14:54 -05:00
karafruit cdfdc15219 Baserom update and bugfix 2026-05-13 00:59:03 -05:00
karafruit d2a5bb56d8 One more fix for the road... 2026-05-11 23:26:07 -05:00
karafruit e86312f145 Fix broken 2026-05-11 23:24:03 -05:00
karafruit 97aceb3f43 Update hash alphabet strings for clarity 2026-05-11 23:17:47 -05:00
karafruit b6f73ffda4 Update hashes in spoiler 2026-05-11 23:06:47 -05:00
karafruit c4687a3be6 Update baserom, add hashes to meta 2026-05-11 22:49:15 -05:00
karafruit 4d63168e9a Bugfix update baserom 2026-05-04 17:54:09 -05:00
karafruit 6474975b07 loothud option 2026-05-04 08:53:42 -05:00
karafruit 4de84df7a8 Update baserom 2026-05-04 00:38:48 -05:00
karafruit b3afa57677 Show level of current supertile loot in hud 2026-05-04 00:14:28 -05:00
karafruit 24ebf3037a Merge branch 'main' into beta_2 2026-05-03 17:38:13 -05:00
karafruit d64a58f636 extra_keys setting for crossed door rando 2026-05-03 17:37:40 -05:00
karafruit 3cb1e9d77b Fix issue with make_custom_pool 2026-05-03 17:37:40 -05:00
karafruit bdf22ac3d5 Merge commit 'ca221b9324485b09e16bc268c131dcd86d883ab6' into beta_2 2026-05-03 00:00:34 -05:00
karafruit f421bba9f3 Fix issue with make_custom_pool 2026-04-14 10:20:53 -05:00
codemann8 ca221b9324 Merge branch 'OverworldShuffleDev' into OverworldShuffle 2026-03-15 17:08:37 -05:00
codemann8 a663ab892d Version bump 0.7.0.3 2026-03-15 17:08:18 -05:00
codemann8 a3adb12422 Various baserom fixes
- Fix buffer sword slash when dashing into water
- Fixed bug with MSU-1 GT2 track not falling back to GT track
- Fix for Kiki unfollowing after certain entrance transition conditions
2026-03-15 17:01:50 -05:00
codemann8 3ce66a4952 Changed big bomb shop vendor text to be follower agnostic 2026-03-15 16:46:07 -05:00
codemann8 0dbae8e21e Fixed bug/oversight with vanilla_fill and prize_shuffle 2026-03-15 16:32:54 -05:00
Esme 3547aef480 Account for failure to determine locale. 2026-03-15 10:44:28 -05:00
codemann8 c9ebb80f3f Merge pull request #30 from Catobat/GridImprovements
Grid Layout Shuffle Customizer and improvements
2026-03-15 10:42:53 -05:00
theclearmouse b45ebdc2ab add crosskeys winners 2026-03-15 10:31:31 -05:00
codemann8 45f5f3955b Merged in DR v1.5.6 2026-03-14 08:53:07 -05:00
aerinon 4da73127a2 fix: reworked spawn refills for standard + enemy drop 2026-03-12 15:52:09 -06:00
aerinon a4d7d63235 fix: disable pikit drops due to vanilla steal failure bug 2026-03-11 15:32:11 -06:00
aerinon b2b775e243 feat: item_pool_adjust added to customizer 2026-03-11 15:32:11 -06:00
aerinon af9b61ad7d fix: beemizer + pottery + multiworld generation issue 2026-03-11 10:08:54 -06:00
codemann8 9a6d5b2112 Merged in DR v1.5.5 2026-03-03 08:23:47 -06:00
Catobat 54e4176311 Consider distance between starting locations when picking a grid layout 2026-02-22 23:11:47 +01:00
Catobat 6a59f58230 Consider number of separate overworld areas when picking a grid layout 2026-02-22 23:11:06 +01:00
Catobat b8884e9010 Add and update presets for Grid Layout Shuffle 2026-02-22 23:11:06 +01:00
aerinon f04ede1e21 doc: fix broken links 2026-02-11 12:22:44 -07:00
aerinon 0e432106d5 fix: handle universal keys issue 2026-02-11 10:49:33 -07:00
aerinon 40260c4fd4 fix: logic issue in PoD Arena (too stringent requirements) 2026-02-11 10:20:39 -07:00
Catobat 78c389e2d5 Add Grid Layout Shuffle Customizer options for custom arrangements, restricted positions and split large screens 2026-02-08 21:57:46 +01:00
Catobat f5d547cc5e Handle trimming and wrapping for large pieces 2026-02-07 12:29:32 +01:00
Catobat 086d1bbc85 Place pieces with only one possible position first 2026-02-05 20:22:42 +01:00
Catobat 0133bd1da7 Implement piece merging 2026-02-05 20:22:42 +01:00
karafruit b1a71ef9b1 Merge in OW Shuffle 0.7.0.2 (#3)
Reviewed-on: #3
2026-02-03 23:47:48 +00:00
karafruit 699d395b3d Update texts 2026-02-03 17:46:18 -06:00
aerinon 27acabadef doc: update known issues 2026-02-03 13:22:02 -07:00
aerinon d3f8e5fd58 fix: key counts when door shuffle is off 2026-02-03 13:17:42 -07:00
Catobat 87ba33852f Refactor how large screen quadrants are stored in grids 2026-02-01 14:15:19 +01:00
karafruit 6859f5cd24 Update prize positions on world map 2026-01-31 13:02:07 -06:00
karafruit 8a7cc02282 Merge remote-tracking branch 'codemann/OverworldShuffle' into codemann_OverworldShuffle 2026-01-31 08:57:53 -06:00
codemann8 ac17d0ead8 Merge branch 'OverworldShuffleDev' into OverworldShuffle 2026-01-30 12:41:38 -06:00
codemann8 ad8dff3b2d Version bump 0.7.0.2 2026-01-30 12:41:26 -06:00
codemann8 f1aef298ef Minor efficiency 2026-01-30 12:35:42 -06:00
aerinon e27fb51dc9 deploy: github action site deploy 2026-01-30 10:09:22 -07:00
aerinon bf92fe91c2 doc: new documentation helps
fix: issue with blank shop items
2026-01-30 10:05:29 -07:00
karafruit 950df6b1d0 Remove empty bottle from fairy refill pool 2026-01-29 22:36:25 -06:00
codemann8 2a24048e87 Fix buffered sword issue when transitioning to water with sword out 2026-01-29 21:26:32 -06:00
codemann8 afe888a87a Fix Link sprite using vanilla coords on map check in Special OW 2026-01-29 20:53:24 -06:00
karafruit dab247807f Update baserom 2026-01-29 15:53:14 -06:00
codemann8 09254850d3 Fixed error with bombbag + non-shopsanity 2026-01-28 20:03:56 -06:00
codemann8 31f634396a Fixed issue with map checks showing opposite world icons in Inverted 2026-01-28 19:49:20 -06:00
codemann8 daa54e8aad Fixed palette issue with map checks when Link stands in grass/water 2026-01-28 18:40:51 -06:00
codemann8 b16777ede7 Added new PlasmaKappa tribute TF text 2026-01-28 18:13:58 -06:00
karafruit fb96d04e56 Update baserom 2026-01-27 22:12:20 -06:00
karafruit 54981b5c51 Update baserom to fix OW Map palette issue 2026-01-27 00:26:09 -06:00
aerinon eda03d8657 chore: version bump 2026-01-26 15:10:51 -07:00
aerinon 31682fb8a2 doc: update release note 2026-01-26 14:58:17 -07:00
theclearmouse fabad625d2 add main tournament 2025 winner 2026-01-26 14:56:07 -07:00
karafruit f43fb18bad Remove some more dead files 2026-01-25 22:29:38 -06:00
karafruit ff4f546ec9 Add collections-extended as a proper dependency 2026-01-25 22:27:22 -06:00
karafruit 6a58773dad Pull in OR 0.7.0.1 (#2)
Reviewed-on: #2
2026-01-26 04:19:24 +00:00
karafruit 51b581aa8c Yet more spacing fixes 2026-01-25 22:14:57 -06:00
karafruit 6949545ef8 More spacing fixes 2026-01-25 22:08:34 -06:00
codemann8 83254f4c78 Moved Flute Shuffle 2026-01-25 00:06:19 -06:00
aerinon a2b23110c4 fix: started using the map_hud_mode flag (somewhat against my better judgement, there's some crufty asm lying about) 2026-01-16 15:46:37 -07:00
aerinon 3fab26f423 fix: prevent locked location from being moved by rupee balancing 2026-01-15 15:16:02 -07:00
aerinon 8480353028 fix: specific fix for vanilla entrance shuffle with no doors to properly process dungeon in the correct order for key logic 2026-01-07 10:59:36 -07:00
aerinon bb2228d70a fix: keys 2025-12-09 11:20:34 -07:00
aerinon cfa448947d chore: bump version 2025-12-09 08:09:52 -07:00
aerinon 6a0aa190a9 fix: issue with keys counts not updating correctly 2025-12-08 16:37:04 -07:00
88 changed files with 5428 additions and 2704 deletions
+81
View File
@@ -0,0 +1,81 @@
# GitHub Pages Deployment Workflow
name: 📄 Deploy GitHub Pages
# Deploy on push to DoorDevUnstable branch
on:
push:
branches:
- DoorDevUnstable
# Allow manual trigger
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Build job
build:
name: 🔨 Build Site
runs-on: ubuntu-latest
steps:
- name: ✔️ Checkout
uses: actions/checkout@v4
- name: 💎 Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: false
- name: 💿 Install dependencies
run: |
gem install bundler
bundle config set --local path 'vendor/bundle'
# Create Gemfile if it doesn't exist
if [ ! -f Gemfile ]; then
cat > Gemfile << 'EOF'
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
gem 'jekyll-feed'
gem 'jekyll-seo-tag'
gem 'jekyll-sitemap'
gem 'just-the-docs'
EOF
fi
bundle install
- name: 🔨 Build with Jekyll
run: bundle exec jekyll build --baseurl "/ALttPDoorRandomizer"
env:
JEKYLL_ENV: production
- name: 📤 Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_site
# Deployment job
deploy:
name: 🚀 Deploy to GitHub Pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: 🚀 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: ✅ Deployment complete
run: |
echo "🎉 GitHub Pages deployed successfully!"
echo "📄 Site URL: ${{ steps.deployment.outputs.page_url }}"
-1
View File
@@ -1 +0,0 @@
<randall.rupper@gmail.com> <randall.rupper@sirsidynix.com>
+27 -1
View File
@@ -164,6 +164,7 @@ class World(object):
set_player_attr('bigkeyshuffle', 'none')
set_player_attr('prizeshuffle', 'none')
set_player_attr('showloot', 'never')
set_player_attr('loothud', 'never')
set_player_attr('showmap', 'map')
set_player_attr('restrict_boss_items', 'none')
set_player_attr('bombbag', False)
@@ -202,6 +203,7 @@ class World(object):
set_player_attr('damage_challenge', 'normal')
set_player_attr('shuffle_damage_table', 'vanilla')
set_player_attr('crystal_book', False)
set_player_attr('extra_keys', 0)
set_player_attr('collection_rate', False)
set_player_attr('colorizepots', True)
set_player_attr('pot_pool', {})
@@ -353,6 +355,16 @@ class World(object):
def is_tile_lw_like(self, owid, player):
return (owid >= 0x40 and owid < 0x80) == self.is_tile_swapped(owid, player)
def get_portal_unsafe(self, portal_name, player):
if (portal_name, player) in self._portal_cache:
return self._portal_cache[(portal_name, player)]
else:
for portal in self.dungeon_portals[player]:
if portal.name == portal_name and portal.player == player:
self._portal_cache[(portal_name, player)] = portal
return portal
return None
def is_atgt_swapped(self, player):
return self.is_tile_swapped(0x03, player) and self.is_tile_swapped(0x1b, player)
@@ -1507,7 +1519,10 @@ class CollectionState(object):
if not item:
return
changed = False
if item.name.startswith('Progressive '):
if item.name == "Sword and Shield":
self.prog_items["Fighter Sword", item.player] += 1
self.prog_items["Blue Shield", item.player] += 1
elif item.name.startswith('Progressive '):
if 'Sword' in item.name:
if self.has('Golden Sword', item.player):
pass
@@ -1968,6 +1983,7 @@ class Dungeon(object):
self.prize = None
self.big_key = big_key
self.small_keys = small_keys
self.extra_small_keys = 0
self.dungeon_items = dungeon_items
self.bosses = dict()
self.player = player
@@ -2882,6 +2898,10 @@ class Item(object):
def compass(self):
return self.type == 'Compass'
@property
def event(self):
return self.type == 'Event'
@property
def dungeon(self):
if not self.smallkey and not self.bigkey and not self.map and not self.compass:
@@ -3144,6 +3164,7 @@ class Spoiler(object):
'bigkeyshuffle': self.world.bigkeyshuffle,
'prizeshuffle': self.world.prizeshuffle,
'showloot': self.world.showloot,
'loothud': self.world.loothud,
'showmap': self.world.showmap,
'boss_shuffle': self.world.boss_shuffle,
'enemy_shuffle': self.world.enemy_shuffle,
@@ -3164,6 +3185,7 @@ class Spoiler(object):
'damage_challenge': self.world.damage_challenge,
'shuffle_damage_table': self.world.shuffle_damage_table,
'crystal_book': self.world.crystal_book,
'extra_keys': self.world.extra_keys,
'triforcegoal': self.world.treasure_hunt_count,
'triforcepool': self.world.treasure_hunt_total,
'race': self.world.settings.world_rep['meta']['race'],
@@ -3171,6 +3193,8 @@ class Spoiler(object):
'code': {p: Settings.make_code(self.world, p) for p in range(1, self.world.players + 1)},
'seed': self.world.seed
}
if self.hashes:
self.metadata['hash'] = {p: self.hashes[p, 0] for p in range(1, self.world.players + 1)} # TODO: make this work for multiple teams
for p in range(1, self.world.players + 1):
from ItemList import set_default_triforce
@@ -3417,6 +3441,7 @@ class Spoiler(object):
outfile.write('Big Key Shuffle:'.ljust(line_width) + '%s\n' % self.metadata['bigkeyshuffle'][player])
outfile.write('Prize Shuffle:'.ljust(line_width) + '%s\n' % self.metadata['prizeshuffle'][player])
outfile.write('Show Value of Checks:'.ljust(line_width) + '%s\n' % self.metadata['showloot'][player])
outfile.write('Show Value of Checks on HUD:'.ljust(line_width) + '%s\n' % self.metadata['loothud'][player])
outfile.write('Show Map:'.ljust(line_width) + '%s\n' % self.metadata['showmap'][player])
outfile.write('Key Logic Algorithm:'.ljust(line_width) + '%s\n' % self.metadata['key_logic'][player])
outfile.write('\n')
@@ -3443,6 +3468,7 @@ class Spoiler(object):
outfile.write('Damage Challenge:'.ljust(line_width) + '%s\n' % self.metadata['damage_challenge'][player])
outfile.write('Damage Table Randomization:'.ljust(line_width) + '%s\n' % self.metadata['shuffle_damage_table'][player])
outfile.write('Crystal Book:'.ljust(line_width) + '%s\n' % yn(self.metadata['crystal_book'][player]))
outfile.write('Extra Keys:'.ljust(line_width) + '%d%%\n' % self.metadata['extra_keys'][player])
outfile.write('Hints:'.ljust(line_width) + '%s\n' % yn(self.metadata['hints'][player]))
outfile.write('Race:'.ljust(line_width) + '%s\n' % yn(self.world.settings.world_rep['meta']['race']))
+20
View File
@@ -1,5 +1,25 @@
# Changelog
# 0.7.0.3
- Further updates and new yamls for Grid OW Shuffle
- Further customizer options for Grid OW Shuffle like defining screens that should stay together
- Fix buffer sword slash when dashing into water
- Fixed bug with MSU-1 GT2 track not falling back to GT track
- Fix for Kiki unfollowing after certain entrance transition conditions
- Fixed bug/oversight with vanilla_fill and prize_shuffle
- Changed big bomb shop vendor text to be follower agnostic
- Updated crosskeys winners (thanks clearmouse)
- Fixed bug with potential locale determination (thanks Esme)
- \~Merged in DR v1.5.6~
# 0.7.0.2
- Fixed money error for bombbag/take-anys
- Fixed palette issue for map check/flute menu
- Fixed issue with dungeon icons showing in opposite world in Inverted
- Fixed Links position in map checks when in Special OW areas
- Fixed buffered sword issue in OW Shuffle water transitions
- Added PlasmaKappa tribute TF room text
# 0.7.0.1
- Fixed buggy sprites in post-Aga Zora's Domain
- Fixed L/R map switch when in special OW screens
+257
View File
@@ -0,0 +1,257 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
**ALttPDoorRandomizer** is a sophisticated dungeon and door randomizer for *The Legend of Zelda: A Link to the Past* (SNES). It extends the standard ALTTP Entrance Randomizer with advanced dungeon shuffling capabilities that can rearrange dungeon interiors at the door and sector level.
- **Repository**: https://github.com/aerinon/ALttPDoorRandomizer
- **Python Version**: 3.10+
- **Current Branch**: DoorDevUnstable (dev branch: NewGeneration)
- **Discord**: #door-rando and #bug-reports channels at ALTTP Randomizer discord
## Development Commands
### Running the Randomizer
```bash
# CLI interface
python DungeonRandomizer.py
# GUI interface
python Gui.py
```
### Dependencies
```bash
# Install platform-specific dependencies
python resources/ci/common/local_install.py
# For multiworld server/client
# Run the same command to install multiworld dependencies
```
### Testing
```bash
# Run test suite
python TestSuite.py
# Run test suite with specific door shuffle mode
python TestSuite.py --dr basic --count 10 --tense 2
# Individual test files (unittest-based)
python -m pytest test/
python -m pytest test/dungeons/TestDarkPalace.py
```
### ROM Generation
```bash
# Basic door shuffle seed
python DungeonRandomizer.py --doorShuffle crossed --intensity 2
# Suppress ROM output (for testing)
python DungeonRandomizer.py --suppress_rom --spoiler none
# Create BPS patch
python DungeonRandomizer.py --bps
```
## Architecture Overview
### Generation Pipeline
The randomizer follows this high-level flow (orchestrated in `Main.py`):
1. **World Setup** → Initialize World object, parse settings, set seed
2. **Region Creation** → Build game regions, locations, entrances (`Regions.py`)
3. **Dungeon Structure** → Create dungeon objects and rooms (`Dungeons.py`, `RoomData.py`)
4. **Door/Entrance Shuffling** → Shuffle dungeon interiors and/or overworld entrances
5. **Logic Rules** → Set access requirements for all locations (`Rules.py`)
6**Item Placement** → Generate item pool and place items with logic constraints (`Fill.py`)
7. **ROM Patching** → Apply changes to base ROM (`Rom.py`)
8. **Output** → Generate ROM file, spoiler log, and/or multiworld data
### Core Data Structures (BaseClasses.py)
- **World**: Container for all game state, regions, dungeons, items, and settings
- **Region**: Geographic area with locations and exits
- **Location**: Item placement spot with access rules
- **Item**: Game items with advancement/priority flags
- **Entrance**: Connections between regions with conditional access
- **CollectionState**: Tracks player's collected items for logic evaluation
### Dungeon Generation System
The dungeon shuffling system uses a three-stage algorithm:
#### 1. DungeonGenLocalSearch (source/dungeon/DungeonGenLocalSearch.py)
**Purpose**: Assigns dungeon sectors to dungeons using constraint satisfaction
**Balancing Constraints**:
- **Polarity**: North/South and East/West door balance
- **Crystal Balance**: Blue/orange barriers must have matching switches
- **Portal Balance**: Entrance distribution
- **Location Balance**: Ensures dungeons have accessible non-big-key locations
- **Branching**: Dead ends vs branches ratio (insufficient branches = unreachable areas)
- **Transitivity**: Validates that doors can actually connect
**Algorithm**: Local search with greedy constraint satisfaction, prioritizing crystal switches → portals → locations → branching → polarity → transitivity
#### 2. DungeonGenTransitivity (source/dungeon/DungeonGenTransitivity.py)
**Purpose**: Validates that door connections are possible for a given sector assignment
**Key Features**:
- Verifies all doors can be validly connected (e.g., North↔South, East↔West, Stairs↔Stairs)
- Propagates crystal switch states through connections
- Detects forced connections and impossible layouts
- Uses depth-first search with constraint propagation
- Handles special mechanics (portals, crystal barriers, special rooms)
#### 3. DungeonStitcherV2 (source/dungeon/DungeonStitcherV2.py)
**Purpose**: Realizes actual door connections from validated sector assignments
**Key Features**:
- Generates random valid door pairings
- Assigns portal connections (dungeon entrances)
- Simulates player traversal to verify connectivity
- Manages crystal barrier state propagation
### Key Logic Components
**Rules.py** (~7000 lines): Sets logical requirements for accessing locations
- Supports multiple logic modes: noglitches, owglitches, hybridglitches, nologic
- Handles multiple key logic algorithms: partial, strict, dangerous, experimental
- Manages dungeon-specific access rules and boss requirements
**Fill.py** (~2000 lines): Item placement algorithms
- **Balanced**: Random distribution
- **Vanilla Fill**: Attempts vanilla item locations when possible
- **Major Location Restriction**: Major items → major locations
- **Dungeon Restriction**: Major items → dungeons
- **District Restriction**: Items distributed by geographic region
**KeyPlacement.py** / **NewKeyLogic.py**: Advanced key door logic
- Handles small key placement with multiple satisfiability algorithms
- Prevents self-locking situations
- Manages big key placement rules
- Validates minimum key requirements for dungeon completion
### Source Module Organization
```
source/
├── dungeon/ # Dungeon generation algorithms and key logic
├── overworld/ # Entrance shuffling (EntranceShuffle2.py)
├── item/ # Item placement utilities (FillUtil.py, District.py)
├── enemizer/ # Enemy randomization system
├── gui/ # GUI components (tkinter-based)
├── rom/ # ROM patching utilities
├── classes/ # Utility classes (BabelFish, CustomSettings)
├── meta/ # Metadata and build tools
└── limited/ # Limited run coordination
```
### Important Files by Size/Complexity
- **DoorShuffle.py** (~8500 lines): Door shuffling orchestration
- **Rules.py** (~7000 lines): Location access logic
- **EnemyList.py** (~6000 lines): Enemy definitions
- **Doors.py** (~5500 lines): Door object definitions
- **Rom.py** (~5500 lines): ROM patching
- **Regions.py** (~5000 lines): World region creation
- **DungeonGenerator.py** (~5000 lines): Legacy dungeon generation
- **EntranceShuffle2.py** (~5000 lines): Entrance shuffling logic
- **BaseClasses.py** (~4000 lines): Core data structures
- **KeyDoorShuffle.py** (~3500 lines): Key door logic
- **PotShuffle.py** (~3500 lines): Pot randomization
## Key Concepts
### Door Shuffle Modes
- **Vanilla**: No shuffling
- **Basic**: Shuffle within each dungeon
- **Partitioned**: Shuffle in pools (Light World, Early Dark World, Late Dark World)
- **Crossed**: Full shuffle between all dungeons
### Intensity Levels
- **Level 1**: Normal doors and spiral staircases
- **Level 2**: + open edges and straight staircases
- **Level 3**: + dungeon lobbies
### Key Shuffle Modes
- **In Dungeon** (keyshuffle=none): Keys restricted to their dungeon
- **Randomized** (keyshuffle=wild): Keys can be anywhere
- **Universal** (keyshuffle=universal): Keys work in any dungeon
### Fill Algorithms (--algorithm)
See Fill.py for implementation details. The algorithm affect where item may be placed.
### Logic Modes
- **noglitches**: Standard logic
- **owglitches**: Overworld glitches (OOB, clips, superbunny)
- **hybridglitches**: + major underworld glitches (not compatible with door shuffle)
- **nologic**: No logical constraints
## Testing Strategy
Tests verify location accessibility with various item combinations:
- **test/dungeons/**: Per-dungeon location access tests
- **test/vanilla/**: Vanilla world logic tests
- **test/owg/**: Overworld glitch logic tests
- **test/inverted/**: Inverted mode tests
- **TestBase.py**: Base test class with utility methods
Use `TestSuite.py` for batch generation testing across modes (Open/Standard/Inverted) and settings.
## Important Development Notes
### Starting Items & Special Items
- **Mirror Scroll**: Dungeon-only mirror (starting item in door shuffle)
- **Bomb Bag**: Optional item that gates bomb usage
- **Pseudo Boots**: Allows dashing but gates certain sequence breaks
### Branch Structure
- **DoorDev**: Main development branch (use for PRs)
- **DoorDevUnstable**: Current working branch
- **Dev/Master**: Do NOT use for PRs
### Git Workflow
Recent commits show work on:
- Limited run coordination
- Custom rooms support
- Key logic improvements (transitivity, portal checks, placement rules)
- Isolated region detection fixes
- Big key placement satisfiability
### Documentation Resources
- **Algorithm.md**: Detailed dungeon generation algorithm documentation
- **docs/ai_context/**: Comprehensive architectural documentation by topic
- **docs/Customizer.md**: Custom seed configuration guide
- **docs/DR_hint_reference.md**: Hint system documentation
- **docs/BUILDING.md**: Build and installation instructions
- **README.md**: User-facing feature documentation
## Common Gotchas
1. **Transitivity Checks**: Most expensive constraint check - always run last
2. **Self-Locking Keys**: Key logic must prevent situations where players cannot access the rest of the dungeon
3. **Crystal Barriers**: Blue/orange barriers require matching switches in dungeon
4. **Portal Distribution**: Each dungeon needs at least one entrance
5. **Branching Balance**: Too many dead ends without branches = unreachable areas
6**Polarity Balance**: N/S and E/W door counts must allow valid connections
## CLI Argument Reference
Key arguments from `resources/app/cli/args.json`:
- `--doorShuffle [vanilla|basic|partitioned|crossed]`
- `--intensity [1|2|3]`
- `--keyshuffle [none|wild|universal]`
- `--key_logic [partial|strict|dangerous|experimental]`
- `--algorithm [balanced|vanilla_fill|major_only|dungeon_only|district]`
- `--logic [noglitches|owglitches|hybridglitches|nologic]`
- `--mode [open|standard|inverted]`
- `--shuffle`: Entrance randomizer options (vanilla, simple, restricted, full, crossed, insanity, etc.)
- `--pottery`: Pot shuffling modes
- `--shopsanity`: Enable shop item randomization
- `--enemizer`: Enemy randomization options
+37 -26
View File
@@ -89,6 +89,7 @@ def parse_cli(argv, no_defaults=False):
parser.add_argument('--count', default=defval(int(settings["count"]) if settings["count"] != "" and settings["count"] is not None else 1), help="\n".join(fish.translate("cli", "help", "count")), type=int)
parser.add_argument('--tries', default=defval(int(settings["tries"]) if settings["tries"] != "" and settings["tries"] is not None else 1), help="\n".join(fish.translate("cli", "help", "tries")), type=int)
parser.add_argument('--customitemarray', default={}, help=argparse.SUPPRESS)
parser.add_argument('--skip_money_balance', action="store_true", help=argparse.SUPPRESS)
# included for backwards compatibility
parser.add_argument('--multi', default=defval(settings["multi"]), type=lambda value: min(max(int(value), 1), 255))
@@ -106,7 +107,14 @@ def parse_cli(argv, no_defaults=False):
ret = parser.parse_args(argv)
if ret.keysanity:
ret.mapshuffle, ret.compassshuffle, ret.keyshuffle, ret.bigkeyshuffle = ['wild'] * 4
if ret.mapshuffle == "none":
ret.mapshuffle = "wild"
if ret.compassshuffle == "none":
ret.compassshuffle = "wild"
if ret.keyshuffle == "none":
ret.keyshuffle = "wild"
if ret.bigkeyshuffle == "none":
ret.bigkeyshuffle = "wild"
if ret.keydropshuffle:
ret.dropshuffle = 'keys' if ret.dropshuffle == 'none' else ret.dropshuffle
@@ -153,31 +161,32 @@ def parse_cli(argv, no_defaults=False):
'crystals_ganon', 'crystals_gt', 'bosses_ganon',
'bosshunt_include_agas', 'ganon_item', 'openpyramid',
'mapshuffle', 'compassshuffle', 'keyshuffle',
'bigkeyshuffle', 'prizeshuffle', 'showloot', 'showmap',
'startinventory', 'usestartinventory', 'bombbag',
'shuffleganon', 'overworld_map', 'restrict_boss_items',
'triforce_max_difference', 'triforce_pool_min',
'triforce_pool_max', 'triforce_goal_min',
'triforce_goal_max', 'triforce_min_difference',
'triforce_goal', 'triforce_pool', 'shufflelinks',
'shuffletavern', 'skullwoods', 'linked_drops',
'pseudoboots', 'mirrorscroll', 'dark_rooms',
'damage_challenge', 'shuffle_damage_table',
'crystal_book', 'retro', 'accessibility', 'hints',
'beemizer', 'experimental', 'dungeon_counters',
'shufflebosses', 'shuffleenemies', 'enemy_health',
'enemy_damage', 'shufflepots', 'ow_palettes',
'uw_palettes', 'sprite', 'triforce_gfx', 'disablemusic',
'quickswap', 'fastmenu', 'heartcolor', 'heartbeep',
'remote_items', 'shopsanity', 'dropshuffle', 'pottery',
'keydropshuffle', 'mixed_travel',
'standardize_palettes', 'code', 'reduce_flashing',
'shuffle_sfx', 'shuffle_sfxinstruments',
'shuffle_songinstruments', 'msu_resume',
'collection_rate', 'colorizepots', 'decoupledoors',
'door_type_mode', 'bonk_drops', 'trap_door_mode',
'key_logic_algorithm', 'door_self_loops',
'any_enemy_logic', 'aga_randomness', 'money_balance']:
'bigkeyshuffle', 'prizeshuffle', 'showloot', 'loothud',
'showmap', 'startinventory', 'usestartinventory',
'bombbag', 'shuffleganon', 'overworld_map',
'restrict_boss_items', 'triforce_max_difference',
'triforce_pool_min', 'triforce_pool_max',
'triforce_goal_min', 'triforce_goal_max',
'triforce_min_difference', 'triforce_goal',
'triforce_pool', 'shufflelinks', 'shuffletavern',
'skullwoods', 'linked_drops', 'pseudoboots',
'mirrorscroll', 'dark_rooms', 'damage_challenge',
'shuffle_damage_table', 'crystal_book', 'extra_keys',
'retro', 'accessibility', 'hints', 'beemizer',
'experimental', 'dungeon_counters', 'shufflebosses',
'shuffleenemies', 'enemy_health', 'enemy_damage',
'shufflepots', 'ow_palettes', 'uw_palettes', 'sprite',
'triforce_gfx', 'disablemusic', 'quickswap', 'fastmenu',
'heartcolor', 'heartbeep', 'remote_items', 'shopsanity',
'dropshuffle', 'pottery', 'keydropshuffle',
'mixed_travel', 'standardize_palettes', 'code',
'reduce_flashing', 'shuffle_sfx',
'shuffle_sfxinstruments', 'shuffle_songinstruments',
'msu_resume', 'collection_rate', 'colorizepots',
'decoupledoors', 'door_type_mode', 'bonk_drops',
'trap_door_mode', 'key_logic_algorithm',
'door_self_loops', 'any_enemy_logic', 'aga_randomness',
'money_balance', 'patches']:
value = getattr(defaults, name) if getattr(playerargs, name) is None else getattr(playerargs, name)
if player == 1:
setattr(ret, name, {1: value})
@@ -254,6 +263,7 @@ def parse_settings():
"damage_challenge": "normal",
"shuffle_damage_table": "vanilla",
"crystal_book": False,
"extra_keys": 0,
"shuffleenemies": "none",
"shufflebosses": "none",
@@ -273,6 +283,7 @@ def parse_settings():
"bigkeyshuffle": "none",
"prizeshuffle": "none",
"showloot": "never",
"loothud": "never",
"showmap": "map",
"keysanity": False,
"door_shuffle": "vanilla",
+52 -4
View File
@@ -3,6 +3,7 @@ import time
from collections import defaultdict, deque
from enum import Flag, unique
from itertools import chain
from math import ceil
from typing import DefaultDict, Dict, List
import RaceRandom as random
@@ -140,6 +141,9 @@ def link_doors_prep(world, player):
world.get_portal('Turtle Rock Eye Bridge', player).destination = True
else:
analyze_portals(world, player)
if world.doorShuffle[player] == 'vanilla': # these are always not destinations
world.get_portal('Desert Back', player).destination = False
world.get_portal('Skull 3', player).destination = False
for portal in world.dungeon_portals[player]:
connect_portal(portal, world, player)
@@ -269,11 +273,21 @@ def vanilla_key_logic(world, player):
enabled_entrances = world.enabled_entrances[player] = {}
builder_queue = deque(builders)
last_key, loops = None, 0
# --- Precompute all potential portals for each builder using dungeon_portals ---
from DungeonGenerator import dungeon_portals
all_potential_portals_map = {}
for builder in builders:
portal_names = list(dungeon_portals.get(builder.name, []))
all_potential_portals_map[builder.name] = set(world.get_portal(portal_name, player).door.entrance.parent_region.name for portal_name in portal_names)
while len(builder_queue) > 0:
builder = builder_queue.popleft()
origin_list = entrances_map[builder.name]
find_enabled_origins(builder.sectors, enabled_entrances, origin_list, entrances_map, builder.name)
if len(origin_list) <= 0:
all_potential_origins = all_potential_portals_map[builder.name]
enabled = entrances_map[builder.name]
if len(origin_list) <= 0 or should_delay_processing(enabled, all_potential_origins, potentials, connections, world, player):
if last_key == builder.name or loops > 1000:
origin_name = (world.get_region(origin_list[0], player).entrances[0].parent_region.name
if len(origin_list) > 0 else 'no origin')
@@ -346,6 +360,33 @@ def validate_vanilla_reservation(dungeon, world, player):
return validate_key_layout(world.key_layout[player][dungeon.name], world, player)
def should_delay_processing(enabled_origins, potential_origins, potentials, connections, world, player):
disabled_origins = potential_origins.difference(set(enabled_origins))
main_targets = []
for do in disabled_origins:
region = world.get_region(do, player)
portal = _find_portal_for_region(region, world, player)
if portal and not portal.destination:
main_targets.append(region)
if not main_targets:
return False # No non-destination disabled origins found
enabling_regions = {connections[r.name] for r in main_targets}
for enabling_region in enabling_regions:
dungeon_names = {
portal.door.entrance.parent_region.dungeon.name
for dungeon_r in potentials[enabling_region]
if (portal := _find_portal_for_region(world.get_region(dungeon_r, player), world, player))
}
if len(dungeon_names) > 1:
return True
return False
def _find_portal_for_region(region, world, player):
return next((p for ent in region.entrances
if (p := world.get_portal_unsafe(ent.parent_region.name.rstrip(' Portal'), player))), None)
# some useful functions
oppositemap = {
Direction.South: Direction.North,
@@ -1559,7 +1600,11 @@ def assign_cross_keys(dungeon_builders, world, player):
if actual_chest_keys == 0:
dungeon.small_keys = []
else:
dungeon.small_keys = [ItemFactory(dungeon_keys[name], player)] * actual_chest_keys
extra_keys = ceil(actual_chest_keys * world.extra_keys[player] / 100)
logger.debug(f'Adding {extra_keys} extra small keys to {name}')
dungeon.extra_small_keys = extra_keys
created_keys = actual_chest_keys + extra_keys
dungeon.small_keys = [ItemFactory(dungeon_keys[name], player)] * created_keys
logger.info(f'{world.fish.translate("cli", "cli", "keydoor.shuffle.time.crossed")}: {time.process_time()-start}')
@@ -2131,7 +2176,10 @@ def shuffle_small_key_doors(door_type_pools, used_doors, start_regions_map, all_
if actual_chest_keys == 0:
dungeon.small_keys = []
else:
dungeon.small_keys = [ItemFactory(dungeon_keys[dungeon_name], player) for _ in range(actual_chest_keys)]
extra_keys = ceil(actual_chest_keys * world.extra_keys[player] / 100)
dungeon.extra_small_keys = extra_keys
created_keys = actual_chest_keys + extra_keys
dungeon.small_keys = [ItemFactory(dungeon_keys[dungeon_name], player) for _ in range(created_keys)]
for name, small_list in small_map.items():
used_doors.update(flatten_pair_list(small_list))
@@ -3721,7 +3769,7 @@ logical_connections = [
('PoD Pit Room Block Path S', 'PoD Pit Room'),
('PoD Arena Landing Bonk Path', 'PoD Arena Bridge'),
('PoD Arena North Drop Down', 'PoD Arena Main'),
('PoD Arena Bridge Drop Down', 'PoD Arena Main'),
('PoD Arena Bridge Drop Down', 'PoD Arena Landing'),
('PoD Arena North to Landing Barrier - Orange', 'PoD Arena Landing'),
('PoD Arena Main to Ranged Crystal', 'PoD Arena Main - Ranged Crystal'),
('PoD Arena Main to Landing Barrier - Blue', 'PoD Arena Landing'),
+30 -9
View File
@@ -117,7 +117,7 @@ def fill_dungeons_restrictive(world, shuffled_locations):
for attempt in range(15):
try:
for player in range(1, world.players + 1):
if world.prizeshuffle[player] == 'nearby':
if world.prizeshuffle[player] == 'nearby' and world.algorithm != 'vanilla_fill':
dungeon_pool = []
for dungeon in world.dungeons:
from Dungeons import dungeon_table
@@ -149,6 +149,14 @@ def fill_dungeons_restrictive(world, shuffled_locations):
else:
raise FillError(f'Unable to place dungeon prizes: {", ".join(list(map(lambda d: d.name, prizes)))}')
if world.algorithm == 'vanilla_fill':
for prize in prizes_copy:
if prize.is_near_dungeon_item(world):
if prize.location and prize.location.parent_region.dungeon:
dungeon = prize.location.parent_region.dungeon
dungeon.prize = prize
prize.dungeon_object = dungeon
random.shuffle(shuffled_locations)
fill(all_state_base, others, shuffled_locations)
@@ -240,9 +248,11 @@ def verify_spot_to_fill(location, item_to_place, max_exp_state, single_player_pl
test_state.sweep_for_events()
if location.can_fill(test_state, item_to_place, perform_access_check):
if valid_key_placement(item_to_place, location, key_pool, test_state, world):
if (item_to_place.prize and world.prizeshuffle[item_to_place.player] == 'none') \
if (item_to_place.prize and (world.prizeshuffle[item_to_place.player] == 'none' \
or (world.algorithm == 'vanilla_fill' and item_to_place.is_near_dungeon_item(world)))) \
or valid_dungeon_placement(item_to_place, location, world):
return location
if item_to_place.smallkey or item_to_place.bigkey or item_to_place.prize:
location.item = None
location.event = False
@@ -302,7 +312,9 @@ def valid_dungeon_placement(item, location, world):
dungeon = check_dungeon
if dungeon:
layout = world.dungeon_layouts[location.player][dungeon.name]
if not is_dungeon_item(item, world) or item.player != location.player:
if item.event:
return True
elif not is_dungeon_item(item, world) or item.player != location.player:
if item.prize and item.is_near_dungeon_item(world):
return item.dungeon_object == dungeon and layout.free_items > 0
return layout.free_items > 0
@@ -336,6 +348,10 @@ def track_dungeon_items(item, location, world):
if item.prize:
location.parent_region.dungeon.prize = item
item.dungeon_object = location.parent_region.dungeon
elif world.algorithm == 'vanilla_fill' and item.prize and location.parent_region.dungeon:
dungeon = location.parent_region.dungeon
dungeon.prize = item
item.dungeon_object = dungeon
def is_dungeon_item(item, world):
@@ -728,8 +744,13 @@ def fast_fill_pot_for_multiworld(world, item_pool, fill_locations):
flex = 256 - world.data_tables[player].pot_secret_table.multiworld_count
fill_count = len(pot_fill_locations[player]) - flex
if fill_count > 0:
fill_spots = random.sample(pot_fill_locations[player], fill_count)
fill_items = random.sample(pot_item_pool[player], fill_count)
first_count = min(fill_count, len(pot_item_pool[player]))
fill_items = random.sample(pot_item_pool[player], first_count)
remaining = fill_count - first_count
if remaining > 0:
other_items = [i for i in item_pool if i.player == player and i not in pot_item_pool[player]]
fill_items += random.sample(other_items, min(remaining, len(other_items)))
fill_spots = random.sample(pot_fill_locations[player], len(fill_items))
for x in fill_items:
item_pool.remove(x)
for x in fill_spots:
@@ -1112,7 +1133,7 @@ def balance_money_progression(world):
slot = shop_to_location_table[location.parent_region.name].index(location.name)
shop = location.parent_region.shop
shop_item = shop.inventory[slot]
if location.item and interesting_item(location, location.item, world, location.item.player):
if shop_item and location.item and interesting_item(location, location.item, world, location.item.player):
if location.item.name.startswith('Rupee') and loc_player == location.item.player:
if shop_item['price'] < rupee_chart[location.item.name]:
wallet[loc_player] -= shop_item['price'] # will get picked up in the location_free block
@@ -1135,9 +1156,9 @@ def balance_money_progression(world):
if location.item:
if location.item.name.startswith('Rupee'):
if not (location.item.name == 'Rupee (1)' and world.algorithm != 'district'):
wallet[location.item.player] += rupee_chart[location.item.name]
if location.item.name != 'Rupees (300)':
balance_locations[location.item.player].add(location)
wallet[location.item.player] += rupee_chart[location.item.name]
if location.item.name != 'Rupees (300)':
balance_locations[location.item.player].add(location)
elif interesting_item(location, location.item, world, location.item.player):
checked_locations.append(location)
elif location.item.name in acceptable_balancers:
+64 -28
View File
@@ -43,8 +43,8 @@ alwaysitems = ['Bombos', 'Book of Mudora', 'Cane of Somaria', 'Ether', 'Fire Rod
progressivegloves = ['Progressive Glove'] * 2
basicgloves = ['Power Glove', 'Titans Mitts']
normalbottles = ['Bottle', 'Bottle (Red Potion)', 'Bottle (Green Potion)', 'Bottle (Blue Potion)', 'Bottle (Fairy)', 'Bottle (Bee)', 'Bottle (Good Bee)']
hardbottles = ['Bottle', 'Bottle (Red Potion)', 'Bottle (Green Potion)', 'Bottle (Blue Potion)', 'Bottle (Bee)', 'Bottle (Good Bee)']
normalbottles = ['Bottle (Red Potion)', 'Bottle (Green Potion)', 'Bottle (Blue Potion)', 'Bottle (Fairy)', 'Bottle (Bee)', 'Bottle (Good Bee)']
hardbottles = ['Bottle (Red Potion)', 'Bottle (Green Potion)', 'Bottle (Blue Potion)', 'Bottle (Bee)', 'Bottle (Good Bee)']
normalbaseitems = (['Magic Upgrade (1/2)', 'Single Arrow', 'Sanctuary Heart Container', 'Arrows (10)', 'Bombs (10)'] +
['Rupees (300)'] * 4 + ['Boss Heart Container'] * 10 + ['Piece of Heart'] * 24)
@@ -325,6 +325,42 @@ def generate_itempool(world, player):
for _ in range(0, amt):
pool.append('Rupees (20)')
if world.shopsanity[player] and not skip_pool_adjustments:
for shop in world.shops[player]:
if shop.region.name in shop_to_location_table:
for index, slot in enumerate(shop.inventory):
if slot:
item = slot['item']
if shop.region.name == 'Capacity Upgrade' and world.difficulty[player] != 'normal':
pool.append('Rupees (20)')
else:
pool.append(item)
if (world.customizer and world.customizer.get_item_pool_adjust()
and player in world.customizer.get_item_pool_adjust()):
diff = difficulties[world.difficulty[player]]
for item_name, delta in world.customizer.get_item_pool_adjust()[player].items():
if not isinstance(delta, int):
continue
if delta > 0:
if item_name == 'Bottle (Random)':
for _ in range(delta):
pool.append(random.choice(diff.bottles))
else:
pool.extend([item_name] * delta)
elif delta < 0:
remove_count = abs(delta)
if item_name == 'Bottle (Random)':
bottle_names = set(diff.bottles)
for _ in range(remove_count):
bottle = next((x for x in pool if x in bottle_names), None)
if bottle:
pool.remove(bottle)
else:
for _ in range(remove_count):
if item_name in pool:
pool.remove(item_name)
if world.logic[player] == 'hybridglitches' and world.pottery[player] not in ['none', 'cave'] \
and world.keyshuffle[player] not in ['none', 'nearby']:
# In HMG force swamp smalls in pots to allow getting out of swamp palace
@@ -336,6 +372,13 @@ def generate_itempool(world, player):
world.push_precollected(ItemFactory(item, player))
if world.mode[player] == 'standard' and not world.state.has_blunt_weapon(player):
if world.customizer:
placements = world.customizer.get_placements()
if placements:
custom_uncle = placements.get(player, {}).get("Link's Uncle")
if custom_uncle:
placed_items["Link's Uncle"] = custom_uncle
if "Link's Uncle" not in placed_items:
found_sword = False
found_bow = False
@@ -364,20 +407,10 @@ def generate_itempool(world, player):
world.escape_assist[player].append('bombs')
for (location, item) in placed_items.items():
world.push_item(world.get_location(location, player), ItemFactory(item, player), False)
world.get_location(location, player).event = True
world.get_location(location, player).locked = True
if world.shopsanity[player] and not skip_pool_adjustments:
for shop in world.shops[player]:
if shop.region.name in shop_to_location_table:
for index, slot in enumerate(shop.inventory):
if slot:
item = slot['item']
if shop.region.name == 'Capacity Upgrade' and world.difficulty[player] != 'normal':
pool.append('Rupees (20)')
else:
pool.append(item)
loc = world.get_location(location, player)
world.push_item(loc, ItemFactory(item, player), False)
loc.event = True
loc.locked = True
items = ItemFactory(pool, player)
if world.shopsanity[player]:
@@ -463,11 +496,11 @@ def generate_itempool(world, player):
# shuffle bottle refills
if world.difficulty[player] in ['hard', 'expert']:
waterfall_bottle = hardbottles[random.randint(0, 5)]
pyramid_bottle = hardbottles[random.randint(0, 5)]
waterfall_bottle = hardbottles[random.randint(0, 4)]
pyramid_bottle = hardbottles[random.randint(0, 4)]
else:
waterfall_bottle = normalbottles[random.randint(0, 6)]
pyramid_bottle = normalbottles[random.randint(0, 6)]
waterfall_bottle = normalbottles[random.randint(0, 5)]
pyramid_bottle = normalbottles[random.randint(0, 5)]
world.bottle_refills[player] = (waterfall_bottle, pyramid_bottle)
set_up_shops(world, player)
@@ -1507,7 +1540,7 @@ def make_customizer_pool(world, player):
elif timer == 'ohko':
clock_mode = 'ohko'
if goal in ['sanctuary']:
if world.goal[player] in ['sanctuary']:
place_item('Sanctuary', 'Triforce')
if world.custom_goals[player]['pedgoal'] and 'requirements' in world.custom_goals[player]['pedgoal'] and world.custom_goals[player]['pedgoal']['requirements'][0]['condition'] == 0x00:
place_item('Master Sword Pedestal', 'Nothing')
@@ -1643,12 +1676,15 @@ def fill_specific_items(world):
item_to_place, event_flag = get_item_and_event_flag(item, world, player,
dungeon_pool, prize_set, prize_pool)
if item_to_place:
world.push_item(loc, item_to_place, False)
loc.locked = True
track_outside_keys(item_to_place, loc, world)
track_dungeon_items(item_to_place, loc, world)
loc.event = (event_flag or item_to_place.advancement
or item_to_place.bigkey or item_to_place.smallkey)
if not loc.item:
world.push_item(loc, item_to_place, False)
loc.locked = True
track_outside_keys(item_to_place, loc, world)
track_dungeon_items(item_to_place, loc, world)
loc.event = (event_flag or item_to_place.advancement
or item_to_place.bigkey or item_to_place.smallkey)
elif loc.item != item_to_place:
logging.getLogger('').warning("Failed to place item %s at location %s because it already contained %s", item_to_place, loc.name, loc.item)
else:
raise Exception(f'Did not find "{item}" in item pool to place at "{location}"')
advanced_placements = world.customizer.get_advanced_placements()
@@ -1776,7 +1812,7 @@ def shuffle_event_items(world, player):
continue
break
else:
raise FillError(f'Unable to place followers: {", ".join(list(map(lambda d: d.hint_text, follower_locations)))}')
raise FillError(f'Unable to place followers: {", ".join(list(map(lambda f: f.name, pickup_items)))}')
def get_item_and_event_flag(item, world, player, dungeon_pool, prize_set, prize_pool):
+1 -1
View File
@@ -55,7 +55,7 @@ item_table = {'Bow': (True, False, None, 0x0B, 200, 'Bow!\nJoin the archer class
'Master Sword': (True, False, 'Sword', 0x50, 100, 'Master Sword!\nEvil\'s bane!', 'and the master sword', 'sword-wielding kid', 'glow sword for sale', 'fungus for blue slasher', 'sword boy fights again', 'the Master Sword'),
'Tempered Sword': (True, False, 'Sword', 0x02, 150, 'Tempered Sword!\nMore slashy!', 'the tempered sword', 'sword-wielding kid', 'flame sword for sale', 'fungus for red slasher', 'sword boy fights again', 'the Tempered Sword'),
'Fighter Sword': (True, False, 'Sword', 0x49, 50, 'Fighter Sword!\nStarter level slashy!', 'the tiny sword', 'sword-wielding kid', 'tiny sword for sale', 'fungus for tiny slasher', 'sword boy fights again', 'the Fighter Sword'),
'Sword and Shield': (True, False, 'Sword', 0x00, 'Sword and Shield!\nUncle sword ahoy!', 'the sword and shield', 'sword and shield-wielding kid', 'training set for sale', 'fungus for training set', 'sword and shield boy fights again', 'the small sword and shield'),
'Sword and Shield': (True, False, 'Sword', 0x00, 50, 'Sword and Shield!\nUncle sword ahoy!', 'the sword and shield', 'sword and shield-wielding kid', 'training set for sale', 'fungus for training set', 'sword and shield boy fights again', 'the small sword and shield'),
'Golden Sword': (True, False, 'Sword', 0x03, 200, 'Golden Sword!\nBest slashy!', 'and the butter sword', 'sword-wielding kid', 'butter for sale', 'cap churned to butter', 'sword boy fights again', 'the Golden Sword'),
'Progressive Sword': (True, False, 'Sword', 0x5E, 150, 'Sword!\nA better sword for your time!', 'the unknown sword', 'sword-wielding kid', 'sword for sale', 'fungus for some slasher', 'sword boy fights again', 'a Sword'),
'Progressive Glove': (True, False, None, 0x61, 150, 'Glove!\nLift more than you can now!', 'and the lift upgrade', 'body-building kid', 'some glove for sale', 'fungus for gloves', 'body-building boy lifts again', 'a Glove'),
+15 -3
View File
@@ -50,7 +50,6 @@ from Items import ItemFactory
from KeyDoorShuffle import validate_key_placement
from OverworldGlitchRules import create_owg_connections
from OverworldShuffle import (
create_dynamic_flute_exits,
create_dynamic_mirror_exits,
link_overworld,
update_world_regions,
@@ -68,6 +67,7 @@ from Rom import (
JsonRom,
LocalRom,
apply_rom_settings,
apply_rom_patches,
get_hash_string,
patch_race_rom,
patch_rom,
@@ -86,6 +86,7 @@ from source.item.FillUtil import (
verify_item_pool_config,
)
from source.overworld.EntranceShuffle2 import link_entrances_new
from source.overworld.FluteShuffle import create_dynamic_flute_exits
from source.rom.DataTables import init_data_tables
from source.tools.BPS import create_bps_from_data
from UnderworldGlitchRules import (
@@ -335,7 +336,7 @@ def main(args, seed=None, fish=None):
for player in range(1, world.players+1):
if world.shopsanity[player]:
customize_shops(world, player)
if args.algorithm in ['balanced', 'equitable']:
if not args.skip_money_balance and args.algorithm in ['balanced', 'equitable']:
balance_money_progression(world)
ensure_good_items(world, True)
@@ -364,6 +365,8 @@ def main(args, seed=None, fish=None):
rom_names.append((player, team, list(rom.name)))
world.spoiler.hashes[(player, team)] = get_hash_string(rom.hash)
if args.patches[player]:
apply_rom_patches(rom, map(lambda arg: arg.strip(), args.patches[player].split(",")))
apply_rom_settings(rom, args.heartbeep[player], args.heartcolor[player], args.quickswap[player],
args.fastmenu[player], args.disablemusic[player], args.sprite[player], args.triforce_gfx[player],
args.ow_palettes[player], args.uw_palettes[player], args.reduce_flashing[player],
@@ -516,6 +519,7 @@ def init_world(args, fish):
world.bigkeyshuffle = args.bigkeyshuffle.copy()
world.prizeshuffle = args.prizeshuffle.copy()
world.showloot = args.showloot.copy()
world.loothud = args.loothud.copy()
world.showmap = args.showmap.copy()
world.bombbag = args.bombbag.copy()
world.flute_mode = args.flute_mode.copy()
@@ -564,13 +568,14 @@ def init_world(args, fish):
world.damage_challenge = args.damage_challenge.copy()
world.shuffle_damage_table = args.shuffle_damage_table.copy()
world.crystal_book = args.crystal_book.copy()
world.extra_keys = {player: int(args.extra_keys[player]) for player in range(1, world.players + 1)}
world.overworld_map = args.overworld_map.copy()
world.take_any = args.take_any.copy()
world.restrict_boss_items = args.restrict_boss_items.copy()
world.collection_rate = args.collection_rate.copy()
world.colorizepots = args.colorizepots.copy()
world.aga_randomness = args.aga_randomness.copy()
world.money_balance = args.money_balance.copy()
world.money_balance = {player: int(args.money_balance[player]) for player in range(1, world.players + 1)}
# custom settings - these haven't been promoted to full settings yet
in_progress_settings = ['force_enemy']
@@ -836,6 +841,7 @@ def copy_world(world):
ret.bigkeyshuffle = world.bigkeyshuffle.copy()
ret.prizeshuffle = world.prizeshuffle.copy()
ret.showloot = world.showloot.copy()
ret.loothud = world.loothud.copy()
ret.showmap = world.showmap.copy()
ret.bombbag = world.bombbag.copy()
ret.flute_mode = world.flute_mode.copy()
@@ -868,6 +874,7 @@ def copy_world(world):
ret.damage_challenge = world.damage_challenge.copy()
ret.shuffle_damage_table = world.shuffle_damage_table.copy()
ret.crystal_book = world.crystal_book.copy()
ret.extra_keys = world.extra_keys.copy()
ret.overworld_map = world.overworld_map.copy()
ret.take_any = world.take_any.copy()
ret.boss_shuffle = world.boss_shuffle.copy()
@@ -1068,6 +1075,7 @@ def copy_world_premature(world, player, create_flute_exits=True):
ret.bigkeyshuffle = world.bigkeyshuffle.copy()
ret.prizeshuffle = world.prizeshuffle.copy()
ret.showloot = world.showloot.copy()
ret.loothud = world.loothud.copy()
ret.showmap = world.showmap.copy()
ret.bombbag = world.bombbag.copy()
ret.flute_mode = world.flute_mode.copy()
@@ -1100,6 +1108,7 @@ def copy_world_premature(world, player, create_flute_exits=True):
ret.damage_challenge = world.damage_challenge.copy()
ret.shuffle_damage_table = world.shuffle_damage_table.copy()
ret.crystal_book = world.crystal_book.copy()
ret.extra_keys = world.extra_keys.copy()
ret.overworld_map = world.overworld_map.copy()
ret.take_any = world.take_any.copy()
ret.boss_shuffle = world.boss_shuffle.copy()
@@ -1282,6 +1291,9 @@ def create_playthrough(world):
for location in sphere:
if world.goal[location.player] == 'completionist':
continue # every location for that player is required
if location.item.type == "SmallKey":
continue
# we remove the item at location and check if game is still beatable
logging.getLogger('').debug('Checking if %s (Player %d) is required to beat the game.', location.item.name, location.item.player)
old_item = location.item
+57 -260
View File
@@ -25,6 +25,11 @@ from OWEdges import (
)
from Regions import mark_light_dark_world_regions
from source.overworld.EntranceShuffle2 import connect_simple
from source.overworld.FluteShuffle import (
default_flute_connections,
flute_data,
shuffle_flute_spots,
)
from Utils import bidict
parallel_links_new = None # needs to be globally available, reset every new generation/player
@@ -349,6 +354,7 @@ def link_overworld(world, player):
world.owcrossededges[player].extend(edge_set)
assert len(world.owcrossededges[player]) == len(set(world.owcrossededges[player])), "Same edge candidate added to crossed edges"
# TODO: Someday don't force parallels also? Keeping for now to ensure full reachability
for edge in copy.deepcopy(world.owcrossededges[player]):
if edge in parallel_links_new:
if parallel_links_new[edge] not in world.owcrossededges[player]:
@@ -578,7 +584,7 @@ def link_overworld(world, player):
remove_connected(forward_edge_sets, back_edge_sets)
assert len(connected_edges) == len(default_connections) * 2, connected_edges
valid_layout = validate_layout(world, player)
valid_layout = world.accessibility[player] == 'none' or validate_layout(world, player)
tries -= 1
assert valid_layout, 'Could not find a valid OW layout'
@@ -587,169 +593,8 @@ def link_overworld(world, player):
# flute shuffle
logging.getLogger('').debug('Shuffling flute spots')
def connect_flutes(flute_destinations):
for o in range(0, len(flute_destinations)):
owid = flute_destinations[o]
regions = flute_data[owid][0]
if not world.is_tile_swapped(owid, player):
connect_simple(world, 'Flute Spot ' + str(o + 1), regions[0], player)
else:
connect_simple(world, 'Flute Spot ' + str(o + 1), regions[1], player)
if world.owFluteShuffle[player] == 'vanilla':
flute_spots = default_flute_connections.copy()
sort_flute_spots(world, player, flute_spots)
world.owflutespots[player] = flute_spots
connect_flutes(flute_spots)
else:
flute_spots = 8
flute_pool = list(flute_data.keys())
new_spots = list()
ignored_regions = set()
used_flute_regions = []
forbidden_spots = []
forbidden_regions = []
shuffle_flute_spots(world, player)
def addSpot(owid, ignore_proximity, forced):
if world.owFluteShuffle[player] == 'balanced':
def getIgnored(regionname, base_owid, owid):
region = world.get_region(regionname, player)
for exit in region.exits:
if exit.connected_region is not None and exit.connected_region.type in [RegionType.LightWorld, RegionType.DarkWorld] and exit.connected_region.name not in new_ignored:
if exit.connected_region.name in OWTileRegions and (OWTileRegions[exit.connected_region.name] in [base_owid, owid] or OWTileRegions[regionname] == base_owid):
new_ignored.add(exit.connected_region.name)
getIgnored(exit.connected_region.name, base_owid, OWTileRegions[exit.connected_region.name])
if regionname in one_way_ledges:
for ledge_region in one_way_ledges[regionname]:
if ledge_region not in new_ignored:
new_ignored.add(ledge_region)
getIgnored(ledge_region, base_owid, OWTileRegions[ledge_region])
if not world.is_tile_swapped(owid, player):
new_region = flute_data[owid][0][0]
else:
new_region = flute_data[owid][0][1]
if new_region in ignored_regions and not forced:
return False
new_ignored = {new_region}
getIgnored(new_region, OWTileRegions[new_region], OWTileRegions[new_region])
if not ignore_proximity and not forced and random.randint(0, 31) != 0 and new_ignored.intersection(ignored_regions):
return False
ignored_regions.update(new_ignored)
if owid in flute_pool:
flute_pool.remove(owid)
if ignore_proximity and not forced:
logging.getLogger('').warning(f'Warning: Adding flute spot within proximity: {hex(owid)}')
logging.getLogger('').debug(f'Placing flute at: {hex(owid)}')
new_spots.append(owid)
else:
# TODO: Inspect later, seems to happen only with 'random' flute shuffle
logging.getLogger('').warning(f'Warning: Attempted to place flute spot not in pool: {hex(owid)}')
return True
if world.customizer:
custom_spots = world.customizer.get_owflutespots()
if custom_spots and player in custom_spots:
if 'force' in custom_spots[player]:
for id in custom_spots[player]['force']:
owid = id & 0xBF
addSpot(owid, True, True)
flute_spots -= 1
if not world.is_tile_swapped(owid, player):
used_flute_regions.append(flute_data[owid][0][0])
else:
used_flute_regions.append(flute_data[owid][0][1])
if 'forbid' in custom_spots[player]:
for id in custom_spots[player]['forbid']:
owid = id & 0xBF
if owid not in new_spots:
forbidden_spots.append(owid)
if not world.is_tile_swapped(owid, player):
forbidden_regions.append(flute_data[owid][0][0])
else:
forbidden_regions.append(flute_data[owid][0][1])
# determine sectors (isolated groups of regions) to place flute spots
flute_regions = {(f[0][0] if (o not in world.owswaps[player][0]) != (world.mode[player] == 'inverted') else f[0][1]) : o for o, f in flute_data.items() if o not in new_spots and o not in forbidden_spots}
flute_sectors = [(len([r for l in s for r in l]), [r for l in s for r in l if r in flute_regions]) for s in world.owsectors[player]]
flute_sectors = [s for s in flute_sectors if len(s[1]) > 0]
region_total = sum([c for c,_ in flute_sectors])
sector_total = len(flute_sectors)
empty_sector_total = 0
sector_has_spot = []
# determine which sectors still need a flute spot
for sector in flute_sectors:
already_has_spot = any(region in sector for region in used_flute_regions)
sector_has_spot.append(already_has_spot)
if not already_has_spot:
empty_sector_total += 1
if flute_spots < empty_sector_total:
logging.getLogger('').warning(f'Warning: Not every sector can have a flute spot, generation might fail')
# pretend like some of the empty sectors already have a flute spot, don't know if they will be reachable
for i in range(len(flute_sectors)):
if not sector_has_spot[i]:
sector_has_spot[i] = True
empty_sector_total -= 1
if flute_spots == empty_sector_total:
break
# distribute flute spots for each sector
for i in range(len(flute_sectors)):
sector = flute_sectors[i]
sector_total -= 1
if not sector_has_spot[i]:
empty_sector_total -= 1
spots_to_place = min(flute_spots - empty_sector_total, max(0 if sector_has_spot[i] else 1, round((sector[0] * (flute_spots - sector_total) / region_total) + 0.5)))
target_spots = len(new_spots) + spots_to_place
logging.getLogger('').debug(f'Sector of {sector[0]} regions gets {spots_to_place} spot(s)')
if 0x30 in flute_pool and 0x30 not in forbidden_spots and len(new_spots) < target_spots and ('Desert Teleporter Ledge' in sector[1] or 'Mire Teleporter Ledge' in sector[1]):
addSpot(0x30, True, True) # guarantee desert/mire access
random.shuffle(sector[1])
f = 0
t = 0
while len(new_spots) < target_spots:
if f >= len(sector[1]):
f = 0
t += 1
if t > 5:
raise GenerationException('Infinite loop detected in flute shuffle')
owid = flute_regions[sector[1][f]]
if owid not in new_spots and owid not in forbidden_spots:
addSpot(owid, t > 0, False)
f += 1
region_total -= sector[0]
flute_spots -= spots_to_place
# connect new flute spots
sort_flute_spots(world, player, new_spots)
world.owflutespots[player] = new_spots
connect_flutes(new_spots)
# update spoiler
s = list(map(lambda x: ' ' if x not in new_spots else 'F', [i for i in range(0x40)]))
text_output = flute_spoiler_table.replace('s', '%s') % ( s[0x02], s[0x07],
s[0x00], s[0x03], s[0x05],
s[0x00], s[0x02],s[0x03], s[0x05], s[0x07], s[0x0a], s[0x0f],
s[0x0a], s[0x0f],
s[0x10],s[0x11],s[0x12],s[0x13],s[0x14],s[0x15],s[0x16],s[0x17], s[0x10],s[0x11],s[0x12],s[0x13],s[0x14],s[0x15],s[0x16],s[0x17],
s[0x18], s[0x1a],s[0x1b], s[0x1d],s[0x1e],
s[0x22], s[0x25], s[0x1a], s[0x1d],
s[0x28],s[0x29],s[0x2a],s[0x2b],s[0x2c],s[0x2d],s[0x2e],s[0x2f], s[0x18], s[0x1b], s[0x1e],
s[0x30], s[0x32],s[0x33],s[0x34],s[0x35], s[0x37], s[0x22], s[0x25],
s[0x3a],s[0x3b],s[0x3c], s[0x3f],
s[0x28],s[0x29],s[0x2a],s[0x2b],s[0x2c],s[0x2d],s[0x2e],s[0x2f],
s[0x32],s[0x33],s[0x34], s[0x37],
s[0x30], s[0x35],
s[0x3a],s[0x3b],s[0x3c], s[0x3f])
world.spoiler.set_map('flute', text_output, new_spots, player)
create_dynamic_flute_exits(world, player)
def connect_custom(world, connected_edges, groups, forced, player):
forced_crossed, forced_noncrossed = forced
@@ -1325,28 +1170,6 @@ def adjust_edge_groups(world, trimmed_groups, edges_to_swap, player):
groups[(mode, wrld, dir, terrain, parallel, count, group_name)][i].extend(matches)
return groups
def sort_flute_spots(world, player, flute_spots):
if world.owLayout[player] != 'grid':
flute_spots.sort(key=lambda id: flute_data[id][1] if id != 0x03 or not world.is_tile_swapped(0x03, player) else 0x04)
else:
world_layout = world.owgrid[player][0] if world.mode[player] != 'inverted' else world.owgrid[player][1]
layout_list = sum(world_layout, [])
layout_map = {id & 0xBF: i for i, id in enumerate(layout_list)}
flute_spots.sort(key=lambda id: layout_map[flute_data[id][1] if id != 0x03 or not world.is_tile_swapped(0x03, player) else 0x04])
def create_dynamic_flute_exits(world, player):
flute_in_pool = True if player not in world.customitemarray else any(i for i, n in world.customitemarray[player].items() if i == 'flute' and n > 0)
if not flute_in_pool:
return
for region in (r for r in world.regions if r.player == player and r.terrain == Terrain.Land and r.name not in ['Zoras Domain', 'Master Sword Meadow', 'Hobo Bridge']):
if region.type == (RegionType.LightWorld if world.mode[player] != 'inverted' else RegionType.DarkWorld):
exitname = 'Flute From ' + region.name
exit = Entrance(region.player, exitname, region)
exit.spot_type = 'Flute'
exit.connect(world.get_region('Flute Sky', player))
region.exits.append(exit)
world.initialize_regions()
def get_mirror_exit_name(from_region, to_region):
if from_region in mirror_connections and to_region in mirror_connections[from_region]:
if len(mirror_connections[from_region]) == 1:
@@ -1563,9 +1386,6 @@ def build_accessible_region_list(world, start_region, player, build_copy_world=F
return explored_regions
def validate_layout(world, player):
if world.accessibility[player] == 'none':
return True
entrance_connectors = {
'East Death Mountain (Bottom)': ['East Death Mountain (Top East)'],
'Kakariko Suburb Area': ['Maze Race Ledge'],
@@ -1659,7 +1479,7 @@ def validate_layout(world, player):
while unreachable_count != len(unreachable_regions):
# find unreachable regions
unreachable_regions = {}
for region_name in list(OWTileRegions.copy().keys()):
for region_name in list(OWTileRegions.keys()):
if region_name not in explored_regions and region_name not in isolated_regions:
region = world.get_region(region_name, player)
unreachable_regions[region_name] = region
@@ -1702,9 +1522,55 @@ def validate_layout(world, player):
if len(unreachable_regions):
return False
return True
def get_separate_ow_areas(world, player):
"""
Returns a list of separated areas in the overworld layout.
It looks at the distinct connected components when only considering
OW edge and whirlpool connections (no entrances, portals, mirror, or flute).
Uses Union-Find to handle directed edges properly (treats them as undirected).
"""
parent = {}
def find(x):
if x not in parent:
parent[x] = x
if parent[x] != x:
parent[x] = find(parent[x]) # Path compression
return parent[x]
def union(x, y):
root_x = find(x)
root_y = find(y)
if root_x != root_y:
parent[root_y] = root_x
all_regions = set(OWTileRegions.keys()) - set(isolated_regions)
considered_exit_spot_types = set(['OpenTerrain', 'OWTerrain', 'Ledge', 'OWEdge', 'Whirlpool'])
# Initialize all regions in Union-Find
for region_name in all_regions:
find(region_name)
# Build connections by examining all edges (treating directed as undirected)
for region_name in all_regions:
region = world.get_region(region_name, player)
for exit in region.exits:
if exit.spot_type in considered_exit_spot_types and exit.connected_region is not None and exit.connected_region.name in all_regions:
union(region_name, exit.connected_region.name)
# Group regions by their root
areas = {}
for region_name in all_regions:
root = find(region_name)
if root not in areas:
areas[root] = []
areas[root].append(region_name)
return list(areas.values())
test_connections = [
#('Links House ES', 'Octoballoon WS'),
#('Links House NE', 'Lost Woods Pass SW')
@@ -1918,10 +1784,6 @@ default_whirlpool_connections = [
((0x35, 'Lake Hylia Whirlpool', 'Lake Hylia Water'), (0x0f, 'Zora Whirlpool', 'Zora Waterfall Water')),
((0x12, 'Kakariko Pond Whirlpool', 'Kakariko Pond Area'), (0x3f, 'Octoballoon Whirlpool', 'Octoballoon Water')),
((0x55, 'Qirn Jump Whirlpool', 'Qirn Jump Water'), (0x7f, 'Bomber Corner Whirlpool', 'Bomber Corner Water'))
]
default_flute_connections = [
0x03, 0x16, 0x18, 0x2c, 0x2f, 0x30, 0x3b, 0x3f
]
ow_connections = {
@@ -2589,51 +2451,6 @@ isolated_regions = [
'Pyramid Water'
]
flute_data = {
#OWID LW Region DW Region Slot VRAM BG Y BG X Link Y Link X Cam Y Cam X Unk1 Unk2 IconY IconX AltY AltX AltVRAM AltBGY AltBGX AltCamY AltCamX AltUnk1 AltUnk2 AltIconY AltIconX
0x00: (['Lost Woods East Area', 'Skull Woods Forest'], 0x09, 0x1042, 0x022e, 0x0202, 0x0290, 0x0288, 0x029b, 0x028f, 0xfff2, 0x000e, 0x0290, 0x0288, 0x0290, 0x0290),
0x02: (['Lumberjack Area', 'Dark Lumberjack Area'], 0x02, 0x059c, 0x00d6, 0x04e6, 0x0138, 0x0558, 0x0143, 0x0563, 0xfffa, 0xfffa, 0x01d8, 0x0518),
0x03: (['West Death Mountain (Bottom)', 'West Dark Death Mountain (Top)'], 0x0b, 0x1600, 0x02ca, 0x060e, 0x0328, 0x0678, 0x0337, 0x0683, 0xfff6, 0xfff2, 0x03bb, 0x0680, 0x0118, 0x0860, 0x05c0, 0x00b8, 0x07ec, 0x0127, 0x086b, 0xfff8, 0x0004, 0x0148, 0x0850),
0x05: (['East Death Mountain (Bottom)', 'East Dark Death Mountain (Bottom)'], 0x0e, 0x1860, 0x031e, 0x0d00, 0x0388, 0x0da8, 0x038d, 0x0d7d, 0x0000, 0x0000, 0x03c8, 0x0d98),
0x07: (['Death Mountain TR Pegs Area', 'Turtle Rock Area'], 0x07, 0x0804, 0x0102, 0x0e1a, 0x0160, 0x0e90, 0x016f, 0x0e97, 0xfffe, 0x0006, 0x0150, 0x0ea0),
0x0a: (['Mountain Pass Area', 'Bumper Cave Area'], 0x0a, 0x0180, 0x0220, 0x0406, 0x0280, 0x0488, 0x028f, 0x0493, 0x0000, 0xfffa, 0x0390, 0x04d8),
0x0f: (['Zora Waterfall Area', 'Catfish Area'], 0x0f, 0x0316, 0x025c, 0x0eb2, 0x02c0, 0x0f28, 0x02cb, 0x0f2f, 0x0002, 0xfffe, 0x0360, 0x0f58),
0x10: (['Lost Woods Pass West Area', 'Skull Woods Pass West Area'], 0x10, 0x0080, 0x0400, 0x0000, 0x0448, 0x0058, 0x046f, 0x0085, 0x0000, 0x0000, 0x04f8, 0x0088),
0x11: (['Kakariko Fortune Area', 'Dark Fortune Area'], 0x11, 0x0912, 0x051e, 0x0292, 0x0588, 0x0318, 0x058d, 0x031f, 0x0000, 0xfffe, 0x05f8, 0x0318),
0x12: (['Kakariko Pond Area', 'Outcast Pond Area'], 0x12, 0x0890, 0x051a, 0x0476, 0x0578, 0x04f8, 0x0587, 0x0503, 0xfff6, 0x000a, 0x05b8, 0x04f8),
0x13: (['Sanctuary Area', 'Dark Chapel Area'], 0x13, 0x051c, 0x04aa, 0x06de, 0x0508, 0x0758, 0x0517, 0x0763, 0xfff6, 0x0002, 0x05b8, 0x0738),
0x14: (['Graveyard Area', 'Dark Graveyard Area'], 0x14, 0x089c, 0x051e, 0x08e6, 0x0580, 0x0958, 0x058b, 0x0963, 0x0000, 0xfffa, 0x05f0, 0x0918, 0x0580, 0x0948),
0x15: (['River Bend East Bank', 'Qirn Jump East Bank'], 0x15, 0x041a, 0x0486, 0x0ad2, 0x04e8, 0x0b48, 0x04f3, 0x0b4f, 0x0008, 0xfffe, 0x0548, 0x0b78),
0x16: (['Potion Shop Area', 'Dark Witch Area'], 0x16, 0x0888, 0x0516, 0x0c4e, 0x0578, 0x0cc8, 0x0583, 0x0cd3, 0xfffa, 0xfff2, 0x05e8, 0x0c9f),
0x17: (['Zora Approach Ledge', 'Catfish Approach Ledge'], 0x17, 0x039e, 0x047e, 0x0ef2, 0x04e0, 0x0f68, 0x04eb, 0x0f6f, 0x0000, 0xfffe, 0x0580, 0x0f48),
0x18: (['Kakariko Village', 'Village of Outcasts'], 0x18, 0x0b30, 0x0759, 0x017e, 0x07b7, 0x0200, 0x07c6, 0x020b, 0x0007, 0x0002, 0x0830, 0x0240, 0x07c8, 0x01f8),
0x1a: (['Forgotten Forest Area', 'Shield Shop Fence'], 0x1a, 0x081a, 0x070f, 0x04d2, 0x0770, 0x0548, 0x077c, 0x054f, 0xffff, 0xfffe, 0x0770, 0x0518),
0x1b: (['Hyrule Castle Courtyard', 'Pyramid Area'], 0x1b, 0x0c30, 0x077a, 0x0786, 0x07d8, 0x07f8, 0x07e7, 0x0803, 0x0006, 0xfffa, 0x07f8, 0x07f8),
0x1d: (['Wooden Bridge Area', 'Broken Bridge Northeast'], 0x1d, 0x0602, 0x06c2, 0x0a0e, 0x0720, 0x0a80, 0x072f, 0x0a8b, 0xfffe, 0x0002, 0x0750, 0x0a70),
0x1e: (['Eastern Palace Area', 'Palace of Darkness Area'], 0x26, 0x1802, 0x091e, 0x0c0e, 0x09c0, 0x0c80, 0x098b, 0x0c8b, 0x0000, 0x0002, 0x09a0, 0x0cb0),
0x22: (['Blacksmith Area', 'Hammer Pegs Area'], 0x22, 0x058c, 0x08aa, 0x0462, 0x0908, 0x04d8, 0x0917, 0x04df, 0x0006, 0xfffe, 0x0978, 0x04e8),
0x25: (['Sand Dunes Area', 'Dark Dunes Area'], 0x25, 0x030e, 0x085a, 0x0a76, 0x08b8, 0x0ae8, 0x08c7, 0x0af3, 0x0006, 0xfffa, 0x0918, 0x0b18),
0x28: (['Maze Race Area', 'Dig Game Area'], 0x28, 0x0908, 0x0b1e, 0x003a, 0x0b88, 0x00b8, 0x0b8d, 0x00bf, 0x0000, 0x0006, 0x0ba8, 0x00b8),
0x29: (['Kakariko Suburb Area', 'Frog Area'], 0x29, 0x0408, 0x0a7c, 0x0242, 0x0ae0, 0x02c0, 0x0aeb, 0x02c7, 0x0002, 0xfffe, 0x0b30, 0x02e0),
0x2a: (['Flute Boy Area', 'Stumpy Area'], 0x2a, 0x058e, 0x0aac, 0x046e, 0x0b10, 0x04e8, 0x0b1b, 0x04f3, 0x0002, 0x0002, 0x0b60, 0x04f8),
0x2b: (['Central Bonk Rocks Area', 'Dark Bonk Rocks Area'], 0x2b, 0x0620, 0x0acc, 0x0700, 0x0b30, 0x0790, 0x0b3b, 0x0785, 0xfff2, 0x0000, 0x0b80, 0x0760),
0x2c: (['Links House Area', 'Big Bomb Shop Area'], 0x2c, 0x0588, 0x0ab9, 0x0840, 0x0b17, 0x08b8, 0x0b26, 0x08bf, 0xfff7, 0x0000, 0x0bb0, 0x08a8),
0x2d: (['Stone Bridge South Area', 'Hammer Bridge South Area'], 0x2d, 0x0886, 0x0b1e, 0x0a2a, 0x0ba0, 0x0aa8, 0x0b8b, 0x0aaf, 0x0000, 0x0006, 0x0bf0, 0x0ab8),
0x2e: (['Tree Line Area', 'Dark Tree Line Area'], 0x2e, 0x0100, 0x0a1a, 0x0c00, 0x0a78, 0x0c30, 0x0a87, 0x0c7d, 0x0006, 0x0000, 0x0ac8, 0x0c70),
0x2f: (['Eastern Nook Area', 'Darkness Nook Area'], 0x2f, 0x0798, 0x0afa, 0x0eb2, 0x0b58, 0x0f30, 0x0b67, 0x0f37, 0xfff6, 0x000e, 0x0bc0, 0x0f00),
0x30: (['Desert Teleporter Ledge', 'Mire Teleporter Ledge'], 0x38, 0x1880, 0x0f1e, 0x0000, 0x0fa8, 0x0078, 0x0f8d, 0x008d, 0x0000, 0x0000, 0x0ff0, 0x0070),
0x32: (['Flute Boy Approach Area', 'Stumpy Approach Area'], 0x32, 0x03a0, 0x0c6c, 0x0500, 0x0cd0, 0x05a8, 0x0cdb, 0x0585, 0x0002, 0x0000, 0x0d00, 0x0528),
0x33: (['C Whirlpool Outer Area', 'Dark C Whirlpool Outer Area'], 0x33, 0x0180, 0x0c20, 0x0600, 0x0c80, 0x0628, 0x0c8f, 0x067d, 0x0000, 0x0000, 0x0ce0, 0x0688),
0x34: (['Statues Area', 'Hype Cave Area'], 0x34, 0x088e, 0x0d00, 0x0866, 0x0d60, 0x08d8, 0x0d6f, 0x08e3, 0x0000, 0x000a, 0x0dd0, 0x08e8),
#0x35: (['Lake Hylia Northwest Bank', 'Ice Lake Northwest Bank'], 0x35, 0x0d00, 0x0da6, 0x0a06, 0x0e08, 0x0a80, 0x0e13, 0x0a8b, 0xfffa, 0xfffa, 0x0dc8, 0x0a90),
0x35: (['Lake Hylia South Shore', 'Ice Lake Southeast Ledge'], 0x3e, 0x1860, 0x0f1e, 0x0d00, 0x0f98, 0x0da8, 0x0f8b, 0x0d85, 0x0000, 0x0000, 0x0fd8, 0x0da8),
0x37: (['Ice Cave Area', 'Shopping Mall Area'], 0x37, 0x0786, 0x0cf6, 0x0e2e, 0x0d58, 0x0ea0, 0x0d63, 0x0eab, 0x000a, 0x0002, 0x0d98, 0x0ed0),
0x3a: (['Desert Pass Area', 'Swamp Nook Area'], 0x3a, 0x001a, 0x0e08, 0x04c6, 0x0e70, 0x0540, 0x0e7d, 0x054b, 0x0006, 0x000a, 0x0ee0, 0x0570),
0x3b: (['Dam Area', 'Swamp Area'], 0x3b, 0x069e, 0x0edf, 0x06f2, 0x0f3d, 0x0778, 0x0f4c, 0x077f, 0xfff1, 0xfffe, 0x0fd0, 0x0770),
0x3c: (['South Pass Area', 'Dark South Pass Area'], 0x3c, 0x0584, 0x0ed0, 0x081e, 0x0f38, 0x0898, 0x0f45, 0x08a3, 0xfffe, 0x0002, 0x0fa8, 0x0898),
0x3f: (['Octoballoon Area', 'Bomber Corner Area'], 0x3f, 0x0810, 0x0f05, 0x0e75, 0x0f67, 0x0ef3, 0x0f72, 0x0efa, 0xfffb, 0x000b, 0x0fd0, 0x0ef0)
}
ow_loc_prize_table = {
'Master Sword Pedestal': (0x06d, 0x070),
'Hobo': (0xb80, 0xb90),
@@ -2714,23 +2531,3 @@ H(38)| sss s| +-+-+-+-+-+-+-+-+
+-+ | s +-+-+-+ s +-+
Zora: |s| H(38)| |s|s|s| |s|
+-+ +---+-+-+-+---+-+"""
flute_spoiler_table = \
""" 0 1 2 3 4 5 6 7
+---+-+---+---+-+
01234567 A(00)| |s| | |s|
+--------+ | s +-+ s | s +-+
A(00)|s ss s s| B(08)| |s| | |s|
B(08)| s s| +-+-+-+-+-+-+-+-+
C(10)|ssssssss| C(10)|s|s|s|s|s|s|s|s|
D(18)|s ss ss | +-+-+-+-+-+-+-+-+
E(20)| s s | D(18)| |s| |s| |
F(28)|ssssssss| | s +-+ s +-+ s |
G(30)|s ssss s| E(20)| |s| |s| |
H(38)| sss s| +-+-+-+-+-+-+-+-+
+--------+ F(28)|s|s|s|s|s|s|s|s|
+-+-+-+-+-+-+-+-+
G(30)| |s|s|s| |s|
| s +-+-+-+ s +-+
H(38)| |s|s|s| |s|
+---+-+-+-+---+-+"""
+33 -1
View File
@@ -1,10 +1,42 @@
# Past Feature Notes
1.4.3: File Select/End Game screen: Mirror Scroll and Pseudoboots added (Thanks Hiimcody!)
1.5.0
* Enemy Drop: Added "spies" and shadows for hidden enemies when enemy drop shuffled is enabled
* Pottery: Pots will uncolor when the item inside is collected next time the room is loaded
1.4.3
* File Select/End Game screen: Mirror Scroll and Pseudoboots added (Thanks Hiimcody!)
# Patch Notes
Changelog archive
* 1.5.5
* Logic: Fixed an issue where PoD Bridge lead to Arena Main instead of Arena Landing Area. (Potentially unnecessarily requiring bombs or Somaria to progress)
* HUD: Key counters are correct even when door shuffle is off
* 1.5.4
* Documentation: New AI-assisted documentation [Site](https://aerinon.github.io/ALttPDoorRandomizer)
* Generation Error: Fixed Issue with Shop Code and Take Any Caves (thanks Codemann for assistance)
* 1.5.3
* Logic: Key logic fix for part of a dungeon located at Skull 3 (or other similar restricted entrancs). Appropriate key logic was not being applied, causing progression issues. This mostly affect crosskey style seeds.
* Standard: Rupee balancing algorithm can no longer switch out the weapon on uncle for money.
* Dungeon Counters: Some fixes for inconsistent tracking and display of dungeon counters on the keysanity menu.
* Text: Updated main tournament winner (Thanks clearmouse!)
* 1.5.1
* Bugfix: Fixed an issue with keys not counting correctly
* 1.5.0
* Logic: Fixed vanilla key logic for GT basement
* Logic (Playthrough): Fixed an issue where enemy kill rules were not applied during playthrough calculation. (Thanks Catobat for the catch)
* Keysanity/Keydrop Menu for DR:
* Map key information is now controlled by the Dungeon Chest Counts setting. If set to always on, this information will be available right away in the menu and will be on the HUD even when the map is not obtained.
* The key counter on the HUD for the current dungeon now accounts for keys from enemies or pots that are from vanilla key locations.
* The first number on the HUD represents all keys collected either in that dungeon or elsewhere.
* The second number on the HUD is the total keys that can be collected either in that dungeon or elsewhere.
* The key counter on inside the Menu is unchanged. (At the bottom near A button items)
* The first number in the Menu is the current number of keys in your inventory
* The second number is how many keys left to find in chests (not those from pots/enemies unless those item pools are enabled)
* Customizer: free_lamp_cone option added. The logic will account for this, and place the lamp without regard to dark rooms.
* Customizer: force_enemy option added that makes all enemies the specified type if possible. There are known gfx glitches in the overworld.
* Optimization: Improved generation performance (Thanks Catobat!)
* 1.4.11
* Rom fixes (all thanks to Codemann, I believe)
* Pot bug when at sprite limit
+7 -16
View File
@@ -141,19 +141,10 @@ These are now independent of retro mode and have three options: None, Random, an
# Patch Notes
* 1.5.0
* Logic: Fixed vanilla key logic for GT basement
* Logic (Playthrough): Fixed an issue where enemy kill rules were not applied during playthrough calculation. (Thanks Catobat for the catch)
* Enemy Drop: Added "spies" and shadows for hidden enemies when enemy drop shuffled is enabled
* Pottery: Pots will uncolor when the item inside is collected next time the room is loaded
* Keysanity/Keydrop Menu for DR:
* Map key information is now controlled by the Dungeon Chest Counts setting. If set to always on, this information will be available right away in the menu and will be on the HUD even when the map is not obtained.
* The key counter on the HUD for the current dungeon now accounts for keys from enemies or pots that are from vanilla key locations.
* The first number on the HUD represents all keys collected either in that dungeon or elsewhere.
* The second number on the HUD is the total keys that can be collected either in that dungeon or elsewhere.
* The key counter on inside the Menu is unchanged. (At the bottom near A button items)
* The first number in the Menu is the current number of keys in your inventory
* The second number is how many keys left to find in chests (not those from pots/enemies unless those item pools are enabled)
* Customizer: free_lamp_cone option added. The logic will account for this, and place the lamp without regard to dark rooms.
* Customizer: force_enemy option added that makes all enemies the specified type if possible. There are known gfx glitches in the overworld.
* Optimization: Improved generation performance (Thanks Catobat!)
* 1.5.6
* Enemy Drops: Pikit are no longer eligible for dropped items due to a vanilla bug where a failed steal can overwrite the assigned drop.
* Standard Mode: Reworked spawn refills to be more generous for enemy drop modes.
* Customizer: Added `item_pool_adjust` section to apply additive/subtractive deltas to the base item pool rather than replacing it entirely.
* Multiworld: Fixed a generation crash when beemizer is active and pottery is enabled. Pot locations are now properly filled with same-player items when the MW limit is hit even when beemizer has replaced native pot items.
+141 -69
View File
@@ -47,6 +47,7 @@ from source.enemizer.Enemizer import write_enemy_shuffle_settings
from source.item.FillUtil import valid_pot_items
from source.overworld.EntranceData import door_addresses, ow_prize_table
from source.overworld.EntranceShuffle2 import exit_ids
from source.overworld.FluteShuffle import default_flute_connections, flute_data
from Text import (
Blacksmiths_texts,
Blind_texts,
@@ -84,7 +85,7 @@ from Utils import int16_as_bytes, int32_as_bytes, local_path, snes_to_pc
from Versions import DRVersion, GKVersion, ORVersion
JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = '33cd5e308266cf2273c80de1b1df3dac'
RANDOMIZERBASEHASH = '100c3e1da68680a0f3d8e1fc94568de6'
class JsonRom(object):
@@ -536,7 +537,8 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
else:
flute_spots = world.owflutespots[player]
owFlags |= 0x0100
write_int16(rom, snes_to_pc(0x0AB7F7), 0xEAEA)
if world.owFluteShuffle[player] != 'vanilla':
write_int16(rom, snes_to_pc(0x0AB80B), 0xEAEA)
flute_writes = [(f, flute_data[f][1]) for f in flute_spots]
for o in range(0, len(flute_writes)):
@@ -736,15 +738,15 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
if world.mirrorscroll[player] or world.doorShuffle[player] != 'vanilla':
dr_flags |= DROptions.Town_Portal
if world.doorShuffle[player] == 'vanilla':
dr_flags |= DROptions.Eternal_Mini_Bosses
dr_flags |= DROptions.Eternal_Mini_Bosses
if world.doorShuffle[player] not in ['vanilla', 'basic']:
dr_flags |= DROptions.Map_Info
if ((world.collection_rate[player] or world.goal[player] == 'completionist')
and world.goal[player] not in ['triforcehunt', 'trinity', 'ganonhunt']):
and world.goal[player] not in ['triforcehunt', 'trinity', 'ganonhunt']):
dr_flags |= DROptions.Debug
rom.write_byte(snes_to_pc(0x308039), 1)
if world.doorShuffle[player] not in ['vanilla', 'basic'] and world.logic[player] != 'nologic'\
and world.mixed_travel[player] == 'prevent':
if world.doorShuffle[player] not in ['vanilla', 'basic'] and world.logic[player] != 'nologic' \
and world.mixed_travel[player] == 'prevent':
# PoD Falling Bridge or Hammjump
# 1FA607: db $2D, $79, $69 ; 0x0069: Vertical Rail ↕ | { 0B, 1E } | Size: 05
# 1FA60A: db $14, $99, $5D ; 0x005D: Large Horizontal Rail ↔ | { 05, 26 } | Size: 01
@@ -816,11 +818,13 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
rom.write_byte(0x138002, 2)
for name, layout in world.key_layout[player].items():
offset = compass_data[name][4]//2
dungeon = world.get_dungeon(name, player)
if world.keyshuffle[player] == 'universal':
rom.write_byte(0x187010+offset, layout.max_chests + layout.max_drops)
else:
rom.write_byte(0x13f020+offset, layout.max_chests + layout.max_drops) # not currently used
rom.write_byte(0x187010+offset, layout.max_chests)
rom.write_byte(0x13f020+offset, layout.max_chests + layout.max_drops + dungeon.extra_small_keys) # not currently used
rom.write_byte(0x187010+offset, layout.max_chests + dungeon.extra_small_keys)
rom.write_byte(0x187000+offset, dungeon.extra_small_keys)
builder = world.dungeon_layouts[player][name]
bk_status = 1 if builder.bk_required else 0
bk_status = 2 if builder.bk_provided else bk_status
@@ -842,9 +846,9 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
if world.doorShuffle[player] == 'basic':
rom.write_byte(0x138002, 1)
for door in world.doors:
if door.dest is not None and isinstance(door.dest, Door) and\
door.player == player and door.type in [DoorType.Normal, DoorType.SpiralStairs,
DoorType.Open, DoorType.StraightStairs, DoorType.Ladder]:
if door.dest is not None and isinstance(door.dest, Door) and \
door.player == player and door.type in [DoorType.Normal, DoorType.SpiralStairs,
DoorType.Open, DoorType.StraightStairs, DoorType.Ladder]:
rom.write_bytes(door.getAddress(), door.dest.getTarget(door))
for paired_door in world.paired_doors[player]:
rom.write_bytes(paired_door.address_a(world, player), paired_door.rom_data_a(world, player))
@@ -990,7 +994,7 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
set_inverted_mode(world, player, rom, inverted_buffer)
uncle_location = world.get_location('Link\'s Uncle', player)
if uncle_location.item is None or uncle_location.item.name not in ['Master Sword', 'Tempered Sword', 'Fighter Sword', 'Golden Sword', 'Progressive Sword']:
if uncle_location.item is None or uncle_location.item.name not in ['Master Sword', 'Tempered Sword', 'Fighter Sword', 'Golden Sword', 'Progressive Sword', 'Sword and Shield']:
# disable sword sprite from uncle
rom.write_bytes(0x6D263, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E])
rom.write_bytes(0x6D26B, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E])
@@ -1254,7 +1258,7 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
gametype = 0x04 # item
if (world.shuffle[player] != 'vanilla' or world.doorShuffle[player] != 'vanilla'
or world.dropshuffle[player] != 'none' or world.pottery[player] != 'none'):
or world.dropshuffle[player] != 'none' or world.pottery[player] != 'none'):
gametype |= 0x02 # entrance/door
rom.write_byte(0x180211, gametype) # Game type
@@ -1499,9 +1503,22 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
loot_source |= 0x04
rom.write_byte(0x1CFF10, loot_source)
if world.loothud[player] == 'never':
rom.write_byte(0x1CFF12, 0x00)
elif world.loothud[player] == 'presence':
rom.write_byte(0x1CFF12, 0x01)
rom.write_bytes(0x1CFF0E, [0x01, 0x01])
elif world.loothud[player] == 'value':
rom.write_byte(0x1CFF12, 0x01)
rom.write_bytes(0x1CFF0E, [0xFF, 0xFF])
elif world.loothud[player] == 'dungeon_value':
rom.write_byte(0x1CFF12, 0x01)
rom.write_bytes(0x1CFF0E, [0xFF, 0x01])
if world.showloot[player] == 'never':
rom.write_bytes(0x1CFF08, [0x00, 0x00, 0x00, 0x00])
rom.write_byte(0x1CFF11, 0x00)
rom.write_byte(0x1CFF12, 0x00) # turn off hud icon too just to be safe
elif world.showloot[player] == 'presence':
rom.write_bytes(0x1CFF08, [0x01, 0x00, 0x00, 0x00])
rom.write_byte(0x1CFF11, 0x00)
@@ -1573,14 +1590,14 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
idx = int((map_index-2)/2)
elif isinstance(ent, int):
# vanilla icon positions
x_map_position = [0x0F30, 0x0170, 0xFF00, 0x0790, 0x0F30, 0x0160, 0x00F0, 0x0CB0, 0x0900, 0x0240, 0x0F30]
y_map_position = [0x06E0, 0x0E50, 0xFF00, 0x0FD0, 0x06E0, 0x0D80, 0x0160, 0x0E80, 0x0130, 0x0840, 0x01B0]
x_map_position = [0x0F40, 0x0140, 0xFF00, 0x0778, 0x0F40, 0x0148, 0x00B0, 0x0CA0, 0x0900, 0x01F8, 0x0F20]
y_map_position = [0x0660, 0x0D00, 0xFF00, 0x0F50, 0x0660, 0x0D00, 0x00C0, 0x0E00, 0x0100, 0x0800, 0x0100]
idx = ent
owid = owid_map[idx]
map_x = x_map_position[idx]
map_y = y_map_position[idx]
if owid != 0xFF:
if (owid < 0x40) == (world.is_tile_swapped(owid, player)):
if (owid < 0x40) == (owid in world.owswaps[player][0]):
coord_flags |= 0x8000 # world indicator flag
if coord_flags & 0x4000 == 0:
map_x, map_y = adjust_ow_coordinates_to_layout(world, player, map_x, map_y, coord_flags & 0x8000 != 0)
@@ -1664,7 +1681,7 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
offset += 4
portal = world.get_portal(portal_list[portal_idx], player)
entrance = portal.find_portal_entrance()
coords = get_entrance_coords(entrance)
coords = get_entrance_coords(entrance)
# figure out compass entrances and what world (light/dark)
write_int16s(rom, snes_to_pc(0x0ABE2E)+(map_index*6), coords)
@@ -1762,53 +1779,40 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
rom.write_byte(0x180358, 0x01 if glitches_enabled else 0x00)
rom.write_byte(0x18008B, 0x01 if glitches_enabled else 0x00)
# remove shield from uncle
rom.write_bytes(0x6D253, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E])
rom.write_bytes(0x6D25B, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E])
rom.write_bytes(0x6D283, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E])
rom.write_bytes(0x6D28B, [0x00, 0x00, 0xf7, 0xff, 0x00, 0x0E])
rom.write_bytes(0x6D2CB, [0x00, 0x00, 0xf6, 0xff, 0x02, 0x0E])
rom.write_bytes(0x6D2FB, [0x00, 0x00, 0xf7, 0xff, 0x02, 0x0E])
rom.write_bytes(0x6D313, [0x00, 0x00, 0xe4, 0xff, 0x08, 0x0E])
if uncle_location.item is None or uncle_location.item.name not in ['Sword and Shield']:
# remove shield from uncle
rom.write_bytes(0x6D253, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E])
rom.write_bytes(0x6D25B, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E])
rom.write_bytes(0x6D283, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E])
rom.write_bytes(0x6D28B, [0x00, 0x00, 0xf7, 0xff, 0x00, 0x0E])
rom.write_bytes(0x6D2CB, [0x00, 0x00, 0xf6, 0xff, 0x02, 0x0E])
rom.write_bytes(0x6D2FB, [0x00, 0x00, 0xf7, 0xff, 0x02, 0x0E])
rom.write_bytes(0x6D313, [0x00, 0x00, 0xe4, 0xff, 0x08, 0x0E])
write_int16(rom, 0x180183, 0) # Escape fill rupee bow
# Uncle / Zelda / Mantle respawn refills (magic, bombs, arrows)
rom.write_bytes(0x180185, [0] * 9)
rom.write_byte(0x18004E, 0) # Escape Fill (nothing)
write_int16(rom, 0x180183, 300) # Escape fill rupee bow
rom.write_bytes(0x180185, [0, 0, 0]) # Uncle respawn refills (magic, bombs, arrows)
rom.write_bytes(0x180188, [0, 0, 0]) # Zelda respawn refills (magic, bombs, arrows)
rom.write_bytes(0x18018B, [0, 0, 0]) # Mantle respawn refills (magic, bombs, arrows)
bow_max, bomb_max, magic_max = 0, 0, 0
bow_small, magic_small = 0, 0
if world.mode[player] == 'standard':
if world.doorShuffle[player] not in ['vanilla']:
# If door shuffle, give player small bit of all three ammos on respawn during escape
# Uncle / Zelda / Mantle respawn refills (magic, bombs, arrows)
rom.write_bytes(0x180185, [0x20, 3, 10] * 3)
# Always fully fill ammo of starting weapon on respawn during escape
if uncle_location.item is not None and uncle_location.item.name in ['Bow', 'Progressive Bow']:
rom.write_byte(0x18004E, 1) # Escape Fill (arrows)
write_int16(rom, 0x180183, 300) # Escape fill rupee bow
rom.write_bytes(0x180185, [0, 0, 70]) # Uncle respawn refills (magic, bombs, arrows)
rom.write_bytes(0x180188, [0, 0, 10]) # Zelda respawn refills (magic, bombs, arrows)
rom.write_bytes(0x18018B, [0, 0, 10]) # Mantle respawn refills (magic, bombs, arrows)
bow_max, bow_small = 70, 10
rom.write_byte(0x180187, 70) # Uncle respawn refill arrows
rom.write_byte(0x18018A, 70) # Zelda respawn refill arrows
rom.write_byte(0x18018D, 70) # Mantle respawn refill arrowss
elif uncle_location.item is not None and uncle_location.item.name in ['Bomb Upgrade (+10)' if world.bombbag[player] else 'Bombs (10)']:
rom.write_byte(0x18004E, 2) # Escape Fill (bombs)
rom.write_bytes(0x180185, [0, 50, 0]) # Uncle respawn refills (magic, bombs, arrows)
rom.write_bytes(0x180188, [0, 3, 0]) # Zelda respawn refills (magic, bombs, arrows)
rom.write_bytes(0x18018B, [0, 3, 0]) # Mantle respawn refills (magic, bombs, arrows)
bomb_max = 50
rom.write_byte(0x180186, 50) # Uncle respawn refill bombs
rom.write_byte(0x180189, 50) # Zelda respawn refill bombs
rom.write_byte(0x18018C, 50) # Mantle respawn refill bombs
elif uncle_location.item is not None and uncle_location.item.name in ['Cane of Somaria', 'Cane of Byrna', 'Fire Rod']:
rom.write_byte(0x18004E, 4) # Escape Fill (magic)
rom.write_bytes(0x180185, [0x80, 0, 0]) # Uncle respawn refills (magic, bombs, arrows)
rom.write_bytes(0x180188, [0x20, 0, 0]) # Zelda respawn refills (magic, bombs, arrows)
rom.write_bytes(0x18018B, [0x20, 0, 0]) # Mantle respawn refills (magic, bombs, arrows)
magic_max, magic_small = 0x80, 0x20
if world.doorShuffle[player] not in ['vanilla', 'basic']:
# Uncle respawn refills (magic, bombs, arrows)
rom.write_bytes(0x180185, [max(0x20, magic_max), max(3, bomb_max), max(10, bow_max)])
# Zelda respawn refills (magic, bombs, arrows)
rom.write_bytes(0x180188, [max(0x20, magic_max), max(3, bomb_max), max(10, bow_max)])
# Mantle respawn refills (magic, bombs, arrows)
rom.write_bytes(0x18018B, [max(0x20, magic_max), max(3, bomb_max), max(10, bow_max)])
elif world.doorShuffle[player] == 'basic': # just in case a bomb is needed to get to a chest
rom.write_bytes(0x180185, [max(0x00, magic_max), max(3, bomb_max), max(0, bow_max)])
rom.write_bytes(0x180188, [magic_small, 3, bow_small]) # Zelda respawn refills (magic, bombs, arrows)
rom.write_bytes(0x18018B, [magic_small, 3, bow_small]) # Mantle respawn refills (magic, bombs, arrows)
rom.write_byte(0x180185, 0x80) # Uncle respawn refill magic
rom.write_byte(0x180188, 0x80) # Zelda respawn refill magic
rom.write_byte(0x18018B, 0x80) # Mantle respawn refill magic
# patch swamp: Need to enable permanent drain of water as dam or swamp were moved
rom.write_byte(0x18003D, 0x01 if world.swamp_patch_required[player] else 0x00)
@@ -1911,7 +1915,7 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
write_enemy_shuffle_settings(world, player, rom)
if (world.doorShuffle[player] != 'vanilla' or world.dropshuffle[player] != 'none'
or world.pottery[player] != 'none'):
or world.pottery[player] != 'none'):
for room in world.rooms:
if room.player == player and room.modified:
if room.index in world.data_tables[player].room_list:
@@ -1928,7 +1932,7 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
write_enemizer_tweaks(rom, world, player)
randomize_damage_table(rom, world, player)
write_strings(rom, world, player, team)
write_strings(rom, world, player, team, is_mystery)
# write initial sram
rom.write_initial_sram()
@@ -1973,7 +1977,7 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None):
(hashint >> 10) & 0x1F,
(hashint >> 5) & 0x1F,
hashint & 0x1F,
]
]
rom.write_bytes(0x180215, code)
rom.hash = code
@@ -2071,6 +2075,49 @@ def hud_format_text(text):
output += b'\x7f\x00'
return output[:32]
def read_bytes(f, count):
values = f.read(count)
if len(values) < count:
raise EOFError
return values
def apply_rom_patches(rom, patches):
for patch in patches:
if not os.path.exists(f"patches/{patch}.ips"):
logging.getLogger('').warning("Patch %s not found -- skipping", patch)
continue
with open(f"patches/{patch}.ips", "rb") as f:
byte_changes = []
try:
header = read_bytes(f, 5)
if header != b"PATCH":
logging.getLogger('').warning("Patch %s invalid -- skipping", patch)
continue
while True:
address = read_bytes(f, 3)
if address == b"EOF":
break
address = int.from_bytes(address, byteorder="big")
length = int.from_bytes(read_bytes(f, 2), byteorder="big")
if length > 0:
byte_changes.append((address, list(f.read(length))))
else:
length = int.from_bytes(read_bytes(f, 2), byteorder="big")
value = read_bytes(f, 1)
byte_changes.append((address, length * list(value)))
for address, values in byte_changes:
rom.write_bytes(address, values)
logging.getLogger("").info("Patch %s applied successfully", patch)
except EOFError:
logging.getLogger('').warning("Patch %s invalid -- skipping", patch)
continue
def apply_rom_settings(rom, beep, color, quickswap, fastmenu, disable_music, sprite, triforce_gfx,
ow_palettes, uw_palettes, reduce_flashing, shuffle_sfx,
@@ -2387,7 +2434,7 @@ def write_string_to_rom(rom, target, string):
rom.write_bytes(address, MultiByteTextMapper.convert(string, maxbytes))
def write_strings(rom, world, player, team):
def write_strings(rom, world, player, team, is_mystery=False):
tt = TextTable()
tt.removeUnwantedText()
if world.shuffle[player] != 'vanilla':
@@ -2395,6 +2442,9 @@ def write_strings(rom, world, player, team):
" Crosskeys\n"
" Tournament\n"
" Winners\n{HARP}\n"
" ~~~2025~~~\n humbugh\n\n"
" ~~~2024~~~\n Gammachuu\n\n"
" ~~~2023~~~\n WallKicks\n\n"
" ~~~2022~~~\n Schulzer\n\n"
" ~~~2021~~~\n Goomba\n\n"
" ~~~2020~~~\n Linlinlin\n\n"
@@ -2762,16 +2812,19 @@ def write_strings(rom, world, player, team):
loc.item = i
return loc
(crystal5, crystal6, greenpendant) = tuple([x[0] if x else missing_prize() for x in [crystal5, crystal6, greenpendant]])
bigbomb_follower = 'Big Bomb?\n'
if world.shuffle_followers[player]:
bigbomb_follower = ''
if world.prizeshuffle[player] in ['none', 'dungeon']:
(crystal5, crystal6, greenpendant) = tuple([x.parent_region.dungeon.name for x in [crystal5, crystal6, greenpendant]])
tt['bomb_shop'] = 'Big Bomb?\nMy supply is blocked until you clear %s and %s.' % (crystal5, crystal6)
tt['bomb_shop'] = f'{bigbomb_follower}My supply is blocked until you clear %s and %s.' % (crystal5, crystal6)
tt['sahasrahla_bring_courage'] = 'I lost my family heirloom in %s' % greenpendant
elif world.prizeshuffle[player] == 'nearby':
(crystal5, crystal6, greenpendant) = tuple([x.item.dungeon_object.name for x in [crystal5, crystal6, greenpendant]])
tt['bomb_shop'] = 'Big Bomb?\nThe crystals can be found near %s and %s.' % (crystal5, crystal6)
tt['bomb_shop'] = f'{bigbomb_follower}The crystals can be found near %s and %s.' % (crystal5, crystal6)
tt['sahasrahla_bring_courage'] = 'I lost my family heirloom near %s' % greenpendant
else:
tt['bomb_shop'] = 'Big Bomb?\nThe crystals can be found %s and %s.' % (crystal5.hint_text, crystal6.hint_text)
tt['bomb_shop'] = f'{bigbomb_follower}The crystals can be found %s and %s.' % (crystal5.hint_text, crystal6.hint_text)
tt['sahasrahla_bring_courage'] = 'My family heirloom can be found %s' % greenpendant.hint_text
tt['sign_ganons_tower'] = ('You need %d crystal to enter.' if world.crystals_needed_for_gt[player] == 1 else 'You need %d crystals to enter.') % world.crystals_needed_for_gt[player]
@@ -2896,7 +2949,22 @@ def write_strings(rom, world, player, team):
sanc_text = "Dark Chapel"
tt['menu_start_2'] = "{MENU}\n{SPEED0}\n≥@'s " + lh_text + "\n " + sanc_text + "\n{CHOICE3}"
tt['menu_start_3'] = "{MENU}\n{SPEED0}\n≥@'s " + lh_text + "\n " + sanc_text + "\n Mountain Cave\n{CHOICE2}"
if world.mode[player] == 'inverted':
if is_mystery:
tt['intro_main'] = CompressedTextMapper.convert(
"{INTRO}\n Episode III"
+ "{PAUSE3}\n A Link to the Past"
+ "{PAUSE3}\n Mystery Randomizer"
+ "{PAUSE3}\n\n\n"
+ "{PAUSE3}\nAfter mostly disregarding what happened in the first two games,"
+ "{PAUSE3}\nLink awakens to a massive mystery."
+ "{PAUSE3}\nHe doesn't know why he's here, or what he must do."
+ "{PAUSE3} {CHANGEPIC}\nGanon has moved around all the items in Hyrule."
+ "{PAUSE7}\nYou will have to find all the items necessary to achieve your goal."
+ "{PAUSE7}\nThis is your chance to be a hero."
+ "{PAUSE3} {CHANGEPIC}\nYou must determine and achieve your goal."
+ "{PAUSE9} {CHANGEPIC}", False)
elif world.mode[player] == 'inverted':
tt['intro_main'] = CompressedTextMapper.convert(
"{INTRO}\n Episode III"
+ "{PAUSE3}\n A Link to the Past"
@@ -2910,6 +2978,7 @@ def write_strings(rom, world, player, team):
+ "{PAUSE7}\nThis is your chance to be a hero."
+ "{PAUSE3} {CHANGEPIC}\nYou must get the 7 crystals to beat Ganon."
+ "{PAUSE9} {CHANGEPIC}", False)
rom.write_bytes(0xE0000, tt.getBytes())
credits = Credits()
@@ -3518,7 +3587,10 @@ Prizes = ['Green Pendant',
]
hash_alphabet = [
"Bow", "Boomerang", "Hookshot", "Bomb", "Mushroom", "Powder", "Rod", "Pendant", "Bombos", "Ether", "Quake",
"Lamp", "Hammer", "Shovel", "Ocarina", "Bug Net", "Book", "Bottle", "Potion", "Cane", "Cape", "Mirror", "Boots",
"Gloves", "Flippers", "Pearl", "Shield", "Tunic", "Heart", "Map", "Compass", "Key"
"Bow", "Boomerang", "Hookshot", "Bomb", "Mushroom", "Powder",
"Ice Rod", "Green Pendant", "Bombos", "Ether", "Quake", "Lamp",
"Hammer", "Shovel", "Ocarina", "Bug Net", "Book", "Bottle",
"Green Potion", "Somaria", "Cape", "Mirror", "Boots", "Gloves",
"Flippers", "Pearl", "Shield", "Green Tunic", "Heart", "Map",
"Compass", "Key",
]
+2 -3
View File
@@ -505,7 +505,7 @@ def global_rules(world, player):
set_rule(world.get_entrance('Skull Woods Rock (West)', player), lambda state: state.can_lift_rocks(player))
set_rule(world.get_entrance('Skull Woods Rock (East)', player), lambda state: state.can_lift_rocks(player))
# this more like an ohko rule - dependent on bird being present too - so enemizer could turn this off?
set_rule(world.get_entrance('Bumper Cave Ledge Drop', player), lambda state: world.can_take_damage or state.has('Cape', player) or state.has('Cane of Byrna', player) or state.has_sword(player))
set_rule(world.get_entrance('Bumper Cave Ledge Drop', player), lambda state: state.has('Cape', player) or state.has('Cane of Byrna', player) or state.has_sword(player))
set_rule(world.get_entrance('Bumper Cave Rock (Outer)', player), lambda state: state.can_lift_rocks(player))
set_rule(world.get_entrance('Bumper Cave Rock (Inner)', player), lambda state: state.can_lift_rocks(player))
set_rule(world.get_entrance('Skull Woods Pass Rock (North)', player), lambda state: state.can_lift_heavy_rocks(player))
@@ -1404,8 +1404,7 @@ def ow_bunny_rules(world, player):
add_bunny_rule(world.get_entrance('Skull Woods Forgotten Bush (East)', player), player)
add_bunny_rule(world.get_entrance('Skull Woods Second Section Hole', player), player)
add_bunny_rule(world.get_entrance('East Dark Death Mountain Bushes', player), player)
if not world.can_take_damage:
add_bunny_rule(world.get_entrance('Bumper Cave Ledge Drop', player), player)
add_bunny_rule(world.get_entrance('Bumper Cave Ledge Drop', player), player)
add_bunny_rule(world.get_entrance('Bumper Cave Rock (Outer)', player), player)
add_bunny_rule(world.get_entrance('Bumper Cave Rock (Inner)', player), player)
add_bunny_rule(world.get_entrance('Skull Woods Pass Bush Row (West)', player), player)
+2 -1
View File
@@ -135,6 +135,7 @@ Triforce_texts = [
" I promise the\n next seed will\n be better.",
"\n Honk.",
" Breakfast\n is served!",
"\n send help",
]
BombShop2_texts = ['Bombs!\nBombs!\nBiggest!\nBestest!\nGreatest!\nBoomest!']
Sahasrahla2_texts = ['You already got my item, idiot.', 'Why are you still talking to me?', 'This text won\'t change.', 'Have you met my brother, Hasarahshla?']
@@ -388,7 +389,6 @@ DeathMountain_texts = [
]
LostWoods_texts = [
'thieves\' stump',
'He\'s got wood',
] * 2 + [
"the forest thief",
"dancing pickles",
@@ -1801,6 +1801,7 @@ class TextTable(object):
text['telepathic_tile_ice_stalfos_knights_room'] = CompressedTextMapper.convert("{NOBORDER}\nKnock 'em down and then bomb them dead.")
text['telepathic_tile_tower_of_hera_entrance'] = CompressedTextMapper.convert("{NOBORDER}\nThis is a bad place, with a guy who will make you fall…\n\n\na lot.")
text['houlihan_room'] = CompressedTextMapper.convert("Randomizer tournament winners\n{HARP}\n"
" ~~~2025~~~\nGammachuu\n\n"
" ~~~2024~~~\nGammachuu\n\n"
" ~~~2023~~~\nGanonsGoneWild\n\n"
" ~~~2022~~~\nObscure\n\n"
+3 -3
View File
@@ -1,3 +1,3 @@
GKVersion = '1.0.0'
ORVersion = '0.7.0.1'
DRVersion = '1.5.2-u'
GKVersion = '1.1.0'
ORVersion = '0.7.0.3'
DRVersion = '1.5.6-u'
+139 -1
View File
@@ -1 +1,139 @@
theme: jekyll-theme-slate
# Site settings
title: ALttP Dungeon Randomizer
description: Advanced dungeon randomization for The Legend of Zelda - A Link to the Past
baseurl: "/ALttPDoorRandomizer"
url: "https://aerinon.github.io"
# Theme
theme: jekyll-theme-slate
remote_theme: just-the-docs/just-the-docs
# Logo and branding
# logo: "/assets/images/logo.png"
# Navigation
nav_enabled: true
nav_external_links:
- title: GitHub
url: https://github.com/aerinon/ALttPDoorRandomizer
- title: Discord
url: https://discordapp.com/invite/alttprandomizer
- title: Download
url: https://github.com/aerinon/ALttPDoorRandomizer/releases
# Search
search_enabled: true
search:
heading_level: 2
previews: 3
preview_words_before: 5
preview_words_after: 10
tokenizer_separator: /[\s/]+/
rel_url: true
button: true
# Heading anchors
heading_anchors: true
# Aux links
aux_links:
"Door Randomizer on GitHub":
- "https://github.com/aerinon/ALttPDoorRandomizer"
"ALTTP Rando Discord":
- "https://discordapp.com/invite/alttprandomizer"
aux_links_new_tab: true
# Footer
footer_content: "Copyright &copy; 2026 ALttP Door Randomizer Team. Based on ALttP Entrance Randomizer."
# Back to top link
back_to_top: true
back_to_top_text: "Back to top"
# Collections for blog posts
collections:
posts:
output: true
permalink: /blog/:year/:month/:day/:title/
# Defaults
defaults:
- scope:
path: ""
type: "posts"
values:
layout: "default"
- scope:
path: ""
values:
layout: "default"
# Build settings
markdown: kramdown
kramdown:
input: GFM
syntax_highlighter: rouge
syntax_highlighter_opts:
css_class: 'highlight'
plugins:
- jekyll-feed
- jekyll-seo-tag
- jekyll-sitemap
# Exclude from processing
exclude:
- .git/
- .github/
- .gitignore
- .gitattributes
- source/
- test/
- resources/
- data/
- debug/
- analysis/
- analysis2/
- alttp_dungeon_randomizer.egg-info/
- DR/
- "*.py"
- "*.pyc"
- "*.pyd"
- "*.pyo"
- "*.egg-info"
- "*.spec"
- requirements*.txt
- setup.py
- TestSuite.py
- DungeonRandomizer.py
- Gui.py
- MultiServer.py
- MultiClient.py
- CLAUDE.md
- LICENSE
- libbz2-dev
- tlogbfs.txt
# Include files
include:
- _posts
- blog
- docs/Customizer.md
- docs/BUILDING.md
- docs/DR_hint_reference.md
# Color scheme (for just-the-docs theme)
color_scheme: dark
# Google Analytics (optional - add your tracking ID)
# ga_tracking: UA-XXXXXXXX-X
# Compress HTML
compress_html:
clippings: all
comments: all
endings: all
startings: []
blanklines: false
profile: false
@@ -0,0 +1,74 @@
---
layout: default
title: "Welcome to the ALttP Door Randomizer Blog"
date: 2026-01-26
author: Door Randomizer Team
category: development
excerpt: "Introducing the new Door Randomizer documentation site and blog. Learn about what's new, what's coming, and how to get involved."
---
# Welcome to the ALttP Door Randomizer Blog
We're excited to launch the official documentation site and development blog for ALttP Door Randomizer! This site serves as a central hub for all things Door Rando - from comprehensive feature documentation to release notes and development updates.
## What's New Here?
### Comprehensive Documentation
We've reorganized and expanded our documentation to make it easier to find what you need:
- **[Features Guide](/features)** - Complete reference for all randomizer settings and modes
- **[Installation & Usage](/installation)** - Step-by-step setup instructions for all platforms
- **[Known Issues](/known-issues)** - Tracking current bugs and limitations
- **[Roadmap](/roadmap)** - Our vision for the future of Door Randomizer
### Development Blog
This blog will be your source for:
- **Feature highlights** - Deep dives into specific features
- **Development updates** - Behind-the-scenes looks at ongoing work
- **Technical articles** - How the randomizer works under the hood
## What is Door Randomizer?
If you're new here, Door Randomizer takes the ALttP randomizer experience to the next level by shuffling the connections between rooms within dungeons. Walk through a door in Eastern Palace and you might end up in Tower of Hera, Ice Palace, or anywhere else!
Key features include:
- **Four shuffle modes** - From basic (within dungeon) to crossed (full chaos)
- **Three intensity levels** - Control how thoroughly dungeons are shuffled
- **Advanced key logic** - Multiple algorithms to prevent self-locking
- **Pottery shuffle** - Randomize items under pots with multiple modes
- **Shopsanity** - 32+ shop locations with intelligent pricing
- **Enemizer integration** - Enemy and boss randomization with logic
- **Custom seeds** - Create your own dungeons and rooms
[Learn more about features →](/features)
[Read the Customizer guide →](https://github.com/aerinon/ALttPDoorRandomizer/blob/DoorDev/docs/Customizer.md)
## What's Coming Next?
We have plans for Door Randomizer's future. Check out our [Roadmap](/roadmap) for details. (Still very much a work in progress!)
## Community
Join the Door Randomizer community:
- **Discord**: [ALTTP Randomizer Discord](https://discordapp.com/invite/alttprandomizer)
- `#door-rando` - General discussion and help
- `#bug-reports` - Report bugs and issues
- **GitHub**: [aerinon/ALttPDoorRandomizer](https://github.com/aerinon/ALttPDoorRandomizer)
## Stay Tuned
We'll be posting irregular updates here as development continues.
Thank you to everyone who has contributed to Door Randomizer through code, testing, feedback, and community support. We're excited about the future and can't wait to see what lies in store!
Happy randomizing!
---
*Have questions or feedback about the new documentation site? Let us know in Discord!*
View File
@@ -1,5 +0,0 @@
Mike Lenzen <m.lenzen@gmail.com> https://github.com/mlenzen
Caleb Levy <caleb.levy@berkeley.edu> https://github.com/caleblevy
Marein Könings <mail@marein.org> https://github.com/MareinK
Jad Kik <jadkik94@gmail.com> https://github.com/jadkik
Kuba Marek <blue.cube@seznam.cz> https://github.com/bluecube
-191
View File
@@ -1,191 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, "control" means (i) the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
"Object" form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative Works
thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit
on behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for
the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.
2. Grant of Copyright License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.
3. Grant of Patent License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination
of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License
for that Work shall terminate as of the date such litigation is filed.
4. Redistribution.
You may reproduce and distribute copies of the Work or Derivative Works thereof
in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of
this License; and
You must cause any modified files to carry prominent notices stating that You
changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source form
of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any
Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices
that do not pertain to any part of the Derivative Works, in at least one of the
following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of
the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works that
You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as
modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.
5. Submission of Contributions.
Unless You explicitly state otherwise, any Contribution intentionally submitted
for inclusion in the Work by You to the Licensor shall be under the terms and
conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of
any separate license agreement you may have executed with Licensor regarding
such Contributions.
6. Trademarks.
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
7. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of
permissions under this License.
8. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License or
out of the use or inability to use the Work (including but not limited to
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However,
in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor, and only if You
agree to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "[]" replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification within
third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-55
View File
@@ -1,55 +0,0 @@
"""collections_extended contains a few extra basic data structures."""
from ._compat import Collection
from .bags import bag, frozenbag
from .bijection import bijection
from .range_map import MappedRange, RangeMap
from .setlists import frozensetlist, setlist
__version__ = '1.0.2'
__all__ = (
'collection',
'setlist',
'frozensetlist',
'bag',
'frozenbag',
'bijection',
'RangeMap',
'MappedRange',
'Collection',
)
def collection(iterable=None, mutable=True, ordered=False, unique=False):
"""Return a Collection with the specified properties.
Args:
iterable (Iterable): collection to instantiate new collection from.
mutable (bool): Whether or not the new collection is mutable.
ordered (bool): Whether or not the new collection is ordered.
unique (bool): Whether or not the new collection contains only unique values.
"""
if iterable is None:
iterable = tuple()
if unique:
if ordered:
if mutable:
return setlist(iterable)
else:
return frozensetlist(iterable)
else:
if mutable:
return set(iterable)
else:
return frozenset(iterable)
else:
if ordered:
if mutable:
return list(iterable)
else:
return tuple(iterable)
else:
if mutable:
return bag(iterable)
else:
return frozenbag(iterable)
-53
View File
@@ -1,53 +0,0 @@
"""Python 2/3 compatibility helpers."""
import sys
is_py2 = sys.version_info[0] == 2
if is_py2:
def keys_set(d):
"""Return a set of passed dictionary's keys."""
return set(d.keys())
else:
keys_set = dict.keys
if sys.version_info < (3, 6):
from collections import Container, Iterable, Sized
def _check_methods(C, *methods):
mro = C.__mro__
for method in methods:
for B in mro:
if method in B.__dict__:
if B.__dict__[method] is None:
return NotImplemented
break
else:
return NotImplemented
return True
class Collection(Sized, Iterable, Container):
"""Backport from Python3.6."""
__slots__ = tuple()
@classmethod
def __subclasshook__(cls, C):
if cls is Collection:
return _check_methods(C, "__len__", "__iter__", "__contains__")
return NotImplemented
else:
from collections.abc import Collection
def handle_rich_comp_not_implemented():
"""Correctly handle unimplemented rich comparisons.
In Python 3, return NotImplemented.
In Python 2, raise a TypeError.
"""
if is_py2:
raise TypeError()
else:
return NotImplemented
-16
View File
@@ -1,16 +0,0 @@
"""util functions for collections_extended."""
def hash_iterable(it):
"""Perform a O(1) memory hash of an iterable of arbitrary length.
hash(tuple(it)) creates a temporary tuple containing all values from it
which could be a problem if it is large.
See discussion at:
https://groups.google.com/forum/#!msg/python-ideas/XcuC01a8SYs/e-doB9TbDwAJ
"""
hash_value = hash(type(it))
for value in it:
hash_value = hash((hash_value, value))
return hash_value
-527
View File
@@ -1,527 +0,0 @@
"""Bag class definitions."""
import heapq
from collections import Hashable, MutableSet, Set
from operator import itemgetter
from . import _compat
class _basebag(Set):
"""Base class for bag classes.
Base class for bag and frozenbag. Is not mutable and not hashable, so there's
no reason to use this instead of either bag or frozenbag.
"""
# Basic object methods
def __init__(self, iterable=None):
"""Create a new basebag.
If iterable isn't given, is None or is empty then the bag starts empty.
Otherwise each element from iterable will be added to the bag
however many times it appears.
This runs in O(len(iterable))
"""
self._dict = dict()
self._size = 0
if iterable:
if isinstance(iterable, _basebag):
for elem, count in iterable._dict.items():
self._dict[elem] = count
self._size += count
else:
for value in iterable:
self._dict[value] = self._dict.get(value, 0) + 1
self._size += 1
def __repr__(self):
if self._size == 0:
return '{0}()'.format(self.__class__.__name__)
else:
repr_format = '{class_name}({values!r})'
return repr_format.format(
class_name=self.__class__.__name__,
values=tuple(self),
)
def __str__(self):
if self._size == 0:
return '{class_name}()'.format(class_name=self.__class__.__name__)
else:
format_single = '{elem!r}'
format_mult = '{elem!r}^{mult}'
strings = []
for elem, mult in self._dict.items():
if mult > 1:
strings.append(format_mult.format(elem=elem, mult=mult))
else:
strings.append(format_single.format(elem=elem))
return '{%s}' % ', '.join(strings)
# New public methods (not overriding/implementing anything)
def num_unique_elements(self):
"""Return the number of unique elements.
This runs in O(1) time
"""
return len(self._dict)
def unique_elements(self):
"""Return a view of unique elements in this bag.
In Python 3:
This runs in O(1) time and returns a view of the unique elements
In Python 2:
This runs in O(n) and returns set of the current elements.
"""
return _compat.keys_set(self._dict)
def count(self, value):
"""Return the number of value present in this bag.
If value is not in the bag no Error is raised, instead 0 is returned.
This runs in O(1) time
Args:
value: The element of self to get the count of
Returns:
int: The count of value in self
"""
return self._dict.get(value, 0)
def nlargest(self, n=None):
"""List the n most common elements and their counts.
List is from the most
common to the least. If n is None, the list all element counts.
Run time should be O(m log m) where m is len(self)
Args:
n (int): The number of elements to return
"""
if n is None:
return sorted(self._dict.items(), key=itemgetter(1), reverse=True)
else:
return heapq.nlargest(n, self._dict.items(), key=itemgetter(1))
@classmethod
def _from_iterable(cls, it):
return cls(it)
@classmethod
def from_mapping(cls, mapping):
"""Create a bag from a dict of elem->count.
Each key in the dict is added if the value is > 0.
"""
out = cls()
for elem, count in mapping.items():
if count > 0:
out._dict[elem] = count
out._size += count
return out
def copy(self):
"""Create a shallow copy of self.
This runs in O(len(self.num_unique_elements()))
"""
return self.from_mapping(self._dict)
# implementing Sized methods
def __len__(self):
"""Return the cardinality of the bag.
This runs in O(1)
"""
return self._size
# implementing Container methods
def __contains__(self, value):
"""Return the multiplicity of the element.
This runs in O(1)
"""
return self._dict.get(value, 0)
# implementing Iterable methods
def __iter__(self):
"""Iterate through all elements.
Multiple copies will be returned if they exist.
"""
for value, count in self._dict.items():
for i in range(count):
yield(value)
# Comparison methods
def _is_subset(self, other):
"""Check that every element in self has a count <= in other.
Args:
other (Set)
"""
if isinstance(other, _basebag):
for elem, count in self._dict.items():
if not count <= other._dict.get(elem, 0):
return False
else:
for elem in self:
if self._dict.get(elem, 0) > 1 or elem not in other:
return False
return True
def _is_superset(self, other):
"""Check that every element in self has a count >= in other.
Args:
other (Set)
"""
if isinstance(other, _basebag):
for elem, count in other._dict.items():
if not self._dict.get(elem, 0) >= count:
return False
else:
for elem in other:
if elem not in self:
return False
return True
def __le__(self, other):
if not isinstance(other, Set):
return _compat.handle_rich_comp_not_implemented()
return len(self) <= len(other) and self._is_subset(other)
def __lt__(self, other):
if not isinstance(other, Set):
return _compat.handle_rich_comp_not_implemented()
return len(self) < len(other) and self._is_subset(other)
def __gt__(self, other):
if not isinstance(other, Set):
return _compat.handle_rich_comp_not_implemented()
return len(self) > len(other) and self._is_superset(other)
def __ge__(self, other):
if not isinstance(other, Set):
return _compat.handle_rich_comp_not_implemented()
return len(self) >= len(other) and self._is_superset(other)
def __eq__(self, other):
if not isinstance(other, Set):
return False
if isinstance(other, _basebag):
return self._dict == other._dict
if not len(self) == len(other):
return False
for elem in other:
if self._dict.get(elem, 0) != 1:
return False
return True
def __ne__(self, other):
return not (self == other)
# Operations - &, |, +, -, ^, * and isdisjoint
def __and__(self, other):
"""Intersection is the minimum of corresponding counts.
This runs in O(l + n) where:
n is self.num_unique_elements()
if other is a bag:
l = 1
else:
l = len(other)
"""
if not isinstance(other, _basebag):
other = self._from_iterable(other)
values = dict()
for elem in self._dict:
values[elem] = min(other._dict.get(elem, 0), self._dict.get(elem, 0))
return self.from_mapping(values)
def isdisjoint(self, other):
"""Return if this bag is disjoint with the passed collection.
This runs in O(len(other))
TODO move isdisjoint somewhere more appropriate
"""
for value in other:
if value in self:
return False
return True
def __or__(self, other):
"""Union is the maximum of all elements.
This runs in O(m + n) where:
n is self.num_unique_elements()
if other is a bag:
m = other.num_unique_elements()
else:
m = len(other)
"""
if not isinstance(other, _basebag):
other = self._from_iterable(other)
values = dict()
for elem in self.unique_elements() | other.unique_elements():
values[elem] = max(self._dict.get(elem, 0), other._dict.get(elem, 0))
return self.from_mapping(values)
def __add__(self, other):
"""Return a new bag also containing all the elements of other.
self + other = self & other + self | other
This runs in O(m + n) where:
n is self.num_unique_elements()
m is len(other)
Args:
other (Iterable): elements to add to self
"""
out = self.copy()
for value in other:
out._dict[value] = out._dict.get(value, 0) + 1
out._size += 1
return out
def __sub__(self, other):
"""Difference between the sets.
For normal sets this is all x s.t. x in self and x not in other.
For bags this is count(x) = max(0, self.count(x)-other.count(x))
This runs in O(m + n) where:
n is self.num_unique_elements()
m is len(other)
Args:
other (Iterable): elements to remove
"""
out = self.copy()
for value in other:
old_count = out._dict.get(value, 0)
if old_count == 1:
del out._dict[value]
out._size -= 1
elif old_count > 1:
out._dict[value] = old_count - 1
out._size -= 1
return out
def __mul__(self, other):
"""Cartesian product of the two sets.
other can be any iterable.
Both self and other must contain elements that can be added together.
This should run in O(m*n+l) where:
m is the number of unique elements in self
n is the number of unique elements in other
if other is a bag:
l is 0
else:
l is the len(other)
The +l will only really matter when other is an iterable with MANY
repeated elements.
For example: {'a'^2} * 'bbbbbbbbbbbbbbbbbbbbbbbbbb'
The algorithm will be dominated by counting the 'b's
"""
if not isinstance(other, _basebag):
other = self._from_iterable(other)
values = dict()
for elem, count in self._dict.items():
for other_elem, other_count in other._dict.items():
new_elem = elem + other_elem
new_count = count * other_count
values[new_elem] = new_count
return self.from_mapping(values)
def __xor__(self, other):
"""Symmetric difference between the sets.
other can be any iterable.
This runs in O(m + n) where:
m = len(self)
n = len(other)
"""
return (self - other) | (other - self)
class bag(_basebag, MutableSet):
"""bag is a mutable unhashable bag."""
def pop(self):
"""Remove and return an element of self."""
# TODO can this be done more efficiently (no need to create an iterator)?
it = iter(self)
try:
value = next(it)
except StopIteration:
raise KeyError
self.discard(value)
return value
def add(self, elem):
"""Add elem to self."""
self._dict[elem] = self._dict.get(elem, 0) + 1
self._size += 1
def discard(self, elem):
"""Remove elem from this bag, silent if it isn't present."""
try:
self.remove(elem)
except ValueError:
pass
def remove(self, elem):
"""Remove elem from this bag, raising a ValueError if it isn't present.
Args:
elem: object to remove from self
Raises:
ValueError: if the elem isn't present
"""
old_count = self._dict.get(elem, 0)
if old_count == 0:
raise ValueError
elif old_count == 1:
del self._dict[elem]
else:
self._dict[elem] -= 1
self._size -= 1
def discard_all(self, other):
"""Discard all of the elems from other."""
if not isinstance(other, _basebag):
other = self._from_iterable(other)
for elem, other_count in other._dict.items():
old_count = self._dict.get(elem, 0)
new_count = old_count - other_count
if new_count >= 0:
if new_count == 0:
if elem in self:
del self._dict[elem]
else:
self._dict[elem] = new_count
self._size += new_count - old_count
def remove_all(self, other):
"""Remove all of the elems from other.
Raises a ValueError if the multiplicity of any elem in other is greater
than in self.
"""
if not self._is_superset(other):
raise ValueError
self.discard_all(other)
def clear(self):
"""Remove all elements from this bag."""
self._dict = dict()
self._size = 0
# In-place operations
def __ior__(self, other):
"""Set multiplicity of each element to the maximum of the two collections.
if isinstance(other, _basebag):
This runs in O(other.num_unique_elements())
else:
This runs in O(len(other))
"""
if not isinstance(other, _basebag):
other = self._from_iterable(other)
for elem, other_count in other._dict.items():
old_count = self._dict.get(elem, 0)
new_count = max(other_count, old_count)
self._dict[elem] = new_count
self._size += new_count - old_count
return self
def __iand__(self, other):
"""Set multiplicity of each element to the minimum of the two collections.
if isinstance(other, _basebag):
This runs in O(other.num_unique_elements())
else:
This runs in O(len(other))
"""
if not isinstance(other, _basebag):
other = self._from_iterable(other)
for elem, old_count in set(self._dict.items()):
other_count = other._dict.get(elem, 0)
new_count = min(other_count, old_count)
if new_count == 0:
del self._dict[elem]
else:
self._dict[elem] = new_count
self._size += new_count - old_count
return self
def __ixor__(self, other):
"""Set self to the symmetric difference between the sets.
if isinstance(other, _basebag):
This runs in O(other.num_unique_elements())
else:
This runs in O(len(other))
"""
if not isinstance(other, _basebag):
other = self._from_iterable(other)
other_minus_self = other - self
self -= other
self |= other_minus_self
return self
def __isub__(self, other):
"""Discard the elements of other from self.
if isinstance(it, _basebag):
This runs in O(it.num_unique_elements())
else:
This runs in O(len(it))
"""
self.discard_all(other)
return self
def __iadd__(self, other):
"""Add all of the elements of other to self.
if isinstance(it, _basebag):
This runs in O(it.num_unique_elements())
else:
This runs in O(len(it))
"""
if not isinstance(other, _basebag):
other = self._from_iterable(other)
for elem, other_count in other._dict.items():
self._dict[elem] = self._dict.get(elem, 0) + other_count
self._size += other_count
return self
class frozenbag(_basebag, Hashable):
"""frozenbag is an immutable, hashable bab."""
def __hash__(self):
"""Compute the hash value of a frozenbag.
This was copied directly from _collections_abc.Set._hash in Python3 which
is identical to _abcoll.Set._hash
We can't call it directly because Python2 raises a TypeError.
"""
if not hasattr(self, '_hash_value'):
self._hash_value = self._hash()
return self._hash_value
-94
View File
@@ -1,94 +0,0 @@
"""Class definition for bijection."""
from collections import Mapping, MutableMapping
class bijection(MutableMapping):
"""A one-to-one onto mapping, a dict with unique values."""
def __init__(self, iterable=None, **kwarg):
"""Create a bijection from an iterable.
Matches dict.__init__.
"""
self._data = {}
self.__inverse = self.__new__(bijection)
self.__inverse._data = {}
self.__inverse.__inverse = self
if iterable is not None:
if isinstance(iterable, Mapping):
for key, value in iterable.items():
self[key] = value
else:
for pair in iterable:
self[pair[0]] = pair[1]
for key, value in kwarg.items():
self[key] = value
def __repr__(self):
if len(self._data) == 0:
return '{0}()'.format(self.__class__.__name__)
else:
repr_format = '{class_name}({values!r})'
return repr_format.format(
class_name=self.__class__.__name__,
values=self._data,
)
@property
def inverse(self):
"""Return the inverse of this bijection."""
return self.__inverse
# Required for MutableMapping
def __len__(self):
return len(self._data)
# Required for MutableMapping
def __getitem__(self, key):
return self._data[key]
# Required for MutableMapping
def __setitem__(self, key, value):
if key in self:
del self.inverse._data[self[key]]
if value in self.inverse:
del self._data[self.inverse[value]]
self._data[key] = value
self.inverse._data[value] = key
# Required for MutableMapping
def __delitem__(self, key):
value = self._data.pop(key)
del self.inverse._data[value]
# Required for MutableMapping
def __iter__(self):
return iter(self._data)
def __contains__(self, key):
return key in self._data
def clear(self):
"""Remove everything from this bijection."""
self._data.clear()
self.inverse._data.clear()
def copy(self):
"""Return a copy of this bijection."""
return bijection(self)
def items(self):
"""See Mapping.items."""
return self._data.items()
def keys(self):
"""See Mapping.keys."""
return self._data.keys()
def values(self):
"""See Mapping.values."""
return self.inverse.keys()
def __eq__(self, other):
return isinstance(other, bijection) and self._data == other._data
-383
View File
@@ -1,383 +0,0 @@
"""RangeMap class definition."""
from bisect import bisect_left, bisect_right
from collections import Mapping, MappingView, Set, namedtuple
# Used to mark unmapped ranges
_empty = object()
MappedRange = namedtuple('MappedRange', ('start', 'stop', 'value'))
class KeysView(MappingView, Set):
"""A view of the keys that mark the starts of subranges.
Since iterating over all the keys is impossible, the KeysView only
contains the keys that start each subrange.
"""
__slots__ = ()
@classmethod
def _from_iterable(self, it):
return set(it)
def __contains__(self, key):
loc = self._mapping._bisect_left(key)
return self._mapping._keys[loc] == key and \
self._mapping._values[loc] is not _empty
def __iter__(self):
for item in self._mapping.ranges():
yield item.start
class ItemsView(MappingView, Set):
"""A view of the items that mark the starts of subranges.
Since iterating over all the keys is impossible, the ItemsView only
contains the items that start each subrange.
"""
__slots__ = ()
@classmethod
def _from_iterable(self, it):
return set(it)
def __contains__(self, item):
key, value = item
loc = self._mapping._bisect_left(key)
return self._mapping._keys[loc] == key and \
self._mapping._values[loc] == value
def __iter__(self):
for mapped_range in self._mapping.ranges():
yield (mapped_range.start, mapped_range.value)
class ValuesView(MappingView):
"""A view on the values of a Mapping."""
__slots__ = ()
def __contains__(self, value):
return value in self._mapping._values
def __iter__(self):
for value in self._mapping._values:
if value is not _empty:
yield value
def _check_start_stop(start, stop):
"""Check that start and stop are valid - orderable and in the right order.
Raises:
ValueError: if stop <= start
TypeError: if unorderable
"""
if start is not None and stop is not None and stop <= start:
raise ValueError('stop must be > start')
def _check_key_slice(key):
if not isinstance(key, slice):
raise TypeError('Can only set and delete slices')
if key.step is not None:
raise ValueError('Cannot set or delete slices with steps')
class RangeMap(Mapping):
"""Map ranges of orderable elements to values."""
def __init__(self, iterable=None, **kwargs):
"""Create a RangeMap.
A mapping or other iterable can be passed to initialize the RangeMap.
If mapping is passed, it is interpreted as a mapping from range start
indices to values.
If an iterable is passed, each element will define a range in the
RangeMap and should be formatted (start, stop, value).
default_value is a an optional keyword argument that will initialize the
entire RangeMap to that value. Any missing ranges will be mapped to that
value. However, if ranges are subsequently deleted they will be removed
and *not* mapped to the default_value.
Args:
iterable: A Mapping or an Iterable to initialize from.
default_value: If passed, the return value for all keys less than the
least key in mapping or missing ranges in iterable. If no mapping
or iterable, the return value for all keys.
"""
default_value = kwargs.pop('default_value', _empty)
if kwargs:
raise TypeError('Unknown keyword arguments: %s' % ', '.join(kwargs.keys()))
self._keys = [None]
self._values = [default_value]
if iterable:
if isinstance(iterable, Mapping):
self._init_from_mapping(iterable)
else:
self._init_from_iterable(iterable)
@classmethod
def from_mapping(cls, mapping):
"""Create a RangeMap from a mapping of interval starts to values."""
obj = cls()
obj._init_from_mapping(mapping)
return obj
def _init_from_mapping(self, mapping):
for key, value in sorted(mapping.items()):
self.set(value, key)
@classmethod
def from_iterable(cls, iterable):
"""Create a RangeMap from an iterable of tuples defining each range.
Each element of the iterable is a tuple (start, stop, value).
"""
obj = cls()
obj._init_from_iterable(iterable)
return obj
def _init_from_iterable(self, iterable):
for start, stop, value in iterable:
self.set(value, start=start, stop=stop)
def __str__(self):
range_format = '({range.start}, {range.stop}): {range.value}'
values = ', '.join([range_format.format(range=r) for r in self.ranges()])
return 'RangeMap(%s)' % values
def __repr__(self):
range_format = '({range.start!r}, {range.stop!r}, {range.value!r})'
values = ', '.join([range_format.format(range=r) for r in self.ranges()])
return 'RangeMap([%s])' % values
def _bisect_left(self, key):
"""Return the index of the key or the last key < key."""
if key is None:
return 0
else:
return bisect_left(self._keys, key, lo=1)
def _bisect_right(self, key):
"""Return the index of the first key > key."""
if key is None:
return 1
else:
return bisect_right(self._keys, key, lo=1)
def ranges(self, start=None, stop=None):
"""Generate MappedRanges for all mapped ranges.
Yields:
MappedRange
"""
_check_start_stop(start, stop)
start_loc = self._bisect_right(start)
if stop is None:
stop_loc = len(self._keys)
else:
stop_loc = self._bisect_left(stop)
start_val = self._values[start_loc - 1]
candidate_keys = [start] + self._keys[start_loc:stop_loc] + [stop]
candidate_values = [start_val] + self._values[start_loc:stop_loc]
for i, value in enumerate(candidate_values):
if value is not _empty:
start_key = candidate_keys[i]
stop_key = candidate_keys[i + 1]
yield MappedRange(start_key, stop_key, value)
def __contains__(self, value):
try:
self.__getitem(value) is not _empty
except KeyError:
return False
else:
return True
def __iter__(self):
for key, value in zip(self._keys, self._values):
if value is not _empty:
yield key
def __bool__(self):
if len(self._keys) > 1:
return True
else:
return self._values[0] != _empty
__nonzero__ = __bool__
def __getitem(self, key):
"""Get the value for a key (not a slice)."""
loc = self._bisect_right(key) - 1
value = self._values[loc]
if value is _empty:
raise KeyError(key)
else:
return value
def get(self, key, restval=None):
"""Get the value of the range containing key, otherwise return restval."""
try:
return self.__getitem(key)
except KeyError:
return restval
def get_range(self, start=None, stop=None):
"""Return a RangeMap for the range start to stop.
Returns:
A RangeMap
"""
return self.from_iterable(self.ranges(start, stop))
def set(self, value, start=None, stop=None):
"""Set the range from start to stop to value."""
_check_start_stop(start, stop)
# start_index, stop_index will denote the sections we are replacing
start_index = self._bisect_left(start)
if start is not None: # start_index == 0
prev_value = self._values[start_index - 1]
if prev_value == value:
# We're setting a range where the left range has the same
# value, so create one big range
start_index -= 1
start = self._keys[start_index]
if stop is None:
new_keys = [start]
new_values = [value]
stop_index = len(self._keys)
else:
stop_index = self._bisect_right(stop)
stop_value = self._values[stop_index - 1]
stop_key = self._keys[stop_index - 1]
if stop_key == stop and stop_value == value:
new_keys = [start]
new_values = [value]
else:
new_keys = [start, stop]
new_values = [value, stop_value]
self._keys[start_index:stop_index] = new_keys
self._values[start_index:stop_index] = new_values
def delete(self, start=None, stop=None):
"""Delete the range from start to stop from self.
Raises:
KeyError: If part of the passed range isn't mapped.
"""
_check_start_stop(start, stop)
start_loc = self._bisect_right(start) - 1
if stop is None:
stop_loc = len(self._keys)
else:
stop_loc = self._bisect_left(stop)
for value in self._values[start_loc:stop_loc]:
if value is _empty:
raise KeyError((start, stop))
# this is inefficient, we've already found the sub ranges
self.set(_empty, start=start, stop=stop)
def empty(self, start=None, stop=None):
"""Empty the range from start to stop.
Like delete, but no Error is raised if the entire range isn't mapped.
"""
self.set(_empty, start=start, stop=stop)
def clear(self):
"""Remove all elements."""
self._keys = [None]
self._values = [_empty]
@property
def start(self):
"""Get the start key of the first range.
None if RangeMap is empty or unbounded to the left.
"""
if self._values[0] is _empty:
try:
return self._keys[1]
except IndexError:
# This is empty or everything is mapped to a single value
return None
else:
# This is unbounded to the left
return self._keys[0]
@property
def end(self):
"""Get the stop key of the last range.
None if RangeMap is empty or unbounded to the right.
"""
if self._values[-1] is _empty:
return self._keys[-1]
else:
# This is unbounded to the right
return None
def __eq__(self, other):
if isinstance(other, RangeMap):
return (
self._keys == other._keys and
self._values == other._values
)
else:
return False
def __getitem__(self, key):
try:
_check_key_slice(key)
except TypeError:
return self.__getitem(key)
else:
return self.get_range(key.start, key.stop)
def __setitem__(self, key, value):
_check_key_slice(key)
self.set(value, key.start, key.stop)
def __delitem__(self, key):
_check_key_slice(key)
self.delete(key.start, key.stop)
def __len__(self):
count = 0
for v in self._values:
if v is not _empty:
count += 1
return count
def keys(self):
"""Return a view of the keys."""
return KeysView(self)
def values(self):
"""Return a view of the values."""
return ValuesView(self)
def items(self):
"""Return a view of the item pairs."""
return ItemsView(self)
# Python2 - override slice methods
def __setslice__(self, i, j, value):
"""Implement __setslice__ to override behavior in Python 2.
This is required because empty slices pass integers in python2 as opposed
to None in python 3.
"""
raise SyntaxError('Assigning slices doesn\t work in Python 2, use set')
def __delslice__(self, i, j):
raise SyntaxError('Deleting slices doesn\t work in Python 2, use delete')
def __getslice__(self, i, j):
raise SyntaxError('Getting slices doesn\t work in Python 2, use get_range.')
-551
View File
@@ -1,551 +0,0 @@
"""Setlist class definitions."""
import random as random_
from collections import (
Hashable,
MutableSequence,
MutableSet,
Sequence,
Set,
)
from . import _util
class _basesetlist(Sequence, Set):
"""A setlist is an ordered Collection of unique elements.
_basesetlist is the superclass of setlist and frozensetlist. It is immutable
and unhashable.
"""
def __init__(self, iterable=None, raise_on_duplicate=False):
"""Create a setlist.
Args:
iterable (Iterable): Values to initialize the setlist with.
"""
self._list = list()
self._dict = dict()
if iterable:
if raise_on_duplicate:
self._extend(iterable)
else:
self._update(iterable)
def __repr__(self):
if len(self) == 0:
return '{0}()'.format(self.__class__.__name__)
else:
repr_format = '{class_name}({values!r})'
return repr_format.format(
class_name=self.__class__.__name__,
values=tuple(self),
)
# Convenience methods
def _fix_neg_index(self, index):
if index < 0:
index += len(self)
if index < 0:
raise IndexError('index is out of range')
return index
def _fix_end_index(self, index):
if index is None:
return len(self)
else:
return self._fix_neg_index(index)
def _append(self, value):
# Checking value in self will check that value is Hashable
if value in self:
raise ValueError('Value "%s" already present' % str(value))
else:
self._dict[value] = len(self)
self._list.append(value)
def _extend(self, values):
new_values = set()
for value in values:
if value in new_values:
raise ValueError('New values contain duplicates')
elif value in self:
raise ValueError('New values contain elements already present in self')
else:
new_values.add(value)
for value in values:
self._dict[value] = len(self)
self._list.append(value)
def _add(self, item):
if item not in self:
self._dict[item] = len(self)
self._list.append(item)
def _update(self, values):
for value in values:
if value not in self:
self._dict[value] = len(self)
self._list.append(value)
@classmethod
def _from_iterable(cls, it, **kwargs):
return cls(it, **kwargs)
# Implement Container
def __contains__(self, value):
return value in self._dict
# Iterable we get by inheriting from Sequence
# Implement Sized
def __len__(self):
return len(self._list)
# Implement Sequence
def __getitem__(self, index):
if isinstance(index, slice):
return self._from_iterable(self._list[index])
return self._list[index]
def count(self, value):
"""Return the number of occurences of value in self.
This runs in O(1)
Args:
value: The value to count
Returns:
int: 1 if the value is in the setlist, otherwise 0
"""
if value in self:
return 1
else:
return 0
def index(self, value, start=0, end=None):
"""Return the index of value between start and end.
By default, the entire setlist is searched.
This runs in O(1)
Args:
value: The value to find the index of
start (int): The index to start searching at (defaults to 0)
end (int): The index to stop searching at (defaults to the end of the list)
Returns:
int: The index of the value
Raises:
ValueError: If the value is not in the list or outside of start - end
IndexError: If start or end are out of range
"""
try:
index = self._dict[value]
except KeyError:
raise ValueError
else:
start = self._fix_neg_index(start)
end = self._fix_end_index(end)
if start <= index and index < end:
return index
else:
raise ValueError
@classmethod
def _check_type(cls, other, operand_name):
if not isinstance(other, _basesetlist):
message = (
"unsupported operand type(s) for {operand_name}: "
"'{self_type}' and '{other_type}'").format(
operand_name=operand_name,
self_type=cls,
other_type=type(other),
)
raise TypeError(message)
def __add__(self, other):
self._check_type(other, '+')
out = self.copy()
out._extend(other)
return out
# Implement Set
def issubset(self, other):
return self <= other
def issuperset(self, other):
return self >= other
def union(self, other):
out = self.copy()
out.update(other)
return out
def intersection(self, other):
other = set(other)
return self._from_iterable(item for item in self if item in other)
def difference(self, other):
other = set(other)
return self._from_iterable(item for item in self if item not in other)
def symmetric_difference(self, other):
return self.union(other) - self.intersection(other)
def __sub__(self, other):
self._check_type(other, '-')
return self.difference(other)
def __and__(self, other):
self._check_type(other, '&')
return self.intersection(other)
def __or__(self, other):
self._check_type(other, '|')
return self.union(other)
def __xor__(self, other):
self._check_type(other, '^')
return self.symmetric_difference(other)
# Comparison
def __eq__(self, other):
if not isinstance(other, _basesetlist):
return False
if not len(self) == len(other):
return False
for self_elem, other_elem in zip(self, other):
if self_elem != other_elem:
return False
return True
def __ne__(self, other):
return not (self == other)
# New methods
def sub_index(self, sub, start=0, end=None):
"""Return the index of a subsequence.
This runs in O(len(sub))
Args:
sub (Sequence): An Iterable to search for
Returns:
int: The index of the first element of sub
Raises:
ValueError: If sub isn't a subsequence
TypeError: If sub isn't iterable
IndexError: If start or end are out of range
"""
start_index = self.index(sub[0], start, end)
end = self._fix_end_index(end)
if start_index + len(sub) > end:
raise ValueError
for i in range(1, len(sub)):
if sub[i] != self[start_index + i]:
raise ValueError
return start_index
def copy(self):
return self.__class__(self)
class setlist(_basesetlist, MutableSequence, MutableSet):
"""A mutable (unhashable) setlist."""
def __str__(self):
return '{[%s}]' % ', '.join(repr(v) for v in self)
# Helper methods
def _delete_all(self, elems_to_delete, raise_errors):
indices_to_delete = set()
for elem in elems_to_delete:
try:
elem_index = self._dict[elem]
except KeyError:
if raise_errors:
raise ValueError('Passed values contain elements not in self')
else:
if elem_index in indices_to_delete:
if raise_errors:
raise ValueError('Passed vales contain duplicates')
indices_to_delete.add(elem_index)
self._delete_values_by_index(indices_to_delete)
def _delete_values_by_index(self, indices_to_delete):
deleted_count = 0
for i, elem in enumerate(self._list):
if i in indices_to_delete:
deleted_count += 1
del self._dict[elem]
else:
new_index = i - deleted_count
self._list[new_index] = elem
self._dict[elem] = new_index
# Now remove deleted_count items from the end of the list
if deleted_count:
self._list = self._list[:-deleted_count]
# Set/Sequence agnostic
def pop(self, index=-1):
"""Remove and return the item at index."""
value = self._list.pop(index)
del self._dict[value]
return value
def clear(self):
"""Remove all elements from self."""
self._dict = dict()
self._list = list()
# Implement MutableSequence
def __setitem__(self, index, value):
if isinstance(index, slice):
old_values = self[index]
for v in value:
if v in self and v not in old_values:
raise ValueError
self._list[index] = value
self._dict = {}
for i, v in enumerate(self._list):
self._dict[v] = i
else:
index = self._fix_neg_index(index)
old_value = self._list[index]
if value in self:
if value == old_value:
return
else:
raise ValueError
del self._dict[old_value]
self._list[index] = value
self._dict[value] = index
def __delitem__(self, index):
if isinstance(index, slice):
indices_to_delete = set(self.index(e) for e in self._list[index])
self._delete_values_by_index(indices_to_delete)
else:
index = self._fix_neg_index(index)
value = self._list[index]
del self._dict[value]
for elem in self._list[index + 1:]:
self._dict[elem] -= 1
del self._list[index]
def insert(self, index, value):
"""Insert value at index.
Args:
index (int): Index to insert value at
value: Value to insert
Raises:
ValueError: If value already in self
IndexError: If start or end are out of range
"""
if value in self:
raise ValueError
index = self._fix_neg_index(index)
self._dict[value] = index
for elem in self._list[index:]:
self._dict[elem] += 1
self._list.insert(index, value)
def append(self, value):
"""Append value to the end.
Args:
value: Value to append
Raises:
ValueError: If value alread in self
TypeError: If value isn't hashable
"""
self._append(value)
def extend(self, values):
"""Append all values to the end.
If any of the values are present, ValueError will
be raised and none of the values will be appended.
Args:
values (Iterable): Values to append
Raises:
ValueError: If any values are already present or there are duplicates
in the passed values.
TypeError: If any of the values aren't hashable.
"""
self._extend(values)
def __iadd__(self, values):
"""Add all values to the end of self.
Args:
values (Iterable): Values to append
Raises:
ValueError: If any values are already present
"""
self._check_type(values, '+=')
self.extend(values)
return self
def remove(self, value):
"""Remove value from self.
Args:
value: Element to remove from self
Raises:
ValueError: if element is already present
"""
try:
index = self._dict[value]
except KeyError:
raise ValueError('Value "%s" is not present.')
else:
del self[index]
def remove_all(self, elems_to_delete):
"""Remove all elements from elems_to_delete, raises ValueErrors.
See Also:
discard_all
Args:
elems_to_delete (Iterable): Elements to remove.
Raises:
ValueError: If the count of any element is greater in
elems_to_delete than self.
TypeError: If any of the values aren't hashable.
"""
self._delete_all(elems_to_delete, raise_errors=True)
# Implement MutableSet
def add(self, item):
"""Add an item.
Note:
This does not raise a ValueError for an already present value like
append does. This is to match the behavior of set.add
Args:
item: Item to add
Raises:
TypeError: If item isn't hashable.
"""
self._add(item)
def update(self, values):
"""Add all values to the end.
If any of the values are present, silently ignore
them (as opposed to extend which raises an Error).
See also:
extend
Args:
values (Iterable): Values to add
Raises:
TypeError: If any of the values are unhashable.
"""
self._update(values)
def discard_all(self, elems_to_delete):
"""Discard all the elements from elems_to_delete.
This is much faster than removing them one by one.
This runs in O(len(self) + len(elems_to_delete))
Args:
elems_to_delete (Iterable): Elements to discard.
Raises:
TypeError: If any of the values aren't hashable.
"""
self._delete_all(elems_to_delete, raise_errors=False)
def discard(self, value):
"""Discard an item.
Note:
This does not raise a ValueError for a missing value like remove does.
This is to match the behavior of set.discard
"""
try:
self.remove(value)
except ValueError:
pass
def difference_update(self, other):
"""Update self to include only the differene with other."""
other = set(other)
indices_to_delete = set()
for i, elem in enumerate(self):
if elem in other:
indices_to_delete.add(i)
if indices_to_delete:
self._delete_values_by_index(indices_to_delete)
def intersection_update(self, other):
"""Update self to include only the intersection with other."""
other = set(other)
indices_to_delete = set()
for i, elem in enumerate(self):
if elem not in other:
indices_to_delete.add(i)
if indices_to_delete:
self._delete_values_by_index(indices_to_delete)
def symmetric_difference_update(self, other):
"""Update self to include only the symmetric difference with other."""
other = setlist(other)
indices_to_delete = set()
for i, item in enumerate(self):
if item in other:
indices_to_delete.add(i)
for item in other:
self.add(item)
self._delete_values_by_index(indices_to_delete)
def __isub__(self, other):
self._check_type(other, '-=')
self.difference_update(other)
return self
def __iand__(self, other):
self._check_type(other, '&=')
self.intersection_update(other)
return self
def __ior__(self, other):
self._check_type(other, '|=')
self.update(other)
return self
def __ixor__(self, other):
self._check_type(other, '^=')
self.symmetric_difference_update(other)
return self
# New methods
def shuffle(self, random=None):
"""Shuffle all of the elements in self randomly."""
random_.shuffle(self._list, random=random)
for i, elem in enumerate(self._list):
self._dict[elem] = i
def sort(self, *args, **kwargs):
"""Sort this setlist in place."""
self._list.sort(*args, **kwargs)
for index, value in enumerate(self._list):
self._dict[value] = index
class frozensetlist(_basesetlist, Hashable):
"""An immutable (hashable) setlist."""
def __hash__(self):
if not hasattr(self, '_hash_value'):
self._hash_value = _util.hash_iterable(self)
return self._hash_value
-28
View File
@@ -1,28 +0,0 @@
version: '{build}'
pull_requests:
do_not_increment_build_number: true
environment:
ProjectVersion: build$(APPVEYOR_BUILD_VERSION)
matrix:
- PYTHON: C:\PYTHON36
install:
- ps: 'if(Test-Path env:APPVEYOR_REPO_TAG_NAME) {$env:ProjectVersion=$env:APPVEYOR_REPO_TAG_NAME}'
- '%PYTHON%\python.exe --version'
- '%PYTHON%\Scripts\pip install pyinstaller'
- '%PYTHON%\Scripts\pip install markdown'
- '%PYTHON%\python.exe -m markdown README.md > README.html'
- '%PYTHON%\Scripts\pyinstaller bundle\EntranceRandomizer.spec'
- 'mkdir dist\EntranceRandomizer\ext'
- 'move dist\EntranceRandomizer\*.pyd dist\EntranceRandomizer\ext'
- 'move dist\EntranceRandomizer\tcl*.dll dist\EntranceRandomizer\ext'
- 'move dist\EntranceRandomizer\tk*.dll dist\EntranceRandomizer\ext'
- ps: '$env:ER_Version= &"$env:PYTHON\python.exe" -c "import Main; import re; print(re.match(''[0-9]+\\.[0-9]+\\.[0-9]+'',Main.__version__).group(0))"'
- '"%WIX%\bin\heat.exe" dir "dist\EntranceRandomizer" -sfrag -srd -suid -dr INSTALLDIR -cg ERFiles -ag -template fragment -t bundle\components.xslt -out build\components.wxs'
- '"%WIX%\bin\candle.exe" -out build\ bundle\*.wxs build\*.wxs'
- '"%WIX%\bin\light.exe" -ext WixUIExtension build\*.wixobj -o dist\EntranceRandomizer-Installer-%ProjectVersion%-win32.msi -b dist\EntranceRandomizer'
build: off
artifacts:
- path: dist/EntranceRandomizer*.msi
name: EntranceRandomizer-Installer-$(ProjectVersion)-win32.msi
- path: dist/EntranceRandomizer/
name: EntranceRandomizer-Raw-$(ProjectVersion)-win32.zip
+100
View File
@@ -0,0 +1,100 @@
---
layout: default
title: Blog
nav_order: 6
has_children: false
---
# Development Blog
{: .no_toc }
Latest updates, release notes, and development insights for ALttP Door Randomizer.
{: .fs-6 .fw-300 }
---
## Recent Posts
{% assign posts = site.posts | sort: 'date' | reverse %}
{% for post in posts limit:10 %}
<div class="post-entry" style="margin-bottom: 2em; padding-bottom: 1em; border-bottom: 1px solid #eeebee;">
<h3 style="margin-bottom: 0.5em;">
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
</h3>
<p style="color: #5C5962; font-size: 0.9em; margin-bottom: 0.5em;">
{{ post.date | date: "%B %d, %Y" }}
{% if post.author %} • by {{ post.author }}{% endif %}
</p>
<p>{{ post.excerpt | strip_html | truncatewords: 50 }}</p>
<p><a href="{{ post.url | relative_url }}">Read more →</a></p>
</div>
{% endfor %}
---
## Categories
Browse posts by category:
- [Release Notes](#release-notes)
- [Development Updates](#development-updates)
- [Feature Highlights](#feature-highlights)
- [Technical Deep Dives](#technical-deep-dives)
### Release Notes
{% assign release_posts = site.posts | where: "category", "release" %}
{% for post in release_posts limit:5 %}
- [{{ post.title }}]({{ post.url | relative_url }}) - {{ post.date | date: "%B %d, %Y" }}
{% endfor %}
### Development Updates
{% assign dev_posts = site.posts | where: "category", "development" %}
{% for post in dev_posts limit:5 %}
- [{{ post.title }}]({{ post.url | relative_url }}) - {{ post.date | date: "%B %d, %Y" }}
{% endfor %}
### Feature Highlights
{% assign feature_posts = site.posts | where: "category", "features" %}
{% for post in feature_posts limit:5 %}
- [{{ post.title }}]({{ post.url | relative_url }}) - {{ post.date | date: "%B %d, %Y" }}
{% endfor %}
### Technical Deep Dives
{% assign feature_posts = site.posts | where: "category", "features" %}
{% for post in feature_posts limit:5 %}
- [{{ post.title }}]({{ post.url | relative_url }}) - {{ post.date | date: "%B %d, %Y" }}
{% endfor %}
---
## Subscribe
Stay up to date with Door Randomizer development:
- **Discord**: Join [ALTTP Randomizer Discord](https://discordapp.com/invite/alttprandomizer) in `#door-rando`
---
## Archive
View all posts by year:
{% assign posts_by_year = site.posts | group_by_exp: "post", "post.date | date: '%Y'" %}
{% for year in posts_by_year %}
### {{ year.name }}
{% for post in year.items %}
- [{{ post.title }}]({{ post.url | relative_url }}) - {{ post.date | date: "%B %d, %Y" }}
{% endfor %}
{% endfor %}
---
## Contributing to the Blog
Want to write a guest post or contribute content?
Contact us on Discord to discuss your ideas!
Binary file not shown.
+57 -2
View File
@@ -68,10 +68,30 @@ Then each player can have the entire item pool defined. The name of item should
`Bottle (Random)` is supported to randomize bottle contents according to those allowed by difficulty. Pendants and crystals are supported here.
##### Caveat
**Note**: `item_pool` is a **full replacement** of the base item pool. Every item the player will receive must be listed. If you only want to tweak the default pool, use `item_pool_adjust` instead.
##### Caveat
Dungeon items amount can be increased (but not decreased as the minimum of each dungeon item is either pre-determined or calculated by door rando) if the type of dungeon item is not shuffled then it is attempted to be placed in the dungeon. Extra item beyond dungeon capacity not be confined to the dungeon.
### item_pool_adjust
This must be defined by player. Each player number should be listed with the appropriate adjustments.
Unlike `item_pool`, this section **adjusts** the base item pool generated by the randomizer settings rather than replacing it. Use positive values to add items and negative values to remove items.
```yaml
item_pool_adjust:
1:
Bottle (Random): 2 # add 2 extra random bottles
Rupees (300): 1 # add 1 extra rupee pack
Boss Heart Container: -3 # remove 3 heart containers from the base pool
```
`Bottle (Random)` follows the same bottle randomization rules as in `item_pool`. When removing bottles with `Bottle (Random): -N`, any bottle (regardless of contents) will be removed.
Removals that exceed the number of that item currently in the pool are silently ignored. Item pool adjustments are applied after beemizer but before the standard-mode Link's Uncle weapon selection, so weapons added here are eligible for that placement.
### goals
This must be defined by player. Each player number should be listed with the appropriate custom goals. This section has four primary subsections for each of the current supported events:
@@ -257,10 +277,45 @@ someDescription:
`grid` contains additional options that only have an effect when `ow_layout` is set to `grid`.
#### fixed_arrangements
Use this to dictate the relative positioning between multiple screens (or quadrants of large screens). Screens and quadrants are addressed by their OW Slot ID (independently of their world), ranging from 0x00 to 0x3F. An `arrangement` is given as a list of rows with equal lenghts. If you do not want to specify a full rectangle of screens, you can use `.` as a placeholder to allow the generator to place any screen there. The `world` property can be set to `light`, `dark` or `both` (default value) and determines for which worlds the arrangement applies.
This example forces Death Mountain to stay connected the same as vanilla in both worlds:
```
fixed_arrangements:
- arrangement:
- 0x03 0x04 0x05 0x06 0x07
- 0x0B 0x0C 0x0D 0x0E .
world: both
```
#### restricted_positions
Use this to restrict cells to a specified set of possible positions. The `world` property can be set to `light`, `dark` or `both` (default value) and determines for which worlds the restriction applies.
This example forces the Sanctuary and Link's House screens in both worlds to get placed in corners of the grid:
```
restricted_positions:
- cells:
- 0x13
- 0x2C
positions:
- 0x00
- 0x07
- 0x38
- 0x3F
world: both
```
#### wrap_horizontal / wrap_vertical
Set these to `true` to allow for overworld edge transitions to wrap from one side of a world to the opposite side. With `wrap_horizontal`, there can be east transitions on the eastern edge of the world map that send the player to the western edge of the world. With `wrap_vertical`, there can be south transitions on the southern edge of the world map that send the player to the northern edge of the world.
#### split_large_screens
When set to `true`, the four quadrants of each large screen are placed on the grid independently of each other.
### ow-crossed
This must be defined by player. Each player number should be listed with the appropriate sections and each of these players MUST have `ow_crossed` enabled in the `settings` section in order for any values here to take effect. This section has four primary subsections: `force_crossed`, `force_noncrossed`, `limit_crossed`, and `undefined_chance`. There are also
+8
View File
@@ -67,6 +67,14 @@ item_pool:
Sanctuary Heart Container: 3
Shovel: 3
Single Arrow: 1
Green Potion: 1
Blue Potion: 1
Red Potion: 1
item_pool_adjust:
1:
Bottle (Random): 2 # add 2 extra random bottles on top of the base pool
Magic Upgrade (1/2): 1 # add 1 extra half-magic
Boss Heart Container: -3 # remove 3 heart containers from the base pool
placements:
1:
Palace of Darkness - Big Chest: Hammer
+473
View File
@@ -0,0 +1,473 @@
---
layout: default
title: Features
nav_order: 2
---
# Features Guide
{: .no_toc }
Comprehensive documentation of all Door Randomizer features and settings.
{: .fs-6 .fw-300 }
## Table of contents
{: .no_toc .text-delta }
1. TOC
{:toc}
---
## Important Differences from Other Randomizers
Most of these apply only when door shuffle is not vanilla.
### Starting Item
You start with a **Mirror Scroll** (looks like a map), a simplified mirror that only works in dungeons, not the overworld, and can't erase blocks like the Mirror.
### Navigation Changes
- Holes in Mire Torches Top and Mire Torches Bottom fall through to rooms below (you only need fire to get the chest)
- You can Hookshot from the left Mire wooden Bridge to the right one
- In the PoD Arena, you can bonk with Boots between the two blue crystal barriers against the ladder to reach the Arena Bridge chest and door (Bomb Jump also possible but not in logic - Boots are required)
- Flooded Rooms in Swamp can be traversed backward and may be required. Flippers are needed to get out of the water
### Logic Differences
- The chest in southeast Skull Woods that is traditionally a guaranteed Small Key in ER is not guaranteed here
- Fire Rod is not in logic for dark rooms (hard enough to figure out which dark room you are in)
- The hammerjump (and some other skips) are not in logic by default (see the mixed_travel setting for details). Doing so in a crossed dungeon seed can put you into another dungeon with the wrong dungeon id
### Boss Differences
- You have to find the attic floor and bomb it open and bring the maiden to the light to fight Blind. In cross dungeon door shuffle, the attic can be in any dungeon. If you bring the maiden to the boss arena, she will hint where the cracked floor can be found
- GT Bosses do not respawn after killing them in this mode
- Enemizer change: The attic/maiden sequence is now active and required when Blind is the boss of Thieves' Town even when bosses are shuffled
### Crystal Switches
- You can hit the PoD crystal switch in the Sexy Statue room with a bomb from the balcony above without jumping down
- GT Crystal Conveyor room (it has gibdos) - You can hit the crystal switch with a bomb when the blue barrier is up from the far side so you can leave the room to the left with blue barriers down
- PoD Arena Bridge - If entering from the bridge, you can circle round and hit the switch, then fall into the hole to respawn at the bridge again with the crystal barriers different
---
## Dungeon Settings
### Door Shuffle
Controls how dungeon doors are shuffled:
- **Vanilla** - Doors are not shuffled
- **Basic** - Doors are shuffled only within a single dungeon
- **Partitioned** - Dungeons are shuffled in 3 pools: Light World, Early Dark World, Late Dark World (Late Dark are the four dungeons that require Mitts in vanilla, including Ganon's Tower)
- **Crossed** - Doors are shuffled between dungeons as well
CLI: `--doorShuffle [vanilla|basic|partitioned|crossed]`
### Intensity
Controls which types of connections are shuffled:
- **Level 1** - Normal doors and spiral staircases are shuffled
- **Level 2** - Same as Level 1 plus open edges and both types of straight staircases are shuffled
- **Level 3** - Same as Level 2 plus Dungeon Lobbies are shuffled
CLI: `--intensity [1|2|3]`
### Door Type Shuffle
Controls which types of doors can be shuffled (only active if door shuffle is not vanilla):
- **Small Key Doors, Bomb Doors, Dash Doors** - Standard shuffled doors
- **Adds Big Key Doors** - Big key doors are now shuffled in addition to those above
- **Adds Trap Doors** - All trap doors that are permanently shut in vanilla are shuffled, excluding boss trap doors
- **Increases all Door Types** - Chaos mode where each door type per dungeon is randomized between 1 less and 4 more
CLI: `--door_type_mode [original|big|all|chaos]`
### Trap Door Removal
Options for making dungeon traversal more convenient:
- **No Removal** - Does not remove any trap doors
- **Removed If Blocking Path** - Dungeon generation removes annoying trap doors if necessary (boss trap doors never shuffled)
- **Remove Boss Traps** - Boss traps are removed, including the one near Mothula
- **Remove All Annoying Traps** - Removes all trap doors that are annoying, including boss traps
CLI: `--trap_door_mode [vanilla|optional|boss|oneway]`
### Dungeon Items
#### Small Keys
- **In Dungeon** - Small keys are restricted to their own dungeon
- **Randomized** - Small keys can be found anywhere
- **Universal** - Small keys work in any dungeon, can be found anywhere, and at least one shop will sell keys (like original Legend of Zelda)
CLI: `--keyshuffle [none|wild|universal]`
All other dungeon items (maps, compasses, Big Keys) can be restricted to their own dungeon or shuffled in the general pool.
### Key Logic Algorithm
Determines how small key door logic works:
- **Partial Protection** - Assumes you always have full inventory and worst case usage. Accounts for dark room and bunny revival glitches
- **Strict** - Small key doors require all small keys to be available to be in logic
- **Dangerous** - Assumes you never use keys out of logic (not recommended)
CLI: `--key_logic [partial|strict|dangerous]`
### Decouple Doors
Similar to insanity mode in ER where door entrances and exits are not paired anymore. Tends to remove more logic from dungeons as many rooms will not be required to traverse.
CLI: `--decoupledoors`
### Allow Self-Looping Spiral Stairs
If enabled, spiral stairs are allowed to lead to themselves.
CLI: `--door_self_loops`
### Experimental Features
You will start as a bunny if your spawn point is in the dark world.
CLI: `--experimental`
### Crossed Dungeon Specific Settings
#### Dungeon Chest Counters
- **Auto** - Picks an appropriate setting based on other settings
- **On** - Dungeon counters on HUD always displayed
- **Off** - Dungeon counters on HUD never displayed
- **On Compass Pickup** - Dungeons with a compass item will display the counter once the compass is found
CLI: `--dungeon_counters [auto|on|off|pickup]`
#### Mixed Travel
Controls Hammerjump, PoD Arena hovering, and Mire Big Key Chest bomb jump:
- **Prevent (default)** - Rails are added to prevent these tricks. Recommended for those learning crossed dungeon mode
- **Allow** - Rooms are left alone and it is up to player discretion whether to use these tricks
- **Force** - The two disjointed sections are forced to be in the same dungeon but the glitches are never logically required
CLI: `--mixed_travel [prevent|allow|force]`
#### Standardize Palettes
- **Standardize (default)** - Rooms in the same dungeon have their palettes changed to match
- **Original** - Rooms/supertiles keep their original palettes
CLI: `--standardize_palettes`
---
## Pool Expansions
### Pottery
Controls which pots (and large blocks) are in the locations pool:
- **None** - No pots are in the pool, like normal randomizer
- **Key Pots** - The pots that have keys are in the pool
- **Cave Pots** - The pots that are not found in dungeons are in the pool (includes Spike Cave large block)
- **Cave + Keys Pots** - Both non-dungeon pots and pots that used to have keys
- **Reduced Dungeon Pots** - Cave+Keys plus roughly 25% of dungeon pots (dynamic mode with colored pots)
- **Clustered Dungeon Pots** - Like reduced but pots grouped by logical sets, roughly 50% chosen (dynamic mode)
- **Excludes Empty Pots** - All pots that had some sort of objects under them
- **Dungeon Pots** - The pots that are in dungeons
- **Lottery** - All pots and large blocks are in the pool
CLI: `--pottery [none|keys|cave|cavekeys|reduced|clustered|nonempty|dungeon|lottery]`
#### Colorize Pots
Colors the pots that have been chosen to be part of the location pool. Forced on for dynamic modes (clustered and reduced).
CLI: `--colorizepots`
### Shuffle Enemy Drops
Controls whether enemies that drop items are randomized:
- **None** - Special enemies drop keys normally
- **Keys** - Enemies that drop keys are added to the randomization pool (includes Hyrule Castle Big Key)
- **Underworld** - Enemies in the underworld are added to the randomization pool. Blue square indicates if there are any enemies on the supertile that still have an available drop
CLI: `--dropshuffle [none|keys|underworld]`
### Shopsanity
Adds 32 shop locations (9 more in retro) to the general location pool. Multi-world supported.
Shop locations include:
- Lake Hylia Cave Shop (3 items)
- Kakariko Village Shop (3 items)
- Potion Shop (3 new items)
- Paradox Cave Shop (3 items)
- Capacity Upgrade Fairy (2 items)
- Dark Lake Hylia Shop (3 items)
- Curiosity/Red Shield Shop (3 items)
- Dark Lumberjack Shop (3 items)
- Dark Potion Shop (3 items)
- Village of Outcast Hammer Peg Shop (3 items)
- Dark Death Mountain Shop (3 items)
[See README for complete pricing guide and mechanics](/README#shopsanity)
### Take Any Caves
Three options: None, Random, and Fixed. Fixed means take any caves replace specific fairy caves:
- Desert Healer Fairy
- Swamp Healer Fairy (aka Light Hype Cave)
- Dark Death Mountain Healer Fairy
- Dark Lake Hylia Ledge Healer Fairy (aka Shopping Mall Bomb)
- Bonk Fairy (Dark)
---
## Item Randomization
### New "Items"
#### Bomb Bag
Two bomb bags are added to the item pool (look like +10 Capacity upgrades). Bombs are unable to be used until one is found.
CLI: `--bombbag`
#### Pseudo Boots
Dashing is allowed without the boots item however doors and certain rocks remain unopenable until boots are found. Specific sequence breaks like hovering and water-walking are not allowed until boots are found.
CLI: `--pseudoboots`
#### Mirror Scroll
Mirror is usable inside dungeons. Locations that require the mirror are still unattainable.
CLI: `--mirrorscroll`
#### Flute Mode
- **Normal** - Need to activate it at the village statue after finding it
- **Activated** - Can use it immediately upon finding it
CLI: `--flute_mode`
#### Bow Mode
- **Progressive** - Standard progressive bows
- **Silvers separate** - One bow in the pool and silvers are a separate item
- **Retro (progressive)** - Arrows cost rupees, need to purchase single arrow item at shop
- **Retro + Silvers** - Arrows cost rupees, one bow, silvers are separate item
CLI: `--bow_mode [progressive|silvers|retro|retro_silvers]`
### Goal Options
- **Trinity** - Find one of 3 triforces to win (pedestal, Ganon, or Murahdahla with 8 of 10 pieces)
- **Ganonhunt** - Collect the requisite triforce pieces, then defeat Ganon (Aga2 not required)
- **Completionist** - Obtain every item in the game and defeat Ganon (forces 100% accessibility)
### Item Sorting (Fill Algorithms)
Controls how items are placed in the world:
#### Balanced
Most random distribution of items (recommended).
#### Vanilla Fill
Attempts to place all items in their vanilla locations when possible. If not possible, prefers "major" locations, then heart piece locations, then the rest.
#### Major Location Restriction
Attempts to place major items in major locations. Major locations are where major items are found in the vanilla game.
#### Dungeon Restriction
Attempts to place all major items in dungeons. Overflows to overworld if necessary.
#### District Restriction
The world is divided into different regions/districts. Districts are chosen at random and filled with major items. Single green rupees indicate chosen districts.
CLI: `--algorithm [balanced|vanilla_fill|major_only|dungeon_only|district]`
### Forbidden Boss Items
Restrict items that can appear on bosses:
- **None** - Boss may have any item
- **MapCompass** - Map and compass are logically required to defeat a boss (currently bugged)
- **Dungeon** - Small keys and big keys of the dungeon are not allowed on a boss
CLI: `--restrict_boss_items [none|mapcompass|dungeon]`
---
## Entrance Randomization
### New Modes
- **Lite** - Non item entrances are vanilla, dungeons/caves grouped with restrictions
- **Lean** - Same grouping as Lite but cross-world connections allowed
- **Swapped** - Entrances are swapped with each other
### Shuffle Links House
In certain ER shuffles (not dungeonssimple or dungeonsfulls), control whether Links House is shuffled or remains vanilla.
### Skull Woods Shuffle
Options to reduce annoying Skull Woods layouts:
- **Original** - Skull woods shuffles classically amongst itself unless insanity mode
- **Restricted** - Skull woods drops are vanilla, entrances stay in skull woods and are shuffled
- **Loose** - Skull woods drops are vanilla, main ER mode's pool determines handling
- **Followlinked** - Follows Linked Drops setting
### Linked Drops Override
Controls whether drops should be linked to nearby entrances:
- **Unset** - Uses the mode's default (linked for all modes except insanity)
- **Linked** - Forces drops to be linked to their entrances
- **Independent** - Decouples drops from entrances
### Overworld Map
Option to move indicators on overworld map to reference dungeon location:
- **Default** - Showing only the prize markers on vanilla dungeon locations
- **Compass** - Compass item controls whether marker is moved to dungeon locations
- **Map** - Map item shows both prize and location of the dungeon
CLI: `--overworld_map [default|compass|map]`
---
## Enemizer
Enemizer has been incorporated into the generator. See [Enemizer in DR documentation](https://docs.google.com/document/d/1iwY7Gy50DR3SsdXVaLFIbx4xRBqo9a-e1_jAl5LMCX8/edit?usp=sharing) for extensive details.
### Enemy Shuffle
Enemies are shuffled with an enemy ban list that prevents problematic placements (blocking paths, unavoidable damage, glitches).
### Enemy Damage
The shuffled setting actually shuffles the damage table unlike the original enemizer.
### Boss Shuffle: Unique
Bosses are shuffled with some exceptions:
- Trinexx is not allowed on GT basement when DR is enabled
- Harder bosses in GT basement have logic concessions for low percentage requirements
New variant: At least one boss of each type for prize bosses will be present guarding prizes.
### Enemy Health
Health is taken into account for challenge rooms if magic or ammo is required.
### Enemy Logic
Can account for logical access to challenge rooms and item/key drops when enemies are shuffled:
- **Forbid special enemies** - Special enemies disallowed from drops and challenge rooms
- **Item drops may have special enemies** - Challenge rooms won't have special enemies, but drops may
- **Allow special enemies anywhere** - Both challenge rooms and enemy drops can have special requirements
---
## Glitched Logic
CLI: `--logic [noglitches|owglitches|hybridglitches|nologic]`
### Overworld Glitches
Includes overworld teleports, clips, superbunny, mirror to access Desert Palace East Entrance, bunny pocket access, etc.
### Hybrid Major Glitches
**Not compatible with Door Shuffle**
Includes all Overworld Glitches logic plus:
- Kikiskip to access PoD without MP or DW access
- IP Lobby clip to skip fire requirement
- Various traversals between dungeons (TT ↔ Desert, Spec rock, Paradox, Mire ↔ Hera ↔ Swamp)
- Stealing SK from Mire to open SP
- Using Mire big key to open Hera doors
---
## Game Options
### MSU Resume
Turns on MSU resume support.
CLI: `--msu_resume`
### Collection Rate
Display the collection rate unless the triforce piece counter is needed.
CLI: `--collection_rate`
### Reduce Flashing
Accessibility option to reduce some flashing animations in the game.
CLI: `--reduce_flashing`
### Shuffle Sound Effects
Shuffles a large portion of the sound effects. Can be used with the adjuster.
CLI: `--shuffle_sfx`
---
## Customizer
Create custom seeds with custom dungeons and rooms.
See [Customizer documentation](Customizer.md) for details.
---
## Generation Setup & Miscellaneous
### Create BPS Patches
Create BPS patch(es) instead of generating ROM(s) for distribution.
CLI: `--bps`
### Triforce Hunt Settings
Controls for triforce piece pool:
- `--triforce_goal_min` / `--triforce_goal_max` - Pieces to collect to win
- `--triforce_pool_min` / `--triforce_pool_max` - Pieces in item pool
- `--triforce_min_difference` / `--triforce_max_difference` - Difference between pool and goal
### Seed
Set a seed number to generate. Same seed with same settings on same version will always yield identical output.
### Count
Batch generate multiple seeds with same settings. If seed number provided, it will be used to derive subsequent seeds.
+81
View File
@@ -0,0 +1,81 @@
---
layout: default
title: Home
nav_order: 1
---
# ALttP Dungeon Randomizer
**A dungeon randomizer for The Legend of Zelda: A Link to the Past**
Door Randomizer extends the standard ALttP Entrance Randomizer with advanced dungeon shuffling capabilities that can rearrange dungeon interiors at the room level, creating entirely new dungeon experiences.
[Download Latest Release](https://github.com/aerinon/ALttPDoorRandomizer/releases/latest){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 }
[View on GitHub](https://github.com/aerinon/ALttPDoorRandomizer){: .btn .fs-5 .mb-4 .mb-md-0 }
---
## What is Door Randomizer?
Door Randomizer takes the dungeon experience in A Link to the Past to the next level by shuffling the connections between rooms within dungeons. Instead of just shuffling dungeon entrances, Door Randomizer can:
- **Shuffle doors within dungeons** - Rooms connect in completely new ways
- **Cross dungeon boundaries** - Walk through a door in Eastern Palace and end up in Tower of Hera
- **Adjust intensity levels** - From basic door shuffling to complete dungeon lobby randomization
## Key Features
### Basic Randomizer Features
- Supports many standard ALttP Randomizer features without needing more advanced settings.
### Door Shuffle Modes
- **Vanilla** - No shuffling, classic experience
- **Basic** - Doors shuffled within each dungeon
- **Partitioned** - Shuffle in pools (Light World, Early Dark World, Late Dark World)
- **Crossed** - Full shuffle between all dungeons
### Intensity Levels
- **Level 1** - Normal doors and spiral staircases
- **Level 2** - + open edges and straight staircases
- **Level 3** - + dungeon lobbies
### Advanced Features
- **Multiple key shuffle modes** - In dungeon, randomized, or universal keys
- **Pottery shuffle** - Randomize items under pots with multiple modes
- **Shopsanity** - 32 shop locations added to item pool
- **Enemy randomization** - Built-in enemizer with logic-aware placement
- **Custom seeds** - Create your own custom dungeons and rooms
- **Fill algorithms** - Multiple item placement strategies (balanced, vanilla fill, major only, district)
## Quick Start
1. [Download the latest release](https://github.com/aerinon/ALttPDoorRandomizer/releases/latest)
2. Extract the archive for your platform (Windows, Mac, or Linux)
3. Run `DungeonRandomizer.exe` (or the appropriate platform executable)
4. Configure your settings and generate a seed
5. Apply the patch to your A Link to the Past ROM (must be JP 1.0 version)
[See detailed installation instructions →](installation.html)
## Community
Join the discussion and get help:
- **Discord**: [ALTTP Randomizer Discord](https://discordapp.com/invite/alttprandomizer)
- `#door-rando` - General discussion and help
- `#bug-reports` - Report bugs and issues
## Learn More
- [Features Guide](features.html) - Comprehensive feature documentation
- [Installation & Usage](installation.html) - Setup and running the randomizer
- [Known Issues](known-issues.html) - Current bugs and limitations
- [Roadmap](roadmap.html) - Future development plans
- [Blog](blog.html) - Latest updates and release notes
## Credits
Based on the [ALttP Entrance Randomizer](https://github.com/KevinCathcart/ALttPEntranceRandomizer) by KevinCathcart et al.
See [alttpr.com](https://alttpr.com/) for more details on the original VT randomizer.
+369
View File
@@ -0,0 +1,369 @@
---
layout: default
title: Installation & Usage
nav_order: 3
---
# Installation & Usage
{: .no_toc }
Complete guide to installing and running ALttP Door Randomizer.
{: .fs-6 .fw-300 }
## Table of contents
{: .no_toc .text-delta }
1. TOC
{:toc}
---
## Requirements
- Python 3.10 or higher (for running from source)
- A legal copy of The Legend of Zelda: A Link to the Past (JP 1.0 version) ROM
---
## Installation Methods
### Method 1: Pre-built Releases (Recommended)
This is the easiest method for most users.
1. Visit the [Releases page](https://github.com/aerinon/ALttPDoorRandomizer/releases)
2. Download the appropriate build for your system:
- **Windows**: `ALttPDoorRandomizer-{version}-windows.zip`
- **macOS**: `ALttPDoorRandomizer-{version}-osx.tar.gz`
- **Linux**: `ALttPDoorRandomizer-{version}-linux-focal.tar.gz`
3. Extract the archive to a folder of your choice
4. Run the executable:
- **Windows**: `DungeonRandomizer.exe`
- **macOS/Linux**: `./DungeonRandomizer` or `./Gui.py`
### Method 2: Running from Source
For developers or users who want to run the latest development version.
#### Step 1: Clone the Repository
```bash
git clone https://github.com/aerinon/ALttPDoorRandomizer.git
cd ALttPDoorRandomizer
```
For the development branch:
```bash
git checkout DoorDevUnstable
```
#### Step 2: Install Python Dependencies
The project includes a script to install platform-specific dependencies:
```bash
python resources/ci/common/local_install.py
```
This will install all necessary Python packages and platform-specific dependencies.
#### Step 3: Verify Installation
Test that everything is working:
```bash
python DungeonRandomizer.py --help
```
You should see the help text with all available options.
---
## Usage
### GUI (Graphical User Interface)
The GUI provides an easy-to-use interface for generating seeds.
#### Starting the GUI
**Pre-built release:**
- **Windows**: Double-click `DungeonRandomizer.exe`
- **macOS/Linux**: Run `./DungeonRandomizer` from terminal
**From source:**
```bash
python Gui.py
```
#### Using the GUI
1. **Select your ROM**: Click "Select ROM" and choose your ALttP ROM file
2. **Configure settings**: Use the tabs to adjust:
- **Dungeon Settings**: Door shuffle mode, intensity, key logic
- **Item Settings**: Item placement, shopsanity, pottery
- **Entrance Settings**: Entrance randomization options
- **Enemy Settings**: Enemy shuffle, boss shuffle
- **Game Options**: MSU resume, collection rate, etc.
3. **Generate**: Click "Generate" to create your seed
4. **Output**: The patched ROM will be created in the same directory
### CLI (Command-Line Interface)
The CLI offers more control and is useful for batch generation or scripting.
#### Basic Usage
```bash
python DungeonRandomizer.py [options]
```
#### Common Examples
**Basic crossed dungeon shuffle:**
```bash
python DungeonRandomizer.py --doorShuffle crossed --intensity 2
```
**With key shuffle and shopsanity:**
```bash
python DungeonRandomizer.py --doorShuffle crossed --keyshuffle wild --shopsanity
```
**Pottery and enemy drops:**
```bash
python DungeonRandomizer.py --doorShuffle basic --pottery lottery --dropshuffle underworld
```
**Generate without creating ROM (testing):**
```bash
python DungeonRandomizer.py --suppress_rom --spoiler none
```
**Create BPS patch instead of ROM:**
```bash
python DungeonRandomizer.py --bps --doorShuffle crossed
```
**Batch generation:**
```bash
python DungeonRandomizer.py --doorShuffle crossed --count 10
```
#### Key CLI Arguments
**Dungeon Settings:**
- `--doorShuffle [vanilla|basic|partitioned|crossed]` - Door shuffle mode
- `--intensity [1|2|3]` - Intensity level
- `--keyshuffle [none|wild|universal]` - Key shuffle mode
- `--key_logic [partial|strict|dangerous]` - Key logic algorithm
- `--door_type_mode [original|big|all|chaos]` - Door type shuffle
- `--trap_door_mode [vanilla|optional|boss|oneway]` - Trap door removal
**Item Settings:**
- `--algorithm [balanced|vanilla_fill|major_only|dungeon_only|district]` - Item placement
- `--pottery [none|keys|cave|cavekeys|reduced|clustered|nonempty|dungeon|lottery]` - Pot shuffle
- `--dropshuffle [none|keys|underworld]` - Enemy drop shuffle
- `--shopsanity` - Enable shop randomization
- `--bombbag` - Enable bomb bag item
- `--pseudoboots` - Enable pseudo boots
**Entrance Settings:**
- `--shuffle [vanilla|simple|restricted|full|crossed|insanity|...]` - Entrance shuffle mode
- `--overworld_map [default|compass|map]` - Overworld map mode
**Enemy Settings:**
- `--enemizercli [none|basic|shuffled]` - Enemy shuffle mode
- `--enemy_damage [default|shuffled|chaos]` - Enemy damage
- `--enemy_health [default|easy|hard]` - Enemy health
- `--shufflebosses [none|basic|normal|chaos|unique]` - Boss shuffle
**Logic:**
- `--logic [noglitches|owglitches|hybridglitches|nologic]` - Logic mode
- `--mode [open|standard|inverted]` - Game mode
- `--goal [ganon|trinity|ganonhunt|completionist]` - Victory condition
**Generation:**
- `--seed SEED` - Set seed number
- `--count N` - Generate N seeds
- `--suppress_rom` - Don't create ROM (testing)
- `--bps` - Create BPS patch instead of ROM
- `--spoiler [none|spoiler|playthrough]` - Spoiler log type
**Game Options:**
- `--msu_resume` - Enable MSU resume
- `--collection_rate` - Display collection rate
- `--reduce_flashing` - Reduce flashing animations
- `--shuffle_sfx` - Shuffle sound effects
For a complete list of options:
```bash
python DungeonRandomizer.py --help
```
---
## Multiworld Setup
Door Randomizer supports multiworld seeds where multiple players play different randomized games with shared item pools.
### Installing Multiworld Dependencies
Run the same installation script to install multiworld-specific dependencies:
```bash
python resources/ci/common/local_install.py
```
### Generating Multiworld Seeds
Create YAML files for each player (see `docs/player1.yml`, `docs/player2.yml`, `docs/player3.yml` for individual examples, or `docs/multi_mystery_example.yaml` for a complete multiworld configuration).
**Example player configuration:**
```yaml
description: Player 1's World
name: Player1
doorShuffle: crossed
intensity: 2
keyshuffle: wild
shopsanity: true
```
Generate the multiworld using the multi-mystery configuration file:
```bash
python DungeonRandomizer.py --customizer docs/multi_mystery_example.yaml
```
### Running Multiworld Server
```bash
python MultiServer.py
```
It will prompt you for the multidata file created from the multiworld generation step.
### Connecting with Multiworld Client
```bash
python MultiClient.py
```
Enter the server address and your player name to connect.
---
## Testing & Verification
### Running the Test Suite
To verify your installation and test the randomizer logic:
```bash
python TestSuite.py
```
**Test with specific settings:**
```bash
python TestSuite.py --dr basic --count 10 --tense 2
```
**Run specific test modules:**
```bash
python -m pytest test/
python -m pytest test/dungeons/TestDarkPalace.py
```
---
## Troubleshooting
### Common Issues
#### "Python not found" or "python: command not found"
- **Windows**: Make sure Python is installed and added to PATH during installation
- **macOS/Linux**: Install Python 3.10+ via your package manager or from [python.org](https://www.python.org/)
#### "No module named 'yaml'" or similar import errors
Run the dependency installation script:
```bash
python resources/ci/common/local_install.py
```
#### Pre-built executable won't run on macOS
macOS may block unsigned applications. Right-click the app and select "Open" to bypass the warning.
#### Pre-built executable won't run on Linux
Ensure the file has execute permissions:
```bash
chmod +x DungeonRandomizer
```
#### GUI window is too small or cut off
Try running from the command line to see if there are any error messages. Some display scaling settings can cause issues.
#### Generated ROM doesn't work with emulator
- Ensure you're using a clean US version of ALttP ROM (Japan 1.0)
- Try a different emulator (recommended: SNES9x, RetroArch with bsnes core)
- Verify the ROM was patched successfully (check file size and modification date)
### Getting Help
If you encounter issues:
1. Check the [Known Issues](/known-issues) page
2. Search [GitHub Issues](https://github.com/aerinon/ALttPDoorRandomizer/issues)
3. Ask in the [ALTTP Randomizer Discord](https://discordapp.com/invite/alttprandomizer):
- `#door-rando` - General help and questions
- `#bug-reports` - Report bugs and issues
When reporting issues, please include:
- Operating system and version
- Python version (`python --version`)
- Door Randomizer version or commit hash
- Full error message or description of the problem
- Settings used (CLI command or screenshot of GUI)
---
## Advanced Usage
### Custom Presets
You can create custom preset files to save your favorite settings combinations.
See the [Customizer documentation](docs/Customizer.md) for details on creating custom seeds with custom dungeons and rooms.
### Build from Source (Packaging)
To create a standalone executable from source:
See [BUILDING.md](docs/BUILDING.md) for detailed build instructions.
### Development Workflow
For contributors:
1. Fork the repository
2. Create a feature branch from `DoorDevUnstable`:
```bash
git checkout DoorDevUnstable
git checkout -b my-feature
```
3. Make your changes
4. Run tests: `python TestSuite.py`
5. Submit a pull request to `DoorDevUnstable` (not main/master)
---
## Next Steps
- Read the [Features Guide](/features) for detailed information on all settings
- Check the [Known Issues](/known-issues) page for current limitations
- See the [Roadmap](/roadmap) for upcoming features
- Join the community on [Discord](https://discordapp.com/invite/alttprandomizer)
+366
View File
@@ -0,0 +1,366 @@
---
layout: default
title: Known Issues
nav_order: 4
---
# Known Issues & Bug Tracking
{: .no_toc }
Current known issues, bugs, and limitations in ALttP Door Randomizer.
{: .fs-6 .fw-300 }
## Table of contents
{: .no_toc .text-delta }
1. TOC
{:toc}
---
## Reporting Bugs
Before reporting a bug, please:
1. Check this page to see if the issue is already known
2. Search [existing GitHub issues](https://github.com/aerinon/ALttPDoorRandomizer/issues)
3. Verify you're using the latest version
### How to Report
Report bugs in this location:
- **Discord**: [ALTTP Randomizer Discord](https://discordapp.com/invite/alttprandomizer) in `#bug-reports` or `#door-rando` channels
### What to Include
When reporting a bug, please provide:
- **Spoiler log** if you have one
- If you don't have a spoiler log, include:
- **Seed number** and **settings used**
- **Version** of Door Randomizer (from GUI or `--version`)
- **Website or Platform** (Windows, macOS, Linux) if generator error, or which website was used
- **Description** of the issue
- **Steps to reproduce** the problem
- **Screenshots or videos** (if applicable)
- Optionally, **Save state** (if gameplay issue) (and which emulator/version)
---
## Known Issues
### Critical Issues
#### Links House on Death Mountain - no logical way off the mountain
**Status**: Under investigation
Some ER generations can have Link's House be on Death Mountain and no good way off the mountain.
---
### Major Issues
#### Crossed Dungeon Generation Can Be Slow
**Status**: Performance optimization needed
Generating crossed dungeon seeds, especially with high intensity and complex settings, can take a significant amount of time (30 seconds to several minutes).
**Why**: The dungeon generation algorithm uses constraint satisfaction and local search, which can require many attempts to find valid layouts.
**Workaround**: Be patient, or reduce intensity/complexity of settings.
#### Rare Impossible Seeds (Generation Failures)
**Status**: Occasional, investigating
In rare cases, the generator may fail to place all items or create a valid dungeon layout. This usually happens with very restrictive settings combinations.
**Workaround**: Try a different seed number, or slightly adjust settings.
---
### Moderate Issues
#### Some Enemy Placements Can Be Problematic
**Status**: Ongoing ban list maintenance
Despite the enemy ban list, some enemy placements can occasionally cause issues:
- Blocking required paths
- Causing unavoidable damage
- Creating glitchy behavior
- Bush enemies not working correctly
- Wallmasters can cause issues in certain locations
**Workaround**: Report specific problematic enemy locations so they can be added to the ban list.
**Note**: Thieves are always unkillable and banned from the entire underworld.
---
### Minor Issues
#### Forbidden Boss Items "MapCompass" Mode Bugged
**Status**: Under investigation
The `mapcompass` option for `--restrict_boss_items` is currently bugged and not recommended for use.
**Workaround**: Use `dungeon` option instead, or use `none`.
#### Swamp Trench 2 Keeps Draining
**Status**: Known issue
In some configurations, Swamp Trench 2 continues to drain even after the pot is obtained.
**Workaround**: None currently. This is a known behavior issue.
#### Killing Certain Red Guards Kills Music
**Status**: Known issue
Killing certain red guards in specific locations causes the music to stop playing.
**Workaround**: None currently. This is a cosmetic issue that doesn't affect gameplay.
#### Some Lobbies Exitable During Escape (Standard Mode)
**Status**: Known issue
In standard mode, some dungeon lobbies can be exited during the escape sequence when they shouldn't be.
**Workaround**: Avoid leaving during escape if you want to maintain intended flow.
---
### Logic Issues
These are cases where the logic may not perfectly match what's actually possible in-game:
#### GT Crystal Paths Room Logic
**Status**: Under investigation
Crystal switch logic for GT Crystal Paths room may not properly account for OHKO scenarios when traversing backwards.
#### OHKO (One-Hit KO) Logic Issues
**Status**: Under investigation
In some configurations, unavoidable damage logic or OHKO scenarios may not be properly accounted for.
#### Hammerjump Logic and Mixed Travel
**Status**: Configurable behavior
Hammerjump and similar tricks (PoD Arena hovering, Mire Big Key bomb jump) can unintentionally put you in another dungeon with the wrong dungeon ID.
**Setting**: Use `--mixed_travel` to control this behavior:
- `prevent`: Adds rails to prevent tricks (default, recommended for learning)
- `allow`: Up to player discretion
- `force`: Sections forced to same dungeon
---
## Mode-Specific Issues
### Glitched Logic Modes
Several issues specific to glitched logic modes (OWG, HMG):
#### Cave State Issues
**Status**: Under investigation
Cave state in GT hearts area may not work correctly in glitched modes.
#### Rain State Issues
**Status**: Under investigation
Rain state handling may have issues in glitched logic modes.
#### Key/Pot SRAM System
**Status**: Needs restoration
Old key/pot SRAM system needs to be restored for glitched modes to work properly.
### Inverted Mode Issues
#### Dark Sanctuary Inverted Insanity
**Status**: Under investigation
Dark Sanctuary with inverted mode and insanity entrance shuffle may have double entrance issues.
#### Dark Sanctuary at Tavern Error
**Status**: In progress
When Dark Sanctuary is at Tavern location, Link's body position may be incorrect.
### Entrance Randomization Issues
#### Dungeon Boss Exits in Non-ER
**Status**: Under investigation
Dungeon boss exits may not work correctly when entrance randomization is disabled.
### Decoupled Doors Issues
#### Sanctuary Palette Detection
**Status**: Known issue
In decoupled doors mode, sanctuary palette doesn't correctly identify adjacent rooms. Uses exits instead of entrances for determination.
**Workaround**: Use coupled doors or original palette mode.
### Shopsanity Issues
#### Output YAML: Shopsanity Potions Missing
**Status**: Under investigation
When outputting to YAML format, shopsanity potions may not be correctly included in the item pool representation.
**Workaround**: Check spoiler log for actual item locations.
---
## Known Limitations & Design Decisions
These items are **not planned to be fixed** as they are either fundamental limitations, intentional design choices, or affect all ALttP randomizers.
### Game Engine Limitations
#### Compass Count Stops Working After Triforce
After obtaining the Triforce, compass counts no longer function correctly. This is true in all ALttP randomizers and is a base game limitation.
**Workaround**: Complete dungeon exploration before finishing the game if you need counts.
#### GT Bosses Don't Respawn
GT bosses don't respawn after killing them. This is intentional base game behavior.
### Door Randomizer Design Decisions
#### Hybrid Major Glitches Not Compatible with Door Shuffle
Hybrid major glitches logic is not compatible with door shuffle modes. This is a fundamental limitation due to how glitch logic interacts with shuffled dungeon interiors.
**Workaround**: Use Overworld Glitches logic instead, or disable door shuffle.
#### Fire Rod Not in Logic for Dark Rooms
Fire Rod is not in logic for dark rooms in door shuffle mode, as it's too difficult to determine which dark room you're in after doors are shuffled.
**Note**: This is different from Advanced mode in the vanilla randomizer.
#### Hammerjump Requiring Mixed Travel Settings
Hammerjump and similar tricks (PoD Arena hovering, Mire Big Key bomb jump) require `--mixed_travel` settings in crossed mode to allow unintended dungeon transitions.
#### Blind Maiden/Attic Sequence Always Required
Blind maiden/attic sequence is required even when boss is shuffled. This maintains story consistency.
#### Southeast Skull Woods Chest Not Guaranteed Key
In Entrance Randomizer, the southeast Skull Woods chest is guaranteed to be a small key. In Door Randomizer, this is not guaranteed. This is an intentional change from ER.
### Technical Limitations
#### Pottery Lottery Mode: Multiworld Item Limit
In pottery lottery mode, only 256 items for other players can be placed under pots in your world due to technical constraints in how the game tracks items.
---
## Feature Limitations
See the [Roadmap](/roadmap) for planned features.
---
## Recently Fixed Issues
See RELEASENOTES.md for the latest fixes.
And PastReleaseNotes.md for older fixes.
---
## Performance Issues
### Memory Usage
**Issue**: Generator can use significant memory for complex seeds.
**Most affected by**:
- Multiworld with many players
- Pottery lottery mode
**Workaround**: Close other applications, or increase available RAM.
---
## Emulator Compatibility
### Known Issues with Emulators
#### Older SNES9x versions
Some older versions (< 1.55) may have graphical glitches with certain custom graphics.
#### ZSNES
**Not recommended**: ZSNES is outdated and has known accuracy issues.
---
## Workarounds & Tips
### If Generation Keeps Failing
1. Switch to a different door shuffle mode
4. Disable some restrictive settings (strict key logic, dungeon item restrictions)
5. Use balanced fill algorithm instead of district restriction
### If Seed Seems Impossible
1. Check spoiler log to verify it's beatable
2. Remember new logic differences (see Features guide)
3. Check for required techniques (boots bonking, crystal switch bombs, etc.)
4. Ask for help in Discord with spoiler log
### If Performance Is Poor
1. Use pre-built executable instead of running from source
2. Close other applications
3. Update to latest version
4. Use simpler settings combinations
---
## Issue Status Tracking
For real-time status of known issues, check:
- Discord `#bug-reports` and `#door-rando` channels
---
Last updated: 2026-01-30
This page is maintained as issues are discovered and fixed. If you notice an issue not listed here, please report it!
-21
View File
@@ -1,21 +0,0 @@
Notes:
Ice Spike Stairs seems to be off and maybe Lonely Freezor
Pod bk ledge stairs
AgaTower usually doesn't have enough Key Door candidates
(Testing) Camera spots in Aga Tower: Push Statue, Lone Statue maybe?
(Testing Waterfall Now) Spiral stairs without keys look funny - change to Incognito instead of Normal
(Can't Fix yet) Key door on Layer 1 not working (Aga Tower)
(Can't Fix yet) Key door in HC Lobby E door not passable - look into it?
Pairing Notes
30-34 4f-37 #$18,-24
30-34 37-1f #$18,-24
30-34 1f-1f???
30-35 1f-1f
30-34 36-1e #$18,-24
30-34 1e-1f
inconsistencies are caused by $0492 being set wrong
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3 -2
View File
@@ -1,5 +1,6 @@
meta:
players: 1
settings:
1:
ow_layout: wild
ow-edges:
1:
two-way:
+140
View File
@@ -0,0 +1,140 @@
settings:
1:
ow_layout: grid
ow-grid:
1:
restricted_positions:
- cells:
- 0x00
- 0x02
- 0x04
- 0x06
- 0x09
- 0x0B
- 0x0D
- 0x0F
- 0x10
- 0x12
- 0x14
- 0x16
- 0x19
- 0x1B
- 0x1D
- 0x1F
- 0x20
- 0x22
- 0x24
- 0x26
- 0x29
- 0x2B
- 0x2D
- 0x2F
- 0x30
- 0x32
- 0x34
- 0x36
- 0x39
- 0x3B
- 0x3D
- 0x3F
positions:
- 0x00
- 0x02
- 0x04
- 0x06
- 0x09
- 0x0B
- 0x0D
- 0x0F
- 0x10
- 0x12
- 0x14
- 0x16
- 0x19
- 0x1B
- 0x1D
- 0x1F
- 0x20
- 0x22
- 0x24
- 0x26
- 0x29
- 0x2B
- 0x2D
- 0x2F
- 0x30
- 0x32
- 0x34
- 0x36
- 0x39
- 0x3B
- 0x3D
- 0x3F
world: both
- cells:
- 0x01
- 0x03
- 0x05
- 0x07
- 0x08
- 0x0A
- 0x0C
- 0x0E
- 0x11
- 0x13
- 0x15
- 0x17
- 0x18
- 0x1A
- 0x1C
- 0x1E
- 0x21
- 0x23
- 0x25
- 0x27
- 0x28
- 0x2A
- 0x2C
- 0x2E
- 0x31
- 0x33
- 0x35
- 0x37
- 0x38
- 0x3A
- 0x3C
- 0x3E
positions:
- 0x01
- 0x03
- 0x05
- 0x07
- 0x08
- 0x0A
- 0x0C
- 0x0E
- 0x11
- 0x13
- 0x15
- 0x17
- 0x18
- 0x1A
- 0x1C
- 0x1E
- 0x21
- 0x23
- 0x25
- 0x27
- 0x28
- 0x2A
- 0x2C
- 0x2E
- 0x31
- 0x33
- 0x35
- 0x37
- 0x38
- 0x3A
- 0x3C
- 0x3E
world: both
@@ -1,3 +1,6 @@
settings:
1:
ow_layout: wild
ow-edges:
1:
groups:
@@ -1,3 +1,6 @@
settings:
1:
ow_layout: wild
ow-edges:
1:
groups:
+147
View File
@@ -0,0 +1,147 @@
settings:
1:
ow_layout: grid
ow-grid:
1:
restricted_positions:
- cells:
- 0x00
- 0x01
- 0x02
- 0x03
- 0x08
- 0x09
- 0x0A
- 0x0B
- 0x10
- 0x11
- 0x12
- 0x13
- 0x18
- 0x19
- 0x1A
- 0x1B
positions:
- 0x00
- 0x01
- 0x02
- 0x03
- 0x08
- 0x09
- 0x0A
- 0x0B
- 0x10
- 0x11
- 0x12
- 0x13
- 0x18
- 0x19
- 0x1A
- 0x1B
world: both
- cells:
- 0x20
- 0x21
- 0x22
- 0x23
- 0x28
- 0x29
- 0x2A
- 0x2B
- 0x30
- 0x31
- 0x32
- 0x33
- 0x38
- 0x39
- 0x3A
- 0x3B
positions:
- 0x20
- 0x21
- 0x22
- 0x23
- 0x28
- 0x29
- 0x2A
- 0x2B
- 0x30
- 0x31
- 0x32
- 0x33
- 0x38
- 0x39
- 0x3A
- 0x3B
world: both
- cells:
- 0x04
- 0x05
- 0x06
- 0x07
- 0x0C
- 0x0D
- 0x0E
- 0x0F
- 0x14
- 0x15
- 0x16
- 0x17
- 0x1C
- 0x1D
- 0x1E
- 0x1F
positions:
- 0x04
- 0x05
- 0x06
- 0x07
- 0x0C
- 0x0D
- 0x0E
- 0x0F
- 0x14
- 0x15
- 0x16
- 0x17
- 0x1C
- 0x1D
- 0x1E
- 0x1F
world: both
- cells:
- 0x24
- 0x25
- 0x26
- 0x27
- 0x2C
- 0x2D
- 0x2E
- 0x2F
- 0x34
- 0x35
- 0x36
- 0x37
- 0x3C
- 0x3D
- 0x3E
- 0x3F
positions:
- 0x24
- 0x25
- 0x26
- 0x27
- 0x2C
- 0x2D
- 0x2E
- 0x2F
- 0x34
- 0x35
- 0x36
- 0x37
- 0x3C
- 0x3D
- 0x3E
- 0x3F
world: both
split_large_screens: true
@@ -1,5 +1,6 @@
settings:
1:
ow_layout: wild
ow_whirlpool: false
ow-edges:
1:
@@ -1,3 +1,6 @@
settings:
1:
ow_layout: wild
ow-edges:
1:
two-way:
+3
View File
@@ -1,3 +1,6 @@
settings:
1:
ow_layout: wild
ow-edges:
1:
groups:
+147
View File
@@ -0,0 +1,147 @@
settings:
1:
ow_layout: grid
ow-grid:
1:
restricted_positions:
- cells:
- 0x00
- 0x01
- 0x02
- 0x03
- 0x04
- 0x05
- 0x06
- 0x07
- 0x08
- 0x0F
- 0x10
- 0x17
- 0x18
- 0x1F
- 0x20
- 0x27
- 0x28
- 0x2F
- 0x30
- 0x37
- 0x38
- 0x39
- 0x3A
- 0x3B
- 0x3C
- 0x3D
- 0x3E
- 0x3F
positions:
- 0x00
- 0x01
- 0x02
- 0x03
- 0x04
- 0x05
- 0x06
- 0x07
- 0x08
- 0x0F
- 0x10
- 0x17
- 0x18
- 0x1F
- 0x20
- 0x27
- 0x28
- 0x2F
- 0x30
- 0x37
- 0x38
- 0x39
- 0x3A
- 0x3B
- 0x3C
- 0x3D
- 0x3E
- 0x3F
world: both
- cells:
- 0x09
- 0x0A
- 0x0B
- 0x0C
- 0x0D
- 0x0E
- 0x11
- 0x16
- 0x19
- 0x1E
- 0x21
- 0x26
- 0x29
- 0x2E
- 0x31
- 0x32
- 0x33
- 0x34
- 0x35
- 0x36
positions:
- 0x09
- 0x0A
- 0x0B
- 0x0C
- 0x0D
- 0x0E
- 0x11
- 0x16
- 0x19
- 0x1E
- 0x21
- 0x26
- 0x29
- 0x2E
- 0x31
- 0x32
- 0x33
- 0x34
- 0x35
- 0x36
world: both
- cells:
- 0x12
- 0x13
- 0x14
- 0x15
- 0x1A
- 0x1D
- 0x22
- 0x25
- 0x2A
- 0x2B
- 0x2C
- 0x2D
positions:
- 0x12
- 0x13
- 0x14
- 0x15
- 0x1A
- 0x1D
- 0x22
- 0x25
- 0x2A
- 0x2B
- 0x2C
- 0x2D
world: both
- cells:
- 0x1B
- 0x1C
- 0x23
- 0x24
positions:
- 0x1B
- 0x1C
- 0x23
- 0x24
world: both
split_large_screens: true
@@ -1,3 +1,6 @@
settings:
1:
ow_layout: wild
ow-edges:
1:
two-way:
+20
View File
@@ -1,5 +1,6 @@
settings:
1:
ow_parallel: false
ow_whirlpool: false
ow-edges:
1:
@@ -77,6 +78,25 @@ ow-edges:
Desert Pass EC*: Dam WC*
Desert Pass ES*: Dam WS*
Dam EC*: South Pass WC*
ow-grid:
1:
fixed_arrangements:
- arrangement:
- 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
- 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F
- 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17
- 0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F
- 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27
- 0x28 0x29 0x2A 0x2B 0x2C 0x2D 0x2E 0x2F
- 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37
- 0x38 0x39 0x3A 0x3B 0x3C 0x3D 0x3E 0x3F
world: light
restricted_positions:
- cells:
- 0x00
positions:
- 0x00
world: light
ow-whirlpools:
1:
two-way:
@@ -1,3 +1,6 @@
settings:
1:
ow_layout: wild
ow-edges:
1:
two-way:
@@ -1,3 +1,6 @@
settings:
1:
ow_layout: wild
ow-edges:
1:
two-way:
@@ -0,0 +1,149 @@
settings:
1:
ow_layout: grid
ow-grid:
1:
restricted_positions:
- cells:
- 0x00
- 0x03
- 0x05
- 0x18
- 0x1B
- 0x1E
- 0x30
- 0x35
positions:
- 0x00
- 0x03
- 0x05
- 0x18
- 0x1B
- 0x1E
- 0x30
- 0x35
world: both
- cells:
- 0x01
- 0x04
- 0x06
- 0x19
- 0x1C
- 0x1F
- 0x31
- 0x36
positions:
- 0x01
- 0x04
- 0x06
- 0x19
- 0x1C
- 0x1F
- 0x31
- 0x36
world: both
- cells:
- 0x08
- 0x0B
- 0x0D
- 0x20
- 0x23
- 0x26
- 0x38
- 0x3D
positions:
- 0x08
- 0x0B
- 0x0D
- 0x20
- 0x23
- 0x26
- 0x38
- 0x3D
world: both
- cells:
- 0x09
- 0x0C
- 0x0E
- 0x21
- 0x24
- 0x27
- 0x39
- 0x3E
positions:
- 0x09
- 0x0C
- 0x0E
- 0x21
- 0x24
- 0x27
- 0x39
- 0x3E
world: both
- cells:
- 0x02
- 0x07
- 0x0A
- 0x0F
- 0x10
- 0x11
- 0x12
- 0x13
- 0x14
- 0x15
- 0x16
- 0x17
- 0x1A
- 0x1D
- 0x22
- 0x25
- 0x28
- 0x29
- 0x2A
- 0x2B
- 0x2C
- 0x2D
- 0x2E
- 0x2F
- 0x32
- 0x33
- 0x34
- 0x37
- 0x3A
- 0x3B
- 0x3C
- 0x3F
positions:
- 0x02
- 0x07
- 0x0A
- 0x0F
- 0x10
- 0x11
- 0x12
- 0x13
- 0x14
- 0x15
- 0x16
- 0x17
- 0x1A
- 0x1D
- 0x22
- 0x25
- 0x28
- 0x29
- 0x2A
- 0x2B
- 0x2C
- 0x2D
- 0x2E
- 0x2F
- 0x32
- 0x33
- 0x34
- 0x37
- 0x3A
- 0x3B
- 0x3C
- 0x3F
world: both
@@ -1,3 +1,6 @@
settings:
1:
ow_layout: wild
settings:
1:
ow_whirlpool: false
+22
View File
@@ -1,3 +1,6 @@
settings:
1:
ow_parallel: false
ow-edges:
1:
two-way:
@@ -69,6 +72,25 @@ ow-edges:
Swamp Nook EC*: Swamp WC*
Swamp Nook ES*: Swamp WS*
Swamp EC*: Dark South Pass WC*
ow-grid:
1:
fixed_arrangements:
- arrangement:
- 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
- 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F
- 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17
- 0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F
- 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27
- 0x28 0x29 0x2A 0x2B 0x2C 0x2D 0x2E 0x2F
- 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37
- 0x38 0x39 0x3A 0x3B 0x3C 0x3D 0x3E 0x3F
world: dark
restricted_positions:
- cells:
- 0x00
positions:
- 0x00
world: dark
ow-whirlpools:
1:
two-way:
@@ -1,3 +1,6 @@
settings:
1:
ow_layout: wild
ow-edges:
1:
groups:
@@ -1,3 +1,6 @@
settings:
1:
ow_layout: wild
ow-edges:
1:
two-way:
@@ -1,5 +1,6 @@
settings:
1:
ow_layout: wild
ow_terrain: false
ow-edges:
1:
@@ -1,5 +1,6 @@
settings:
1:
ow_layout: wild
ow_terrain: true
ow-edges:
1:
@@ -1,3 +1,6 @@
settings:
1:
ow_layout: wild
ow-edges:
1:
two-way:
@@ -0,0 +1,16 @@
ow-edges:
1:
two-way:
West Death Mountain EN*: East Death Mountain WN*
West Death Mountain ES*: East Death Mountain WS*
East Death Mountain EN*: Death Mountain TR Pegs WN*
West Dark Death Mountain EN*: East Dark Death Mountain WN*
West Dark Death Mountain ES*: East Dark Death Mountain WS*
East Dark Death Mountain EN*: Turtle Rock WN*
ow-grid:
1:
fixed_arrangements:
- arrangement:
- 0x03 0x04 0x05 0x06 0x07
- 0x0B 0x0C 0x0D 0x0E .
world: both
+3
View File
@@ -1,3 +1,6 @@
settings:
1:
ow_layout: wild
ow-edges:
1:
two-way:
@@ -1,3 +1,6 @@
settings:
1:
ow_layout: wild
ow-edges:
1:
two-way:
@@ -0,0 +1,7 @@
settings:
1:
ow_layout: grid
ow-grid:
1:
wrap_horizontal: true
wrap_vertical: true
+19
View File
@@ -144,6 +144,25 @@ ow-edges:
Swamp EC*: Dark South Pass WC*
South Pass ES*: Lake Hylia WS*
Dark South Pass ES*: Ice Lake WS*
ow-grid:
1:
fixed_arrangements:
- arrangement:
- 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
- 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F
- 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17
- 0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F
- 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27
- 0x28 0x29 0x2A 0x2B 0x2C 0x2D 0x2E 0x2F
- 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37
- 0x38 0x39 0x3A 0x3B 0x3C 0x3D 0x3E 0x3F
world: both
restricted_positions:
- cells:
- 0x00
positions:
- 0x00
world: both
ow-whirlpools:
1:
two-way:
+1
View File
@@ -7,6 +7,7 @@ requires-python = ">=3.7"
dependencies = [
"aenum>=3.1.16",
"aioconsole>=0.6.2",
"collections-extended>=2.0.2",
"colorama>=0.4.6",
"distro>=1.9.0",
"fast-enum>=1.3.0",
+15
View File
@@ -486,6 +486,14 @@
"always"
]
},
"loothud": {
"choices": [
"never",
"presence",
"value",
"dungeon_value"
]
},
"showmap": {
"choices": [
"visited",
@@ -665,6 +673,9 @@
"action": "store_true",
"type": "bool"
},
"extra_keys": {
"type": "int"
},
"calc_playthrough": {
"action": "store_false",
"type": "bool"
@@ -743,6 +754,10 @@
"type": "bool"
},
"money_balance": {},
"patches": {
"type": "str",
"help": "suppress"
},
"settingsonload": {
"choices": [
"default",
+1
View File
@@ -425,6 +425,7 @@
"AlwaysInLogic: Dark rooms are always considered to be in logic, even if the player cannot see"
],
"crystal_book": [ " Book can be used indoors to flip the state of colored pegs (default: %(default)s)"],
"extra_keys": [ " Percentage of extra small keys to create for each dungeon when door shuffle is enabled (default: %(default)s)"],
"bombbag": ["Start with 0 bomb capacity. Two capacity upgrades (+10) are added to the pool (default: %(default)s)" ],
"any_enemy_logic": [
"How to handle potential traversal between dungeon in Crossed door shuffle",
+2 -2
View File
@@ -111,11 +111,11 @@
"randomizer.dungeon.experimental": "Enable Experimental Features",
"randomizer.dungeon.dungeon_counters": "Dungeon Chest Counters",
"randomizer.dungeon.dungeon_counters": "Dungeon Counters",
"randomizer.dungeon.dungeon_counters.default": "Auto",
"randomizer.dungeon.dungeon_counters.off": "Off",
"randomizer.dungeon.dungeon_counters.on": "On",
"randomizer.dungeon.dungeon_counters.pickup": "On Compass Pickup",
"randomizer.dungeon.dungeon_counters.pickup": "On Item Pickup",
"randomizer.dungeon.mixed_travel": "Mixed Dungeon Travel ",
"randomizer.dungeon.mixed_travel.prevent": "Prevent Mixed Dungeon Travel",
+234
View File
@@ -0,0 +1,234 @@
---
layout: default
title: Roadmap
nav_order: 5
---
# Development Roadmap
{: .no_toc }
Future plans and upcoming features for ALttP Door Randomizer.
{: .fs-6 .fw-300 }
## Table of contents
{: .no_toc .text-delta }
1. TOC
{:toc}
---
## Project Vision
Door Randomizer aims to provide the most comprehensive and flexible dungeon randomization experience for A Link to the Past while maintaining playability and logical consistency. Our focus is on:
1. **Robust Generation** - Ensuring seeds are always completable and logical
2. **Feature Richness** - Providing extensive customization options
3. **Community Engagement** - Responding to player feedback and needs
4. **Performance** - Improving generation speed and reliability
---
## Bug Fixes
Critical and important bugs that need to be addressed:
### Critical Bugs
- Dungeon Key HUD indicator issue (total is incorrect)
- Links House on DM pathing issues (See OWR solution)
### Minor Bugs
- Resolve Swamp Trench 2 draining issue (pot obtained but still drains)
- Fix OHKO logic issues - Crystal Path backwards in GT
- Fix MapCompass forbidden boss items mode (currently bugged)
- Killing Certain Red Guards Kills Music
---
## Logic & Generation Improvements
Improving dungeon generation algorithms and logic:
- Enhanced key logic algorithms (experimental mode in New Generation)
- Rework Uncle weapon/Escape small key
- Make Sanctuary heart the logical one (simplify sanctuary heart logic)
- Investigate rupee balancing issues causing failed generations
---
## New Features
New functionality and game modes, mostly planned for the NewGeneration branch:
- Portal placement flexibility (customizability and mixed dungeon pools)
- Smarter trap door placement (reduce forced mirroring)
- DR Keysanity menu improvements
- PitWarp feature
- Door Type pooling customizations
- OWR ER standardization (District ER, Links on Death Mountain issue)
- NewSwappedAlgorithm integration
- Bonk Item Pool from Overworld Randomizer (downstream integration)
- A better hint system
- Prize Shuffle from Overworld Randomizer (downstream integration)
- Map Screen from GK Randomizer (need to investigate)
- Other downstream integrations? (custom goals, follower shuffle, flute shuffle?)
---
## Quality of Life Enhancements
Improving user experience and usability:
- Preferred location groups (control item placement with warnings/failures/retries)
- Preset support
- Control output ROM name (customize generated ROM filename)
- Progress indicators for generations
- Better entrance tracking for trackers (investigate race legality)
- Super-tile split palettes (reduce hinting from palette colors)
- Turn off Bob by default for enemizer (fewer graphical glitches)
---
## Performance Improvements
Making generation faster and more efficient:
- Reduce memory footprint
---
## Customization & Content Creation
Tools and features for creating custom content:
- Re-design customizer file format (improved YAML structure)
- Presets for customizer (start from predefined base)
- Easier enemy customization (simpler interface for customizing specific enemies - better integration with customization system)
---
## Multiworld
Enhancements for multiplayer seeds:
- Multiworld documentation
- Ability to have similar randomizations across multiworlds (makes parts of it co-op)
---
## External Tools & Integration
Integration with external tools and platforms:
- Tracker integration features
- Web-based API
---
## Technical Debt & Refactoring
Behind-the-scenes code improvements:
- Modernize Rules.py (improve readability and maintainability)
- Python upgrade (3.10 deprecated in 2026)
---
## Research & Exploration
Experimental ideas that may or may not be implemented:
### Dungeon Randomization Ideas
- **Subroom randomization** - Randomize smaller rooms within a larger room (subtile vs. supertile doors)
- **Euclidean dungeon layouts** - Dungeon randomization that makes spatial sense (rooms connected geographically)
- **Swapped dungeon generation** - Create dungeons by swapping door destinations (requires new algorithms)
---
## Branch Strategy
### Current Branches
- **NewGeneration** - Active development branch for new generation system
- **NewSwappedAlgorithm** - Experimental branch for swapped item algorithm
- **DoorDevUnstable** - Main branch, maintenance mode - only bug fixes and patches (ready to be moved to official stable)
- **DoorDev** - Stale development branch (needs update)
- **Dev/Master** - Do NOT use for PRs. Used by upstream only.
### Planned Branch Changes
- Transition from DoorDevUnstable to DoorDev as main maintenance branch
- Transition NewGeneration to main development branch
---
## Completed Features
Recent accomplishments:
- ✅ Dynamic colored pots
- ✅ Free lamp cone
- ✅ Experimental key logic improvements
---
## How to Contribute
Want to help shape the future of Door Randomizer?
### For Players
- **Test seeds** - Play with different settings and report issues
- **Provide feedback** - Share what you like and what could be better
- **Suggest features** - Tell us what you want to see
### For Developers
- **Submit PRs to DoorDevUnstable**
- **Join Discord** - Discuss development in `#door-rando`
- **Write tests** - Improve test coverage
- **Improve documentation** - Help others understand the code
### For Creators
- **Custom rooms** - Design interesting custom rooms
- **Presets** - Create balanced preset configurations
- **Tutorials** - Teach others how to use Door Rando
- **Tools** - Build complementary tools (trackers, analyzers)
---
## Release Schedule
### Regular Releases
- **Unstable builds** - Automated on every push to DoorDevUnstable
- **Hotfixes** - As needed for critical bugs
### Upcoming Releases (Tentative)
- **v1.5.x** (Q2 2026) - DoorDevUnstable becomes DoorDev
- **v1.6** (Q3 2026) - Python upgrade
- **v2.0** (Q4 2026) - New Generation branch release
---
## Success Metrics
How we measure progress:
### Technical Metrics
- Generation success rate (target: >95%)
- Average generation time (target: <10s for crossed seeds)
- Memory usage (start measuring)
- Test coverage (start measuring)
---
## Feedback & Discussion
Have thoughts on the roadmap?
- **Discord**: Join `#door-rando` to discuss
---
*This roadmap is a living document and will be updated regularly as priorities shift and progress is made.*
Last updated: 2026-01-30
+2
View File
@@ -6,6 +6,8 @@ import os
class BabelFish():
def __init__(self,subpath=["resources","app","meta"],lang=None):
localization_string = locale.getdefaultlocale()[0] #get set localization
if localization_string is None:
localization_string = "en"
self.locale = localization_string[:2] if lang is None else lang #let caller override localization
self.langs = ["en"] #start with English
if(not self.locale == "en"): #add localization
+59 -1
View File
@@ -11,6 +11,7 @@ from yaml.representer import Representer
import RaceRandom as random
from BaseClasses import DoorType, LocationType
from OverworldShuffle import default_flute_connections, flute_data
from source.overworld.FluteShuffle import default_flute_connections, flute_data
from source.tools.MysteryUtils import get_weights, roll_settings
from Utils import HexInt, hex_representer
@@ -246,6 +247,11 @@ class CustomSettings(object):
return self.file_source['item_pool']
return None
def get_item_pool_adjust(self):
if 'item_pool_adjust' in self.file_source:
return self.file_source['item_pool_adjust']
return None
def get_placements(self):
if 'placements' in self.file_source:
return self.file_source['placements']
@@ -505,6 +511,7 @@ class CustomSettings(object):
self.world_rep['ow-whirlpools'] = whirlpools = {}
self.world_rep['ow-tileflips'] = flips = {}
self.world_rep['ow-flutespots'] = flute = {}
self.world_rep['ow-grid'] = owgrid = {}
for p in self.player_range:
connections = edges[p] = {}
connections['two-way'] = {}
@@ -525,6 +532,57 @@ class CustomSettings(object):
else:
flute[p]['force'] = list(HexInt(id) for id in sorted(default_flute_connections))
flute[p]['forbid'] = []
# layout grid
owgrid[p] = {}
grid = world.owgrid[p]
if grid is None:
grid = [
[[HexInt(row * 8 + col) for col in range(8)] for row in range(8)],
[[HexInt(row * 8 + col) for col in range(8)] for row in range(8)]
]
else:
grid = [
[[HexInt(cell & 0xBF) for cell in row] for row in grid[0]],
[[HexInt(cell & 0xBF) for cell in row] for row in grid[1]]
]
# Create fixed_arrangements for both worlds
owgrid[p]['fixed_arrangements'] = [
{
'arrangement': [' '.join(f'0x{cell:02X}' for cell in row) for row in grid[0]],
'world': 'light'
},
{
'arrangement': [' '.join(f'0x{cell:02X}' for cell in row) for row in grid[1]],
'world': 'dark'
}
]
# Pin top left corners to position 0x00
owgrid[p]['restricted_positions'] = [
{
'cells': [HexInt(grid[0][0][0])],
'positions': [HexInt(0x00)],
'world': 'light'
},
{
'cells': [HexInt(grid[1][0][0])],
'positions': [HexInt(0x00)],
'world': 'dark'
}
]
# Set advanced grid options
horizontal_wrap = False
vertical_wrap = False
split_large_screens = False
if world.customizer:
grid_options = world.customizer.get_owgrid()
if grid_options and p in grid_options:
grid_options = grid_options[p]
horizontal_wrap = 'wrap_horizontal' in grid_options and grid_options['wrap_horizontal'] == True
vertical_wrap = 'wrap_vertical' in grid_options and grid_options['wrap_vertical'] == True
split_large_screens = 'split_large_screens' in grid_options and grid_options['split_large_screens'] == True
owgrid[p]['wrap_horizontal'] = horizontal_wrap
owgrid[p]['wrap_vertical'] = vertical_wrap
owgrid[p]['split_large_screens'] = split_large_screens
for key, data in world.spoiler.overworlds.items():
player = data['player'] if 'player' in data else 1
connections = edges[player]
@@ -532,7 +590,7 @@ class CustomSettings(object):
connections[sub][data['entrance']] = data['exit']
for key, data in world.spoiler.whirlpools.items():
player = data['player'] if 'player' in data else 1
whirlconnects = whirlconnects[player]
whirlconnects = whirlpools[player]
sub = 'two-way' if data['direction'] == 'both' else 'one-way'
whirlconnects[sub][data['entrance']] = data['exit']
+1 -1
View File
@@ -450,7 +450,7 @@ def init_enemy_stats():
EnemySprite.Stalfos: EnemyStats(EnemySprite.Stalfos, False, True, 6, health=4, dmg=1),
EnemySprite.GreenZirro: EnemyStats(EnemySprite.GreenZirro, False, False, 1, health=4, dmg=5, dmask=0x80),
EnemySprite.BlueZirro: EnemyStats(EnemySprite.BlueZirro, False, False, 7, health=8, dmg=3, dmask=0x80),
EnemySprite.Pikit: EnemyStats(EnemySprite.Pikit, False, True, 2, health=12, dmg=5),
EnemySprite.Pikit: EnemyStats(EnemySprite.Pikit, False, False, 2, health=12, dmg=5),
EnemySprite.OldMan: EnemyStats(EnemySprite.OldMan, True, dmg=0),
EnemySprite.PipeDown: EnemyStats(EnemySprite.PipeDown, True, dmg=0),
+1 -1
View File
@@ -335,7 +335,7 @@ def init_sprite_requirements():
SpriteRequirement(EnemySprite.Stalfos).sub_group(0, 0x1f),
SpriteRequirement(EnemySprite.GreenZirro).no_drop().sub_group(3, 0x1b).exclude(NoFlyingRooms),
SpriteRequirement(EnemySprite.BlueZirro).no_drop().sub_group(3, 0x1b).exclude(NoFlyingRooms),
SpriteRequirement(EnemySprite.Pikit).sub_group(3, 0x1b),
SpriteRequirement(EnemySprite.Pikit).no_drop().sub_group(3, 0x1b),
SpriteRequirement(EnemySprite.CrystalMaiden).affix(),
SpriteRequirement(EnemySprite.OldMan).affix().sub_group(2, 0x1c),
SpriteRequirement(EnemySprite.PipeDown).affix(),
+10 -7
View File
@@ -84,7 +84,10 @@ UwGeneralDeny:
- [ 0x0039, 4, [ "RollerVerticalUp", "RollerVerticalDown", "RollerHorizontalLeft", "RollerHorizontalRight", "FirebarCW", "FirebarCCW" ] ] #"Skull Woods - Play Pen - Spike Trap 1"
- [0x0039, 5, ["RollerVerticalUp", "RollerVerticalDown", "RollerHorizontalLeft", "Bumper", "AntiFairyCircle"]] #"Skull Woods - Play Pen - Hardhat Beetle"
- [ 0x0039, 6, [ "RollerVerticalUp", "RollerVerticalDown", "RollerHorizontalLeft", "RollerHorizontalRight", "FirebarCW", "FirebarCCW" ] ] #"Skull Woods - Play Pen - Spike Trap 2"
- [0x003a, 1, ["RollerVerticalUp", "RollerVerticalDown"]]
- [ 0x003a, 0, ["RollerVerticalUp", "RollerVerticalDown"]]
- [ 0x003a, 1, ["RollerVerticalUp", "RollerVerticalDown"]]
- [ 0x003a, 3, ["RollerHorizontalLeft", "RollerHorizontalRight"]]
- [ 0x003a, 4, ["RollerHorizontalLeft", "RollerHorizontalRight"]]
- [ 0x003b, 1, [ "Bumper", "AntiFairyCircle" ]]
- [ 0x003b, 4, ["RollerVerticalUp", "RollerVerticalDown"]]
- [ 0x003c, 0, ["BigSpike"]]
@@ -306,7 +309,7 @@ UwGeneralDeny:
- [0x00b0, 7, [ "StalfosKnight", "Blob", "Stal", "Wizzrobe"]] # blocked, but Geldmen are probably okay
- [0x00b0, 8, [ "StalfosKnight", "Blob", "Stal", "Wizzrobe"]] # blocked, but Geldmen are probably okay
- [ 0x00b1, 2, [ "RollerVerticalUp", "RollerVerticalDown" ] ] #"Misery Mire - Hourglass - Spike Trap 1"
- [ 0x00b1, 3, [ "RollerVerticalUp", "RollerVerticalDown" ] ] #"Misery Mire - Hourglass - Spike Trap 2"
- [ 0x00b1, 3, [ "RollerVerticalUp", "RollerVerticalDown", "Bumper" ] ] #"Misery Mire - Hourglass - Spike Trap 2"
- [0x00b1, 4, ["Bumper", "BigSpike", "AntiFairyCircle", "Statue"]] # Wizzrobe near door
- [ 0x00b2, 1, [ "Wizzrobe", "Statue" ] ] # Wizzrobes can't spawn on pots
- [ 0x00b2, 3, [ "Wizzrobe", "Statue" ] ] # Wizzrobes can't spawn on pots
@@ -339,11 +342,11 @@ UwGeneralDeny:
- [ 0x00c2, 5, [ "Wizzrobe", "Statue" ] ] # Wizzrobes can't spawn on pots
- [ 0x00c5, 6, [ "RollerVerticalUp", "RollerVerticalDown", "RollerHorizontalLeft", "RollerHorizontalRight", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper" ] ] #"Turtle Rock - Catwalk - Mini Helmasaur"
- [ 0x00c5, 7, [ "Statue" ] ] #"Turtle Rock - Catwalk - Laser Eye (Left) 4"
- [0x00c6, 2, ["Bumper", "AntiFairyCircle"]]
- [0x00c6, 3, ["Bumper", "AntiFairyCircle"]]
- [0x00c6, 4, ["Bumper", "AntiFairyCircle"]]
- [0x00c6, 5, ["Bumper", "AntiFairyCircle"]]
- [0x00c6, 6, ["Bumper", "AntiFairyCircle"]]
- [ 0x00c6, 2, ["Bumper", "AntiFairyCircle", "BigSpike" ]]
- [ 0x00c6, 3, ["Bumper", "AntiFairyCircle", "BigSpike" ]]
- [ 0x00c6, 4, ["Bumper", "AntiFairyCircle", "BigSpike" ]]
- [ 0x00c6, 5, ["Bumper", "AntiFairyCircle", "BigSpike" ]]
- [ 0x00c6, 6, ["Bumper", "AntiFairyCircle", "BigSpike" ]]
- [ 0x00cb, 0, [ "Wizzrobe", "Statue" ] ] # Wizzrobes can't spawn on pots
- [ 0x00cb, 3, [ "RollerVerticalUp", "RollerVerticalDown", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper" ] ] #"Thieves' Town - Grand Room NW - Zol 1"
- [ 0x00cb, 5, [ "RollerVerticalUp", "RollerVerticalDown", "Beamos", "AntiFairyCircle", "BigSpike", "SpikeBlock", "Bumper" ] ] #"Thieves' Town - Grand Room NW - Zol 2"
-3
View File
@@ -120,9 +120,6 @@ def create_item_pool_config(world):
LocationGroup('bkgt').locs(mode_grouping['GT Trash'])]
for loc_name in mode_grouping['Big Chests'] + mode_grouping['Heart Containers']:
config.reserved_locations[player].add(loc_name)
if world.prizeshuffle[player] != 'none':
for loc_name in mode_grouping['Prizes']:
config.reserved_locations[player].add(loc_name)
elif world.algorithm == 'major_only':
config.location_groups = [
LocationGroup('MajorItems'),
+270
View File
@@ -0,0 +1,270 @@
import copy
import logging
import RaceRandom as random
from BaseClasses import Entrance, RegionType, Terrain
from DungeonGenerator import GenerationException
from OWEdges import OWTileRegions
from source.overworld.EntranceShuffle2 import connect_simple
def shuffle_flute_spots(world, player):
def connect_flutes(flute_destinations):
for o in range(0, len(flute_destinations)):
owid = flute_destinations[o]
regions = flute_data[owid][0]
if not world.is_tile_swapped(owid, player):
connect_simple(world, 'Flute Spot ' + str(o + 1), regions[0], player)
else:
connect_simple(world, 'Flute Spot ' + str(o + 1), regions[1], player)
if world.owFluteShuffle[player] == 'vanilla':
flute_spots = default_flute_connections.copy()
sort_flute_spots(world, player, flute_spots)
world.owflutespots[player] = flute_spots
connect_flutes(flute_spots)
else:
from OverworldShuffle import one_way_ledges
flute_spots = 8
flute_pool = list(flute_data.keys())
new_spots = list()
ignored_regions = set()
used_flute_regions = []
forbidden_spots = []
forbidden_regions = []
def addSpot(owid, ignore_proximity, forced):
if world.owFluteShuffle[player] == 'balanced':
def getIgnored(regionname, base_owid, owid):
region = world.get_region(regionname, player)
for exit in region.exits:
if exit.connected_region is not None and exit.connected_region.type in [RegionType.LightWorld, RegionType.DarkWorld] and exit.connected_region.name not in new_ignored:
if exit.connected_region.name in OWTileRegions and (OWTileRegions[exit.connected_region.name] in [base_owid, owid] or OWTileRegions[regionname] == base_owid):
new_ignored.add(exit.connected_region.name)
getIgnored(exit.connected_region.name, base_owid, OWTileRegions[exit.connected_region.name])
if regionname in one_way_ledges:
for ledge_region in one_way_ledges[regionname]:
if ledge_region not in new_ignored:
new_ignored.add(ledge_region)
getIgnored(ledge_region, base_owid, OWTileRegions[ledge_region])
if not world.is_tile_swapped(owid, player):
new_region = flute_data[owid][0][0]
else:
new_region = flute_data[owid][0][1]
if new_region in ignored_regions and not forced:
return False
new_ignored = {new_region}
getIgnored(new_region, OWTileRegions[new_region], OWTileRegions[new_region])
if not ignore_proximity and not forced and random.randint(0, 31) != 0 and new_ignored.intersection(ignored_regions):
return False
ignored_regions.update(new_ignored)
if owid in flute_pool:
flute_pool.remove(owid)
if ignore_proximity and not forced:
logging.getLogger('').warning(f'Warning: Adding flute spot within proximity: {hex(owid)}')
logging.getLogger('').debug(f'Placing flute at: {hex(owid)}')
new_spots.append(owid)
else:
# TODO: Inspect later, seems to happen only with 'random' flute shuffle
logging.getLogger('').warning(f'Warning: Attempted to place flute spot not in pool: {hex(owid)}')
return True
if world.customizer:
custom_spots = world.customizer.get_owflutespots()
if custom_spots and player in custom_spots:
if 'force' in custom_spots[player]:
for id in custom_spots[player]['force']:
owid = id & 0xBF
addSpot(owid, True, True)
flute_spots -= 1
if not world.is_tile_swapped(owid, player):
used_flute_regions.append(flute_data[owid][0][0])
else:
used_flute_regions.append(flute_data[owid][0][1])
if 'forbid' in custom_spots[player]:
for id in custom_spots[player]['forbid']:
owid = id & 0xBF
if owid not in new_spots:
forbidden_spots.append(owid)
if not world.is_tile_swapped(owid, player):
forbidden_regions.append(flute_data[owid][0][0])
else:
forbidden_regions.append(flute_data[owid][0][1])
# determine sectors (isolated groups of regions) to place flute spots
flute_regions = {(f[0][0] if (o not in world.owswaps[player][0]) != (world.mode[player] == 'inverted') else f[0][1]) : o for o, f in flute_data.items() if o not in new_spots and o not in forbidden_spots}
flute_sectors = [(len([r for l in s for r in l]), [r for l in s for r in l if r in flute_regions]) for s in world.owsectors[player]]
flute_sectors = [s for s in flute_sectors if len(s[1]) > 0]
region_total = sum([c for c,_ in flute_sectors])
sector_total = len(flute_sectors)
empty_sector_total = 0
sector_has_spot = []
# determine which sectors still need a flute spot
for sector in flute_sectors:
already_has_spot = any(region in sector for region in used_flute_regions)
sector_has_spot.append(already_has_spot)
if not already_has_spot:
empty_sector_total += 1
if flute_spots < empty_sector_total:
logging.getLogger('').warning(f'Warning: Not every sector can have a flute spot, generation might fail')
# pretend like some of the empty sectors already have a flute spot, don't know if they will be reachable
for i in range(len(flute_sectors)):
if not sector_has_spot[i]:
sector_has_spot[i] = True
empty_sector_total -= 1
if flute_spots == empty_sector_total:
break
# distribute flute spots for each sector
for i in range(len(flute_sectors)):
sector = flute_sectors[i]
sector_total -= 1
if not sector_has_spot[i]:
empty_sector_total -= 1
spots_to_place = min(flute_spots - empty_sector_total, max(0 if sector_has_spot[i] else 1, round((sector[0] * (flute_spots - sector_total) / region_total) + 0.5)))
target_spots = len(new_spots) + spots_to_place
logging.getLogger('').debug(f'Sector of {sector[0]} regions gets {spots_to_place} spot(s)')
if 0x30 in flute_pool and 0x30 not in forbidden_spots and len(new_spots) < target_spots and ('Desert Teleporter Ledge' in sector[1] or 'Mire Teleporter Ledge' in sector[1]):
addSpot(0x30, True, True) # guarantee desert/mire access
random.shuffle(sector[1])
f = 0
t = 0
while len(new_spots) < target_spots:
if f >= len(sector[1]):
f = 0
t += 1
if t > 5:
raise GenerationException('Infinite loop detected in flute shuffle')
owid = flute_regions[sector[1][f]]
if owid not in new_spots and owid not in forbidden_spots:
addSpot(owid, t > 0, False)
f += 1
region_total -= sector[0]
flute_spots -= spots_to_place
# connect new flute spots
sort_flute_spots(world, player, new_spots)
world.owflutespots[player] = new_spots
connect_flutes(new_spots)
# update spoiler
#new_spots = list(map(lambda o: flute_data[o][1], new_spots))
s = list(map(lambda x: ' ' if x not in new_spots else 'F', [i for i in range(0x40)]))
text_output = flute_spoiler_table.replace('s', '%s') % ( s[0x02], s[0x07],
s[0x00], s[0x03], s[0x05],
s[0x00], s[0x02],s[0x03], s[0x05], s[0x07], s[0x0a], s[0x0f],
s[0x0a], s[0x0f],
s[0x10],s[0x11],s[0x12],s[0x13],s[0x14],s[0x15],s[0x16],s[0x17], s[0x10],s[0x11],s[0x12],s[0x13],s[0x14],s[0x15],s[0x16],s[0x17],
s[0x18], s[0x1a],s[0x1b], s[0x1d],s[0x1e],
s[0x22], s[0x25], s[0x1a], s[0x1d],
s[0x28],s[0x29],s[0x2a],s[0x2b],s[0x2c],s[0x2d],s[0x2e],s[0x2f], s[0x18], s[0x1b], s[0x1e],
s[0x30], s[0x32],s[0x33],s[0x34],s[0x35], s[0x37], s[0x22], s[0x25],
s[0x3a],s[0x3b],s[0x3c], s[0x3f],
s[0x28],s[0x29],s[0x2a],s[0x2b],s[0x2c],s[0x2d],s[0x2e],s[0x2f],
s[0x32],s[0x33],s[0x34], s[0x37],
s[0x30], s[0x35],
s[0x3a],s[0x3b],s[0x3c], s[0x3f])
world.spoiler.set_map('flute', text_output, new_spots, player)
create_dynamic_flute_exits(world, player)
def sort_flute_spots(world, player, flute_spots):
if world.owLayout[player] != 'grid':
flute_spots.sort(key=lambda id: flute_data[id][1] if id != 0x03 or not world.is_tile_swapped(0x03, player) else 0x04)
else:
world_layout = world.owgrid[player][0] if world.mode[player] != 'inverted' else world.owgrid[player][1]
layout_list = sum(world_layout, [])
layout_map = {id & 0xBF: i for i, id in enumerate(layout_list)}
flute_spots.sort(key=lambda id: layout_map[flute_data[id][1] if id != 0x03 or not world.is_tile_swapped(0x03, player) else 0x04])
def create_dynamic_flute_exits(world, player):
flute_in_pool = True if player not in world.customitemarray else any(i for i, n in world.customitemarray[player].items() if i == 'flute' and n > 0)
if not flute_in_pool:
return
for region in (r for r in world.regions if r.player == player and r.terrain == Terrain.Land and r.name not in ['Zoras Domain', 'Master Sword Meadow', 'Hobo Bridge']):
if region.type == (RegionType.LightWorld if world.mode[player] != 'inverted' else RegionType.DarkWorld):
exitname = 'Flute From ' + region.name
exit = Entrance(region.player, exitname, region)
exit.spot_type = 'Flute'
exit.connect(world.get_region('Flute Sky', player))
region.exits.append(exit)
world.initialize_regions()
default_flute_connections = [
0x03, 0x16, 0x18, 0x2c, 0x2f, 0x30, 0x3b, 0x3f
]
flute_data = {
#OWID LW Region DW Region Slot VRAM BG Y BG X Link Y Link X Cam Y Cam X Unk1 Unk2 IconY IconX AltY AltX AltVRAM AltBGY AltBGX AltCamY AltCamX AltUnk1 AltUnk2 AltIconY AltIconX
0x00: (['Lost Woods East Area', 'Skull Woods Forest'], 0x09, 0x1042, 0x022e, 0x0202, 0x0290, 0x0288, 0x029b, 0x028f, 0xfff2, 0x000e, 0x0290, 0x0288, 0x0290, 0x0290),
0x02: (['Lumberjack Area', 'Dark Lumberjack Area'], 0x02, 0x059c, 0x00d6, 0x04e6, 0x0138, 0x0558, 0x0143, 0x0563, 0xfffa, 0xfffa, 0x01d8, 0x0518),
0x03: (['West Death Mountain (Bottom)', 'West Dark Death Mountain (Top)'], 0x0b, 0x1600, 0x02ca, 0x060e, 0x0328, 0x0678, 0x0337, 0x0683, 0xfff6, 0xfff2, 0x03bb, 0x0680, 0x0118, 0x0860, 0x05c0, 0x00b8, 0x07ec, 0x0127, 0x086b, 0xfff8, 0x0004, 0x0148, 0x0850),
0x05: (['East Death Mountain (Bottom)', 'East Dark Death Mountain (Bottom)'], 0x0e, 0x1860, 0x031e, 0x0d00, 0x0388, 0x0da8, 0x038d, 0x0d7d, 0x0000, 0x0000, 0x03c8, 0x0d98),
0x07: (['Death Mountain TR Pegs Area', 'Turtle Rock Area'], 0x07, 0x0804, 0x0102, 0x0e1a, 0x0160, 0x0e90, 0x016f, 0x0e97, 0xfffe, 0x0006, 0x0150, 0x0ea0),
0x0a: (['Mountain Pass Area', 'Bumper Cave Area'], 0x0a, 0x0180, 0x0220, 0x0406, 0x0280, 0x0488, 0x028f, 0x0493, 0x0000, 0xfffa, 0x0390, 0x04d8),
0x0f: (['Zora Waterfall Area', 'Catfish Area'], 0x0f, 0x0316, 0x025c, 0x0eb2, 0x02c0, 0x0f28, 0x02cb, 0x0f2f, 0x0002, 0xfffe, 0x0360, 0x0f58),
0x10: (['Lost Woods Pass West Area', 'Skull Woods Pass West Area'], 0x10, 0x0080, 0x0400, 0x0000, 0x0448, 0x0058, 0x046f, 0x0085, 0x0000, 0x0000, 0x04f8, 0x0088),
0x11: (['Kakariko Fortune Area', 'Dark Fortune Area'], 0x11, 0x0912, 0x051e, 0x0292, 0x0588, 0x0318, 0x058d, 0x031f, 0x0000, 0xfffe, 0x05f8, 0x0318),
0x12: (['Kakariko Pond Area', 'Outcast Pond Area'], 0x12, 0x0890, 0x051a, 0x0476, 0x0578, 0x04f8, 0x0587, 0x0503, 0xfff6, 0x000a, 0x05b8, 0x04f8),
0x13: (['Sanctuary Area', 'Dark Chapel Area'], 0x13, 0x051c, 0x04aa, 0x06de, 0x0508, 0x0758, 0x0517, 0x0763, 0xfff6, 0x0002, 0x05b8, 0x0738),
0x14: (['Graveyard Area', 'Dark Graveyard Area'], 0x14, 0x089c, 0x051e, 0x08e6, 0x0580, 0x0958, 0x058b, 0x0963, 0x0000, 0xfffa, 0x05f0, 0x0918, 0x0580, 0x0948),
0x15: (['River Bend East Bank', 'Qirn Jump East Bank'], 0x15, 0x041a, 0x0486, 0x0ad2, 0x04e8, 0x0b48, 0x04f3, 0x0b4f, 0x0008, 0xfffe, 0x0548, 0x0b78),
0x16: (['Potion Shop Area', 'Dark Witch Area'], 0x16, 0x0888, 0x0516, 0x0c4e, 0x0578, 0x0cc8, 0x0583, 0x0cd3, 0xfffa, 0xfff2, 0x05e8, 0x0c9f),
0x17: (['Zora Approach Ledge', 'Catfish Approach Ledge'], 0x17, 0x039e, 0x047e, 0x0ef2, 0x04e0, 0x0f68, 0x04eb, 0x0f6f, 0x0000, 0xfffe, 0x0580, 0x0f48),
0x18: (['Kakariko Village', 'Village of Outcasts'], 0x18, 0x0b30, 0x0759, 0x017e, 0x07b7, 0x0200, 0x07c6, 0x020b, 0x0007, 0x0002, 0x0830, 0x0240, 0x07c8, 0x01f8),
0x1a: (['Forgotten Forest Area', 'Shield Shop Fence'], 0x1a, 0x081a, 0x070f, 0x04d2, 0x0770, 0x0548, 0x077c, 0x054f, 0xffff, 0xfffe, 0x0770, 0x0518),
0x1b: (['Hyrule Castle Courtyard', 'Pyramid Area'], 0x1b, 0x0c30, 0x077a, 0x0786, 0x07d8, 0x07f8, 0x07e7, 0x0803, 0x0006, 0xfffa, 0x07f8, 0x07f8),
0x1d: (['Wooden Bridge Area', 'Broken Bridge Northeast'], 0x1d, 0x0602, 0x06c2, 0x0a0e, 0x0720, 0x0a80, 0x072f, 0x0a8b, 0xfffe, 0x0002, 0x0750, 0x0a70),
0x1e: (['Eastern Palace Area', 'Palace of Darkness Area'], 0x26, 0x1802, 0x091e, 0x0c0e, 0x09c0, 0x0c80, 0x098b, 0x0c8b, 0x0000, 0x0002, 0x09a0, 0x0cb0),
0x22: (['Blacksmith Area', 'Hammer Pegs Area'], 0x22, 0x058c, 0x08aa, 0x0462, 0x0908, 0x04d8, 0x0917, 0x04df, 0x0006, 0xfffe, 0x0978, 0x04e8),
0x25: (['Sand Dunes Area', 'Dark Dunes Area'], 0x25, 0x030e, 0x085a, 0x0a76, 0x08b8, 0x0ae8, 0x08c7, 0x0af3, 0x0006, 0xfffa, 0x0918, 0x0b18),
0x28: (['Maze Race Area', 'Dig Game Area'], 0x28, 0x0908, 0x0b1e, 0x003a, 0x0b88, 0x00b8, 0x0b8d, 0x00bf, 0x0000, 0x0006, 0x0ba8, 0x00b8),
0x29: (['Kakariko Suburb Area', 'Frog Area'], 0x29, 0x0408, 0x0a7c, 0x0242, 0x0ae0, 0x02c0, 0x0aeb, 0x02c7, 0x0002, 0xfffe, 0x0b30, 0x02e0),
0x2a: (['Flute Boy Area', 'Stumpy Area'], 0x2a, 0x058e, 0x0aac, 0x046e, 0x0b10, 0x04e8, 0x0b1b, 0x04f3, 0x0002, 0x0002, 0x0b60, 0x04f8),
0x2b: (['Central Bonk Rocks Area', 'Dark Bonk Rocks Area'], 0x2b, 0x0620, 0x0acc, 0x0700, 0x0b30, 0x0790, 0x0b3b, 0x0785, 0xfff2, 0x0000, 0x0b80, 0x0760),
0x2c: (['Links House Area', 'Big Bomb Shop Area'], 0x2c, 0x0588, 0x0ab9, 0x0840, 0x0b17, 0x08b8, 0x0b26, 0x08bf, 0xfff7, 0x0000, 0x0bb0, 0x08a8),
0x2d: (['Stone Bridge South Area', 'Hammer Bridge South Area'], 0x2d, 0x0886, 0x0b1e, 0x0a2a, 0x0ba0, 0x0aa8, 0x0b8b, 0x0aaf, 0x0000, 0x0006, 0x0bf0, 0x0ab8),
0x2e: (['Tree Line Area', 'Dark Tree Line Area'], 0x2e, 0x0100, 0x0a1a, 0x0c00, 0x0a78, 0x0c30, 0x0a87, 0x0c7d, 0x0006, 0x0000, 0x0ac8, 0x0c70),
0x2f: (['Eastern Nook Area', 'Darkness Nook Area'], 0x2f, 0x0798, 0x0afa, 0x0eb2, 0x0b58, 0x0f30, 0x0b67, 0x0f37, 0xfff6, 0x000e, 0x0bc0, 0x0f00),
0x30: (['Desert Teleporter Ledge', 'Mire Teleporter Ledge'], 0x38, 0x1880, 0x0f1e, 0x0000, 0x0fa8, 0x0078, 0x0f8d, 0x008d, 0x0000, 0x0000, 0x0ff0, 0x0070),
0x32: (['Flute Boy Approach Area', 'Stumpy Approach Area'], 0x32, 0x03a0, 0x0c6c, 0x0500, 0x0cd0, 0x05a8, 0x0cdb, 0x0585, 0x0002, 0x0000, 0x0d00, 0x0528),
0x33: (['C Whirlpool Outer Area', 'Dark C Whirlpool Outer Area'], 0x33, 0x0180, 0x0c20, 0x0600, 0x0c80, 0x0628, 0x0c8f, 0x067d, 0x0000, 0x0000, 0x0ce0, 0x0688),
0x34: (['Statues Area', 'Hype Cave Area'], 0x34, 0x088e, 0x0d00, 0x0866, 0x0d60, 0x08d8, 0x0d6f, 0x08e3, 0x0000, 0x000a, 0x0dd0, 0x08e8),
#0x35: (['Lake Hylia Northwest Bank', 'Ice Lake Northwest Bank'], 0x35, 0x0d00, 0x0da6, 0x0a06, 0x0e08, 0x0a80, 0x0e13, 0x0a8b, 0xfffa, 0xfffa, 0x0dc8, 0x0a90),
0x35: (['Lake Hylia South Shore', 'Ice Lake Southeast Ledge'], 0x3e, 0x1860, 0x0f1e, 0x0d00, 0x0f98, 0x0da8, 0x0f8b, 0x0d85, 0x0000, 0x0000, 0x0fd8, 0x0da8),
0x37: (['Ice Cave Area', 'Shopping Mall Area'], 0x37, 0x0786, 0x0cf6, 0x0e2e, 0x0d58, 0x0ea0, 0x0d63, 0x0eab, 0x000a, 0x0002, 0x0d98, 0x0ed0),
0x3a: (['Desert Pass Area', 'Swamp Nook Area'], 0x3a, 0x001a, 0x0e08, 0x04c6, 0x0e70, 0x0540, 0x0e7d, 0x054b, 0x0006, 0x000a, 0x0ee0, 0x0570),
0x3b: (['Dam Area', 'Swamp Area'], 0x3b, 0x069e, 0x0edf, 0x06f2, 0x0f3d, 0x0778, 0x0f4c, 0x077f, 0xfff1, 0xfffe, 0x0fd0, 0x0770),
0x3c: (['South Pass Area', 'Dark South Pass Area'], 0x3c, 0x0584, 0x0ed0, 0x081e, 0x0f38, 0x0898, 0x0f45, 0x08a3, 0xfffe, 0x0002, 0x0fa8, 0x0898),
0x3f: (['Octoballoon Area', 'Bomber Corner Area'], 0x3f, 0x0810, 0x0f05, 0x0e75, 0x0f67, 0x0ef3, 0x0f72, 0x0efa, 0xfffb, 0x000b, 0x0fd0, 0x0ef0)
}
flute_spoiler_table = \
""" 0 1 2 3 4 5 6 7
+---+-+---+---+-+
01234567 A(00)| |s| | |s|
+--------+ | s +-+ s | s +-+
A(00)|s ss s s| B(08)| |s| | |s|
B(08)| s s| +-+-+-+-+-+-+-+-+
C(10)|ssssssss| C(10)|s|s|s|s|s|s|s|s|
D(18)|s ss ss | +-+-+-+-+-+-+-+-+
E(20)| s s | D(18)| |s| |s| |
F(28)|ssssssss| | s +-+ s +-+ s |
G(30)|s ssss s| E(20)| |s| |s| |
H(38)| sss s| +-+-+-+-+-+-+-+-+
+--------+ F(28)|s|s|s|s|s|s|s|s|
+-+-+-+-+-+-+-+-+
G(30)| |s|s|s| |s|
| s +-+-+-+ s +-+
H(38)| |s|s|s| |s|
+---+-+-+-+---+-+"""
File diff suppressed because it is too large Load Diff
+153 -158
View File
@@ -2,9 +2,24 @@ import logging
import os
from datetime import datetime
from typing import Dict, List
from PIL import Image, ImageDraw
from BaseClasses import Direction, OWEdge
from source.overworld.LayoutGenerator import Screen
from source.overworld.LayoutGenerator import Screen, get_screen_id_from_cell
def get_quadrant_from_cell_id(cell_id: int, screen_id: int) -> str:
offset = (cell_id & 0xBF) - (screen_id & 0xBF)
if offset == 0x00:
return "NW"
elif offset == 0x01:
return "NE"
elif offset == 0x08:
return "SW"
else:
return "SE"
def get_edge_lists(grid: List[List[List[int]]],
overworld_screens: Dict[int, Screen],
@@ -13,7 +28,7 @@ def get_edge_lists(grid: List[List[List[int]]],
Get list of edges for each cell and direction.
Args:
grid: 3D list [world][row][col] containing screen IDs
grid: 3D list [world][row][col] containing cell IDs
overworld_screens: Dict of screen_id -> Screen objects
large_screen_quadrant_info: Dict of screen_id -> quadrant info for large screens
@@ -24,47 +39,27 @@ def get_edge_lists(grid: List[List[List[int]]],
GRID_SIZE = 8
edge_lists = {}
# Large screen base IDs
large_screen_base_ids = [0x00, 0x03, 0x05, 0x18, 0x1B, 0x1E, 0x30, 0x35,
0x40, 0x43, 0x45, 0x58, 0x5B, 0x5E, 0x70, 0x75]
for world_idx in range(2):
# Build a map of screen_id -> list of (row, col) positions for large screens
large_screen_positions = {}
for row in range(GRID_SIZE):
for col in range(GRID_SIZE):
screen_id = grid[world_idx][row][col]
if screen_id != -1 and screen_id in large_screen_base_ids:
if screen_id not in large_screen_positions:
large_screen_positions[screen_id] = []
large_screen_positions[screen_id].append((row, col))
cell_id = grid[world_idx][row][col]
for row in range(GRID_SIZE):
for col in range(GRID_SIZE):
screen_id = grid[world_idx][row][col]
if screen_id == -1:
if cell_id == -1:
# Empty cell - no edges
for direction in [Direction.North, Direction.South, Direction.East, Direction.West]:
edge_lists[(world_idx, row, col, direction)] = []
continue
screen_id = get_screen_id_from_cell(cell_id)
screen = overworld_screens.get(screen_id)
if not screen:
for direction in [Direction.North, Direction.South, Direction.East, Direction.West]:
edge_lists[(world_idx, row, col, direction)] = []
continue
is_large = screen_id in large_screen_base_ids
if is_large:
# For large screens, determine which quadrant this cell is
# Find all positions of this large screen and determine quadrant
positions = large_screen_positions.get(screen_id, [(row, col)])
# Determine quadrant by finding relative position
# The quadrant is determined by which cells are adjacent
quadrant = determine_large_screen_quadrant(row, col, positions, GRID_SIZE)
if screen.big:
# For large screens, determine quadrant from cell ID
quadrant = get_quadrant_from_cell_id(cell_id, screen_id)
# Get edges for this quadrant
if screen_id in large_screen_quadrant_info:
@@ -85,45 +80,6 @@ def get_edge_lists(grid: List[List[List[int]]],
return edge_lists
def determine_large_screen_quadrant(row: int, col: int, positions: List[tuple], grid_size: int) -> str:
"""
Determine which quadrant (NW, NE, SW, SE) a cell is in for a large screen.
Handles wrapping correctly by checking adjacency patterns.
Args:
row: Current cell row
col: Current cell column
positions: List of all (row, col) positions for this large screen
grid_size: Size of the grid (8)
Returns:
Quadrant string: "NW", "NE", "SW", or "SE"
"""
positions_set = set(positions)
# Check which adjacent cells also belong to this large screen
has_right = ((row, (col + 1) % grid_size) in positions_set)
has_below = (((row + 1) % grid_size, col) in positions_set)
has_left = ((row, (col - 1) % grid_size) in positions_set)
has_above = (((row - 1) % grid_size, col) in positions_set)
# Determine quadrant based on adjacency
# NW: has right and below neighbors
# NE: has left and below neighbors
# SW: has right and above neighbors
# SE: has left and above neighbors
if has_right and has_below:
return "NW"
elif has_left and has_below:
return "NE"
elif has_right and has_above:
return "SW"
elif has_left and has_above:
return "SE"
else:
raise Exception("?")
def is_crossed_edge(edge: OWEdge, overworld_screens: Dict[int, Screen]) -> bool:
if edge.dest is None:
return False
@@ -132,6 +88,40 @@ def is_crossed_edge(edge: OWEdge, overworld_screens: Dict[int, Screen]) -> bool:
dest_screen = overworld_screens.get(edge.dest.owIndex)
return source_screen.dark_world != dest_screen.dark_world
def are_large_screen_cells_connected(cell_id1: int, cell_id2: int, quadrant1: str, quadrant2: str, direction: str) -> bool:
"""
Check if two cells of a large screen are connected (should have no border between them).
For cells to be connected:
1. They must be from the same large screen (same base screen ID)
2. Their quadrants must be adjacent in the expected direction
Args:
cell_id1: Cell ID of the first cell
cell_id2: Cell ID of the second cell
quadrant1: Quadrant of the first cell ("NW", "NE", "SW", "SE")
quadrant2: Quadrant of the second cell
direction: Direction from cell1 to cell2 ("east", "south")
Returns:
True if the cells should have no border between them
"""
# Must be from the same large screen
screen_id1 = get_screen_id_from_cell(cell_id1)
screen_id2 = get_screen_id_from_cell(cell_id2)
if screen_id1 != screen_id2:
return False
# Check if quadrants are properly adjacent
if direction == "east":
# For east connection: NW->NE or SW->SE
return (quadrant1 == "NW" and quadrant2 == "NE") or (quadrant1 == "SW" and quadrant2 == "SE")
elif direction == "south":
# For south connection: NW->SW or NE->SE
return (quadrant1 == "NW" and quadrant2 == "SW") or (quadrant1 == "NE" and quadrant2 == "SE")
return False
def visualize_layout(grid: List[List[List[int]]], output_dir: str,
overworld_screens: Dict[int, Screen],
large_screen_quadrant_info: Dict[int, Dict]) -> None:
@@ -162,78 +152,42 @@ def visualize_layout(grid: List[List[List[int]]], output_dir: str,
output_height = world_height
output_img = Image.new('RGB', (output_width, output_height), color='black')
# Large screen base IDs (defined once for reuse)
large_screen_base_ids = [0x00, 0x03, 0x05, 0x18, 0x1B, 0x1E, 0x30, 0x35,
0x40, 0x43, 0x45, 0x58, 0x5B, 0x5E, 0x70, 0x75]
# Process both worlds
for world_idx in range(2):
x_offset = 0 if world_idx == 0 else (world_width + gap)
# Build a map of screen_id -> list of (row, col) positions for large screens
large_screen_positions = {}
for row in range(GRID_SIZE):
for col in range(GRID_SIZE):
screen_id = grid[world_idx][row][col]
if screen_id != -1 and screen_id in large_screen_base_ids:
if screen_id not in large_screen_positions:
large_screen_positions[screen_id] = []
large_screen_positions[screen_id].append((row, col))
# Process each cell in the grid individually
# This handles wrapped large screens correctly by drawing each quadrant separately
for row in range(GRID_SIZE):
for col in range(GRID_SIZE):
screen_id = grid[world_idx][row][col]
cell_id = grid[world_idx][row][col]
if screen_id == -1:
if cell_id == -1:
# Empty cell - fill with black (already black from initialization)
continue
is_large = screen_id in large_screen_base_ids
screen_id = get_screen_id_from_cell(cell_id)
screen = overworld_screens.get(screen_id)
if not screen:
continue
# Calculate source position in the world image
source_row = (screen_id % 0x40) >> 3
source_col = screen_id % 0x08
world_img = lightworld_img if screen_id < 0x40 else darkworld_img
is_large = screen.big
if is_large:
# For large screens, determine which quadrant this cell represents
positions = large_screen_positions.get(screen_id, [(row, col)])
quadrant = determine_large_screen_quadrant(row, col, positions, GRID_SIZE)
# Calculate source position in the world image based on cell_id
# For large screens, cell_id already encodes the quadrant position
source_row = (cell_id % 0x40) >> 3
source_col = cell_id % 0x08
world_img = lightworld_img if cell_id < 0x40 else darkworld_img
# Map quadrant to source offset within the 2x2 large screen
quadrant_offsets = {
"NW": (0, 0),
"NE": (1, 0),
"SW": (0, 1),
"SE": (1, 1)
}
q_col_offset, q_row_offset = quadrant_offsets[quadrant]
source_x = source_col * SOURCE_CELL_SIZE
source_y = source_row * SOURCE_CELL_SIZE
# Calculate source position for this quadrant
source_x = (source_col + q_col_offset) * SOURCE_CELL_SIZE
source_y = (source_row + q_row_offset) * SOURCE_CELL_SIZE
# Crop single cell from source (the specific quadrant)
cropped = world_img.crop((
source_x,
source_y,
source_x + SOURCE_CELL_SIZE,
source_y + SOURCE_CELL_SIZE
))
else:
# Small screen (1x1)
source_x = source_col * SOURCE_CELL_SIZE
source_y = source_row * SOURCE_CELL_SIZE
# Crop single cell from source
cropped = world_img.crop((
source_x,
source_y,
source_x + SOURCE_CELL_SIZE,
source_y + SOURCE_CELL_SIZE
))
# Crop single cell from source
cropped = world_img.crop((
source_x,
source_y,
source_x + SOURCE_CELL_SIZE,
source_y + SOURCE_CELL_SIZE
))
# Resize to output size (64x64 pixels)
resized = cropped.resize(
@@ -257,52 +211,93 @@ def visualize_layout(grid: List[List[List[int]]], output_dir: str,
for world_idx in range(2):
x_offset = 0 if world_idx == 0 else (world_width + gap)
# Build large screen positions map for this world
large_screen_positions = {}
for row in range(GRID_SIZE):
for col in range(GRID_SIZE):
screen_id = grid[world_idx][row][col]
if screen_id != -1 and screen_id in large_screen_base_ids:
if screen_id not in large_screen_positions:
large_screen_positions[screen_id] = []
large_screen_positions[screen_id].append((row, col))
# Draw borders for each cell
# For large screens, only draw borders where cells are not connected
for row in range(GRID_SIZE):
for col in range(GRID_SIZE):
screen_id = grid[world_idx][row][col]
cell_id = grid[world_idx][row][col]
if screen_id == -1:
if cell_id == -1:
continue
is_large = screen_id in large_screen_base_ids
screen_id = get_screen_id_from_cell(cell_id)
screen = overworld_screens.get(screen_id)
if not screen:
continue
is_large = screen.big
dest_x = x_offset + col * OUTPUT_CELL_SIZE
dest_y = row * OUTPUT_CELL_SIZE
if is_large:
# For large screens, determine which quadrant this cell is
positions = large_screen_positions.get(screen_id, [(row, col)])
quadrant = determine_large_screen_quadrant(row, col, positions, GRID_SIZE)
quadrant = get_quadrant_from_cell_id(cell_id, screen_id)
# Draw border only on the outer edges of the large screen
# (not on internal edges between quadrants)
# NW: draw top and left borders
# NE: draw top and right borders
# SW: draw bottom and left borders
# SE: draw bottom and right borders
if quadrant in ["NW", "NE"]:
# Draw top border
draw.line([(dest_x, dest_y), (dest_x + OUTPUT_CELL_SIZE - 1, dest_y)], fill='black', width=BORDER_WIDTH)
# Check each border direction
# Top border: draw if this is a north quadrant OR if the cell above is not connected
draw_top = True
if quadrant in ["SW", "SE"]:
# Draw bottom border
draw.line([(dest_x, dest_y + OUTPUT_CELL_SIZE - 1), (dest_x + OUTPUT_CELL_SIZE - 1, dest_y + OUTPUT_CELL_SIZE - 1)], fill='black', width=BORDER_WIDTH)
if quadrant in ["NW", "SW"]:
# Draw left border
draw.line([(dest_x, dest_y), (dest_x, dest_y + OUTPUT_CELL_SIZE - 1)], fill='black', width=BORDER_WIDTH)
# Check if cell above is connected
above_row = (row - 1) % GRID_SIZE
above_cell_id = grid[world_idx][above_row][col]
if above_cell_id != -1:
above_screen_id = get_screen_id_from_cell(above_cell_id)
above_screen = overworld_screens.get(above_screen_id)
if above_screen and above_screen.big:
above_quadrant = get_quadrant_from_cell_id(above_cell_id, above_screen_id)
if are_large_screen_cells_connected(above_cell_id, cell_id, above_quadrant, quadrant, "south"):
draw_top = False
# Bottom border: draw if this is a south quadrant OR if the cell below is not connected
draw_bottom = True
if quadrant in ["NW", "NE"]:
# Check if cell below is connected
below_row = (row + 1) % GRID_SIZE
below_cell_id = grid[world_idx][below_row][col]
if below_cell_id != -1:
below_screen_id = get_screen_id_from_cell(below_cell_id)
below_screen = overworld_screens.get(below_screen_id)
if below_screen and below_screen.big:
below_quadrant = get_quadrant_from_cell_id(below_cell_id, below_screen_id)
if are_large_screen_cells_connected(cell_id, below_cell_id, quadrant, below_quadrant, "south"):
draw_bottom = False
# Left border: draw if this is a west quadrant OR if the cell to the left is not connected
draw_left = True
if quadrant in ["NE", "SE"]:
# Draw right border
# Check if cell to the left is connected
left_col = (col - 1) % GRID_SIZE
left_cell_id = grid[world_idx][row][left_col]
if left_cell_id != -1:
left_screen_id = get_screen_id_from_cell(left_cell_id)
left_screen = overworld_screens.get(left_screen_id)
if left_screen and left_screen.big:
left_quadrant = get_quadrant_from_cell_id(left_cell_id, left_screen_id)
if are_large_screen_cells_connected(left_cell_id, cell_id, left_quadrant, quadrant, "east"):
draw_left = False
# Right border: draw if this is an east quadrant OR if the cell to the right is not connected
draw_right = True
if quadrant in ["NW", "SW"]:
# Check if cell to the right is connected
right_col = (col + 1) % GRID_SIZE
right_cell_id = grid[world_idx][row][right_col]
if right_cell_id != -1:
right_screen_id = get_screen_id_from_cell(right_cell_id)
right_screen = overworld_screens.get(right_screen_id)
if right_screen and right_screen.big:
right_quadrant = get_quadrant_from_cell_id(right_cell_id, right_screen_id)
if are_large_screen_cells_connected(cell_id, right_cell_id, quadrant, right_quadrant, "east"):
draw_right = False
# Draw the borders
if draw_top:
draw.line([(dest_x, dest_y), (dest_x + OUTPUT_CELL_SIZE - 1, dest_y)], fill='black', width=BORDER_WIDTH)
if draw_bottom:
draw.line([(dest_x, dest_y + OUTPUT_CELL_SIZE - 1), (dest_x + OUTPUT_CELL_SIZE - 1, dest_y + OUTPUT_CELL_SIZE - 1)], fill='black', width=BORDER_WIDTH)
if draw_left:
draw.line([(dest_x, dest_y), (dest_x, dest_y + OUTPUT_CELL_SIZE - 1)], fill='black', width=BORDER_WIDTH)
if draw_right:
draw.line([(dest_x + OUTPUT_CELL_SIZE - 1, dest_y), (dest_x + OUTPUT_CELL_SIZE - 1, dest_y + OUTPUT_CELL_SIZE - 1)], fill='black', width=BORDER_WIDTH)
else:
# Small screen - draw border around single cell
@@ -315,8 +310,8 @@ def visualize_layout(grid: List[List[List[int]]], output_dir: str,
# Draw edge connection indicators for each cell
for row in range(GRID_SIZE):
for col in range(GRID_SIZE):
screen_id = grid[world_idx][row][col]
if screen_id == -1:
cell_id = grid[world_idx][row][col]
if cell_id == -1:
continue
dest_x = x_offset + col * OUTPUT_CELL_SIZE
+6 -6
View File
@@ -58,17 +58,17 @@ class DataTables:
self.bush_sprite_table = {}
# enemizer conditions
self.uw_enemy_denials = {}
self.ow_enemy_denials = {}
self.uw_enemy_drop_denials = {}
self.uw_enemy_denials = defaultdict(set)
self.ow_enemy_denials = defaultdict(set)
self.uw_enemy_drop_denials = defaultdict(set)
self.sheet_choices = []
denial_data = load_cached_yaml(['source', 'enemizer', 'enemy_deny.yaml'])
for denial in denial_data['UwGeneralDeny']:
self.uw_enemy_denials[denial[0], denial[1]] = {sprite_translation[x] for x in denial[2]}
self.uw_enemy_denials[denial[0], denial[1]] |= {sprite_translation[x] for x in denial[2]}
for denial in denial_data['OwGeneralDeny']:
self.ow_enemy_denials[denial[0], denial[1]] = {sprite_translation[x] for x in denial[2]}
self.ow_enemy_denials[denial[0], denial[1]] |= {sprite_translation[x] for x in denial[2]}
for denial in denial_data['UwEnemyDrop']:
self.uw_enemy_drop_denials[denial[0], denial[1]] = {sprite_translation[x] for x in denial[2]}
self.uw_enemy_drop_denials[denial[0], denial[1]] |= {sprite_translation[x] for x in denial[2]}
weights = load_cached_yaml(['source', 'enemizer', 'enemy_weight.yaml'])
self.uw_weights = {sprite_translation[k]: v for k, v in weights['UW'].items()}
self.ow_weights = {sprite_translation[k]: v for k, v in weights['OW'].items()}
Generated
+11
View File
@@ -49,6 +49,7 @@ dependencies = [
{ name = "aenum" },
{ name = "aioconsole", version = "0.6.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.8'" },
{ name = "aioconsole", version = "0.8.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.8'" },
{ name = "collections-extended" },
{ name = "colorama" },
{ name = "distro" },
{ name = "fast-enum" },
@@ -64,6 +65,7 @@ dependencies = [
requires-dist = [
{ name = "aenum", specifier = ">=3.1.16" },
{ name = "aioconsole", specifier = ">=0.6.2" },
{ name = "collections-extended", specifier = ">=2.0.2" },
{ name = "colorama", specifier = ">=0.4.6" },
{ name = "distro", specifier = ">=1.9.0" },
{ name = "fast-enum", specifier = ">=1.3.0" },
@@ -72,6 +74,15 @@ requires-dist = [
{ name = "websockets", specifier = ">=11.0.3" },
]
[[package]]
name = "collections-extended"
version = "2.0.2"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/62/40/e92bd575a99b7fb1fe9f3198ff4addc7d9f66e3d7e976b4d1b5bca6e049d/collections-extended-2.0.2.tar.gz", hash = "sha256:d68ebd1e2208444e392aa0016e5c085bd897f89296f5c1860787de5935994114", size = 22753, upload-time = "2022-01-23T18:58:38.99Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/d5/65/8f409bbb1faf21714ebebfa553a34023a6657bbb2f85f43141be4e4ffe5e/collections_extended-2.0.2-py3-none-any.whl", hash = "sha256:bc096dda430b9455f51287943f7f63fbe53a4de78c444cc38c44e996af306ac5", size = 24330, upload-time = "2022-01-23T18:58:40.662Z" },
]
[[package]]
name = "colorama"
version = "0.4.6"
+264
View File
@@ -0,0 +1,264 @@
item_pool_adjust:
1:
"Bottle (Random)": -4
"Bottle": 4
"Fighter Sword": -1
"Blue Shield": -1
"Sword and Shield": 1
"Bombs (10)": -1
"Bombs (3)": 1
"Arrows (10)": -1
"Rupees (20)": 2
placements:
1:
"Master Sword Pedestal": Master Sword
"Mushroom": Mushroom
"Ether Tablet": Ether
"Spectacle Rock": Piece of Heart
"Old Man": Magic Mirror
"Floating Island": Piece of Heart
"King Zora": Flippers
"Zora's Ledge": Piece of Heart
"Bottle Merchant": Bottle
"Maze Race": Piece of Heart
"Flute Spot": Ocarina
"Hobo": Bottle
"Desert Ledge": Piece of Heart
"Bombos Tablet": Bombos
"Lake Hylia Island": Piece of Heart
"Purple Chest": Bottle
"Sunken Treasure": Piece of Heart
"Bumper Cave Ledge": Piece of Heart
"Catfish": Quake
"Pyramid": Piece of Heart
"Digging Game": Piece of Heart
"Stumpy": Shovel
"Lost Woods Hideout": Piece of Heart
"Lumberjack Tree": Piece of Heart
"Spectacle Rock Cave": Piece of Heart
"Spiral Cave": Rupees (50)
"Mimic Cave": Piece of Heart
"Paradox Cave Lower - Far Left": Rupees (20)
"Paradox Cave Lower - Left": Rupees (20)
"Paradox Cave Lower - Right": Rupees (20)
"Paradox Cave Lower - Far Right": Rupees (20)
"Paradox Cave Lower - Middle": Rupees (20)
"Paradox Cave Upper - Left": Bombs (3)
"Paradox Cave Upper - Right": Arrows (10)
"Waterfall Fairy - Left": Red Boomerang
"Waterfall Fairy - Right": Red Shield
"Bonk Rock Cave": Piece of Heart
"Graveyard Cave": Piece of Heart
"King's Tomb": Cape
"Potion Shop": Magic Powder
"Kakariko Well - Left": Rupees (20)
"Kakariko Well - Middle": Rupees (20)
"Kakariko Well - Right": Rupees (20)
"Kakariko Well - Bottom": Bombs (3)
"Kakariko Well - Top": Piece of Heart
"Blind's Hideout - Left": Rupees (20)
"Blind's Hideout - Right": Rupees (20)
"Blind's Hideout - Far Left": Rupees (20)
"Blind's Hideout - Far Right": Rupees (20)
"Blind's Hideout - Top": Piece of Heart
"Chicken House": Arrows (10) # Blue Boomerang that turns into 10 arrows
"Sick Kid": Bug Catching Net
"Kakariko Tavern": Bottle
"Link's Uncle": Sword and Shield
"Secret Passage": Rupees (5) # Lamp that turns into blue rupee
"Sahasrahla's Hut - Left": Rupees (50)
"Sahasrahla's Hut - Middle": Bombs (3)
"Sahasrahla's Hut - Right": Rupees (50)
"Sahasrahla": Pegasus Boots
"Blacksmith": Tempered Sword
"Magic Bat": Magic Upgrade (1/2)
"Library": Book of Mudora
"Link's House": Rupees (5) # Lamp that turns into blue rupee
"Checkerboard Cave": Piece of Heart
"Aginah's Cave": Piece of Heart
"Cave 45": Piece of Heart
"Mini Moldorm Cave - Far Left": Bombs (3)
"Mini Moldorm Cave - Left": Rupees (20)
"Mini Moldorm Cave - Right": Rupees (20)
"Mini Moldorm Cave - Far Right": Arrows (10)
"Mini Moldorm Cave - Generous Guy": Rupees (300)
"Ice Rod Cave": Ice Rod
"Floodgate Chest": Bombs (3)
"Spike Cave": Cane of Byrna
"Hookshot Cave - Bottom Right": Rupees (50)
"Hookshot Cave - Top Right": Rupees (50)
"Hookshot Cave - Top Left": Rupees (50)
"Hookshot Cave - Bottom Left": Rupees (50)
"Superbunny Cave - Top": Bombs (3)
"Superbunny Cave - Bottom": Rupees (20)
"Chest Game": Piece of Heart
"C-Shaped House": Rupees (300)
"Brewery": Rupees (300) # Red Boomerang that turns into 300 rupees
"Pyramid Fairy - Left": Golden Sword
"Pyramid Fairy - Right": Silver Arrows
"Peg Cave": Piece of Heart
"Mire Shed - Left": Piece of Heart
"Mire Shed - Right": Rupees (20)
"Hype Cave - Top": Rupees (20)
"Hype Cave - Middle Right": Rupees (20)
"Hype Cave - Middle Left": Rupees (20)
"Hype Cave - Bottom": Rupees (20)
"Hype Cave - Generous Guy": Rupees (300)
"Hyrule Castle - Map Chest": Map (Escape)
"Hyrule Castle - Boomerang Chest": Blue Boomerang
"Hyrule Castle - Zelda's Chest": Lamp
"Sewers - Dark Cross": Small Key (Escape)
"Sewers - Secret Room - Left": Bombs (3)
"Sewers - Secret Room - Middle": Rupees (300)
"Sewers - Secret Room - Right": Arrows (10)
"Sanctuary": Sanctuary Heart Container
"Eastern Palace - Cannonball Chest": Rupees (100)
"Eastern Palace - Map Chest": Map (Eastern Palace)
"Eastern Palace - Compass Chest": Compass (Eastern Palace)
"Eastern Palace - Big Chest": Bow
"Eastern Palace - Big Key Chest": Big Key (Eastern Palace)
"Eastern Palace - Boss": Boss Heart Container
"Eastern Palace - Prize": Green Pendant
"Desert Palace - Compass Chest": Compass (Desert Palace)
"Desert Palace - Big Key Chest": Big Key (Desert Palace)
"Desert Palace - Map Chest": Map (Desert Palace)
"Desert Palace - Torch": Small Key (Desert Palace)
"Desert Palace - Big Chest": Power Glove
"Desert Palace - Boss": Boss Heart Container
"Desert Palace - Prize": Blue Pendant
"Tower of Hera - Map Chest": Map (Tower of Hera)
"Tower of Hera - Basement Cage": Small Key (Tower of Hera)
"Tower of Hera - Big Key Chest": Big Key (Tower of Hera)
"Tower of Hera - Compass Chest": Compass (Tower of Hera)
"Tower of Hera - Big Chest": Moon Pearl
"Tower of Hera - Boss": Boss Heart Container
"Tower of Hera - Prize": Red Pendant
"Castle Tower - Room 03": Small Key (Agahnims Tower)
"Castle Tower - Dark Maze": Small Key (Agahnims Tower)
"Palace of Darkness - Shooter Room": Small Key (Palace of Darkness)
"Palace of Darkness - The Arena - Bridge": Small Key (Palace of Darkness)
"Palace of Darkness - The Arena - Ledge": Small Key (Palace of Darkness)
"Palace of Darkness - Map Chest": Map (Palace of Darkness)
"Palace of Darkness - Stalfos Basement": Small Key (Palace of Darkness)
"Palace of Darkness - Big Key Chest": Big Key (Palace of Darkness)
"Palace of Darkness - Dark Maze - Top": Bombs (3)
"Palace of Darkness - Dark Maze - Bottom": Rupees (5)
# "Palace of Darkness - Dark Maze - Bottom": Small Key (Palace of Darkness)
"Palace of Darkness - Big Chest": Hammer
"Palace of Darkness - Compass Chest": Compass (Palace of Darkness)
"Palace of Darkness - Dark Basement - Left": Single Arrow
"Palace of Darkness - Dark Basement - Right": Small Key (Palace of Darkness)
"Palace of Darkness - Harmless Hellway": Small Key (Palace of Darkness)
# "Palace of Darkness - Harmless Hellway": Rupees (5)
"Palace of Darkness - Boss": Boss Heart Container
"Palace of Darkness - Prize": Crystal 1
"Swamp Palace - Entrance": Small Key (Swamp Palace)
"Swamp Palace - Map Chest": Map (Swamp Palace)
"Swamp Palace - Big Chest": Hookshot
"Swamp Palace - Compass Chest": Compass (Swamp Palace)
"Swamp Palace - Big Key Chest": Big Key (Swamp Palace)
"Swamp Palace - West Chest": Rupees (20)
"Swamp Palace - Flooded Room - Left": Rupees (20)
"Swamp Palace - Flooded Room - Right": Rupees (20)
"Swamp Palace - Waterfall Room": Rupees (20)
"Swamp Palace - Boss": Boss Heart Container
"Swamp Palace - Prize": Crystal 2
"Skull Woods - Map Chest": Map (Skull Woods)
"Skull Woods - Big Chest": Fire Rod
"Skull Woods - Pinball Room": Small Key (Skull Woods)
"Skull Woods - Pot Prison": Small Key (Skull Woods)
"Skull Woods - Compass Chest": Compass (Skull Woods)
"Skull Woods - Big Key Chest": Big Key (Skull Woods)
"Skull Woods - Bridge Room": Small Key (Skull Woods)
"Skull Woods - Boss": Boss Heart Container
"Skull Woods - Prize": Crystal 3
"Thieves' Town - Map Chest": Map (Thieves Town)
"Thieves' Town - Ambush Chest": Rupees (20)
"Thieves' Town - Compass Chest": Compass (Thieves Town)
"Thieves' Town - Big Key Chest": Big Key (Thieves Town)
"Thieves' Town - Attic": Bombs (3)
"Thieves' Town - Blind's Cell": Small Key (Thieves Town)
"Thieves' Town - Big Chest": Titans Mitts
"Thieves' Town - Boss": Boss Heart Container
"Thieves' Town - Prize": Crystal 4
"Ice Palace - Compass Chest": Compass (Ice Palace)
"Ice Palace - Big Key Chest": Big Key (Ice Palace)
"Ice Palace - Spike Room": Small Key (Ice Palace)
"Ice Palace - Map Chest": Map (Ice Palace)
"Ice Palace - Freezor Chest": Bombs (3)
"Ice Palace - Iced T Room": Small Key (Ice Palace)
"Ice Palace - Big Chest": Blue Mail
"Ice Palace - Boss": Boss Heart Container
"Ice Palace - Prize": Crystal 5
"Misery Mire - Main Lobby": Small Key (Misery Mire)
"Misery Mire - Big Chest": Cane of Somaria
"Misery Mire - Map Chest": Map (Misery Mire)
"Misery Mire - Spike Chest": Small Key (Misery Mire)
"Misery Mire - Bridge Chest": Small Key (Misery Mire)
"Misery Mire - Compass Chest": Compass (Misery Mire)
"Misery Mire - Big Key Chest": Big Key (Misery Mire)
"Misery Mire - Boss": Boss Heart Container
"Misery Mire - Prize": Crystal 6
"Turtle Rock - Compass Chest": Compass (Turtle Rock)
"Turtle Rock - Roller Room - Left": Map (Turtle Rock)
"Turtle Rock - Roller Room - Right": Small Key (Turtle Rock)
"Turtle Rock - Chain Chomps": Small Key (Turtle Rock)
"Turtle Rock - Big Key Chest": Big Key (Turtle Rock)
"Turtle Rock - Big Chest": Mirror Shield
"Turtle Rock - Crystaroller Room": Small Key (Turtle Rock)
"Turtle Rock - Eye Bridge - Bottom Left": Small Key (Turtle Rock)
"Turtle Rock - Eye Bridge - Bottom Right": Rupees (20)
"Turtle Rock - Eye Bridge - Top Left": Rupees (5)
"Turtle Rock - Eye Bridge - Top Right": Rupee (1)
"Turtle Rock - Boss": Boss Heart Container
"Turtle Rock - Prize": Crystal 7
"Ganons Tower - Bob's Torch": Small Key (Ganons Tower)
"Ganons Tower - Hope Room - Left": Arrows (10)
"Ganons Tower - Hope Room - Right": Bombs (3)
"Ganons Tower - Big Chest": Red Mail
"Ganons Tower - Bob's Chest": Arrows (10)
"Ganons Tower - Tile Room": Small Key (Ganons Tower)
"Ganons Tower - Compass Room - Top Left": Compass (Ganons Tower)
"Ganons Tower - Compass Room - Top Right": Rupee (1)
"Ganons Tower - Compass Room - Bottom Left": Rupees (20)
"Ganons Tower - Compass Room - Bottom Right": Arrows (10)
"Ganons Tower - Map Chest": Map (Ganons Tower)
"Ganons Tower - Firesnake Room": Small Key (Ganons Tower)
"Ganons Tower - DMs Room - Top Left": Bombs (3)
"Ganons Tower - DMs Room - Top Right": Arrows (10)
"Ganons Tower - DMs Room - Bottom Left": Rupees (20)
"Ganons Tower - DMs Room - Bottom Right": Rupees (20)
"Ganons Tower - Randomizer Room - Top Left": Arrows (10)
"Ganons Tower - Randomizer Room - Top Right": Arrows (10)
"Ganons Tower - Randomizer Room - Bottom Left": Bombs (3)
"Ganons Tower - Randomizer Room - Bottom Right": Bombs (3)
"Ganons Tower - Big Key Room - Left": Arrows (10)
"Ganons Tower - Big Key Room - Right": Bombs (3)
"Ganons Tower - Big Key Chest": Big Key (Ganons Tower)
"Ganons Tower - Mini Helmasaur Room - Left": Bombs (3)
"Ganons Tower - Mini Helmasaur Room - Right": Bombs (3)
"Ganons Tower - Pre-Moldorm Chest": Small Key (Ganons Tower)
"Ganons Tower - Validation Chest": Rupees (20)
drops:
1:
Pack 1: ["Small Heart", "Small Heart", "Small Heart", "Small Heart", "Rupee (1)", "Small Heart", "Small Heart", "Rupee (1)"]
Pack 2: ["Rupees (5)", "Rupee (1)", "Rupees (5)", "Rupees (20)", "Rupees (5)", "Rupee (1)", "Rupees (5)", "Rupees (5)"]
Pack 3: ["Big Magic", "Small Magic", "Small Magic", "Rupees (5)", "Big Magic", "Small Magic", "Small Heart", "Small Magic"]
Pack 4: ["Single Bomb", "Single Bomb", "Single Bomb", "Bombs (4)", "Single Bomb", "Single Bomb", "Bombs (8)", "Single Bomb"]
Pack 5: ["Arrows (5)", "Small Heart", "Arrows (5)", "Arrows (10)", "Arrows (5)", "Small Heart", "Arrows (5)", "Arrows (10)"]
Pack 6: ["Small Magic", "Rupee (1)", "Small Heart", "Arrows (5)", "Small Magic", "Single Bomb", "Rupee (1)", "Small Heart"]
Pack 7: ["Small Heart", "Fairy", "Big Magic", "Rupees (20)", "Bombs (8)", "Small Heart", "Rupees (20)", "Arrows (10)"]
Tree Pull Tier 1: "Rupee (1)"
Tree Pull Tier 2: "Rupees (5)"
Tree Pull Tier 3: "Rupees (20)"
Crab Normal: "Rupee (1)"
Crab Special: "Rupees (20)"
Stun Prize: "Rupee (1)"
Fish: "Rupees (20)"
medallions:
1:
"Misery Mire": Ether
"Turtle Rock": Quake
+265
View File
@@ -0,0 +1,265 @@
item_pool_adjust:
1:
"Bottle (Random)": -4
"Bottle": 4
"Fighter Sword": -1
"Blue Shield": -1
"Sword and Shield": 1
"Bombs (10)": -1
"Bombs (3)": 1
"Arrows (10)": -1
"Rupees (20)": -8
"Small Key (Universal)": 5
placements:
1:
"Master Sword Pedestal": Master Sword
"Mushroom": Mushroom
"Ether Tablet": Ether
"Spectacle Rock": Piece of Heart
"Old Man": Magic Mirror
"Floating Island": Piece of Heart
"King Zora": Flippers
"Zora's Ledge": Piece of Heart
"Bottle Merchant": Bottle
"Maze Race": Piece of Heart
"Flute Spot": Ocarina
"Hobo": Bottle
"Desert Ledge": Piece of Heart
"Bombos Tablet": Bombos
"Lake Hylia Island": Piece of Heart
"Purple Chest": Bottle
"Sunken Treasure": Piece of Heart
"Bumper Cave Ledge": Piece of Heart
"Catfish": Quake
"Pyramid": Piece of Heart
"Digging Game": Piece of Heart
"Stumpy": Shovel
"Lost Woods Hideout": Piece of Heart
"Lumberjack Tree": Piece of Heart
"Spectacle Rock Cave": Piece of Heart
"Spiral Cave": Rupees (50)
"Mimic Cave": Piece of Heart
"Paradox Cave Lower - Far Left": Rupees (20)
"Paradox Cave Lower - Left": Rupees (20)
"Paradox Cave Lower - Right": Rupees (20)
"Paradox Cave Lower - Far Right": Rupees (20)
"Paradox Cave Lower - Middle": Rupees (20)
"Paradox Cave Upper - Left": Bombs (3)
"Paradox Cave Upper - Right": Arrows (10)
"Waterfall Fairy - Left": Red Boomerang
"Waterfall Fairy - Right": Red Shield
"Bonk Rock Cave": Piece of Heart
"Graveyard Cave": Piece of Heart
"King's Tomb": Cape
"Potion Shop": Magic Powder
"Kakariko Well - Left": Rupees (20)
"Kakariko Well - Middle": Rupees (20)
"Kakariko Well - Right": Rupees (20)
"Kakariko Well - Bottom": Bombs (3)
"Kakariko Well - Top": Piece of Heart
"Blind's Hideout - Left": Rupees (20)
"Blind's Hideout - Right": Rupees (20)
"Blind's Hideout - Far Left": Rupees (20)
"Blind's Hideout - Far Right": Rupees (20)
"Blind's Hideout - Top": Piece of Heart
"Chicken House": Arrows (10) # Blue Boomerang that turns into 10 arrows
"Sick Kid": Bug Catching Net
"Kakariko Tavern": Bottle
"Link's Uncle": Sword and Shield
"Secret Passage": Rupees (5) # Lamp that turns into blue rupee
"Sahasrahla's Hut - Left": Rupees (50)
"Sahasrahla's Hut - Middle": Bombs (3)
"Sahasrahla's Hut - Right": Rupees (50)
"Sahasrahla": Pegasus Boots
"Blacksmith": Tempered Sword
"Magic Bat": Magic Upgrade (1/2)
"Library": Book of Mudora
"Link's House": Rupees (5) # Lamp that turns into blue rupee
"Checkerboard Cave": Piece of Heart
"Aginah's Cave": Piece of Heart
"Cave 45": Piece of Heart
"Mini Moldorm Cave - Far Left": Bombs (3)
"Mini Moldorm Cave - Left": Rupees (20)
"Mini Moldorm Cave - Right": Rupees (20)
"Mini Moldorm Cave - Far Right": Arrows (10)
"Mini Moldorm Cave - Generous Guy": Rupees (300)
"Ice Rod Cave": Ice Rod
"Floodgate Chest": Bombs (3)
"Spike Cave": Cane of Byrna
"Hookshot Cave - Bottom Right": Rupees (50)
"Hookshot Cave - Top Right": Rupees (50)
"Hookshot Cave - Top Left": Rupees (50)
"Hookshot Cave - Bottom Left": Rupees (50)
"Superbunny Cave - Top": Bombs (3)
"Superbunny Cave - Bottom": Rupees (20)
"Chest Game": Piece of Heart
"C-Shaped House": Rupees (300)
"Brewery": Rupees (300) # Red Boomerang that turns into 300 rupees
"Pyramid Fairy - Left": Golden Sword
"Pyramid Fairy - Right": Silver Arrows
"Peg Cave": Piece of Heart
"Mire Shed - Left": Piece of Heart
"Mire Shed - Right": Rupees (20)
"Hype Cave - Top": Rupees (20)
"Hype Cave - Middle Right": Rupees (20)
"Hype Cave - Middle Left": Rupees (20)
"Hype Cave - Bottom": Rupees (20)
"Hype Cave - Generous Guy": Rupees (300)
"Hyrule Castle - Map Chest": Map (Escape)
"Hyrule Castle - Boomerang Chest": Blue Boomerang
"Hyrule Castle - Zelda's Chest": Lamp
"Sewers - Dark Cross": Small Key (Universal)
"Sewers - Secret Room - Left": Bombs (3)
"Sewers - Secret Room - Middle": Rupees (300)
"Sewers - Secret Room - Right": Arrows (10)
"Sanctuary": Sanctuary Heart Container
"Eastern Palace - Cannonball Chest": Rupees (100)
"Eastern Palace - Map Chest": Map (Eastern Palace)
"Eastern Palace - Compass Chest": Compass (Eastern Palace)
"Eastern Palace - Big Chest": Bow
"Eastern Palace - Big Key Chest": Big Key (Eastern Palace)
"Eastern Palace - Boss": Boss Heart Container
"Eastern Palace - Prize": Green Pendant
"Desert Palace - Compass Chest": Compass (Desert Palace)
"Desert Palace - Big Key Chest": Big Key (Desert Palace)
"Desert Palace - Map Chest": Map (Desert Palace)
"Desert Palace - Torch": Small Key (Universal)
"Desert Palace - Big Chest": Power Glove
"Desert Palace - Boss": Boss Heart Container
"Desert Palace - Prize": Blue Pendant
"Tower of Hera - Map Chest": Map (Tower of Hera)
"Tower of Hera - Basement Cage": Small Key (Universal)
"Tower of Hera - Big Key Chest": Big Key (Tower of Hera)
"Tower of Hera - Compass Chest": Compass (Tower of Hera)
"Tower of Hera - Big Chest": Moon Pearl
"Tower of Hera - Boss": Boss Heart Container
"Tower of Hera - Prize": Red Pendant
"Castle Tower - Room 03": Small Key (Universal)
"Castle Tower - Dark Maze": Small Key (Universal)
"Palace of Darkness - Shooter Room": Small Key (Universal)
"Palace of Darkness - The Arena - Bridge": Small Key (Universal)
"Palace of Darkness - The Arena - Ledge": Small Key (Universal)
"Palace of Darkness - Map Chest": Map (Palace of Darkness)
"Palace of Darkness - Stalfos Basement": Small Key (Universal)
"Palace of Darkness - Big Key Chest": Big Key (Palace of Darkness)
"Palace of Darkness - Dark Maze - Top": Bombs (3)
"Palace of Darkness - Dark Maze - Bottom": Small Key (Universal)
"Palace of Darkness - Big Chest": Hammer
"Palace of Darkness - Compass Chest": Compass (Palace of Darkness)
"Palace of Darkness - Dark Basement - Left": Single Arrow
"Palace of Darkness - Dark Basement - Right": Small Key (Universal)
"Palace of Darkness - Harmless Hellway": Rupees (5)
"Palace of Darkness - Boss": Boss Heart Container
"Palace of Darkness - Prize": Crystal 1
"Swamp Palace - Entrance": Small Key (Universal)
"Swamp Palace - Map Chest": Map (Swamp Palace)
"Swamp Palace - Big Chest": Hookshot
"Swamp Palace - Compass Chest": Compass (Swamp Palace)
"Swamp Palace - Big Key Chest": Big Key (Swamp Palace)
"Swamp Palace - West Chest": Rupees (20)
"Swamp Palace - Flooded Room - Left": Rupees (20)
"Swamp Palace - Flooded Room - Right": Rupees (20)
"Swamp Palace - Waterfall Room": Rupees (20)
"Swamp Palace - Boss": Boss Heart Container
"Swamp Palace - Prize": Crystal 2
"Skull Woods - Map Chest": Map (Skull Woods)
"Skull Woods - Big Chest": Fire Rod
"Skull Woods - Pinball Room": Small Key (Universal)
"Skull Woods - Pot Prison": Small Key (Universal)
"Skull Woods - Compass Chest": Compass (Skull Woods)
"Skull Woods - Big Key Chest": Big Key (Skull Woods)
"Skull Woods - Bridge Room": Small Key (Universal)
"Skull Woods - Boss": Boss Heart Container
"Skull Woods - Prize": Crystal 3
"Thieves' Town - Map Chest": Map (Thieves Town)
"Thieves' Town - Ambush Chest": Rupees (20)
"Thieves' Town - Compass Chest": Compass (Thieves Town)
"Thieves' Town - Big Key Chest": Big Key (Thieves Town)
"Thieves' Town - Attic": Bombs (3)
"Thieves' Town - Blind's Cell": Small Key (Universal)
"Thieves' Town - Big Chest": Titans Mitts
"Thieves' Town - Boss": Boss Heart Container
"Thieves' Town - Prize": Crystal 4
"Ice Palace - Compass Chest": Compass (Ice Palace)
"Ice Palace - Big Key Chest": Big Key (Ice Palace)
"Ice Palace - Spike Room": Small Key (Universal)
"Ice Palace - Map Chest": Map (Ice Palace)
"Ice Palace - Freezor Chest": Bombs (3)
"Ice Palace - Iced T Room": Small Key (Universal)
"Ice Palace - Big Chest": Blue Mail
"Ice Palace - Boss": Boss Heart Container
"Ice Palace - Prize": Crystal 5
"Misery Mire - Main Lobby": Small Key (Universal)
"Misery Mire - Big Chest": Cane of Somaria
"Misery Mire - Map Chest": Map (Misery Mire)
"Misery Mire - Spike Chest": Small Key (Universal)
"Misery Mire - Bridge Chest": Small Key (Universal)
"Misery Mire - Compass Chest": Compass (Misery Mire)
"Misery Mire - Big Key Chest": Big Key (Misery Mire)
"Misery Mire - Boss": Boss Heart Container
"Misery Mire - Prize": Crystal 6
"Turtle Rock - Compass Chest": Compass (Turtle Rock)
"Turtle Rock - Roller Room - Left": Map (Turtle Rock)
"Turtle Rock - Roller Room - Right": Small Key (Universal)
"Turtle Rock - Chain Chomps": Small Key (Universal)
"Turtle Rock - Big Key Chest": Big Key (Turtle Rock)
"Turtle Rock - Big Chest": Mirror Shield
"Turtle Rock - Crystaroller Room": Small Key (Universal)
"Turtle Rock - Eye Bridge - Bottom Left": Small Key (Universal)
"Turtle Rock - Eye Bridge - Bottom Right": Rupees (20)
"Turtle Rock - Eye Bridge - Top Left": Rupees (5)
"Turtle Rock - Eye Bridge - Top Right": Rupee (1)
"Turtle Rock - Boss": Boss Heart Container
"Turtle Rock - Prize": Crystal 7
"Ganons Tower - Bob's Torch": Small Key (Universal)
"Ganons Tower - Hope Room - Left": Arrows (10)
"Ganons Tower - Hope Room - Right": Bombs (3)
"Ganons Tower - Big Chest": Red Mail
"Ganons Tower - Bob's Chest": Arrows (10)
"Ganons Tower - Tile Room": Small Key (Universal)
"Ganons Tower - Compass Room - Top Left": Compass (Ganons Tower)
"Ganons Tower - Compass Room - Top Right": Rupee (1)
"Ganons Tower - Compass Room - Bottom Left": Rupees (20)
"Ganons Tower - Compass Room - Bottom Right": Arrows (10)
"Ganons Tower - Map Chest": Map (Ganons Tower)
"Ganons Tower - Firesnake Room": Small Key (Universal)
"Ganons Tower - DMs Room - Top Left": Bombs (3)
"Ganons Tower - DMs Room - Top Right": Arrows (10)
"Ganons Tower - DMs Room - Bottom Left": Rupees (20)
"Ganons Tower - DMs Room - Bottom Right": Rupees (20)
"Ganons Tower - Randomizer Room - Top Left": Arrows (10)
"Ganons Tower - Randomizer Room - Top Right": Arrows (10)
"Ganons Tower - Randomizer Room - Bottom Left": Bombs (3)
"Ganons Tower - Randomizer Room - Bottom Right": Bombs (3)
"Ganons Tower - Big Key Room - Left": Arrows (10)
"Ganons Tower - Big Key Room - Right": Bombs (3)
"Ganons Tower - Big Key Chest": Big Key (Ganons Tower)
"Ganons Tower - Mini Helmasaur Room - Left": Bombs (3)
"Ganons Tower - Mini Helmasaur Room - Right": Bombs (3)
"Ganons Tower - Pre-Moldorm Chest": Small Key (Universal)
"Ganons Tower - Validation Chest": Rupees (20)
drops:
1:
Pack 1: ["Small Heart", "Small Heart", "Small Heart", "Small Heart", "Rupee (1)", "Small Heart", "Small Heart", "Rupee (1)"]
Pack 2: ["Rupees (5)", "Rupee (1)", "Rupees (5)", "Rupees (20)", "Rupees (5)", "Rupee (1)", "Rupees (5)", "Rupees (5)"]
Pack 3: ["Big Magic", "Small Magic", "Small Magic", "Rupees (5)", "Big Magic", "Small Magic", "Small Heart", "Small Magic"]
Pack 4: ["Single Bomb", "Single Bomb", "Single Bomb", "Bombs (4)", "Single Bomb", "Single Bomb", "Bombs (8)", "Single Bomb"]
Pack 5: ["Arrows (5)", "Small Heart", "Arrows (5)", "Arrows (10)", "Arrows (5)", "Small Heart", "Arrows (5)", "Arrows (10)"]
Pack 6: ["Small Magic", "Rupee (1)", "Small Heart", "Arrows (5)", "Small Magic", "Single Bomb", "Rupee (1)", "Small Heart"]
Pack 7: ["Small Heart", "Fairy", "Big Magic", "Rupees (20)", "Bombs (8)", "Small Heart", "Rupees (20)", "Arrows (10)"]
Tree Pull Tier 1: "Rupee (1)"
Tree Pull Tier 2: "Rupees (5)"
Tree Pull Tier 3: "Rupees (20)"
Crab Normal: "Rupee (1)"
Crab Special: "Rupees (20)"
Stun Prize: "Rupee (1)"
Fish: "Rupees (20)"
medallions:
1:
"Misery Mire": Ether
"Turtle Rock": Quake