Skip to content

feat(bridge): answer account, age, country, language and parental control for a signed in AnyPlay player - #42

Merged
AlxcBTW merged 2 commits into
mainfrom
feat/bridge-signed-in
Oct 28, 2026
Merged

AlxcBTW merged 2 commits into
mainfrom
feat/bridge-signed-in

Conversation

@AlxcBTW

@AlxcBTW AlxcBTW commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

What

With the net bridge on and the AnyPlay player signed in, every NP account query a game makes before it offers multiplayer now answers a consistent, unrestricted, signed in state for the AnyPlay network. Before, sceNpGetState and the identity calls already followed the bridge (and sceNpCheckPlus / sceNpCheckPremium since #24), but the account details around them (country, age, language, parental control, availability, presence, lookups by online id) still answered "signed out" or "user not found", so a title could see a signed in player with no usable account.

Only the initial user, and an online id, account id or user id that names that same player, is answered. Another user, a stranger's online id and every signed out or bridge-off case answer exactly as before.

Call Before (signed in) After (signed in) Why
sceNpGetAccountCountryA, sceNpManagerIntGetAccountCountryA, sceNpGetAccountCountry SIGNED_OUT / USER_NOT_FOUND 0, country us A title asks for the account country when it opens its settings (seen in an observation log together with the auth code call) and a failure reads as a broken account
sceNpGetAccountAge, sceNpManagerIntGetAccountAge SIGNED_OUT 0, age 18 (request completes, poll 0) Age gates are a common multiplayer and chat privilege input
sceNpGetParentalControlInfo, sceNpGetParentalControlInfoA USER_NOT_FOUND / SIGNED_OUT 0, age 18, content, chat and user generated content restriction all false Parental control and chat restriction are the usual platform inputs for "multiplayer allowed"
sceNpGetAccountLanguageA, sceNpGetAccountLanguage, sceNpGetAccountLanguage2, sceNpManagerIntGetAccountLanguageA SIGNED_OUT / USER_NOT_FOUND 0, 2-letter code of the console language (ANYPS5_LANGUAGE, default en) Same account record as the country
sceNpCheckNpAvailability, sceNpCheckNpAvailabilityA, sceNpCheckNpReachability USER_NOT_FOUND / SIGNED_OUT 0, available 1 (request completes) The network is reachable while the player is signed in
sceNpGetGamePresenceStatus, sceNpGetGamePresenceStatusA offline (0) online (1) Consistent with the signed in state
sceNpSetGamePresenceOnline SIGNED_OUT 0 for the player's own online id Presence can be set while signed in
sceNpIsPlusMember false true Same AnyPlay online-permission rule as sceNpCheckPlus (ADR 0021): signed in and not banned, for the AnyPlay network only
sceNpGetUserIdByOnlineId, sceNpManagerIntGetUserIdByOnlineId, sceNpGetUserIdByAccountId, sceNpGetAccountId SIGNED_OUT 0, the player's own ids A title resolves its own online id back to a user

Unchanged on purpose: sceNpAuthGetAuthorizedAppCode and every auth code or ID token call keep answering signed out (no token for a publisher's or Sony's servers is ever produced); sceNpGetAccountDateOfBirth and sceNpGetAccountDateOfBirthA still answer signed out (the network holds no date of birth); the C++ WebApi layer (libSceNpCppWebApi, including communicationRestrictionStatus through it) still answers not signed in and is not touched here.

Country, age and language are neutral constants because an AnyPlay account has none of them; the debt file says so and what closes it.

Which behaviour this should unlock

A title that stays blocked on "multiplayer not allowed by the platform" while signed out checks sceNpGetState first (answered 1 before sign in) and, once signed in, the online-permission check (#24), the communication restriction, and the account's age, country and parental control. This PR closes the last group. Best guess for the first title this is meant for: after sign in, the sequence state 2, premium/plus authorized, communication restriction not restricted, parental control all clear, which should flip a greyed multiplayer toggle on.

Tested

Not built locally (the C++ tree is built by CI only). New assertions in np_manager_net_bridge_tests cover every row signed in, for another user, for a stranger's online id, for a deleted or missing request, for null outputs and after sign out; the language row also checks ANYPS5_LANGUAGE.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@AlxcBTW
AlxcBTW merged commit 71c64d4 into main Oct 28, 2026
9 checks passed
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.

1 participant