Skip to content

Commit

Permalink
New Game: Zillion (#1081)
Browse files Browse the repository at this point in the history
* Option RangeWithSpecialMax

* amendment to typing in web options

* compare string with number

* lots of work on zillion

* fix zillion fill logic

* fix a few more issues in zillion fill logic

* can make zillion patch and use it

* put multi items in zillion rom

* work on ZillionClient

* logging and auth in client

* work on sending and receiving items

* implement item_handling flag

* fix locations ids to NuktiServer package

* use rewrite of zri

* cache logic rule data for performance

* use new id maps

* fix some problems with the big recent merge

* ZillionClient: use new context manager for Memory class

* fix ItemClassification for Zillion items
and some debug statements for asserts,
documentation on running scripts for manual testing
type correction in CommonContext

* fix some issues in client, start on docs, put rescue and item ram addresses in slot data

* use new location name system
fix item locations getting out of sync in progression balancing

* zillion client can read slot name from game

* zillion: new item names

* remove extra unneeded import

* newer options (room gen and starting cards)

* update comment in zillion patch

* zillion non static regions

* change some logging, update some comments

* allow ZillionClient to exit in certain situations

* todo note to fix options doc strings

* don't force auto forfeit

* rework validation of floppy requirement and item counts
and fix race condition in generate_output

* reorganize Zillion component structure
with System class

* documentation updates for Zillion

* attempt inno_setup.iss

* remove todo comment for something done

* update comment

* rework item count zillion options
and some small cleanups

* fix location check count

* data package version 1

* Zillion can pass unit tests without rom

* fix freeze if closing ZillionClient while it's waiting for server login

* specify commit hash for zilliandomizer package

* some changes to options validation

* Zillion doors saved on multiworld server

* add missing function in inno_setup
and name of vanilla continues in options

* rework zillion sync task and context

* Apply documentation suggestions from SoldierofOrder

Co-authored-by: SoldierofOrder <[email protected]>

* update zillion package

* workaround for asyncio udp bug

There is a bug in Python in Windows
python/cpython#91227
that makes it so if I look for RetroArch before it's ready, it breaks the asyncio udp transport system.

As a workaround, we don't look for RetroArch until the user asks for it with /sms

* a few of the smaller suggestions from review

* logic only looks at my locations
instead of all the multiworld locations

* some adjustments from pull request discussion
and some unit tests

* patch webhost changes from pull request discussion

* zillion logic tests

* better vblr test

* test interaction of character rescue items with logic

* move unit tests to new worlds folder

* comment improvements

* fix minor logic issue
and add memory read timeout

* capitalization in option display names
Opa-Opa is a proper noun

* redirect zz stdout to debug

* fix option validation bug making unbeatable seeds

* remove line that does nothing

* attach logic cache to world

Co-authored-by: SoldierofOrder <[email protected]>
Co-authored-by: Doug Hoskisson <[email protected]>
  • Loading branch information
3 people authored Oct 20, 2022
1 parent ed76c13 commit 265ee70
Show file tree
Hide file tree
Showing 27 changed files with 1,871 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*.z64
*.n64
*.nes
*.sms
*.gb
*.gbc
*.gba
Expand Down
7 changes: 6 additions & 1 deletion CommonClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ class CommonContext:
hint_cost: typing.Optional[int]
player_names: typing.Dict[int, str]

finished_game: bool
ready: bool
auth: typing.Optional[str]
seed_name: typing.Optional[str]

# locations
locations_checked: typing.Set[int] # local state
locations_scouted: typing.Set[int]
Expand Down Expand Up @@ -288,7 +293,7 @@ async def console_input(self) -> str:
self.input_requests += 1
return await self.input_queue.get()

async def connect(self, address=None):
async def connect(self, address: typing.Optional[str] = None) -> None:
await self.disconnect()
self.server_task = asyncio.create_task(server_loop(self, address), name="server loop")

Expand Down
3 changes: 3 additions & 0 deletions Launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ def handles_file(self, path: str):
Component('ChecksFinder Client', 'ChecksFinderClient'),
# Starcraft 2
Component('Starcraft 2 Client', 'Starcraft2Client'),
# Zillion
Component('Zillion Client', 'ZillionClient',
file_identifier=SuffixIdentifier('.apzl')),
# Functions
Component('Open host.yaml', func=open_host_yaml),
Component('Open Patch', func=open_patch),
Expand Down
7 changes: 7 additions & 0 deletions ModuleUpdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ def update(yes=False, force=False):
wheel = line.split('/')[-1]
name, version, _ = wheel.split('-', 2)
line = f'{name}=={version}'
elif line.startswith('git+https://'):
# extract name and version
end = line.split('/')[-1]
name_hash, egg = end.split("#", 1)
name, _ = name_hash.split("@", 1)
version = egg.split('==')[-1]
line = f'{name}=={version}'
requirements = pkg_resources.parse_requirements(line)
for requirement in requirements:
requirement = str(requirement)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Currently, the following games are supported:
* Pokémon Red and Blue
* Hylics 2
* Overcooked! 2
* Zillion

For setup and instructions check out our [tutorials page](https://archipelago.gg/tutorial/).
Downloads can be found at [Releases](https://github.com/ArchipelagoMW/Archipelago/releases), including compiled
Expand Down
6 changes: 6 additions & 0 deletions Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,12 @@ def get_default_options() -> OptionsType:
"sni": "SNI",
"rom_start": True,
},
"zillion_options": {
"rom_file": "Zillion (UE) [!].sms",
# RetroArch doesn't make it easy to launch a game from the command line.
# You have to know the path to the emulator core library on the user's computer.
"rom_start": "retroarch",
},
"pokemon_rb_options": {
"red_rom_file": "Pokemon Red (UE) [S][!].gb",
"blue_rom_file": "Pokemon Blue (UE) [S][!].gb",
Expand Down
2 changes: 2 additions & 0 deletions WebHostLib/downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def download_slot_file(room_id, player_id: int):
fname = f"AP_{app.jinja_env.filters['suuid'](room_id)}_P{slot_data.player_id}_{slot_data.player_name}.apz5"
elif slot_data.game == "VVVVVV":
fname = f"AP_{app.jinja_env.filters['suuid'](room_id)}_SP.apv6"
elif slot_data.game == "Zillion":
fname = f"AP_{app.jinja_env.filters['suuid'](room_id)}_SP.apzl"
elif slot_data.game == "Super Mario 64":
fname = f"AP_{app.jinja_env.filters['suuid'](room_id)}_SP.apsm64ex"
elif slot_data.game == "Dark Souls III":
Expand Down
Loading

0 comments on commit 265ee70

Please sign in to comment.