Skip to content
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

TUNIC: Grass Randomizer #3913

Open
wants to merge 41 commits into
base: main
Choose a base branch
from

Conversation

silent-destroyer
Copy link
Contributor

What is this fixing or adding?

Adds Grass Randomizer as an option for TUNIC.
Grass Randomizer adds over 6,000 bushes/pieces of grass as checkable locations that have the potential to give items when cut down.

By default, at least 95% of the grass/filler items are required to be kept local or shuffled among other TUNIC slots with Grass Randomizer enabled. The host can turn off this restriction if they wish by changing the limit_grass_rando setting in the host.yaml file to false.

How was this tested?

Several playtests over the last two months using a beta version of the randomizer mod in the Tunic AP channel, with continuous updates and bugfixes based on feedback.

If this makes graphical changes, please attach screenshots.

image

@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Sep 9, 2024
@ScipioWright ScipioWright added the is: enhancement Issues requesting new features or pull requests implementing new features. label Sep 9, 2024
Copy link
Collaborator

@ScipioWright ScipioWright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed some things along the way and contributed the grass fill option, so idk if my review really counts but I'm doing it anyway

Copy link
Contributor

@qwint qwint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have some comments but nothing crazy, have rolled and played exactly one game on the shared apworld, but it wasn't on this exact iteration of it, still pretty happy with it altogether

worlds/tunic/__init__.py Show resolved Hide resolved
worlds/tunic/grass.py Outdated Show resolved Hide resolved
worlds/tunic/grass.py Outdated Show resolved Hide resolved
- non-grass rando games were accidentally seeing grass items get shuffled in as filler, which is funny but probably shouldn't happen
worlds/tunic/items.py Show resolved Hide resolved
worlds/tunic/__init__.py Outdated Show resolved Hide resolved
worlds/tunic/__init__.py Outdated Show resolved Hide resolved
@ScipioWright ScipioWright requested a review from hesto2 November 8, 2024 18:08
Copy link

@hesto2 hesto2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I didn't test this, only reviewed the code 👍

@ScipioWright ScipioWright added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Nov 9, 2024
Comment on lines 380 to 385
unfilled_locations = [loc for loc in multiworld.get_unfilled_locations_for_players(
location_names=[], players=tunic_players_with_grass) if loc.progress_type != LocationProgressType.PRIORITY
and loc.name not in reserved_locations]
grass_filler_items: List[TunicItem] = []
for world in tunic_grass_worlds:
grass_filler_items.extend(world.local_filler)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could reorder this part and add an early return just so that you aren't calling get_unfilled_locations_for_players when it isn't needed.

Suggested change
unfilled_locations = [loc for loc in multiworld.get_unfilled_locations_for_players(
location_names=[], players=tunic_players_with_grass) if loc.progress_type != LocationProgressType.PRIORITY
and loc.name not in reserved_locations]
grass_filler_items: List[TunicItem] = []
for world in tunic_grass_worlds:
grass_filler_items.extend(world.local_filler)
grass_filler_items: List[TunicItem] = []
for world in tunic_grass_worlds:
grass_filler_items.extend(world.local_filler)
if not grass_filler_items:
return
unfilled_locations = [loc for loc in multiworld.get_unfilled_locations_for_players(
location_names=[], players=tunic_players_with_grass) if loc.progress_type != LocationProgressType.PRIORITY
and loc.name not in reserved_locations]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: enhancement Issues requesting new features or pull requests implementing new features. waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants