Skip to content

API Documentation

Squishy6094 edited this page Sep 26, 2026 · 173 revisions

Note Before Reading

We highly recommend messing around with our Character Select Template while first reading this doc to get a handle on everything here. DO NOT modify/add any content within the Character Select mod itself, please use the API and an individual mod when adding characters. If you're confused about anything from outside of Character Select's Documentation, Please refer to SM64CoopDX's Lua Documentation.

Automatic Documentation for character-select-coop written at 09/26/2026 - 11:55:52 AM PST

Character Functions

character_add

charSelect.character_add - v1 - A function that adds a Character to the Character Table

Variable Input Types Description/Examples
name string? "Custom Model"
description string/table? {"string"}
credit string? "You!", Credit the creators
color Color/string? {r, g, b}
modelInfo ModelExtendedId/integer? Use smlua_model_util_get_id
baseChar CharacterType? Character Type, such as CT_MARIO
lifeIcon TextureInfo/string? Use get_texture_info
camScale integer? Zooms the camera based on a multiplier (Default 1)

Returns: integer - The index of the character in the character table

Returns: table - The character table

character_add_costume

charSelect.character_add_costume - v1.11 - A function that adds a Costume to an Existing Character, all inputs mimic character_edit()

Variable Input Types Description/Examples
charNum integer The number/table position of the Character you want to add a costume to
name string? "Custom Model"
description table/string? {"string"}
credit string? "You!", Credit the creators
color Color/string? {r, g, b}
modelInfo ModelExtendedId/integer? Use smlua_model_util_get_id
baseChar CharacterType? Character Type, such as CT_MARIO
lifeIcon TextureInfo/string? Use get_texture_info
camScale integer? Zooms the camera based on a multiplier (Default 1)

Returns: integer? - The index of the costume in the character's table

character_edit_costume

charSelect.character_edit_costume - v1.11 - A function that Edits an existing Costume

Variable Input Types Description/Examples
charNum integer The number/table position of the Character you want to edit the costume of
charAlt integer The number/table position of the Costume you want to edit, this can be found by making a variable equal
name string? "Custom Model"
description table/string? {"string"}
credit string? "You!", Credit the creators
color Color/string? {r, g, b}
modelInfo ModelExtendedId/integer? Use smlua_model_util_get_id
baseChar CharacterType? Character Type, such as CT_MARIO
lifeIcon TextureInfo/string? Use get_texture_info
camScale integer? Zooms the camera based on a multiplier (Default 1)

character_edit

charSelect.character_edit - v1 - A function that Edits an Existing Character

Variable Input Types Description/Examples
charNum integer The number/table position of the Character you want to edit
name string? "Custom Model"
description table/string? {"string"}
credit string? "You!", Credit the creators
color Color/string? {r, g, b}
modelInfo ModelExtendedId/integer? Use smlua_model_util_get_id
baseChar CharacterType? Character Type, such as CT_MARIO
lifeIcon TextureInfo/string? Use get_texture_info
camScale integer? Zooms the camera based on a multiplier (Default 1)

character_set_nickname

charSelect.character_set_nickname - v1.16 - A function to set a Character's Nickname, used for Dialog Replacement

Variable Input Types Description/Examples
charNum integer The number/table position of the Character you want to nickname
nickname string The Character's new nickname
autoSetDialog boolean? Wheather dialog is automatically set (Defaults to true)

character_get_nickname

charSelect.character_get_nickname - v1.16 - A function to get a Character's Nickname, used for Dialog Replacement

Variable Input Types Description/Examples
charNum integer The number/table position of the Character you want to get the nickname of

character_add_voice

charSelect.character_add_voice - v1.5 - A function that adds a voice table to a character

Variable Input Types Description/Examples
modelInfo ModelExtendedId/integer Model Information Received from smlua_model_util_get_id
clips table A Table with your Character's Sound File Names

Notes: In order for sound files to function, please run config_character_sounds() in your pack ---@note Table Example:

local VOICETABLE_CHAR = {
    [CHAR_SOUND_ATTACKED] = 'NES-Hit.ogg',
    [CHAR_SOUND_DOH] = 'NES-Bump.ogg',
    [CHAR_SOUND_DROWNING] = 'NES-Die.ogg',
    [CHAR_SOUND_DYING] = 'NES-Die.ogg',
    [CHAR_SOUND_GROUND_POUND_WAH] = 'NES-Squish.ogg',
    [CHAR_SOUND_HAHA] = 'NES-1up.ogg',
    [CHAR_SOUND_HAHA_2] = 'NES-1up.ogg',
    [CHAR_SOUND_HERE_WE_GO] = 'NES-Flagpole.ogg',
    [CHAR_SOUND_HOOHOO] = 'NES-Jump.ogg',
    [CHAR_SOUND_MAMA_MIA] = 'NES-Warp.ogg',
    [CHAR_SOUND_OKEY_DOKEY] = 'NES-1up.ogg',
    [CHAR_SOUND_ON_FIRE] = 'NES-Enemy_Fire.ogg',
    [CHAR_SOUND_OOOF] = 'NES-Hit.ogg',
    [CHAR_SOUND_OOOF2] = 'NES-Hit.ogg',
    [CHAR_SOUND_PUNCH_HOO] = 'NES-Kick.ogg',
    [CHAR_SOUND_PUNCH_WAH] = 'NES-Thwomp.ogg',
    [CHAR_SOUND_PUNCH_YAH] = 'NES-Thwomp.ogg',
    [CHAR_SOUND_SO_LONGA_BOWSER] = 'NES-Bowser_Die.ogg',
    [CHAR_SOUND_TWIRL_BOUNCE] = 'NES-Item.ogg',
    [CHAR_SOUND_WAAAOOOW] = 'NES-Vine.ogg',
    [CHAR_SOUND_WAH2] = 'NES-Kick.ogg',
    [CHAR_SOUND_WHOA] = 'NES-Item.ogg',
    [CHAR_SOUND_YAHOO] = 'NES-Jump.ogg',
    [CHAR_SOUND_YAHOO_WAHA_YIPPEE] = 'NES-Jump.ogg',
    [CHAR_SOUND_YAH_WAH_HOO] = 'NES-Big_Jump.ogg',
    [CHAR_SOUND_YAWNING] = 'NES-Pause.ogg',
}

character_get_voice

charSelect.character_get_voice - v1.5 - A function that gets the current character's voice table

Variable Input Types Description/Examples
model integer/MarioState Can use Model and/or MarioState

character_add_caps

charSelect.character_add_caps - v1.6 - A function that adds a caps table to a character

Variable Input Types Description/Examples
modelInfo ModelExtendedId/integer Model Information Received from smlua_model_util_get_id
caps table Cap

Notes:

local CAPTABLE_CHAR = {
    normal = smlua_model_util_get_id("custom_model_cap_normal_geo"),
    wing = smlua_model_util_get_id("custom_model_cap_wing_geo"),
    metal = smlua_model_util_get_id("custom_model_cap_metal_geo"),
    metalWing = smlua_model_util_get_id("custom_model_cap_wing_geo")
}

character_get_caps

charSelect.character_get_caps - v1.13 - A function that gets a model's cap table

Variable Input Types Description/Examples
modelInfo ModelExtendedId/integer? Model Information Received from smlua_model_util_get_id

character_add_costume_health_meter

charSelect.character_add_costume_health_meter - v1.12 - A function that adds health meter textures to a costume

Variable Input Types Description/Examples
charNum integer The number/table position of the Character you want to add a meter to
charAlt integer The number/table position of the Costume you want to add a meter to
healthMeter table/function? A Table with your Character's Health Textures (Table Shown in character_add_health_meter()) or Rendering Function

char_meter_render

charSelect.char_meter_render - v1.9 - A function that adds health meter textures to a character

Variable Input Types Description/Examples
charNum integer The number/table position of the Character you want to add a meter to
healthMeter table/function? A Table with your Character's Health Textures (Table Shown Below) or Rendering Function

Notes:

local HEALTH_METER_CHAR = {
    label = {
        left = get_texture_info("char_hp_pie_left"),
        right = get_texture_info("char_hp_pie_right"),
    },
    pie = {
        [1] = get_texture_info("char_hp_pie_1"),
        [2] = get_texture_info("char_hp_pie_2"),
        [3] = get_texture_info("char_hp_pie_3"),
        [4] = get_texture_info("char_hp_pie_4"),
        [5] = get_texture_info("char_hp_pie_5"),
        [6] = get_texture_info("char_hp_pie_6"),
        [7] = get_texture_info("char_hp_pie_7"),
        [8] = get_texture_info("char_hp_pie_8"),
    }
}
---@note
-- or --
---@note
local function [`char_meter_render()`](#char_meter_render)(localIndex, health, prevX, prevY, prevScaleX, prevScaleY, x, y, scaleX, scaleY)


## character_add_health_meter
`charSelect.character_add_health_meter` - v1.9 - A function that adds health meter textures to a character

| Variable | Input Types | Description/Examples |
| ----- | ----- | ----- |
| charNum | integer | The number/table position of the Character you want to add a meter to | 
| healthMeter | table/function? | A Table with your Character's Health Textures (Table Shown Below) or Rendering Function | 

**Notes**:
```lua
local HEALTH_METER_CHAR = {
    label = {
        left = get_texture_info("char_hp_pie_left"),
        right = get_texture_info("char_hp_pie_right"),
    },
    pie = {
        [1] = get_texture_info("char_hp_pie_1"),
        [2] = get_texture_info("char_hp_pie_2"),
        [3] = get_texture_info("char_hp_pie_3"),
        [4] = get_texture_info("char_hp_pie_4"),
        [5] = get_texture_info("char_hp_pie_5"),
        [6] = get_texture_info("char_hp_pie_6"),
        [7] = get_texture_info("char_hp_pie_7"),
        [8] = get_texture_info("char_hp_pie_8"),
    }
}
---@note
-- or --
---@note
local function [`char_meter_render()`](#char_meter_render)(localIndex, health, prevX, prevY, prevScaleX, prevScaleY, x, y, scaleX, scaleY)
    local squares = health >> 8
    for i = 1, squares do
        djui_hud_render_rect(x + (i * 17), y, 16, 16)
    end
end

character_add_costume_course_texture

charSelect.character_add_costume_course_texture - v1.12 - A function that adds course textures to a costume in the Star Select

Variable Input Types Description/Examples
charNum integer The number/table position of the Character you want to add a course textures to
charAlt integer The number/table position of the Costume you want to add a course textures to
courseTexture table? A Table with your Character's Health Textures (Table Shown in character_add_course)

character_add_course_texture

charSelect.character_add_course_texture - v1.12 - A function that adds course textures to a character in the Star Select

Variable Input Types Description/Examples
charNum integer The number/table position of the Character you want to add a course textures to
courseTexture table? A Table with your Character's Health Textures (Table Shown Below)

Notes:

local COURSE_CHAR = {
    top = get_texture_info("char_course_top"),
    bottom = get_texture_info("char_course_bottom"),
}

character_add_model_replacement

charSelect.character_add_model_replacement - v1.16.2 - A function that replaces a behaviors model with your own

Variable Input Types Description/Examples
charNum integer Player Model ID
bhvId BehaviorId/ModelExtendedId/integer Behavior ID of the type of objects you want to replace
replaceModel ModelExtendedId/integer/function? Model ID
isModel boolean? Makes bhvId act as a ModelExtendedId input, replacing objects based on it's model rather then it's behavior

character_add_texture_replacement

charSelect.character_add_texture_replacement - v1.16.2 - A function that replaces a texture with your own

Variable Input Types Description/Examples
charNum integer Player Model ID
textureName string Behavior ID of the type of objects you want to replace
overrideTexInfo TextureInfo/function Model ID

character_add_sequence_replacement

charSelect.character_add_sequence_replacement - v1.17 - A function that replaces a texture with your own

Variable Input Types Description/Examples
charNum integer Character ID
sequenceId integer The original Sequence ID you want to replace
replaceId integer/ModAudio/function Your own allocated sequence to replace with.

character_add_celebration_star

charSelect.character_add_celebration_star - v1.7 - A function that adds a celebration star model to a character

Variable Input Types Description/Examples
modelInfo ModelExtendedId/integer Player Model ID
starModel ModelExtendedId/integer Custom Star Model ID
starIcon TextureInfo? Custom Star Texture

character_add_peach_custom

charSelect.character_add_peach_custom - v1.16 - A function that adds a peach model to a character for the opening letter and ending cutscene.Can also change peach's letter for the character

Variable Input Types Description/Examples
modelInfo ModelExtendedId/integer Model Information Received from smlua_model_util_get_id()
peachmodelstart ModelExtendedId? Model Information Received from smlua_model_util_get_id() the model used for peach in the opening if left blank will use default peach model
peachmodelend ModelExtendedId? Model Information Received from smlua_model_util_get_id() the model used for peach in the ending if left blank will use default peach model
peachletterleft TextureInfo? left side of the texture to replace peach's letter texture in the intro
peachletterright TextureInfo? right side of the texture to replace peach's letter texture in the intro
peachlettersig TextureInfo? texture to replace peach's letter texture in the intro

character_add_ending_toad_model

charSelect.character_add_ending_toad_model - v1.16 - A function that sets the toad models during the ending cutscene

Variable Input Types Description/Examples
modelInfo ModelExtendedId/integer Model Information Received from smlua_model_util_get_id()
toadModelRight ModelExtendedId Model Information Received from smlua_model_util_get_id(), the model used for the right toad in the ending if left blank said toad will use the default npc toad model
toadModelLeft ModelExtendedId Model Information Received from smlua_model_util_get_id(), the model used for the left toad in the ending if left blank said toad will use the default npc toad model

character_add_palette_preset

charSelect.character_add_palette_preset - v1.8 - A function that adds a palette preset to a character

Variable Input Types Description/Examples
modelInfo ModelExtendedId/integer
paletteTable table
paletteName string?

Notes:

local PALETTE_CHAR = {
    [PANTS]  = {r = 0x00, g = 0x00, b = 0xff},
    [SHIRT]  = {r = 0xff, g = 0x00, b = 0x00},
    [GLOVES] = {r = 0xff, g = 0xff, b = 0xff},
    [SHOES]  = {r = 0x72, g = 0x1c, b = 0x0e},
    [HAIR]   = {r = 0x73, g = 0x06, b = 0x00},
    [SKIN]   = {r = 0xfe, g = 0xc1, b = 0x79},
    [CAP]    = {r = 0xff, g = 0x00, b = 0x00},
}

Strings can also be used rather than RGB tables, ex. [PANTS] = "0000ff"

character_add_animations

charSelect.character_add_animations - v1.10 - A function that adds animations to a model

Variable Input Types Description/Examples
modelInfo ModelExtendedId/integer
animTable? table
eyeTable? table
handTable? table

character_get_animations

charSelect.character_get_animations - v1.10 - A function that gets any animation table from a model

Variable Input Types Description/Examples
modelInfo ModelExtendedId/integer

character_get_current_table

charSelect.character_get_current_table - v1 - A function that gets a character's full Character Select Table

Variable Input Types Description/Examples
tablePos integer?
charAlt integer?

Returns: CharacterTable

character_get_full_table

charSelect.character_get_full_table - v1.11.1 - A function that gets Character Select's Entire Character Table

Returns: table

character_get_current_number

charSelect.character_get_current_number - v1 - A function that gets the current character's table position in CS

Variable Input Types Description/Examples
localIndex integer? The local player index you want to get the character number from, Default is 0

Returns: integer?

character_get_current_costume

charSelect.character_get_current_costume - v1.12 - A function that gets the current costumes's table position in CS

Variable Input Types Description/Examples
localIndex integer?

Returns: integer?

character_set_current_number

charSelect.character_set_current_number - v1.9 - A function that sets the current character based only table position with an optional second argument for setting a specific costume

Variable Input Types Description/Examples
charNum integer The number/table position of the Character you want the local player to become
charAlt integer? The number/table position of a costume in the corresponding character's costume table to switch to. If nil will use the 1st costume

character_get_current_palette

charSelect.character_get_current_palette - v1.12 - A function that gets the current character's palette data

Variable Input Types Description/Examples
model ModelExtendedId/integer? The model you want to pull from
paletteNum integer? The palette you want to pull from

Returns: table?

character_get_current_palette_number

charSelect.character_get_current_palette_number - v1.12 - A function that gets the current character's palette number

Variable Input Types Description/Examples
localIndex integer?

Returns: integer?

character_get_number_from_string

charSelect.character_get_number_from_string - v1 - A function that searches for a character's table posision based on name

Variable Input Types Description/Examples
name string

Returns: integer?

character_get_number_from_model

charSelect.character_get_number_from_model - v1.16 - A function that searches for a character's table posision based on model

Variable Input Types Description/Examples
model integer/ModelExtendedId

Returns: integer, integer

character_get_life_icon

charSelect.character_get_life_icon - v1.7 - A function that gets a persons life icon texture / string based off of local index

Variable Input Types Description/Examples
localIndex integer

Returns: TextureInfo|string

Notes: This assumes multiple characters will not have the same model, Icons can only be seen by users who have the character avalible to them. This function can return nil. if this is the case, render djui_hud_print_text("?", x, y, 1)

character_render_life_icon

charSelect.character_render_life_icon - v1.11 - A function that renders a persons life icon texture / string based off of local index

Variable Input Types Description/Examples
localIndex integer
x integer
y integer
scale integer

character_render_life_icon_interpolated

charSelect.character_render_life_icon_interpolated - v1.13 - A function that acts as character_render_life_icon() with support for interpolation

Variable Input Types Description/Examples
localIndex integer
prevX integer
prevY integer
prevScale integer
x integer
y integer
scale integer

character_get_star_icon

charSelect.character_get_star_icon - v1.8 - A function that gets a persons star icon texture / string based off of local index

Variable Input Types Description/Examples
localIndex integer

Returns: TextureInfo

Notes: This assumes multiple characters will not have the same model, Icons can only be seen by users who have the character avalible to them

character_render_star_icon

charSelect.character_render_star_icon - v1.11 - A function that renders a persons star icon texture / string based off of local index

Variable Input Types Description/Examples
localIndex integer
x integer
y integer
scale integer

character_render_star_icon_interpolated

charSelect.character_render_star_icon_interpolated - v1.13 - A function that acts as character_render_star_icon() with support for interpolation

Variable Input Types Description/Examples
localIndex integer
prevX integer
prevY integer
prevScale integer
x integer
y integer
scale integer

character_get_health_meter

charSelect.character_get_health_meter - v1.12 - A function that gets a persons health meter texture table (example of which is at character_add_health_meter())

Variable Input Types Description/Examples
localIndex integer

Returns: table

Notes: This assumes multiple characters will not have the same model, Meters can only be seen by users who have the character avalible to them

character_render_health_meter

charSelect.character_render_health_meter - v1.12 - A function that renders a persons health meter texture table

Variable Input Types Description/Examples
localIndex integer
health integer
x integer
y integer
scaleX integer
scaleY integer

character_render_health_meter_interpolated

charSelect.character_render_health_meter_interpolated - v1.16 - A function that renders a persons health meter texture table, with interpolation

Variable Input Types Description/Examples
localIndex integer
health integer
prevX integer
prevY integer
prevScaleX integer
prevScaleY integer
x integer
y integer
scaleX integer
scaleY integer

character_set_locked

charSelect.character_set_locked - v1.10 - A function that locks a character under an unlock condition

Variable Input Types Description/Examples
charNum integer? The number of the Character you want to Lock
unlockCondition function/boolean? The condition for if the character stays locked
notify boolean? Toggles whether Character Select should notify the user when the character is unlocked

character_set_category

charSelect.character_set_category - v1.14 - A function that sets a character under a specific category

Variable Input Types Description/Examples
charNum integer The number of the Character you want to set the category for
categoryName string The Category Name (Will create a new category if category does not exist)
forceIcon boolean? Forces the icon to be used as a category icon

character_replace_dialog

charSelect.character_replace_dialog - v1.16 - A function that replaces dialog if you are playing as a specific character

Variable Input Types Description/Examples
charNum integer The number of the Character you want to replace dislog for
dialogId integer/DialogId The ID of the dialog you want to replace
unused integer Unused Dialog Variable
linesPerBox integer Lines of text that appear in a single dialog
leftOffset integer Dialog Box Posistion relitive to the left side of the screen
width integer Verticle Position on screen (Dispite Variable Name)
text string Dialog to be replaced with

Menu Functions

header_set_texture

charSelect.header_set_texture - v1.7 - (Deprecated) A function that sets the big "Character Select" texture in the Character Select Menu

Variable Input Types Description/Examples
texture TextureInfo?

version_get

charSelect.version_get - v1 - A function that returns the version string

Returns: string - "v1.2.3"

version_get_full

charSelect.version_get_full - v1.11 - A function that returns the version in table format

Returns: table

Notes: Returns the following table (Will differ based on version)

{
   api = 1,
   major = 2,
   minor = 3,
   indev = true
}

is_menu_open

charSelect.is_menu_open - v1 - A function that checks is the Character Select Menu is currently open

Returns: boolean

set_menu_open

charSelect.set_menu_open - v1.8 - A function that forces they Character Select Menu state

Variable Input Types Description/Examples
bool boolean? Sets if the menu is open

get_menu_color

charSelect.get_menu_color - v1.8 - A function that gets Character Select's current Menu color

Returns: table

HUD Element Functions

hud_hide_element

charSelect.hud_hide_element - v1.5 - Hides the specified custom hud element

Variable Input Types Description/Examples
hudElement HUDDisplayFlag

hud_show_element

charSelect.hud_show_element - v1.5 - Shows the specified custom hud element

Variable Input Types Description/Examples
hudElement HUDDisplayFlag

hud_get_element

charSelect.hud_get_element - v1.5 - Gets the specified custom hud element's state

Variable Input Types Description/Examples
hudElement HUDDisplayFlag

Returns: boolean

is_options_open

charSelect.is_options_open - v1 - A function that checks if the options menu is open inside of the CS menu

Returns: boolean

credit_add

charSelect.credit_add - v1.10 - A function that adds credits to the CS Options' Credits section

Variable Input Types Description/Examples
modName string The Name of your Character Select Mod
creditee string The person you want to Credit
credit string What the Person helped with

restrict_palettes

charSelect.restrict_palettes - v1.8 - A function that sets if palettes are restricted (Default false unless a mod with the incompatible gamemode is on)

Variable Input Types Description/Examples
bool boolean

restrict_movesets

charSelect.restrict_movesets - v1.10 - A function that sets if movesets are restricted (Default false)

Variable Input Types Description/Examples
bool boolean

are_palettes_restricted

charSelect.are_palettes_restricted - v1.15 - A function that checks if palettes are restricted

Returns: boolean

are_movesets_restricted

charSelect.are_movesets_restricted - v1.15 - A function that checks if movesets are restricted

Returns: boolean

add_option

charSelect.add_option - v1.9 - A function that adds an option to the Character Select Options Menu

Variable Input Types Description/Examples
name string The Name of the Option
toggleDefault number? The default number that the option toggles to (Defaults to 0)
toggleMax number? The max number the option can be toggled to (Defaults to 1)
toggleNames table? A table of strings, each entry being for a toggle's name {"Off", "On"}
description table? A table of strings, each entry being a new line {"This toggle allows your", "character to feel everything."}
save boolean? Toggles whether the option retains between sessions (Defaults to true)

Returns: number - The table position of the option added

get_option

charSelect.get_option - v1.9 - A function that gets an option's status from the Character Select Options Menu

Variable Input Types Description/Examples
tableNum integer The table position of the option

Returns: number?

get_options_status

charSelect.get_options_status - v1.9 - A function that gets an option's status from the Character Select Options Menu

Variable Input Types Description/Examples
tableNum integer The table position of the option

Returns: number?

set_options_status

charSelect.set_options_status - v1.9 - A function that sets an option's status from the Character Select Options Menu

Variable Input Types Description/Examples
tableNum integer The table position of the option
toggle integer What you want to set the option to

Misc

dialog_set_replace_name

charSelect.dialog_set_replace_name - v1.10 - A function that sets the name to be replaced in Dialog, Default is "Mario"

Variable Input Types Description/Examples
name string

Notes: This function does NOT change what NPCs will refer to your character as, this function is intended for Rom-Hack ports with alternate protagonists such as "Luigi".

update_preset_palette

charSelect.update_preset_palette - v1.11 - A function that sets the preset palette for a network player forcefully their current Preset Palette

Variable Input Types Description/Examples
np NetworkPlayer

Tables

optionTableRef

charSelect.optionTableRef - v1 - The "Reference Sheet" or IDs for all of Character Select's Options

controller

charSelect.controller - v1 - The info for inputs from gMarioStates[0] before Character Select's Menu cancels inputs

gCSPlayers

charSelect.gCSPlayers - v1.11.1 - A table containing player info from Character Select's custom networking system

CUTSCENE_CS_MENU

charSelect.CUTSCENE_CS_MENU - v1 - The ID for Character Select's Menu "Cutscene"

CS_ANIM_MENU

charSelect.CS_ANIM_MENU - v1.14 - The ID for Character Select's Menu Animation ID, Used in combination with character_add_animations() to display a specific pose in the menu.

Character Select Hooks

hook_allow_menu_open

charSelect.hook_allow_menu_open - v1 - A function that allows you to add a condition for if the CS Menu can be opened

Variable Input Types Description/Examples
func function

hook_render_in_menu

charSelect.hook_render_in_menu - v1.5 - A function that allows you to render HUD Elements in the menu (Behind transistions such as Option and going in/out of menu)

Variable Input Types Description/Examples
func function

hook_on_character_change

charSelect.hook_on_character_change - v1.15 - A function that runs the inputted function when the character is changed

Variable Input Types Description/Examples
func function

Notes: Function gives currChar and prevChar as function inputs

config_character_sounds

charSelect.config_character_sounds - v1.12 - A function that adds the necessary hooks in order for your pack to have function voicelines

character_hook_moveset

charSelect.character_hook_moveset - v1.10 - A function that allows you to hook a function, much like hook_event, to a specific character number

Variable Input Types Description/Examples
charNum integer
hookEventType LuaHookedEventType/integer The hook event tied to a specific character
func function

character_get_moveset

charSelect.character_get_moveset - v1.14 - A function that returns the Character's moveset functions

Variable Input Types Description/Examples
charNum integer

character_is_vanilla

charSelect.character_is_vanilla - v1.15.1 - A function that returns if the character number is of a character that is included with CoopDX

Variable Input Types Description/Examples
charNum integer? The character number you want to check, Default is the local character

Notes: Function was made in preperation for v1.16, in which the Base Cast are individual characters rather than Costumes of each other.

character_add_menu_instrumental

charSelect.character_add_menu_instrumental - v1.16 - A function that adds an instrument track to a specific character

Variable Input Types Description/Examples
charNum integer The character number you want to add instruments for
loadedAudio ModAudio The loaded instrumental audio file

Notes: Original Song is .ogg File Format, Mono Channel, C Minor Key, 82 BPM, 93.659 Seconds Long, and is set to a sample rate of 22050. If these requirements are not met then the song will not properly play, or incorrectly fit with the base theme.

character_add_graffiti

charSelect.character_add_graffiti - v1.16 - A function that adds graffiti art to the background of the menu

Variable Input Types Description/Examples
charNum integer
texture TextureInfo

character_get_graffiti

charSelect.character_get_graffiti - v1.16 - A function that adds graffiti art to the background of the menu

Variable Input Types Description/Examples
charNum integer

hook_on_save_data_reset

charSelect.hook_on_save_data_reset - v1.16 - A function that runs when Character Select Resets it's save data

Variable Input Types Description/Examples
func function

Notes: Function gives currChar and prevChar as function inputs

Clone this wiki locally