mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-23 17:33:30 -07:00
Merge branch 'main' into player-tracker
This commit is contained in:
@@ -36,10 +36,7 @@ class ChecksFinderContext(CommonContext):
|
||||
async def server_auth(self, password_requested: bool = False):
|
||||
if password_requested and not self.password:
|
||||
await super(ChecksFinderContext, self).server_auth(password_requested)
|
||||
if not self.auth: # TODO: Replace this if block with await self.getusername() once that PR is merged in.
|
||||
logger.info('Enter slot name:')
|
||||
self.auth = await self.console_input()
|
||||
|
||||
await self.get_username()
|
||||
await self.send_connect()
|
||||
|
||||
async def connection_closed(self):
|
||||
|
||||
@@ -43,12 +43,14 @@ class ClientCommandProcessor(CommandProcessor):
|
||||
def _cmd_connect(self, address: str = "") -> bool:
|
||||
"""Connect to a MultiWorld Server"""
|
||||
self.ctx.server_address = None
|
||||
self.ctx.username = None
|
||||
asyncio.create_task(self.ctx.connect(address if address else None), name="connecting")
|
||||
return True
|
||||
|
||||
def _cmd_disconnect(self) -> bool:
|
||||
"""Disconnect from a MultiWorld Server"""
|
||||
self.ctx.server_address = None
|
||||
self.ctx.username = None
|
||||
asyncio.create_task(self.ctx.disconnect(), name="disconnecting")
|
||||
return True
|
||||
|
||||
@@ -161,6 +163,7 @@ class CommonContext:
|
||||
def __init__(self, server_address, password):
|
||||
# server state
|
||||
self.server_address = server_address
|
||||
self.username = None
|
||||
self.password = password
|
||||
self.hint_cost = None
|
||||
self.slot_info = {}
|
||||
@@ -253,6 +256,13 @@ class CommonContext:
|
||||
self.password = await self.console_input()
|
||||
return self.password
|
||||
|
||||
async def get_username(self):
|
||||
if not self.auth:
|
||||
self.auth = self.username
|
||||
if not self.auth:
|
||||
logger.info('Enter slot name:')
|
||||
self.auth = await self.console_input()
|
||||
|
||||
async def send_connect(self, **kwargs):
|
||||
payload = {
|
||||
'cmd': 'Connect',
|
||||
@@ -309,6 +319,7 @@ class CommonContext:
|
||||
|
||||
async def shutdown(self):
|
||||
self.server_address = ""
|
||||
self.username = None
|
||||
if self.server and not self.server.socket.closed:
|
||||
await self.server.socket.close()
|
||||
if self.server_task:
|
||||
@@ -469,12 +480,20 @@ async def server_loop(ctx: CommonContext, address=None):
|
||||
logger.info('Please connect to an Archipelago server.')
|
||||
return
|
||||
|
||||
address = f"ws://{address}" if "://" not in address else address
|
||||
port = urllib.parse.urlparse(address).port or 38281
|
||||
address = f"ws://{address}" if "://" not in address \
|
||||
else address.replace("archipelago://", "ws://")
|
||||
|
||||
server_url = urllib.parse.urlparse(address)
|
||||
if server_url.username:
|
||||
ctx.username = server_url.username
|
||||
if server_url.password:
|
||||
ctx.password = server_url.password
|
||||
port = server_url.port or 38281
|
||||
|
||||
logger.info(f'Connecting to Archipelago server at {address}')
|
||||
try:
|
||||
socket = await websockets.connect(address, port=port, ping_timeout=None, ping_interval=None)
|
||||
ctx.ui.update_address_bar(server_url.netloc)
|
||||
ctx.server = Endpoint(socket)
|
||||
logger.info('Connected')
|
||||
ctx.server_address = address
|
||||
@@ -585,6 +604,7 @@ async def process_server_cmd(ctx: CommonContext, args: dict):
|
||||
raise Exception('Connection refused by the multiworld host, no reason provided')
|
||||
|
||||
elif cmd == 'Connected':
|
||||
ctx.username = ctx.auth
|
||||
ctx.team = args["team"]
|
||||
ctx.slot = args["slot"]
|
||||
# int keys get lost in JSON transfer
|
||||
@@ -708,10 +728,7 @@ if __name__ == '__main__':
|
||||
async def server_auth(self, password_requested: bool = False):
|
||||
if password_requested and not self.password:
|
||||
await super(TextContext, self).server_auth(password_requested)
|
||||
if not self.auth:
|
||||
logger.info('Enter slot name:')
|
||||
self.auth = await self.console_input()
|
||||
|
||||
await self.get_username()
|
||||
await self.send_connect()
|
||||
|
||||
def on_package(self, cmd: str, args: dict):
|
||||
@@ -722,6 +739,7 @@ if __name__ == '__main__':
|
||||
async def main(args):
|
||||
ctx = TextContext(args.connect, args.password)
|
||||
ctx.auth = args.name
|
||||
ctx.server_address = args.connect
|
||||
ctx.server_task = asyncio.create_task(server_loop(ctx), name="server loop")
|
||||
|
||||
if gui_enabled:
|
||||
|
||||
@@ -95,10 +95,7 @@ class SC2Context(CommonContext):
|
||||
async def server_auth(self, password_requested: bool = False):
|
||||
if password_requested and not self.password:
|
||||
await super(SC2Context, self).server_auth(password_requested)
|
||||
if not self.auth:
|
||||
logger.info('Enter slot name:')
|
||||
self.auth = await self.console_input()
|
||||
|
||||
await self.get_username()
|
||||
await self.send_connect()
|
||||
|
||||
def on_package(self, cmd: str, args: dict):
|
||||
|
||||
11
kvui.py
11
kvui.py
@@ -334,8 +334,8 @@ class GameManager(App):
|
||||
# top part
|
||||
server_label = ServerLabel()
|
||||
self.connect_layout.add_widget(server_label)
|
||||
self.server_connect_bar = ConnectBarTextInput(text="archipelago.gg", size_hint_y=None, height=30, multiline=False,
|
||||
write_tab=False)
|
||||
self.server_connect_bar = ConnectBarTextInput(text=self.ctx.server_address or "archipelago.gg", size_hint_y=None,
|
||||
height=30, multiline=False, write_tab=False)
|
||||
self.server_connect_bar.bind(on_text_validate=self.connect_button_action)
|
||||
self.connect_layout.add_widget(self.server_connect_bar)
|
||||
self.server_connect_button = Button(text="Connect", size=(100, 30), size_hint_y=None, size_hint_x=None)
|
||||
@@ -412,6 +412,7 @@ class GameManager(App):
|
||||
def connect_button_action(self, button):
|
||||
if self.ctx.server:
|
||||
self.ctx.server_address = None
|
||||
self.ctx.username = None
|
||||
asyncio.create_task(self.ctx.disconnect())
|
||||
else:
|
||||
asyncio.create_task(self.ctx.connect(self.server_connect_bar.text.replace("/connect ", "")))
|
||||
@@ -445,6 +446,12 @@ class GameManager(App):
|
||||
self.log_panels["Archipelago"].on_message_markup(text)
|
||||
self.log_panels["All"].on_message_markup(text)
|
||||
|
||||
def update_address_bar(self, text: str):
|
||||
if hasattr(self, "server_connect_bar"):
|
||||
self.server_connect_bar.text = text
|
||||
else:
|
||||
logging.getLogger("Client").info("Could not update address bar as the GUI is not yet initialized.")
|
||||
|
||||
def enable_energy_link(self):
|
||||
if not hasattr(self, "energy_link_label"):
|
||||
self.energy_link_label = Label(text="Energy Link: Standby",
|
||||
|
||||
@@ -97,9 +97,9 @@ the lua you are using in your file explorer and copy the `socket.dll` to the bas
|
||||
3. Click on the Tools menu and click on **Lua Console**
|
||||
4. Click Script -> Open Script...
|
||||
5. Select the `Connector.lua` file you downloaded above
|
||||
- SuperNintendoClient users should download `sniConnector.lua` from the client download page
|
||||
- SNIClient users should look in their Archipelago folder for `/SNI/lua/x64` or `/SNI/lua/x86` depending on if the
|
||||
emulator is 64-bit or 32-bit.
|
||||
- Look in the Archipelago folder for `/SNI/lua/x64` or `/SNI/lua/x86` depending on if the
|
||||
emulator is 64-bit or 32-bit. Please note the most recent versions of BizHawk are 64-bit only.
|
||||
|
||||
|
||||
##### RetroArch 1.10.1 or newer
|
||||
|
||||
|
||||
@@ -88,8 +88,9 @@ Factorio product code. This will allow you to download the game directly from th
|
||||
|
||||
It is recommended to download the standalone version of Factorio for use as a dedicated server. Doing so prevents any
|
||||
potential conflicts with your currently-installed version of Factorio. Download the file by clicking on the button
|
||||
appropriate to your operating system, and extract the folder to a convenient location (we recommend `C:\Factorio` or
|
||||
similar).
|
||||
appropriate to your operating system, and extract the folder to a convenient location. The best place to do this for
|
||||
Archipelago is to place the extracted game folder into the `Archipelago` directory and rename it to just be "Factorio".
|
||||
|
||||
|
||||

|
||||
|
||||
@@ -99,12 +100,13 @@ have logged in, you may close the game.
|
||||
|
||||
#### Configure your Archipelago Installation
|
||||
|
||||
You must modify your `host.yaml` file inside your Archipelago installation directory so that it points to your
|
||||
standalone Factorio executable. Here is an example of the appropriate setup, note the double `\\` are required:
|
||||
If you did not place the Factorio standalone in your Archipelago installation, you must modify your `host.yaml` file
|
||||
inside your Archipelago installation directory so that it points to your standalone Factorio executable. Here is an
|
||||
example of the appropriate setup, note the double `\\` are required:
|
||||
|
||||
```yaml
|
||||
factorio_options:
|
||||
executable: C:\\factorio\\bin\\x64\\factorio"
|
||||
executable: C:\\path\\to\\factorio\\bin\\x64\\factorio"
|
||||
```
|
||||
|
||||
This allows you to host your own Factorio game.
|
||||
@@ -145,6 +147,13 @@ In case any problems should occur, the Archipelago Client will create a file `Fa
|
||||
contents of this file may help you troubleshoot an issue on your own and is vital for requesting help from other people
|
||||
in Archipelago.
|
||||
|
||||
## Commands in game
|
||||
|
||||
Once you have connected to the server successfully using the Archipelago Factorio Client you should see a message
|
||||
stating you can get help using Archipelago commands by typing `!help`. Commands cannot currently be sent from within
|
||||
the Factorio session, but you can send them from the Archipelago Factorio Client. For more information about the commands
|
||||
you can use see the [commands guide](/tutorial/Archipelago/commands/en).
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- Alternate Tutorial by
|
||||
|
||||
@@ -27,4 +27,11 @@ website to generate a YAML using a graphical interface.
|
||||
5. Hit **Start** to begin the game. The game will stall for a few seconds while it does all item placements.
|
||||
6. The game will immediately drop you into the randomized game.
|
||||
* If you are waiting for a countdown then wait for it to lapse before hitting Start.
|
||||
* Or hit Start then pause the game once you're in it.
|
||||
* Or hit Start then pause the game once you're in it.
|
||||
|
||||
## Commands
|
||||
While playing the multiworld you can interact with the server using various commands listed in the
|
||||
[commands guide](/tutorial/Archipelago/commands/en). As this game does not have an in-game text client at the moment,
|
||||
You can optionally connect to the multiworld using the text client, which can be found in the
|
||||
[main Archipelago installation](https://github.com/ArchipelagoMW/Archipelago/releases) as Archipelago Text Client to
|
||||
enter these commands.
|
||||
|
||||
@@ -52,6 +52,13 @@ Once the goal has been completed, you may press F to send a forfeit, sending out
|
||||
|
||||
More in-depth information about the game can be found in the game's help file, accessed by pressing H while playing.
|
||||
|
||||
## Commands
|
||||
While playing the multiworld you can interact with the server using various commands listed in the
|
||||
[commands guide](/tutorial/Archipelago/commands/en). As this game does not have an in-game text client at the moment,
|
||||
You can optionally connect to the multiworld using the text client, which can be found in the
|
||||
[main Archipelago installation](https://github.com/ArchipelagoMW/Archipelago/releases) as Archipelago Text Client to
|
||||
enter these commands.
|
||||
|
||||
## Game Troubleshooting
|
||||
|
||||
### An error message shows up at the bottom-left
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
|
||||
## Required Software
|
||||
|
||||
- One of the client programs:
|
||||
- [SNIClient](https://github.com/ArchipelagoMW/Archipelago/releases), included with the main
|
||||
Archipelago install. Make sure to check the box for `SNI Client - Super Metroid Patch Setup`
|
||||
- [SuperNintendoClient](https://github.com/ArchipelagoMW/SuperNintendoClient/releases), an alternate standalone
|
||||
client for Super Nintendo games
|
||||
- [Archipelago](https://github.com/ArchipelagoMW/Archipelago/releases). Make sure to check the box for `SNI Client - Super Metroid Patch Setup`
|
||||
|
||||
|
||||
- Hardware or software capable of loading and playing SNES ROM files
|
||||
- An emulator capable of connecting to SNI such as:
|
||||
- snes9x Multitroid
|
||||
@@ -71,7 +69,7 @@ validator page: [YAML Validation page](/mysterycheck)
|
||||
|
||||
When you join a multiworld game, you will be asked to provide your config file to whoever is hosting. Once that is done,
|
||||
the host will provide you with either a link to download your patch file, or with a zip file containing everyone's patch
|
||||
files. Your patch file should have a `.apm3` extension.
|
||||
files. Your patch file should have a `.apsm` extension.
|
||||
|
||||
Put your patch file on your desktop or somewhere convenient, and double click it. This should automatically launch the
|
||||
client, and will also create your ROM in the same place as your patch file.
|
||||
@@ -90,9 +88,10 @@ first time launching, you may be prompted to allow it to communicate through the
|
||||
3. Click on **New Lua Script Window...**
|
||||
4. In the new window, click **Browse...**
|
||||
5. Select the connector lua file included with your client
|
||||
- SuperNintendoClient users should download `sniConnector.lua` from the client download page
|
||||
- SNIClient users should look in their Archipelago folder for `/SNI/lua/x64` or `/SNI/lua/x86` depending on if the
|
||||
- Look in the Archipelago folder for `/SNI/lua/x64` or `/SNI/lua/x86` depending on if the
|
||||
emulator is 64-bit or 32-bit.
|
||||
6. If you see an error while loading the script that states `socket.dll missing` or similar, navigate to the folder of
|
||||
the lua you are using in your file explorer and copy the `socket.dll` to the base folder of your snes9x install.
|
||||
|
||||
##### BizHawk
|
||||
|
||||
@@ -104,8 +103,7 @@ first time launching, you may be prompted to allow it to communicate through the
|
||||
3. Click on the Tools menu and click on **Lua Console**
|
||||
4. Click the button to open a new Lua script.
|
||||
5. Select the `Connector.lua` file included with your client
|
||||
- SuperNintendoClient users should download `sniConnector.lua` from the client download page
|
||||
- SNIClient users should look in their Archipelago folder for `/SNI/lua/x64` or `/SNI/lua/x86` depending on if the
|
||||
- Look in the Archipelago folder for `/SNI/lua/x64` or `/SNI/lua/x86` depending on if the
|
||||
emulator is 64-bit or 32-bit. Please note the most recent versions of BizHawk are 64-bit only.
|
||||
|
||||
##### RetroArch 1.10.1 or newer
|
||||
|
||||
@@ -45,6 +45,7 @@ def set_rules(world, player: int, area_connections):
|
||||
add_rule(world.get_location("BBH: Eye to Eye in the Secret Room", player), lambda state: state.has("Vanish Cap", player))
|
||||
add_rule(world.get_location("DDD: Collect the Caps...", player), lambda state: state.has("Vanish Cap", player))
|
||||
add_rule(world.get_location("DDD: Pole-Jumping for Red Coins", player), lambda state: state.can_reach("Bowser in the Fire Sea", 'Region', player))
|
||||
add_rule(world.get_location("DDD: 100 Coins", player), lambda state: state.can_reach("Bowser in the Fire Sea", 'Region', player))
|
||||
add_rule(world.get_location("SL: Into the Igloo", player), lambda state: state.has("Vanish Cap", player))
|
||||
add_rule(world.get_location("WDW: Quick Race Through Downtown!", player), lambda state: state.has("Vanish Cap", player))
|
||||
add_rule(world.get_location("RR: Somewhere Over the Rainbow", player), lambda state: state.has("Cannon Unlock RR", player))
|
||||
|
||||
@@ -68,7 +68,7 @@ validator page: [YAML Validation page](/mysterycheck)
|
||||
|
||||
When you join a multiworld game, you will be asked to provide your config file to whoever is hosting. Once that is done,
|
||||
the host will provide you with either a link to download your patch file, or with a zip file containing everyone's patch
|
||||
files. Your patch file should have a `.apsmz` extension.
|
||||
files. Your patch file should have a `.apsmz3` extension.
|
||||
|
||||
Put your patch file on your desktop or somewhere convenient, and double click it. This should automatically launch the
|
||||
client, and will also create your ROM in the same place as your patch file.
|
||||
@@ -87,9 +87,10 @@ first time launching, you may be prompted to allow it to communicate through the
|
||||
3. Click on **New Lua Script Window...**
|
||||
4. In the new window, click **Browse...**
|
||||
5. Select the connector lua file included with your client
|
||||
- SuperNintendoClient users should download `sniConnector.lua` from the client download page
|
||||
- SNIClient users should look in their Archipelago folder for `/SNI/lua/x64` or `/SNI/lua/x86` depending on if the
|
||||
- Look in the Archipelago folder for `/SNI/lua/x64` or `/SNI/lua/x86` depending on if the
|
||||
emulator is 64-bit or 32-bit.
|
||||
6. If you see an error while loading the script that states `socket.dll missing` or similar, navigate to the folder of
|
||||
the lua you are using in your file explorer and copy the `socket.dll` to the base folder of your snes9x install.
|
||||
|
||||
##### BizHawk
|
||||
|
||||
@@ -101,8 +102,7 @@ first time launching, you may be prompted to allow it to communicate through the
|
||||
3. Click on the Tools menu and click on **Lua Console**
|
||||
4. Click the button to open a new Lua script.
|
||||
5. Select the `Connector.lua` file included with your client
|
||||
- SuperNintendoClient users should download `sniConnector.lua` from the client download page
|
||||
- SNIClient users should look in their Archipelago folder for `/SNI/lua/x64` or `/SNI/lua/x86` depending on if the
|
||||
- Look in the Archipelago folder for `/SNI/lua/x64` or `/SNI/lua/x86` depending on if the
|
||||
emulator is 64-bit or 32-bit. Please note the most recent versions of BizHawk are 64-bit only.
|
||||
|
||||
##### RetroArch 1.10.3 or newer
|
||||
|
||||
@@ -2,42 +2,48 @@
|
||||
|
||||
## Required Software
|
||||
|
||||
- VVVVVV (Bought from the [Steam Store](https://store.steampowered.com/app/70300/VVVVVV/) or [GOG Store](https://www.gog.com/game/vvvvvv) Page, NOT Make and Play Edition!)
|
||||
- VVVVVV
|
||||
- [Steam Store Page](https://store.steampowered.com/app/70300/VVVVVV/)
|
||||
- [GOG Store Page](https://www.gog.com/game/vvvvvv)
|
||||
- [V6AP](https://github.com/N00byKing/VVVVVV/releases)
|
||||
|
||||
## Installation and Game Start Procedures
|
||||
|
||||
1. Install VVVVVV through either Steam or GOG
|
||||
2. Go to the page linked for V6AP, and download the latest release
|
||||
1. Install VVVVVV through either Steam or GOG.
|
||||
2. Go to the page linked for V6AP, and download the latest release.
|
||||
3. Unpack the zip file where you have VVVVVV installed.
|
||||
|
||||
# Joining a MultiWorld Game
|
||||
|
||||
To join, set the following launch options: `-v6ap_name YourName -v6ap_ip ServerIP:Port`.
|
||||
Optionally, add `-v6ap_passwd "YourPassword"` if the room you are using requires a password. All parameters without quotation marks.
|
||||
The Name in this case is the one specified in your generated .yaml file.
|
||||
In case you are using the Archipelago Website, the IP should be `archipelago.gg`.
|
||||
To join an Archipelago MultiWorld game, you must set the game's launch options. The two mandatory launch options are:
|
||||
`-v6ap_name slotName`
|
||||
`-v6ap_ip server:port`
|
||||
|
||||
If the game you are joining requires a password, you should also add the following to your launch options:
|
||||
`-v6ap_passwd secretPassword`
|
||||
|
||||
If the game is to be played offline in single-player mode, you should include this launch option:
|
||||
`-v6ap_file filePath`
|
||||
|
||||
Launch options may be found by right-clicking on the game in Steam and clicking "Properties" in the context menu. From there, open the "General" tab. There is a "Launch Options" setting near the bottom wherein you should enter the above options. Note that all launch options are separated by a space, and if there are spaces in your slot name or password, it should be surrounded with quotes.
|
||||
If everything worked out, you will see a textbox informing you the connection has been established after the story intro.
|
||||
|
||||
# Playing offline
|
||||
|
||||
To play offline, first generate a seed on the game's settings page.
|
||||
Create a room and download the `.apv6` file, and start the game with the `-v6ap_file FileName` launch argument.
|
||||
Create a room and download the `.apv6` file, include the offline single-player launch option described above.
|
||||
|
||||
## Installation Troubleshooting
|
||||
|
||||
Start the game from the command line to view helpful messages regarding V6AP. These will look something like "V6AP: Message"
|
||||
Start the game from the command line to view helpful messages regarding V6AP. These will look something like `V6AP: Message`.
|
||||
|
||||
### Game no longer starts after copying the .exe
|
||||
|
||||
Most likely you forgot to set the launch options. `-v6ap_name YourName` and `-v6ap_ip ServerIP:Port` are required for startup for Multiworlds, and
|
||||
`-v6ap_file FileName` is required for (offline) singleplayer.
|
||||
If your Name or Password have spaces in them, surround them in quotes.
|
||||
The most likely cause of a startup failure is invalid launch options. Ensure the launch options are set properly as described above in
|
||||
**Joining a MultiWorld Game**.
|
||||
|
||||
## Game Troubleshooting
|
||||
|
||||
### What happens if I lose connection?
|
||||
|
||||
V6AP tries to reconnect a few times, so be patient.
|
||||
Should the problem still be there after about a minute or two, just save and restart the game.
|
||||
If a disconnection occurs, wait a moment to see if the game automatically reconnects itself. If the problem presists, save and restart the game.
|
||||
|
||||
Reference in New Issue
Block a user