Repository navigation
launcher: add co-op profiles (step 1 of #701) - #724
Draft
lenase0077 wants to merge 4 commits into
Draft
lenase0077 wants to merge 4 commits into
lenase0077 wants to merge 4 commits into
Conversation
…odel Add co-op profile metadata (private Crockford room code, relay, members, world version) in profiles.json, keep co-op saves in their own account folder without writing to pkp.ini, and add copy between singleplayer and co-op modes via saveimport::copy_account.
…tion Pass co-op account, relay, private room code, and co-op mode flags through the child process environment for that launch only, refuse normal launches of co-op saves and co-op launches of singleplayer saves, scope backups and online presence to the launched profile, and bump world_version after each co-op session.
Expose co-op profile creation, singleplayer/co-op save copying, private room code, relay, group members, world version, and Play co-op routing across Home, Settings > Saves, and Link Play, translated across all 9 languages.
3 of 11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it changes
Implements build step 1 of #701 (Co-op profiles in the launcher):
profiles.rs,coop.rs): Profiles inprofiles.jsoncan now carrycoopmetadata (room_code,relay,members,world_version) while keeping their own save folder (<save_dir>/account/<uid_key>/). Existingprofiles.jsonfiles withoutcoopload unchanged as singleplayer profiles.coop.rs,play.rs,launch.rs): Launching a co-op profile viaplay_cooppasses its account identity (NXRT_ACCOUNT_UID,NXRT_ACCOUNT_NICKNAME,NXRT_NET_UID), relay network configuration (NXRT_NET_PROTOCOL=native,NXRT_NET_MODE=auto,NXRT_NET_INTERNET=true,NXRT_NET_RELAY,NXRT_NET_ROOM_CODE), and co-op flags (NXRT_PKP_COOP=1,NXRT_PKP_COOP_WORLD_VERSION,NXRT_PKP_LINK_INTERACT_EVERYWHERE=1,NXRT_PKP_LINK_STORY_COOP=0) in the child process environment for that launch only.profiles::apply_activeleavespkp.iniuntouched for co-op profiles.launch.rs,play.rs): Normalplayand--playrefuse co-op saves;play_cooprefuses singleplayer saves (and refuses when pointing to127.xwhile this PC's relay is off).saveimport.rs,profiles.rs,profile_cmds.rs): Addssaveimport::copy_accountand commands for Start coop from my singleplayer save (profile_start_coop_from) and Copy to singleplayer (profile_copy_to_singleplayer), checking that a save exists and has no unfinished.commit.XXXX-XXXX-XXXX-XXXX), validates optional custom relay IPv4 addresses (defaulting to204.216.111.91:47610), records group members, and incrementsworld_versionafter each co-op session (savebackup::Watch::start_forandonline::Watch::start_forscope backups and online presence to the launched profile).home.js,action.js,settings-schema.js,settings/profiles.js,linkplay-coop.js,coop-model.js,i18n/*.js): Adds co-op profile creation and mode copying in Settings > Saves > Profiles, a Co-op section on Link Play for the private room code, relay, members, world version, and Play co-op, and Play co-op routing on Home, translated across all 9 languages.Part of #701.
Pros
pkp.ini.profiles.json,saveimport::copy_account,savebackup, andonlinepresence cleanly with minimal new surface area.profiles.jsonfiles and singleplayer workflows are unaffected.Cons
NXRT_NET_ROOM_CODEunder[net] protocol = native(runtime/src/services/ldn_native.cpp) andNXRT_PKP_COOP/NXRT_PKP_COOP_WORLD_VERSION(steps 2–4 of Seamless co-op and split screen: design draft #701) is not yet wired in the runtime, so co-op launches currently still use public relay listing until the runtime side lands.CMNDAT.BIN/SYDAT.BIN(needed when two players on one group share the same origin save; handled in step 4 / Split screen: two to four players on one PC #692'sswap_uuid).For players
CHANGELOG.md## Unreleasedhas an entry (Before / Now / Still not), or this change is not player-facingRule overrides
Co-Authored-Bytrailer): Overridden at the collaborator's explicit instruction — commits on this branch omit theCo-Authored-By/ AI attribution trailer.