-
Notifications
You must be signed in to change notification settings - Fork 709
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
FFMQ: Efficiency Improvement and Use New Options Methods #2767
Conversation
# Conflicts: # worlds/ffmq/Client.py # worlds/ffmq/Regions.py
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.
Output.py
line 102 usesself.multiworld.sky_coin_mode[self.player]
stage_generate_early
could (should?) access options through theworld
variableRegions.py
line 70 usesself.multiworld.brown_boxes[self.player]
Regions.py
line 213 usesmultiworld.enemies_density[player]
Otherwise, does what it says on the tin.
World load on my machine goes from
- ~0.75s to ~0.075s on Python 3.8
- ~0.55s to ~0.08s on Python 3.11
Fixed |
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.
Looks like all options access was converted.
hint.append((subregion.split("Subregion ")[-1] + (" Region" if subregion not | ||
in single_location_regions else ""))) | ||
if self.multiworld.map_shuffle[self.player] != "overworld" and subregion not in \ | ||
("Subregion Mac's Ship", "Subregion Doom Castle"): | ||
if self.options.map_shuffle != "overworld": |
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.
Just checking that the removal of the subregion check here is intended.
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.
Just checking that the removal of the subregion check here is intended.
From the description of this PR:
Entrance hints will now show locations at Mac's Ship (why did I go out of my way to exclude it? It is a mystery)
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.
And I wasn't sure if Doom Castle was relevant to that. But by your answer, I'll just assume it was
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 had one comment on a removed bit of code. Otherwise the changes all LGTM. Merged into main and generated ten multiworlds with 100 random yamls. Everything generated fine and did not hit any deprecated options warning. Searched through the code as well and did not find any instances of that or per_slot_randoms.
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.
Ready to merge, just noticed one small thing
worlds/ffmq/__init__.py
Outdated
if self.options.enemies_scaling_lower.value > \ | ||
self.options.enemies_scaling_upper.value: |
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 short enough to be on one line now, no? :)
Same with a lot of the following lines
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.
+1
It's really hard to read. also the (..., ...) = (..., ...) assignment below is even worse with the breaks. If it needs breaks, there is no reason to do tuple assignments like this.
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.
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.
Can you change settings_template
in Output.py
to use Utils.parse_yaml
? (see below)
|
||
rooms = yaml.load(pkgutil.get_data(__name__, "data/rooms.yaml"), yaml.Loader) |
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 think we should be more thorough in reviews (and hopefully some peer reviewers see this): for yaml this should've been Utils.parse_yaml
, which is both safer and (since another PR was joined) 7x faster than this old code. There are very few reasons to use anything else for yaml. (Changing to non-yaml, as you did, is even better though)
worlds/ffmq/__init__.py
Outdated
if self.options.enemies_scaling_lower.value > \ | ||
self.options.enemies_scaling_upper.value: |
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.
+1
It's really hard to read. also the (..., ...) = (..., ...) assignment below is even worse with the breaks. If it needs breaks, there is no reason to do tuple assignments like this.
Done |
This should be reverted, as it currently breaks SNI connection on FFMQ. |
@Alchav can just make another PR, no? |
What is this fixing or adding?
print
statements that were left in by mistake.How was this tested?
Generating several times with various options.