Skip to content

Main Menu

This page documents hooks in the main menu category.


CanPlayerCreateChar(client, data)View Source

Purpose

Determines whether a player is allowed to create a character with the supplied creation data.

Category

Main Menu

Realm

Shared

Parameters

Player client The player attempting to create a character.

table data The submitted character creation data.

Returns

boolean|nil Return false to block character creation.


ChooseCharacter(id)View Source

Purpose

Requests that the client load a specific character from the character list.

Category

Main Menu

Realm

Client

Parameters

number id The character ID to choose.

Returns

Deferred Resolves when the character is loaded or rejects with the server-provided error.


CreateCharacter(data)View Source

Purpose

Validates and submits character-creation payload data to the server.

Category

Main Menu

Realm

Client

Parameters

table data The character field values to validate and send.

Returns

Deferred Resolves with the new character ID or rejects with the validation or server error.


DeleteCharacter(id)View Source

Purpose

Requests deletion of a character by ID.

Category

Main Menu

Realm

Client

Parameters

number id The character ID to delete.


GetMainCharacterID()View Source

Purpose

Allows code to override which character ID should be treated as the player's main character.

Category

Main Menu

Realm

Client

Returns

number|nil Return the character ID that should be loaded as the main character.


GetMaxPlayerChar(client)View Source

Purpose

Returns the total number of character slots available to a player.

Category

Main Menu

Realm

Shared

Parameters

Player client The player whose character slot limit should be calculated.

Returns

number The maximum number of characters the player may have.


KickedFromChar(characterID, isCurrentChar)View Source

Purpose

Handles the clientside character menu state after the player is kicked from a character.

Category

Main Menu

Realm

Client

Parameters

number characterID The character ID the player was removed from.

boolean isCurrentChar Whether the removed character was the player's currently loaded character.


LiliaLoaded()View Source

Purpose

Opens the character menu after the framework has finished loading on the client.

Category

Main Menu

Realm

Client


LoadMainCharacter()View Source

Purpose

Loads the player's configured main character through the normal character-selection flow.

Category

Main Menu

Realm

Client

Returns

Deferred|nil Returns the character-load deferred when a main character is available.


OpenCharacterMenu()View Source

Purpose

Opens the default character menu unless another hook overrides it.

Category

Main Menu

Realm

Client

Returns

Panel|nil The created character panel, when the default menu opens.


OpenCharacterMenuOverride()View Source

Purpose

Allows code to replace the default character menu panel creation.

Category

Main Menu

Realm

Client

Returns

Panel|boolean|nil Return a panel to use instead of the default character menu, or any non-nil value to stop the default menu from opening.


ResetCharacterPanel()View Source

Purpose

Rebuilds the character panel when the current menu state no longer matches the player's session state.

Category

Main Menu

Realm

Client


SetMainCharacter(charID)View Source

Purpose

Sends the selected character ID to the server as the player's main character.

Category

Main Menu

Realm

Client

Parameters

number charID The character ID to store as the player's main character.


SyncCharList(client)View Source

Purpose

Sends the current character list to a client that is viewing character selection.

Category

Main Menu

Realm

Server

Parameters

Player client The player who should receive the synchronized character list.


ThirdPersonToggled(enabled)View Source

Purpose

Called whenever the third-person option is toggled through the main menu or option system.

Category

Main Menu

Realm

Client

Parameters

boolean enabled The new third-person enabled state.