Skip to content

Reenable Force Role and fix role assignment for the local player || Fix kicks when using judge overrule ability - #954

Open
wirtea wants to merge 11 commits into
scp222thj:mainfrom
wirtea:aaa
Open

Reenable Force Role and fix role assignment for the local player || Fix kicks when using judge overrule ability#954
wirtea wants to merge 11 commits into
scp222thj:mainfrom
wirtea:aaa

Conversation

@wirtea

@wirtea wirtea commented Aug 29, 2026

Copy link
Copy Markdown

Force Role existed in the code but was disabled (commented) the toggle in HostOnlyTab was commented out and the function that actually runs it (ForceRolePPM) was never called. reenabled both
Also added Judge to the Force Role list since it was missing.

the role assignment itself (RoleManager.SetRole) only changes the role locally on host and never tells the server or other clients so it never actually assign as your real role and using Judge overrule ability while set this way you will get kicked from your own lobby (invalid RPC) tried a few lighter approaches first (swapping roles after normal dealing assigning before dealing) but none of them gave a consistent real assignment so i ended up replacing SelectRoles with a custom dealer that assigns your forced role first using RpcSetRole (the actual networked role assignment call) and then deals everyone else normally based on the lobby role settings
also added a fix/feature for Judge specifically: a forced judge doesnt complete tasks two hooks bypass that gate and grant the overrule use directly

tested: hosted a lobby > used Force Role to become Judge > started the match> used Overrule in a meeting with zero tasks done worked no kick correct role assigned every time

@wirtea

wirtea commented Aug 29, 2026

Copy link
Copy Markdown
Author

also just look at the changed files because the commits are so dead i accidently made a pr with the main branch instead of creating new one so i ended up removing other pull requests codes and add the new ones

@basugur568-dot

Copy link
Copy Markdown

does this work non host

@wirtea

wirtea commented Aug 29, 2026

Copy link
Copy Markdown
Author

Obviously host only the force role is host only feature

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