Skip to content

Add maskSkill setting to hide exact skill values from other players#92

Draft
tomjn wants to merge 1 commit into
Yaribz:masterfrom
tomjn:mask-skill-values
Draft

Add maskSkill setting to hide exact skill values from other players#92
tomjn wants to merge 1 commit into
Yaribz:masterfrom
tomjn:mask-skill-values

Conversation

@tomjn

@tomjn tomjn commented Jun 22, 2026

Copy link
Copy Markdown

Summary

Adds a new opt-in global setting maskSkill (default 0, disabled) that hides exact skill values from other players, to mitigate lower-skilled players being singled out / bullied over their rating.

When enabled, skill values shown to others are rounded down to the nearest 10, with a floor of 10. The real skill is still used internally for everything (team balancing is unaffected).

Behaviour

Skill is exposed through two channels, handled differently because of a hard constraint:

  • Battle script tag (sendPlayerSkill)SETSCRIPTTAGS game/players/<name>/skill is broadcast identically to every client in the battle, so it cannot be made per-viewer. When maskSkill is on, the masked value (~N) is sent to everyone. This is consistent with the existing private-TrueSkill broadcast form, which already sends ~N.
  • !status command (getBattleLobbyStatus) — this is per-viewer, so masking is conditional: a player still sees their own exact skill, and privileged users (access level >= privacyTrustLevel) see exact values for everyone. Everyone else sees ~N.

Masking is applied uniformly regardless of skill origin (rank / TrueSkill / Plugin / etc.).

Changes

  • getMaskedSkill() helper: max(10, int(skill/10)*10).
  • maskSkill registered in %globalParameters (SpadsConf.pm), etc/spads.conf template, and a helpSettings.dat entry.
  • Masking applied in sendPlayerSkill and in both the player and spectator branches of getBattleLobbyStatus.

Verification

No automated tests exist in this project and SPADS cannot run in a dev checkout, so this has not been verified at runtime — only:

  • perl -c (with a stub harness) passes for spads.pl and SpadsConf.pm.
  • helpSettings.dat round-trips through loadHelpSettingsFile with the new entry parsed into all fields.
  • getMaskedSkill() rounding/floor logic unit-checked in isolation (round down to nearest 10, floor 10, fractional and out-of-range inputs).

Runtime behaviour (lobby broadcast + !status rendering on a live host) still needs human verification. Default-off, so existing deployments are unaffected until opted in.

Draft pending that real-host verification.

New opt-in global setting maskSkill (default 0, off). When enabled,
skill values shown to other players are rounded down to the nearest 10
with a floor of 10, to prevent lower-skilled players from being singled
out:

- sendPlayerSkill: the battle script tag is broadcast identically to all
  clients, so it cannot be per-viewer; the masked value is sent to
  everyone. Team balancing is unaffected (it reads %battleSkills directly).
- getBattleLobbyStatus (!status): masked per-viewer; a player still sees
  their own exact skill, and privileged users (level >= privacyTrustLevel)
  see exact values for everyone.

Adds getMaskedSkill() helper, registers maskSkill in %globalParameters,
the spads.conf template, and a helpSettings.dat entry.
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