ArchipelagoMW / Archipelago

Archipelago Multi-Game Randomizer and Server
https://archipelago.gg
Other
488 stars 640 forks source link

MultiServer: Allow (limited) LocationScouts of other players' slots #3523

Open NewSoupVi opened 4 months ago

NewSoupVi commented 4 months ago

Add a "player" argument to the LocationScouts package that specifies which player's locations to scout.

If this is a different player than the requesting slot, this only processes locations that contain that slot's items.

This can be used to

  1. "find all items in a different slot" (probably a bad usecase, this should be ItemScouts instead)
  2. Create a free Archipelago hint matching an in-game hint.

That second use case is why this is important to me. The Witness (like a couple other games) has hints of the format: "Progressive Dots can be found on Player69's Link's Uncle". I cannot currently create Archipelago hints from hints like that, and I want to be able to. ItemScouts would not solve my problem because there are multi-copy items (e.g. Progressive Dots), and I want to be able to hint a specific copy, not all of them and not a random one. This means that the location is the only uniquely identifying key for a hint like this.

I released a Special Witness Client that can be used to test this feature in action: https://github.com/NewSoupVi/The-Witness-Randomizer-for-Archipelago/releases/tag/locationscoutsspecial

Tested Minimally, by making a simple modification to apclientpp and the Witness client and testing it "in action". While playing slot 1, I got this audio log hint: image

This correctly appeared in the TextClient: image

Haven't tested ItemLinks, I did add code for it but it's untested

Silvris commented 4 months ago

For item links, wouldn't it make sense to also include any locations that are for groups that this player is a member of? Then you could just scout out the item linked item in the same manner.

NewSoupVi commented 4 months ago

I want to hear @Berserker66's opinion on this first and foremost.

If the answer is "This would be solved by ItemScouts", there is a section in the PR description detailing why I don't think ItemScouts properly solves my use case. It would be nice if you could then rebutt that if you think ItemScouts still solves my problem / there is a way to implement ItemScouts reasonably that has this functionality.

If, instead, the answer is "Your use case should not be a supported use case", then fine. Well, not fine, I'll probably argue against that, but at least it would be an answer that I can work with.

Apologies if this sounds antagonistic, it's not supposed to be, I just really need clarity on this topic specifically as it pertains to my use case, because it's one of the most asked about things / "bug reports" from the Witness playerbase: "Why do in-game hints for my items in other games not get sent to the text client?"

NewSoupVi commented 4 months ago

For item links, wouldn't it make sense to also include any locations that are for groups that this player is a member of? Then you could just scout out the item linked item in the same manner.

Yeah, I think the Item Links implementation is simple, I just don't have the time to implement and properly test that right now, and I'm somewhat worried the concept won't make it past other core devs so I'm not as motivated to finish the feature immediately

Edit: Well, adding item links support was simple, but I haven't tested it.

NewSoupVi commented 4 months ago

Tested ItemLinks by making some groups and then scouting every single location in Player2's seed while connected as Player1.

It correctly returned every item that is for Player1 or for an ItemLinks group that Player1 is part of, and nothing else.

to be able to test this, I made a custom Witness Client that will, upon connecting, scout-hint every location of player 2 (So, must be used with two options-identical Witness slots) https://github.com/NewSoupVi/The-Witness-Randomizer-for-Archipelago/releases/tag/locationscouteverything

This will cause a bunch of weird behavior within the client later, so I would not recommend actually playing the rest of the seed afterwards.

Anyway, that's every case (manually) tested now. This is fully 100% ready from my side

NewSoupVi commented 2 months ago

like everyone else i haven't tested this yet. i've got a feeling this has a pretty good chance to break multiclient though

Oh? Why would it break a client? It should be fully backwards compatible... It's just an extra arg that only matters if your client is the one that sent the packet in the first place, I think...

threeandthreee commented 1 month ago

I'd potentially make use of this to generate hints for Link's Awakening in-game hints, I'd like to see this added