-
Notifications
You must be signed in to change notification settings - Fork 1
builtin matchmaker
boyism80 edited this page Jul 14, 2026
·
1 revision
This document describes functions available to matchmaker type objects (fb.game.matchmaker).
- mu
- sigma
- enrolled
- registry_id
- pending_match_id
- register
- unregister
- confirm
- decline
-
Description:
Returns the current mu (mean skill rating) for the given matchmaking type. -
Parameters:
-
match_type:integer: Matchmaking queue type (MATCH_TYPEenum value)
-
-
Return Value:
-
number|nil: Mu value, ornilif no rating exists for the type
-
-
Example:
local mm = me:matchmaker() local mu = mm:mu(MATCH_TYPE.SOME_QUEUE) if mu then me:message("mu: " .. mu, MESSAGE_TYPE.STATE) end
-
Description:
Returns the current sigma (rating uncertainty) for the given matchmaking type. -
Parameters:
-
match_type:integer: Matchmaking queue type (MATCH_TYPEenum value)
-
-
Return Value:
-
number|nil: Sigma value, ornilif no rating exists for the type
-
-
Example:
local mm = me:matchmaker() local sigma = mm:sigma(MATCH_TYPE.SOME_QUEUE)
-
Description:
Returns whether the character is currently enrolled in a matchmaking queue. -
Parameters:
- None
-
Return Value:
-
boolean:trueif enrolled
-
-
Example:
local mm = me:matchmaker() if mm:enrolled() then me:message("Already in queue", MESSAGE_TYPE.STATE) end
-
Description:
Returns the current registry id while enrolled in a queue. -
Parameters:
- None
-
Return Value:
-
string|nil: Registry id, ornilif not enrolled
-
-
Example:
local mm = me:matchmaker() local registry_id = mm:registry_id()
-
Description:
Returns the pending match id while a proposed match awaits confirmation. -
Parameters:
- None
-
Return Value:
-
string|nil: Match id, ornilif no pending match
-
-
Example:
local mm = me:matchmaker() local match_id = mm:pending_match_id()
-
Description:
Enrolls the character (or group, when group master) into the given matchmaking queue.
On success,on_matchmaking_registeris invoked from Lua. -
Parameters:
-
match_type:integer: Matchmaking queue type
-
-
Return Value:
-
nilon success -
stringerror message on failure (suitable forme:message)
-
-
Example:
local mm = me:matchmaker() local error = mm:register(MATCH_TYPE.SOME_QUEUE) if error then me:message(error, MESSAGE_TYPE.STATE) end
-
Description:
Unregisters the current queue enrollment.
On success,on_matchmaking_unregisteris invoked from Lua. -
Parameters:
- None
-
Return Value:
-
nilon success -
stringerror message on failure
-
-
Example:
local mm = me:matchmaker() local error = mm:unregister() if error then me:message(error, MESSAGE_TYPE.STATE) end
-
Description:
Confirms participation in the currently pending proposed match. Usespending_match_id().
On success,on_matchmaking_confirmis invoked from Lua. -
Parameters:
- None
-
Return Value:
-
nilon success -
stringerror message on failure (including when there is no pending match)
-
-
Example:
local mm = me:matchmaker() local error = mm:confirm() if error then me:message(error, MESSAGE_TYPE.STATE) end
-
Description:
Declines the currently pending proposed match. Usespending_match_id().
On success,on_matchmaking_declineis invoked from Lua. -
Parameters:
- None
-
Return Value:
-
nilon success -
stringerror message on failure (including when there is no pending match)
-
-
Example:
local mm = me:matchmaker() local error = mm:decline() if error then me:message(error, MESSAGE_TYPE.STATE) end
-
me:matchmaker()on character - Matchmaking event callbacks in
scripts/interaction.lua:on_matchmaking_register,on_matchmaking_unregister,on_matchmaking_confirm,on_matchmaking_decline,on_matchmaking_proposed,on_matchmaking_ready,on_matchmaking_dissolved