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

Initial support for HITMAN 3 Windows/Xbox PC version #326

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jorys-paulin
Copy link
Contributor

Hello everyone!

This (draft) pull request adds support for the PC Xbox version of HITMAN 3 you can buy in the Microsoft Store or Xbox app. While I haven't tested yet, GamePass subscribers should be able to access the full game as well.

Currently, official server authentication and server-side entitlements aren't supported yet, but the rest of the game will work as expected. I am working on that, but would like to make sure the basics are working correctly first.

Massive thanks to @grappigegovert for updating the patcher to work on newer versions!

@AnthonyFuller
Copy link
Contributor

Won't be merged (and shouldn't be converted from a draft) until the piracy element is solved.

@jorys-paulin
Copy link
Contributor Author

This was discussed on the Peacock Discord, but to summarize:
I don't agree with the "piracy element", the code doesn't give any undue entitlement to the user, not that it could since this version doesn't use the GetPlatformEntitlements endpoint pirated versions of Peacock modify to pirate the game. And even if it did, right now it would only get the 9P2JC6R9S37C entitlement, the one you have when you only have the free starter pack.

For reference, here's our discussion on the Peacock Discord about this issue:

Anthony Fuller — Today at 14:58
@ChaineJoueur542 I've deleted your message, hopefully for obvious reasons.
ChaineJoueur542 — Today at 14:59
No sharing changes and asking for feedback? 
Anthony Fuller — Today at 15:00
don't act oblivious, you said it in your PR
ChaineJoueur542 — Today at 15:01
Currently, official server authentication and server-side entitlements aren't supported yet, but the rest of the game will work as expected. I am working on that, but would like to make sure the basics are working correctly first
Maybe I should have explicitly said I wanted feedback on the basics before moving on, but that's what I meant
Anthony Fuller — Today at 15:02
you should've known that we wouldn't support it being shared in here at all until that is done
what you've done is something i've done before
didn't continue when the game doesn't send the xbox token to peacock
ChaineJoueur542 — Today at 15:05
The only thing a token would provide to Peacock is official server auth and items from DLCs, but 90% of the rest works, I don't understand. 
Anthony Fuller — Today at 15:05
People don't have to own the game to use your version of peacock
hence "piracy"
ChaineJoueur542 — Today at 15:06
How would they do that? I made it work with the starter pack before buying the game. It didn't give me access to anything
Anthony Fuller — Today at 15:08
you return the entitlements, what are you talking about
it's literally how they pirate peacock
they do what you've done, but for the other platforms
ChaineJoueur542 — Today at 15:08
Do you mean trough GetPlatformEntitlements?
Anthony Fuller — Today at 15:10
obviously
ChaineJoueur542 — Today at 15:12
Have you tried my PR?
Anthony Fuller — Today at 15:12
why would i need to
i can obviously see what it does
and either way, what i said still stands even if i did try it
we're not merging without an official authentication strategy
ChaineJoueur542 — Today at 15:14
This version never calls GetPlatformEntitlements:
[15:13:09:318] [Info | http] POST /oauth/token
[15:13:09:369] [Info | http] POST /authentication/api/userchannel/ProfileService/SetClientEntitlements
[15:13:09:402] [Info | http] GET /authentication/api/configuration/Init?configName=pcgdk-prod&lockedContentDisabled=false&isFreePrologueUser=false&isIntroPackUser=false&isFullExperienceUser=true

For reference, here's the Epic version:
[15:13:48:984] [Info | http] POST /oauth/token
[15:13:48:997] [Debug | handleOauthToken] Setting up container with ID fa157e54-5639-4997-b074-922c75338cae.
[15:13:49:717] [Info | http] POST /authentication/api/userchannel/ProfileService/GetPlatformEntitlements
[15:13:49:718] [Debug | getPlatformEntitlements] Platform issuer: ed55aa5edc5941de92fd7f64de415793
[15:13:49:734] [Info | http] POST /authentication/api/userchannel/ProfileService/SetClientEntitlements
[15:13:49:749] [Info | http] GET /authentication/api/configuration/Init?configName=pc-prod&lockedContentDisabled=false&isFreePrologueUser=false&isIntroPackUser=false&isFullExperienceUser=true
And even if it did, the only entitlement you'd get is 9P2JC6R9S37C, the one I had when I was still on the starter pack
Anthony Fuller — Today at 15:15
i've watched it call it on official
ChaineJoueur542 — Today at 15:16
Well for me it never did, maybe they changed it
Anthony Fuller — Today at 15:17
starter pack is weird
it's a version i hate
and it has so many bodges in it
ChaineJoueur542 — Today at 15:20
starter pack is weird
Including in a capture I did after buying the game, even re-installing it just to be sure
Anthony Fuller — Today at 15:21
i have it in a capture somewhere
i mean this was pre-WoA, they might've changed something ¯\_(ツ)_/¯
ChaineJoueur542 — Today at 15:21
Seems like they have
Anthony Fuller — Today at 15:22
anyway if it doesn't call it anymore, a different strategy would need to be devised to authenticate users
ChaineJoueur542 — Today at 15:23
Yes, this is still a work in progress.
Like I said,
Currently, official server authentication and server-side entitlements aren't supported yet, but the rest of the game will work as expected
AKA 90% of features are working correctly

@AnthonyFuller
Copy link
Contributor

Like I said in the discord, the piracy element is still there, we don't authenticate the user at all.

@jorys-paulin
Copy link
Contributor Author

Once again, it's still a work in progress.
Besides, Peacock already doesn't authenticate the user at all for everything besides HITMAN 3:

/**
 * Provider for HITMAN 2 on Steam.
 *
 * @internal
 */
export class SteamH2Strategy extends EntitlementStrategy {
    override get() {
        return H2_STEAM_ENTITLEMENTS
    }
}

That's exactly what my code does right now, just give the base entitlement, which in this case isn't even used.

@AnthonyFuller
Copy link
Contributor

AnthonyFuller commented Oct 13, 2023

  1. This is Hitman 3
  2. That is something I've wanted to change for a while now (and I have a local branch that does so, this is also long before my time)
  3. That's not base entitlements

@jorys-paulin
Copy link
Contributor Author

Have you tried giving yourself entitlements you don't own to see if it's even possible to pirate the game that way? Because if you can't then your "piracy element" simply doesn't exist.

@AnthonyFuller
Copy link
Contributor

That's a terrible question.

@TheBoxyBear
Copy link

Game Pass user here, I can confirm it seems the game doesn't use the entitlements from the server at all. Using the PR branch while not signed in, content with or without Peacock is limited to the starter pack. When signed in to an account with Game Pass and all the dlc however, all the content can be accessed with Peacock even if getEntiltements returns the ["9P2JC6R9S37C"] array.

I will try granting myself extra entiltements while not signed in but I doubt it will do anything.

@AnthonyFuller
Copy link
Contributor

It doesn't request entitlements from Peacock if you're signed in.

Signed-off-by: Anthony Fuller <24512050+AnthonyFuller@users.noreply.github.com>
@RDIL RDIL changed the base branch from v7 to master April 4, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants