-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial client #2
Conversation
logger.debug(f"Giving item {item_data.name} to player") | ||
ctx.game_interface.give_item_to_player(item_data.id, 1, 1) | ||
|
||
# Handle Missile Expansions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not in love with the size of this function, but I figured rather than creating an abstraction it'd be more pragmatic to keep them separate since each of these 3 different powerups have a slightly different effect when you receive them (gain 5 missiles, gain 1 bomb, restore health). Open to suggestions here though for sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an area where we can also gate the player from receiving any Missile or PB expansions if they haven't received the Missile Launcher or Power Bomb Main items yet.
|
||
if __name__ == "__main__": | ||
parser = get_base_parser() | ||
parser.add_argument('--name', default=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added support for a --name
argument so I don't have to type it in every time I test the client connecting to AP. SC2 client does something similar so I figured it wasn't going to break anything upstream 🤣
|
||
class MetroidPrimeArea(Enum): | ||
"""Game worlds with their corresponding IDs in memory""" | ||
Impact_Crater = 3241871825 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can move these into the Region data structure later if we want
worlds/metroidprime/Items.py
Outdated
@@ -47,7 +47,7 @@ class MetroidPrimeItem(Item): | |||
"Gravity Suit": ItemData("Gravity Suit", 21, ItemClassification.progression), | |||
"Varia Suit": ItemData("Varia Suit", 22, ItemClassification.progression), | |||
"Phazon Suit": ItemData("Phazon Suit", 23, ItemClassification.progression), | |||
"Energy Tank": ItemData("Energy Tank", 24, ItemClassification.useful), | |||
"Energy Tank": ItemData("Energy Tank", 24, ItemClassification.useful, 14), | |||
"Spring Ball": ItemData("Spring Ball", 25, ItemClassification.useful), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to look at putting Spring Ball somewhere else (maybe 43?) if we want to use UnknownItem1 for location checks
… layers are in sync
This adds the following:
The client currently will do the following:
Next steps (future PR):
Steps to test:
config.yaml
file withPORT: 8080
in the root of the directory thenpython WebHost.py
, here's the link http://localhost:8080/games/Metroid%20Prime/player-options )Players
in the root of the AP projectGenerate.py
and unzip the file in theoutput
folder then click the.archipelago
file to run the multi world serverpython MetroidPrimeClient.py
optionally add--connect localhost:9999 --name PlayerSlotName
if you want to speed it up a bitOn the server, use
/send_location other_player location_name
to test sending items via location,/send_multiple 3 Hesto2 Missile Expansion
also works if you want to test with specific items (a little bit more pragmatic for most cases)Pardon the book here, I'm mostly documenting this here in such great detail so that if I forget how to test this later I'll be able to come back and reference this 😅