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
Contributor

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.
@Yaribz

Yaribz commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Thanks for this PR, however I'm not sure a host-scoped setting is ideal to manage privacy (what's the point of hiding precise skill values on your host if on all the other hosts the exact skill values are shown ?).

If SLDB is used with TrueSkill, then the global privacyMode SLDB user preference can be used by anyone to manage his own privacy mode. It's centralized, self-managed by the user themselves and applied on all SPADS hosts at once.

If a custom skill algorithm is used through a SPADS plugin (implementing the updatePlayerSkill customization callback), then imo this plugin is the correct place to manage privacy modes. Currently, plugins can already alter the way the skill values are presented to the users in the !status command output by implementing the updateStatusInfo customization callback. However, it's true that currently plugins cannot alter the way the skill values are broadcasted to other players in the battleroom with the SETSCRIPTTAGS lobby protocol command. I think the correct way to add the desired functionality is to allow plugins to set a privacyMode in addition to the skill and skill uncertainty values in the updatePlayerSkill plugin callback, and make plugin skill values obey this privacyMode setting the same way internal TrueSkill values do.

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