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

MultiServer: make !hint prefer early sphere #2862

Merged
merged 5 commits into from
May 27, 2024

Conversation

Berserker66
Copy link
Member

What is this fixing or adding?

https://discord.com/channels/731205301247803413/1198835324667834509

How was this tested?

Locally with Factorio, which reliably gave me orders like this:
image

If this makes graphical changes, please attach screenshots.

@github-actions github-actions bot added affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Feb 24, 2024
@Alchav
Copy link
Contributor

Alchav commented Feb 24, 2024

Crazy, I had thought of this same thing. But I also have a thing for my personal games where it appends the sphere information to the entrance hint. Putting it in the multidata sounded like a hassle. But like, I wonder if there would be general interest in making the sphere number visible on hints, or the option for it.

@Alchav
Copy link
Contributor

Alchav commented Feb 24, 2024

Guess I missed a lot of discussion about this stuff.

@Berserker66
Copy link
Member Author

Crazy, I had thought of this same thing. But I also have a thing for my personal games where it appends the sphere information to the entrance hint. Putting it in the multidata sounded like a hassle. But like, I wonder if there would be general interest in making the sphere number visible on hints, or the option for it.

So, this system uses different spheres than the playthrough, as it filters down to sendable items only. As a result, to keep player confusion low, I don't intend to display this information that would conflict with another source. Additionally, the discord votes for being able to poke at specific spheres are low that this does not appear required.

Comment on lines 1520 to +1524
# By popular vote, make hints prefer non-local placements
not_found_hints.sort(key=lambda hint: int(hint.receiving_player != hint.finding_player))
# By another popular vote, prefer early sphere
not_found_hints.sort(key=lambda hint: self.ctx.get_sphere(hint.finding_player, hint.location),
reverse=True)
Copy link
Collaborator

@beauxq beauxq Feb 25, 2024

Choose a reason for hiding this comment

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

Was there any discussion about prioritizing early spheres over non-local placements (as it looks like this is doing)?

If there's an earlier sphere in my world, and a later sphere in someone else's world,
which do players prefer to be hinted?

Copy link
Collaborator

@remyjette remyjette Feb 26, 2024

Choose a reason for hiding this comment

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

The only related poll question about !hint was "Should !hint prioritize the earliest sphere?" but there was no poll question about the priority, and I didn't see any discussion about it in the thread. That's a good point.

I think it would be worth getting community feedback to decide which of these two "by popular vote"s should take priority.

My personal take is that I'm not hinting unless im stuck. So given that, I'd still prefer it to be non-local even if it's a later sphere, since hinting and seeing an item in my own world doesn't help me get un-stuck. An item one sphere later in another world on the other hand might, since players play at different speeds and dont breadth-first-search the locations in their world.

Copy link
Contributor

Choose a reason for hiding this comment

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

Depends on the game, I think. I'll frequently hint QOL stuff in Factorio because it makes my build easier. If I have research for progressive (long handed) inserters accessible within my world, I definitely want to know it.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, I hint QOL stuff a lot too. Though IDK if there's generally many "QOL" things I hint that have multiple of the same hint in any game; maybe tools in stardew, but that's not always QOL, sometimes it's necessary.

I think the approach of "trying to get unstuck" as a default behavior makes good sense.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sometimes I worry that when I hint something in another players world, that it might be an annoyance or a chore that I'm putting them through.
But for me personally, I like it when another player hints something in my world. It makes it feel like there's more interaction (when sometimes the interaction feels lacking).
While if I hint something, and it's in my own world, there's no interaction with other players that comes from that.

So this could be another consideration on this question.

MultiServer.py Show resolved Hide resolved
@ScipioWright ScipioWright added the is: enhancement Issues requesting new features or pull requests implementing new features. label Feb 26, 2024
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.

I'm not sure why setting the points_available got moved from one while to a different if, but the rest of the code looks good.

But did do some light testing, mostly with solo seeds of HK and my apworld (minit) and did see that the order duplicate items were hinted matched my understanding of which would be earlier based on game knowledge and playthrough spheres
also did not see any issues with hint points in that testing in response to my first comment, but didn't extensively test that

Copy link
Member

@NewSoupVi NewSoupVi left a comment

Choose a reason for hiding this comment

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

Reviewed the code, it looks good and simple enough. Was wondering whether the lookup for spheres->locations should be reversed, but I ended up coming to the conclusion that it's fine.

Tested with a multiworld of several games, which also included item links (because I don't trust item links with new hint features)

Tested with a frozen .exe build because why not.

@Berserker66 Berserker66 merged commit 74aa4ec into main May 27, 2024
29 checks passed
@Berserker66 Berserker66 deleted the multiserver_sphere_hint_priority branch May 27, 2024 16:43
jnschurig pushed a commit to Tranquilite0/Archipelago-SoulBlazer that referenced this pull request Jun 13, 2024
sflavelle pushed a commit to sflavelle/Archipelago-tgc that referenced this pull request Jun 20, 2024
qwint pushed a commit to qwint/Archipelago that referenced this pull request Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: core Issues/PRs that touch core and may need additional validation. is: enhancement Issues requesting new features or pull requests implementing new features. 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.

9 participants