Skip to content

Commit 2af08c7

Browse files
AlchavFlySniper
authored andcommitted
Pokémon Red and Blue: Version 4 update (ArchipelagoMW#1963)
## What is this fixing or adding? Adds a large number of new options, including: - Door Shuffle - Sphere-based level scaling - Key Item and Pokedex requirement options to reach the Elite Four - Split Card Key option - Dexsanity option can be set to a percentage of Pokémon that will be checks - Stonesanity: remove the stones from the Celadon Department Store and shuffle them into the item pool, replacing 4 of the 5 Moon Stone items - Sleep Trap items option - Randomize Move Types option - Town Map Fly Location option, to unlock a flight location when finding/receiving the Town Map Many enhancements have been made, including: - Game allows you to continue your save file _from Pallet Town_ as a way to save warp back to the beginning of the game. The one-way drop from Diglett's Cave to north Route 2 that had been added to the randomizer has been removed. - Client auto-hints some locations when you are able to see the item before you can obtain it (but would only show AP Item if it is for another player), including Bike Shop, Oak's Aides, Celadon Prize Corner, and the unchosen Fossil location. Various bugs have been fixed, including: - Route 13 wild Pokémon not correctly logically requiring Cut - Vanilla tm/hm compatibility options giving compatibility for many TMs/HMs erroneously - If an item that exists in multiple quantities in the item pool is chosen for one of the locations that are pre-filled with local items, it will continue placing that same item in the remaining locations as long as more of that item exist - `start_with` option for `randomize_pokedex` still shuffling a Pokédex into the item pool - The obedience threshold levels being incorrect with 0-2 badges, with Pokémon up to level 30 obeying with 0-1 badges and up to 10 with 2 badges - Receiving a DeathLink trigger in the Safari Zone causing issues. Now, you will have your steps remaining set to 0 instead of blacking out when you're in the Safari Zone. Many location names have been changed, as location names are automatically prepended using the Region name and a large number of areas have been split into new regions as part of the overhaul to add Door Shuffle.
1 parent ce617db commit 2af08c7

20 files changed

+8125
-3630
lines changed

PokemonClient.py

+29
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
location_map[type(location.ram_address).__name__][location.ram_address.flag] = location.address
3030
location_bytes_bits[location.address] = {'byte': location.ram_address.byte, 'bit': location.ram_address.bit}
3131

32+
location_name_to_id = {location.name: location.address for location in location_data if location.type == "Item"
33+
and location.address is not None}
34+
3235
SYSTEM_MESSAGE_ID = 0
3336

3437
CONNECTION_TIMING_OUT_STATUS = "Connection timing out. Please restart your emulator, then restart pkmn_rb.lua"
@@ -72,6 +75,7 @@ def __init__(self, server_address, password):
7275
self.items_handling = 0b001
7376
self.sent_release = False
7477
self.sent_collect = False
78+
self.auto_hints = set()
7579

7680
async def server_auth(self, password_requested: bool = False):
7781
if password_requested and not self.password:
@@ -153,6 +157,31 @@ async def parse_locations(data: List, ctx: GBContext):
153157
locations.append(loc_id)
154158
elif flags[flag_type][location_bytes_bits[loc_id]['byte']] & 1 << location_bytes_bits[loc_id]['bit']:
155159
locations.append(loc_id)
160+
161+
hints = []
162+
if flags["EventFlag"][280] & 16:
163+
hints.append("Cerulean Bicycle Shop")
164+
if flags["EventFlag"][280] & 32:
165+
hints.append("Route 2 Gate - Oak's Aide")
166+
if flags["EventFlag"][280] & 64:
167+
hints.append("Route 11 Gate 2F - Oak's Aide")
168+
if flags["EventFlag"][280] & 128:
169+
hints.append("Route 15 Gate 2F - Oak's Aide")
170+
if flags["EventFlag"][281] & 1:
171+
hints += ["Celadon Prize Corner - Item Prize 1", "Celadon Prize Corner - Item Prize 2",
172+
"Celadon Prize Corner - Item Prize 3"]
173+
if (location_name_to_id["Fossil - Choice A"] in ctx.checked_locations and location_name_to_id["Fossil - Choice B"]
174+
not in ctx.checked_locations):
175+
hints.append("Fossil - Choice B")
176+
elif (location_name_to_id["Fossil - Choice B"] in ctx.checked_locations and location_name_to_id["Fossil - Choice A"]
177+
not in ctx.checked_locations):
178+
hints.append("Fossil - Choice A")
179+
hints = [location_name_to_id[loc] for loc in hints if loc not in ctx.auto_hints and location_name_to_id[loc] in
180+
ctx.missing_locations and location_name_to_id[loc] not in ctx.locations_checked]
181+
if hints:
182+
await ctx.send_msgs([{"cmd": "LocationScouts", "locations": hints, "create_as_hint": 2}])
183+
ctx.auto_hints.update(hints)
184+
156185
if flags["EventFlag"][280] & 1 and not ctx.finished_game:
157186
await ctx.send_msgs([
158187
{"cmd": "StatusUpdate",

setup.py

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
"Meritous",
7878
"Ocarina of Time",
7979
"Overcooked! 2",
80-
"Pokemon Red and Blue",
8180
"Raft",
8281
"Secret of Evermore",
8382
"Slay the Spire",

worlds/pokemon_rb/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Alex "Alchav" Avery
3+
Copyright (c) 2022-2023 Alex "Alchav" Avery
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

worlds/pokemon_rb/__init__.py

+405-178
Large diffs are not rendered by default.
6.53 KB
Binary file not shown.
6.5 KB
Binary file not shown.

worlds/pokemon_rb/docs/en_Pokemon Red and Blue.md

+34-10
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,59 @@ Items which the player would normally acquire throughout the game have been move
1111
always able to be completed, but because of the item shuffle the player may need to access certain areas before they
1212
would in the vanilla game.
1313

14-
A great many things besides item placement can be randomized, such as the location of Pokémon, their stats, types, etc., depending on your yaml settings.
14+
A great many things besides item placement can be randomized, such as the location of Pokémon, their stats, types, etc.,
15+
depending on your yaml settings.
1516

1617
Many baseline changes are made to the game, including:
1718

18-
* Bag item space increased to 128 slots (up from 20)
19-
* PC item storage increased to 64 slots (up from 50)
19+
* Bag item space increased to 128 slots (up from 20).
20+
* PC item storage increased to 64 slots (up from 50).
2021
* You can hold B to run (or bike extra fast!).
2122
* You can hold select while talking to a trainer to re-battle them.
22-
* You can return to route 2 from Diglett's Cave without the use of Cut.
23+
* You can select "Pallet Warp" below the "Continue" option to warp to Pallet Towna s you load your save.
2324
* Mew can be encountered at the S.S. Anne dock truck. This can be randomized depending on your settings.
2425
* The S.S. Anne will never depart.
2526
* Seafoam Islands entrances are swapped. This means you need Strength to travel through from Cinnabar Island to Fuchsia
26-
City
27+
City. You also cannot Surf onto the water from the end of Seafoam Islands going backwards if you have not yet dropped
28+
the boulders.
2729
* After obtaining one of the fossil item checks in Mt Moon, the remaining item can be received from the Cinnabar Lab
2830
fossil scientist. This may require reviving a number of fossils, depending on your settings.
2931
* Obedience depends on the total number of badges you have obtained instead of depending on specific badges.
3032
* Pokémon that evolve by trading can also evolve by reaching level 35.
31-
* Evolution stones are reusable.
33+
* Evolution stones are reusable key items.
3234
* Much of the dialogue throughout the game has been removed or shortened.
33-
* If the Old Man is blocking your way through Viridian City, you do not have Oak's Parcel in your inventory, and you've
34-
exhausted your money and Poké Balls, you can get a free Poké Ball from your mom.
35+
* The Pokédex shows which HMs can be learned by any Pokémon registered as seen.
3536
* HM moves can be overwritten if you have the HM for it in your bag.
3637
* The NPC on the left behind the Celadon Game Corner counter will sell 1500 coins at once instead of giving information
37-
about the Prize Corner
38+
about the Prize Corner.
39+
* A woman in Oak's Lab can send you back in time to replay the first rival battle, in case you have no other reachable
40+
and repeatable source of money.
41+
* You can disable and re-enable experience gains by talking to an aide in Oak's Lab.
42+
* You can reset static encounters (Poké Flute encounter, legendaries, and the trap Poké Ball battles in Power Plant)
43+
for any Pokémon you have defeated but not caught, by talking to an aide in Oak's Lab.
3844

3945
## What items and locations get shuffled?
4046

4147
All items that go into your bags given by NPCs or found on the ground, as well as gym badges.
42-
Optionally, hidden items (those located with the Item Finder) can be shuffled as well.
48+
Various options add more items / location checks to the pool, including:
49+
* Randomize Hidden Items.
50+
* Stonesanity: Replace 4 of the 5 Moon Stones in the item pool with the other 4 stones, and remove them from the
51+
Celadon Department Store shop. Will shuffle the hidden item locations that contain Moon Stones in the original game
52+
regardless of the Randomize Hidden Items option.
53+
* Prizesanity: Shuffle the three item prizes from the Celadon Prize Corner.
54+
* Tea: Adds a Tea item to the item pool which is required to pass the Saffron Gate guards instead of vending machine
55+
drinks. Adds a location check to the woman in Celadon Mansion 1F, where the Tea item is found in FireRed and LeafGreen.
56+
* Extra Key Items: Adds key items that will be required to access the Power Plant, Pokémon Mansion, Rocket Hideout,
57+
and Safari Zone. Adds 4 extra item locations to Rock Tunnel B1F
58+
* Split Card Key: Splits the Card Key into 10 different Card Keys, one for each floor of Silph Co that has locked doors.
59+
Adds 9 location checks to friendly NPCs in Silph Co. You can also choose Progressive Card Keys to always obtain the
60+
keys in order from Card Key 2F to Card Key 11F.
61+
* Trainersanity: Adds location checks to 317 trainers. Does not include scripted trainers, most of which disappear
62+
after battling them, but also includes Gym Leaders. You must talk to the trainer after defeating them to receive
63+
your prize. Adds 317 random filler items to the item pool
64+
* Dexsanity: Location checks occur when registering Pokémon as owned in the Pokédex. You can choose a percentage
65+
of Pokémon to have checks added to, chosen randomly. You can identify which Pokémon have location checks by an empty
66+
Poké Ball icon shown in battle or in the Pokédex menu.
4367

4468
## Which items can be in another player's world?
4569

0 commit comments

Comments
 (0)