Skip to content

Include trait demand in away assignment events - #318

Merged
netniV merged 1 commit into
STFC-Mod:devfrom
blevouschurverantunt:feature/away-trait-demand-v2
Oct 4, 2026
Merged

netniV merged 1 commit into
STFC-Mod:devfrom
blevouschurverantunt:feature/away-trait-demand-v2

Conversation

@blevouschurverantunt

Copy link
Copy Markdown

Summary

Follow-up to #295. Adds the fields a crew planner needs to decide which officers and traits an away assignment wants. They come from the same AwayAssignmentInstance the away_assignment event already parses. No config/TOML changes, the event name is unchanged, and the new keys are additive only, so existing receivers are unaffected.

What changes

New flat keys on away_assignment:

  • officer_traits: [{tid, max_level}], the traits the assignment asks for.
  • critical_trait_scores: [{tid, score}] sorted by tid, the assigned crew's current score per asked trait.
  • success_chance, critical_success_chance, max_critical_success_chance
  • key_stat (0 unassigned, 1 attack, 2 defense, 3 health), max_assignable_officers
  • attack_weight, defense_weight, health_weight

Notes

  • On a fresh offer critical_trait_scores is [] and success_chance/critical_success_chance are 0 until officers are assigned.
  • The chance fields are part of the de-dup hash, so an assignment re-emits when its chances change, e.g. after a trait upgrade.

Verified

Windows client build 267, mod built from dev + this change (FileVersion 1.1.9.2), against a logging sync target: the login dump carried 9 assignments, all with non-empty officer_traits; battle, ship and job sync unaffected. An earlier capture (12 assignments) showed fresh offers (state 1) with empty critical_trait_scores and 0 chances, and started missions (state 2) with the scores and chances filled in alongside the existing fields. macOS not tested.

Checks

  • Fork CI: build-win, build-mac arm64 / x86_64, package-mac, validate example configs — all green on this exact commit
  • Local MSVC release build clean
  • No CHANGELOG, version or config changes

🤖 Generated with Claude Code

Adds officer_traits, critical_trait_scores, success_chance, critical_success_chance,
max_critical_success_chance, key_stat, max_assignable_officers and the attack/defense/health
weights, all from the AwayAssignmentInstance the event already parses. On a fresh offer
critical_trait_scores is [] and the chances are 0 until officers are assigned. The chance fields
are in the de-dup hash, so an assignment re-emits when they change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@netniV
netniV merged commit a38241f into STFC-Mod:dev Oct 4, 2026
6 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.

2 participants