Repository navigation
Sync mission acceptance requirements (opt-in mission_requirements) - #390
Open
blevouschurverantunt wants to merge 1 commit into
Open
blevouschurverantunt wants to merge 1 commit into
blevouschurverantunt wants to merge 1 commit into
Conversation
Add an opt-in sync option, mission_requirements, off by default, that sends
one mission_requirement record per mission spec the client receives: the
MissionSpecs (login, active missions) and NodeMissions (system entry) entity
groups. Both merge into one stream, so a system's specs never remove the
login specs. Each record lists the spec's acceptance requirements as short
{t, ...} entries; an empty list is sent too. A spec is sent again only when
its list changes. Example settings list the option as false.
Refs STFC-Mod#389
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
blevouschurverantunt
force-pushed
the
feature/sync-mission-requirements
branch
from
November 21, 2026 04:21
ee5a2c0 to
5736682
Compare
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 changed and why
Adds an opt-in sync option,
mission_requirements, that sends onemission_requirementrecord per mission spec the client receives:{"type":"mission_requirement","mid":1002,"req":[{"t":3,"v":1001}]}. It is off by default, and only targets that enable it receive the records. Closes #389.Why: sync consumers already receive active and completed missions, but they cannot tell which offered missions a player can start. The server's offer list is unfiltered, so a mission can be offered while its requirement (usually "mission X completed") is not met. Only the mission spec carries that requirement.
mission_requirementsunder[sync]and per target, as oneSyncOptionsrow. All example settings files list it asfalse, next tomissions.src/mod/sync/records.cc:Requirement()maps oneMissionRequirementto JSON.AddRequirements()emits one record per spec,[]included, so a consumer can tell "needs nothing" from "not seen".ProcessMissionSpecs(group 58, at login and for active missions) andProcessNodeMissions(group 60, on system entry) sit next to the other mission processors. Both merge into one stream, so a system's specs add to the login specs and never remove them. The type-6 float goes out throughShortNumber, like fleet stats.src/mod/sync/state.cc,src/mod/sync/sync.h: newStream::kMissionRequirements, gated bySyncConfig::mission_requirements.zig/deps/protobuf_roots.txt:MissionSpecsResponseandNodeMissionsResponse.docs/FEATURES.md: a "Mission requirements" row in the data sync table.Record shape:
reqis always an array, and each entry is{"t":<MissionRequirementType 0-8>, ...}:score stat,vvaluemmodule type,vlevelvpreviously completed mission idhhull type,vvalueggrade,vvalueccomponent,vvalue (shortest float form)min,maxplayer levelffaction id,vamounttonlyValidation
zig build mods build-tests -Dtarget=x86_64-windows-msvc,zig build test-sync test-mod test-codegen, the fullReleaseFastDLL build, andzig build fmt.mission requirementstest checks:missionson andmission_requirementsoff;test-modchecks that the English example's new key is read.missions, sent records to a private sync endpoint. Login produced 66 records (49 login specs, 17 active-mission specs). 3 had a type-3 requirement and the rest were[]. Entering a system with mission givers produced that system's two specs. Nothing else in sync changed. Thedev-layout build is compile- and unit-tested only, not run in game.build-wincurrently fails on the runner's newer MSVC toolset, withSTL1000in every unit including dependencies. This is unrelated to this change. The Linux and macOS jobs passed on the previous revision.Settings and platforms
mission_requirements, off by default, under[sync]and per target.missionson see no change.🤖 Generated with Claude Code