-
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
update config #4
Conversation
remove extra file minor schema changes, ap world output update, text formatting for item text
@@ -29,7 +29,7 @@ class MetroidPrimeItem(Item): | |||
"Plasma Beam": ItemData("Plasma Beam", 3, ItemClassification.progression), | |||
"Missile Expansion": ItemData("Missile Expansion", 4, ItemClassification.useful, 999), | |||
"Scan Visor": ItemData("Scan Visor", 5, ItemClassification.progression), | |||
"Morph Ball Bombs": ItemData("Morph Ball Bombs", 6, ItemClassification.progression), | |||
"Morph Ball Bomb": ItemData("Morph Ball Bomb", 6, ItemClassification.progression), |
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.
randomprime expects this to be singular 🤷
"Wavebuster": ItemData("Wavebuster", 28, ItemClassification.filler), | ||
} | ||
|
||
misc_item_table: dict[str, ItemData] = { |
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.
Moved these out so they aren't included in the item pool for now (we'll obviously want to move ice traps back in eventually)
@@ -45,6 +46,7 @@ class MetroidPrimeWorld(World): | |||
topology_present = True | |||
item_name_to_id = {name: data.code for name, data in item_table.items()} | |||
location_name_to_id = every_location | |||
settings: MetroidPrimeSettings |
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.
Once I wired this up that settings class worked as expected and correctly asked me to put in an ISO 🎉
# convert configjson to json | ||
import json | ||
|
||
configjsons = json.dumps(configjson, indent=4) |
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 left this in for now just to make debugging the config easier, I'm good to remove if you want or to flag it so it only does it if we have a debug argument passed in or something
from typing import Dict, Any | ||
|
||
|
||
def starting_inventory(world, item) -> bool: |
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.
Changed from self
to world
since these functions are not methods inside of a class
def item_text(world, location) -> str: | ||
loc = world.multiworld.get_location(location, world.player) | ||
player_name = f"{world.multiworld.player_name[location.player]} " if loc.player != world.player else "" | ||
return f"{player_name}{loc.item.name}" |
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.
Grab the item name from the location 👍
"poisonDamagePerSec": 0.11, | ||
"phazonDamagePerSec": 0.964, | ||
"phazonDamageModifier": "Default", | ||
"autoEnabledElevators": True, |
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 turned this on for testing, let me know if you want to keep it disabled or we can add it as a config option 👍
}, | ||
"rooms": { | ||
"Landing Site": { | ||
"pickups": [{ |
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 learned that pickups
needs to be an array of objects, you'll see a lot of updates for the rest of the file with that change guiding it.
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.
Definitely leave the pre-scanned elevators in that seems to be a popular feature. Looking forward to getting to test this!
This looks like a lot more changes than it actually is, most of it is whitespace changes. Here are the updates:
properties
which is a JSON schema keyword but not something the actual config was expecting. Removed that,type
, andadditionalProperties
from each of the objects and that got randomprime working smoothly 🎉Unknown Item 1
from the item pool so we don't have it shuffled inWorld
class in__init__
so it'll be able to accept an ISO input