Skip to content

Conversation

@nicholassaylor
Copy link
Contributor

@nicholassaylor nicholassaylor commented Dec 27, 2025

What is this fixing or adding?

  • Removed unused imports
  • Reformats the file for consistent whitespace
  • Updated ast to not use Num, Str, Bytes, or NameConstant

How was this tested?

Ran unittests and CI to check for any issues
Did NOT run any seperate test generations

@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Dec 27, 2025
@nicholassaylor
Copy link
Contributor Author

May resolve #3993, but not positive
@Mysteryem

@duckboycool duckboycool added is: maintenance Regular updates to requirements and utilities that do not fix bugs or change/add features. waiting-on: author Issue/PR is waiting for feedback or changes from its author. labels Dec 27, 2025
@duckboycool
Copy link
Collaborator

Not sure which exact change from the last commit broke things, but clearly it did somehow.

@Mysteryem
Copy link
Contributor

Mysteryem commented Dec 27, 2025

As I mentioned in #3993, the reason I didn't do the simple change of replacing the deprecated ast types with their new types was because doing so actually breaks generation with entrance randomization enabled because parts of the code now actually run as they were originally supposed to, whereas those parts of the code do not run currently with the deprecated types because the code compares ast.NameConstant (deprecated and actually gives you ast.Constant) against the string "NameConstant", which will never match because it needs to compare against "Constant" now.

This PR hasn't actually updated the parts of the code that still refer to "NameConstant" by name, so it does not resolve #3993.

So OoT has probably been broken since AP started supporting Python 3.8 (when these ast types were deprecated), and its entrance randomization has probably only worked because of that part of the code that broke with the deprecations.

@nicholassaylor
Copy link
Contributor Author

As I mentioned in #3993, the reason I didn't do the simple change of replacing the deprecated ast types with their new types was because doing so actually breaks generation with entrance randomization enabled because parts of the code now actually run as they were originally supposed to, whereas those parts of the code do not run currently with the deprecated types because the code compares ast.NameConstant (deprecated and actually gives you ast.Constant) against the string "NameConstant", which will never match because it needs to compare against "Constant" now.

This PR hasn't actually updated the parts of the code that still refer to "NameConstant" by name, so it does not resolve #3993.

So OoT has probably been broken since AP started supporting Python 3.8 (when these ast types were deprecated), and its entrance randomization has probably only worked because of that part of the code that broke with the deprecations.

I was able to track down the issue with Entrance randomization to a bug in

def _add_boss_entrances():

It is telling AP that there are 2-way entrances that do not exist. However, I am a bit at a loss as of the correct way to fix this. The reason it crashes on the Barinade Boss Room transition is because it is the first boss room that does not have a proper return entrance. So when AP looks for the transition, it fails to find it.

@nicholassaylor
Copy link
Contributor Author

Could someone please add the help wanted meta tag to this PR?

@duckboycool duckboycool added the meta: help wanted Additional review/assistance is requested for these issues or pull requests. label Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

is: maintenance Regular updates to requirements and utilities that do not fix bugs or change/add features. meta: help wanted Additional review/assistance is requested for these issues or pull requests. waiting-on: author Issue/PR is waiting for feedback or changes from its author. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants