# Programming Reference

See new wiki! (opens new window)

This section is a searchable repository of knowledge for quick reference while working.

This is reference, like a dictionary, and is not meant to read like a guide.

While this is in construction, try the following:

Under Construction

Below is a highly WIP outline that should contain any rivals, NTT, or gml term.

Each item is followed by the number of uses in a selection of mods + the troubleshooting threads.

root (opens new window) - 31121

# Assets

sprite_get - 2566
sound_get - 951
asset_get - 1713
resource_get - 0

script_get_index - 0
is_number - 0
is_object - 0
pi - 37

NTT Array functions (opens new window)
array_clear - 0
array_clone - 0
array_slice - 0
array_length_1d - 30
array_find_index - 3
array_find_index_ext - 0
array_find_last_index - 0
array_find_last_index_ext - 0
array_sort_sub - 0
array_join - 0

ds_list_valid - 7
ds_list_add_array - 0
ds_list_remove - 0
ds_list_join - 0
ds_list_to_array - 0
ds_map_valid - 2

ds_map_keys - 0
ds_map_values - 0
ds_grid_valid - 0

vertex_color - 0
vertex_format_add_color - 0

sprite_add_base64 - 0
instance_number - 28
draw_set_color - 12
draw_get_color - 0

# Colors

c_aqua - 1
c_black - 64
c_blue - 0
c_dkgray - 3
c_fuchsia - 1
c_gray - 9
c_green - 12
c_lime - 0
c_ltgray - 2
c_maroon - 1
c_navy - 0
c_olive - 0
c_purple - 1
c_red - 17
c_silver - 0
c_teal - 1
c_white - 222
c_yellow - 4
c_orange - 0

make_color_rgb - 11
make_color_hsv - 8
color_get_red - 10
color_get_green - 10
color_get_blue - 10
color_get_hue - 7
color_get_saturation - 7
color_get_value - 7
merge_color - 4

# Font alignment

fa_left - 4
fa_center - 1
fa_right - 0
fa_top - 0
fa_middle - 0
fa_bottom - 0

# Drawing

draw_text_color - 2
draw_text_ext_color - 0
draw_text_transformed_color - 0
draw_text_ext_transformed_color - 3
draw_point_color - 0
draw_line_color - 0
draw_line_width_color - 4
draw_rectangle_color - 14
draw_roundrect_color - 0
draw_roundrect_color_ext - 0
draw_triangle_color - 0
draw_circle_color - 6
draw_ellipse_color - 0

# Primitives (opens new window)

pr_pointlist - 0
pr_linelist - 0
pr_linestrip - 0
pr_trianglelist - 0
pr_trianglestrip - 0
pr_trianglefan - 0

draw_vertex_color - 0
draw_vertex_texture_color - 0

# Blend modes

bm_normal - 16
bm_add - 1
bm_max - 0
bm_subtract - 1
bm_zero - 3
bm_one - 0
bm_src_colour - 0
bm_inv_src_colour - 0
bm_src_color - 0
bm_inv_src_color - 6
bm_src_alpha - 12
bm_inv_src_alpha - 5
bm_dest_alpha - 8
bm_inv_dest_alpha - 8
bm_dest_colour - 0
bm_inv_dest_colour - 3
bm_dest_color - 0
bm_inv_dest_color - 9
bm_src_alpha_sat - 0

# Unknown

tf_point - 0
tf_linear - 0
tf_anisotropic - 0

mip_off - 0
mip_on - 0
mip_markedonly - 0

cmpfunc_never - 0
cmpfunc_less - 0
cmpfunc_equal - 0
cmpfunc_lessequal - 0
cmpfunc_greater - 0
cmpfunc_notequal - 0
cmpfunc_greaterequal - 0
cmpfunc_always - 0

cull_noculling - 0
cull_clockwise - 0
cull_counterclockwise - 0

lighttype_dir - 0
lighttype_point - 0

# GPU

gpu_set_colorwriteenable - 21
gpu_set_alphatestfunc - 0
gpu_set_tex_filter - 0
gpu_set_tex_filter_ext - 0
gpu_set_tex_repeat - 0
gpu_set_tex_repeat_ext - 0
gpu_get_colorwriteenable - 0
gpu_get_alphatestfunc - 0
gpu_get_tex_filter - 0
gpu_get_tex_filter_ext - 0
gpu_get_tex_repeat - 0
gpu_get_tex_repeat_ext - 0

sprite_change_offset (opens new window) - 314

instance_create (opens new window) - 571
sprite_change_collision_mask (opens new window) - 28
trigger_b_reverse (opens new window) - 26

random_func (opens new window) - 404
random_func_2 (opens new window) - 47

sound_play (opens new window) - 725
sound_stop (opens new window) - 134
sound_volume (opens new window) - 2
sound_pitch (opens new window) - 1

attack_end (opens new window) - 185
destroy_hitboxes (opens new window) - 92
set_state (opens new window) - 365
set_attack (opens new window) - 1129
iasa_script (opens new window) - 40
can_tap_jump (opens new window) - 4

hit_fx_create (opens new window) - 98
spawn_hit_fx (opens new window) - 234
spawn_dust_fx (opens new window) - 4
set_hit_particle_sprite (opens new window) - 2

create_hitbox (opens new window) - 923
create_deathbox (opens new window) - 33

draw_debug_text (opens new window) - 286
print (opens new window) - 113
print_debug (opens new window) - 210
trace - 10

take_damage (opens new window) - 167

# Color Profiles

set_color_profile_slot (opens new window) - 1300
set_color_profile_slot_range (opens new window) - 304
set_character_color_slot (opens new window) - 47
set_article_color_slot (opens new window) - 9
set_character_color_shading (opens new window) - 24
get_color_profile_slot_r (opens new window) - 60
get_color_profile_slot_g (opens new window) - 22
get_color_profile_slot_b (opens new window) - 23

set_num_palettes (opens new window) - 62
get_hitbox_angle (opens new window) - 41
set_victory_theme (opens new window) - 91
set_victory_bg (opens new window) - 27
set_victory_portrait (opens new window) - 9
set_victory_sidebar (opens new window) - 0
get_training_cpu_action (opens new window) - 14
get_instance_player (opens new window) - 4
get_instance_player_id (opens new window) - 4
get_instance_x (opens new window) - 15
get_instance_y (opens new window) - 7
get_gameplay_time (opens new window) - 161
get_game_timer (opens new window) - 50

init_shader (opens new window) - 249
shader_start (opens new window) - 109
shader_end (opens new window) - 110

get_stage_data (opens new window) - 167
get_state_name (opens new window) - 14
get_player_damage (opens new window) - 178
get_player_stocks (opens new window) - 44
get_player_team (opens new window) - 26
set_player_stocks (opens new window) - 18
set_player_team (opens new window) - 0
set_player_damage (opens new window) - 31
get_player_color (opens new window) - 253

clear_button_buffer - 44

# Viewport

view_get_wview (opens new window) - 7
view_get_hview (opens new window) - 7
view_get_xview (opens new window) - 25
view_get_yview (opens new window) - 17

# Attack Scripting

set_attack_value (opens new window) - 1379
get_attack_value (opens new window) - 42
reset_attack_value (opens new window) - 27
set_window_value (opens new window) - 4197
get_window_value (opens new window) - 124
reset_window_value (opens new window) - 35
set_hitbox_value (opens new window) - 7389
get_hitbox_value (opens new window) - 111
reset_hitbox_value (opens new window) - 126
set_num_hitboxes (opens new window) - 271
get_num_hitboxes (opens new window) - 18
reset_num_hitboxes (opens new window) - 3

# Easing

tween - 0
ease_linear - 57
ease_backIn - 0
ease_backInOut - 0
ease_backOut - 0
ease_bounceIn - 0
ease_bounceInOut - 0
ease_bounceOut - 0
ease_circIn - 4
ease_circInOut - 0
ease_circOut - 3
ease_cubeIn - 0
ease_cubeInOut - 0
ease_cubeOut - 5
ease_expoIn - 0
ease_expoInOut - 0
ease_expoOut - 7
ease_quadIn - 1
ease_quadInOut - 0
ease_quadOut - 7
ease_quartIn - 2
ease_quartInOut - 0
ease_quartOut - 1
ease_quintIn - 4
ease_quintInOut - 0
ease_quintOut - 0
ease_sineIn - 5
ease_sineInOut - 10
ease_sineOut - 3

# Attack grid (opens new window)

AG_CATEGORY - 224
AG_SPRITE - 279
AG_AIR_SPRITE - 69
AG_HURTBOX_SPRITE - 238
AG_HURTBOX_AIR_SPRITE - 13
AG_NUM_WINDOWS - 363
AG_HAS_LANDING_LAG - 143
AG_OFF_LEDGE - 103
AG_LANDING_LAG - 50
AG_STRONG_CHARGE_WINDOW - 55
AG_USES_CUSTOM_GRAVITY - 39
AG_WINDOW_TYPE - 659
AG_WINDOW_LENGTH - 993
AG_WINDOW_ANIM_FRAMES - 839
AG_WINDOW_ANIM_FRAME_START - 551
AG_WINDOW_HSPEED - 141
AG_WINDOW_VSPEED - 162
AG_WINDOW_HSPEED_TYPE - 125
AG_WINDOW_VSPEED_TYPE - 147
AG_WINDOW_HAS_CUSTOM_FRICTION - 36
AG_WINDOW_CUSTOM_AIR_FRICTION - 16
AG_WINDOW_CUSTOM_GROUND_FRICTION - 27
AG_WINDOW_CUSTOM_GRAVITY - 52
AG_WINDOW_HAS_WHIFFLAG - 88
AG_WINDOW_INVINCIBILITY - 3
AG_WINDOW_HITPAUSE_FRAME - 1
AG_WINDOW_CANCEL_TYPE - 119
AG_WINDOW_CANCEL_FRAME - 84
AG_WINDOW_HAS_SFX - 275
AG_WINDOW_SFX - 298
AG_WINDOW_SFX_FRAME - 133
AG_WINDOW_GOTO - 11

# Hitbox Grid Indexes (opens new window)

HG_PARENT_HITBOX - 302
HG_HITBOX_TYPE - 390
HG_WINDOW - 450
HG_WINDOW_CREATION_FRAME - 203
HG_LIFETIME - 408
HG_HITBOX_X - 363
HG_HITBOX_Y - 369
HG_WIDTH - 336
HG_HEIGHT - 338
HG_SHAPE - 134
HG_PRIORITY - 327
HG_DAMAGE - 504
HG_ANGLE - 346
HG_BASE_KNOCKBACK - 381
HG_KNOCKBACK_SCALING - 248
HG_EFFECT - 164
HG_BASE_HITPAUSE - 308
HG_HITPAUSE_SCALING - 166
HG_VISUAL_EFFECT - 160
HG_VISUAL_EFFECT_X_OFFSET - 97
HG_VISUAL_EFFECT_Y_OFFSET - 136
HG_HIT_SFX - 266
HG_ANGLE_FLIPPER - 112
HG_EXTRA_HITPAUSE - 60
HG_GROUNDEDNESS - 10
HG_EXTRA_CAMERA_SHAKE - 16
HG_IGNORES_PROJECTILES - 18
HG_HIT_LOCKOUT - 39
HG_EXTENDED_PARRY_STUN - 5
HG_HITBOX_GROUP - 230
HG_HITSTUN_MULTIPLIER - 87
HG_DRIFT_MULTIPLIER - 18
HG_SDI_MULTIPLIER - 12
HG_TECHABLE - 17
HG_FORCE_FLINCH - 14
HG_FINAL_BASE_KNOCKBACK - 7
HG_THROWS_ROCK - 5
HG_PROJECTILE_SPRITE - 192
HG_PROJECTILE_MASK - 177
HG_PROJECTILE_COLLISION_SPRITE - 2
HG_PROJECTILE_ANIM_SPEED - 99
HG_PROJECTILE_UNBASHABLE - 28
HG_PROJECTILE_HSPEED - 154
HG_PROJECTILE_VSPEED - 88
HG_PROJECTILE_GRAVITY - 53
HG_PROJECTILE_GROUND_FRICTION - 4
HG_PROJECTILE_AIR_FRICTION - 6
HG_PROJECTILE_WALL_BEHAVIOR - 67
HG_PROJECTILE_GROUND_BEHAVIOR - 107
HG_PROJECTILE_ENEMY_BEHAVIOR - 68
HG_PROJECTILE_LIFESPAN - 2
HG_PROJECTILE_PARRY_STUN - 18
HG_PROJECTILE_DOES_NOT_REFLECT - 21
HG_PROJECTILE_IS_TRANSCENDENT - 47
HG_PROJECTILE_DESTROY_EFFECT - 51
HG_PROJECTILE_PLASMA_SAFE - 4
HG_HIT_PARTICLE_NUM - 3

# Player States (opens new window)

PS_IDLE - 222
PS_IDLE_AIR - 90
PS_CROUCH - 25
PS_JUMPSQUAT - 25
PS_FIRST_JUMP - 48
PS_DOUBLE_JUMP - 69
PS_WALL_JUMP - 75
PS_LAND - 29
PS_WALK - 68
PS_WALK_TURN - 6
PS_DASH_START - 34
PS_DASH - 108
PS_DASH_STOP - 10
PS_DASH_TURN - 17
PS_WAVELAND - 10
PS_ATTACK_AIR - 226
PS_ATTACK_GROUND - 252
PS_LANDING_LAG - 30
PS_HITSTUN - 78
PS_HITSTUN_LAND - 15
PS_TUMBLE - 89
PS_PRATFALL - 75
PS_PRATLAND - 30
PS_AIR_DODGE - 34
PS_PARRY_START - 7
PS_PARRY - 15
PS_ROLL_BACKWARD - 3
PS_ROLL_FORWARD - 9
PS_TECH_GROUND - 8
PS_TECH_BACKWARD - 10
PS_TECH_FORWARD - 10
PS_WALL_TECH - 2
PS_SPAWN - 96
PS_RESPAWN - 145
PS_DEAD - 78
PS_WRAPPED - 98
PS_FROZEN - 10

SC_HITSTUN - 44
SC_GROUND_NEUTRAL - 20
SC_GROUND_COMMITTED - 10
SC_AIR_NEUTRAL - 24
SC_AIR_COMMITTED - 5

# Attacks (opens new window)

AT_JAB - 1712
AT_FTILT - 546
AT_DTILT - 426
AT_UTILT - 168
AT_FSTRONG - 747
AT_DSTRONG - 608
AT_USTRONG - 572
AT_DATTACK - 487
AT_FAIR - 298
AT_BAIR - 422
AT_DAIR - 638
AT_UAIR - 407
AT_NAIR - 704
AT_FSPECIAL - 1664
AT_DSPECIAL - 1774
AT_USPECIAL - 1352
AT_NSPECIAL - 3016
AT_TAUNT - 651
AT_FSTRONG_2 - 80
AT_DSTRONG_2 - 37
AT_USTRONG_2 - 33
AT_FTHROW - 18
AT_UTHROW - 18
AT_DTHROW - 15
AT_NTHROW - 24
AT_NSPECIAL_AIR - 119
AT_NSPECIAL_2 - 95
AT_FSPECIAL_AIR - 60
AT_FSPECIAL_2 - 121
AT_USPECIAL_GROUND - 61
AT_USPECIAL_2 - 56
AT_DSPECIAL_AIR - 132
AT_DSPECIAL_2 - 251
AT_TAUNT_2 - 117
AT_EXTRA_1 - 531
AT_EXTRA_2 - 87
AT_EXTRA_3 - 221

# Characters

CH_ZETTERBURN - 19
CH_ORCANE - 1
CH_WRASTOR - 3
CH_KRAGG - 3
CH_FORSBURN - 4
CH_MAYPUL - 1
CH_ABSA - 1
CH_ETALUS - 1
CH_ORI - 1
CH_RANNO - 1
CH_CLAIREN - 2
CH_SYLVANOS - 2
CH_ELLIANA - 1
CH_SHOVEL_KNIGHT - 4

# Stage Data (opens new window)

SD_X_POS - 36
SD_Y_POS - 38
SD_TOP_BLASTZONE - 9
SD_BOTTOM_BLASTZONE - 14
SD_SIDE_BLASTZONE - 13
SD_WIDTH - 15
SD_ID - 28

# Input Buffers (opens new window)

PC_LEFT_HARD_PRESSED - 1
PC_RIGHT_HARD_PRESSED - 1
PC_UP_HARD_PRESSED - 0
PC_DOWN_HARD_PRESSED - 0
PC_LEFT_STRONG_PRESSED - 0
PC_RIGHT_STRONG_PRESSED - 0
PC_UP_STRONG_PRESSED - 0
PC_DOWN_STRONG_PRESSED - 0
PC_LEFT_STICK_PRESSED - 0
PC_RIGHT_STICK_PRESSED - 0
PC_UP_STICK_PRESSED - 0
PC_DOWN_STICK_PRESSED - 0
PC_JUMP_PRESSED - 0
PC_ATTACK_PRESSED - 8
PC_SHIELD_PRESSED - 2
PC_SPECIAL_PRESSED - 5
PC_STRONG_PRESSED - 0
PC_TAUNT_PRESSED - 0

# Hit Particles (opens new window)

PART_NORMAL - 0
PART_ZET_FIRE - 0
PART_ORC_LIGHT - 0
PART_ORC_DARK - 0
PART_WRA_WIND - 0
PART_WRA_FEATHER - 0
PART_KRA_ROCK - 0
PART_FOR_SMOKE - 0
PART_MAY_LEAF - 0
PART_ABS_ZAP - 0
PART_ETA_ICE - 0
PART_ORI_ORANGE - 0
PART_ORI_BLUE - 0
PART_RAN_POISON - 0
PART_CLA_RED - 0
PART_CLA_BLUE - 0
PART_SYL_FLOWER - 0
PART_SYL_WOOD - 0
PART_ELL_FIRE - 0
PART_SHO_FIRE - 0
PART_SHO_MUSIC - 0

# Objects (opens new window)

oPlayer - 1029
oTestPlayer - 17
pHitBox - 524
pHurtBox - 32
hit_fx_obj - 40
obj_article1 - 682
obj_article2 - 89
obj_article3 - 23
obj_article_platform - 46
obj_article_solid - 66
obj_stage_article - 23
obj_stage_article_platform - 0
obj_stage_article_solid - 2
obj_stage_main - 51

end_match (opens new window) - 3

# Match Settings (opens new window)

get_match_setting (opens new window) - 7
SET_STOCKS - 0
SET_STONKS - 0
SET_TIMER - 1
SET_TEAMS - 0
SET_TEAMATTACK - 0
SET_HITBOX_VIS - 1
SET_SEASON - 1
SET_RUNES - 0
SET_PRACTICE - 1
SET_TURBO - 1
SET_SCALING - 1
get_local_setting - 0
SET_ACCESSIBLE - 0
SET_HUD_SIZE - 0
SET_HUD_NAMES - 0
SET_SFX_VOLUME - 0
SET_MUSIC_VOLUME - 0
SET_MENU_VOLUME - 0

# Stage Scripting (opens new window)

get_marker_x - 11
get_marker_y - 7
is_aether_stage - 12
get_article_script (opens new window) - 9
music_play_file (opens new window) - 83
music_stop (opens new window) - 0
music_set_volume (opens new window) - 4
music_fade (opens new window) - 1
music_crossfade (opens new window) - 28
get_bg_data (opens new window) - ?
set_bg_data (opens new window) - ?

is_laststock (opens new window) - 46
is_player_on (opens new window) - 2
suppress_stage_music (opens new window) - 7
set_view_position (opens new window) - 7
shake_camera (opens new window) - 7
get_player_hud_color (opens new window) - 7
user_event (opens new window) - 12

# Unknown

is_attack_pressed - 0
is_strong_pressed - 0
is_special_pressed - 11

# Define arguments

argument - 266
argument0 - 24
argument1 - 11
argument2 - 3
argument3 - 1
argument4 - 1
argument5 - 0
argument6 - 0
argument7 - 0
argument8 - 0
argument9 - 0
argument10 - 0
argument11 - 0
argument12 - 0
argument13 - 0
argument14 - 0
argument15 - 0
argument_count - 1

null - 37
undefined - 62