Macros & Keywords

important

GameMaker Studio 1.x users must import the included macros.txt file located in the Included Files folder before using VNgen. This can be done from the Resources > Define Macros menu and selecting Load.

For the sake of memorability and forwards-compatibility, many VNgen script arguments support the use of built-in keywords and/or custom macros in place of plain numeric values to trigger different behaviors. It is strongly recommended to always use keywords and macros when available, as their numeric values may change in future updates.

It is important to note that not every keyword/macro is supported by every script, and as such, using them in undocumented ways may not have the intended effect, or no effect at all. To learn which macros are supported by which arguments and functions, refer to the full reference guide.

tip

Many macros are prefixed, meaning you don't have to memorize each one to use them. Simply begin typing the first few letters of a macro or keyword in your code editor and you'll be shown auto-complete options to choose the desired item from a list.

Miscellaneous

Keyword/MacroValueDescription
true1Enables a behavior
false0Disables a behavior
auto-1Defers to the engine to determine a value automatically
previous-1Does not change the current value from its previous definition
inherit-2Retrieves an automatically associated value stored in memory
toggle-2Alternates between enabled and disabled based on the previous value
any-3A general selector to apply a modification to one or more qualifying entities
all-3A general selector to apply a modification to all qualifying entities
none-4Disables a value from having any effect

Animations

Keyword/MacroValueDescription
anim_zoomanim_xscaleA perspective camera property used in keyframe animations. Same as anim_xscale to other entities.
anim_strengthanim_yscaleA perspective camera property used in keyframe animations. Same as anim_yscale to other entities.
input_zoominput_xscaleA perspective camera property used in keyframe animations. Same as input_xscale to other entities.
input_strengthinput_yscaleA perspective camera property used in keyframe animations. Same as input_yscale to other entities.

Easing/Tweening

note

For a visual representation of ease modes, see https://easings.net/ and https://cubic-bezier.com/

Keyword/MacroValueDescription
ease_none-4Sets the animation ease mode to linear math, or no easing
ease_sin1Sets the animation ease mode to sine math at the start and end
ease_sin_in2Sets the animation ease mode to sine math at the start only
ease_sin_out3Sets the animation ease mode to sine math at the end only
ease_quad4Sets the animation ease mode to quadratic math at the start and end
ease_quad_in5Sets the animation ease mode to quadratic math at the start only
ease_quad_out6Sets the animation ease mode to quadratic math at the end only
ease_cubic7Sets the animation ease mode to cubic math at the start and end
ease_cubic_in8Sets the animation ease mode to cubic math at the start only
ease_cubic_out9Sets the animation ease mode to cubic math at the end only
ease_quart10Sets the animation ease mode to quartic math at the start and end
ease_quart_in11Sets the animation ease mode to quartic math at the start only
ease_quart_out12Sets the animation ease mode to quartic math at the end only
ease_quint13Sets the animation ease mode to quintic math at the start and end
ease_quint_in14Sets the animation ease mode to quintic math at the start only
ease_quint_out15Sets the animation ease mode to quintic math at the end only
ease_expo16Sets the animation ease mode to exponential math at the start and end
ease_expo_in17Sets the animation ease mode to exponential math at the start only
ease_expo_out18Sets the animation ease mode to exponential math at the end only
ease_circ19Sets the animation ease mode to circular math at the start and end
ease_circ_in20Sets the animation ease mode to circular math at the start only
ease_circ_out21Sets the animation ease mode to circular math at the end only
ease_rubber22Sets the animation ease mode to exceed values and smoothly fall back at the start and end
ease_rubber_in23Sets the animation ease mode to exceed values and smoothly fall back at the start only
ease_rubber_out24Sets the animation ease mode to exceed values and smoothly fall back at the end only
ease_elastic25Sets the animation ease mode to exceed values and roughly fall back at the start and end
ease_elastic_in26Sets the animation ease mode to exceed values and roughly fall back at the start only
ease_elastic_out27Sets the animation ease mode to exceed values and roughly fall back at the end only
ease_bounce28Sets the animation ease mode to bounce between values at the start and end
ease_bounce_in29Sets the animation ease mode to bounce between values at the start only
ease_bounce_out30Sets the animation ease mode to bounce between values at the end only
ease_bezier31Sets the animation ease mode to a custom curve based on two pairs of X, Y coordinates

Origin

Keyword/MacroValueDescription
orig_top0Triggers vertically aligning the current entity by the top edge
orig_left0Triggers horizontally aligning the current entity by the left edge
orig_center-1Triggers horizontally or vertically aligning the current entity by the center
orig_bottom-2Triggers vertically aligning the current entity by the bottom edge
orig_right-2Triggers horizontally aligning the current entity by the right edge

Scaling

Keyword/MacroValueDescription
scale_none-4Disables automatic scaling
scale_x_y1Triggers automatic scaling to fill the screen in both directions, maintaining aspect ratio
scale_x2Triggers automatic scaling to fill the screen horizontally, maintaining aspect ratio
scale_y3Triggers automatic scaling to fill the screen vertically, maintaining aspect ratio
scale_stretch_x_y4Triggers automatic scaling to fill the screen in both directions, disregarding aspect ratio
scale_stretch_x5Triggers automatic scaling to fill the screen horizontally, disregarding aspect ratio
scale_stretch_y6Triggers automatic scaling to fill the screen vertically, disregarding aspect ratio
scale_prop_x_y7Triggers automatic scaling relative to changes in screen resolution in both directions
scale_prop_x8Triggers automatic scaling relative to changes in horizontal screen resolution only
scale_prop_y9Triggers automatic scaling relative to changes in vertical screen resolution only

Transitions

Keyword/MacroValueDescription
trans_none-4Disables scripted transition animations

Entity Types

Keyword/MacroValueDescription
vngen_type_perspective0Points to the global perspective camera
vngen_type_scene1Points to scene entities
vngen_type_char2Points to character entities
vngen_type_attach3Points to character attachment entities
vngen_type_emote4Points to emote entities
vngen_type_textbox5Points to textbox entities
vngen_type_text6Points to text entities
vngen_type_label7Points to label entities
vngen_type_prompt8Points to prompt entities
vngen_type_option9Points to option entities
vngen_type_audio10Points to regular audio entities
vngen_type_vox11Points to speech synthesis audio entities
vngen_type_effect12Points to scripted effect entities
vngen_type_button13Points to button entities
vngen_type_speaker14Points to the current active speaker(s) (Exception: not an entity)

Audio Types

Keyword/MacroValueDescription
audio_type_sound0Points to sound effects or looped sound effects
audio_type_voice1Points to spoken dialog
audio_type_music2Points to music
audio_type_vox3Points to vox (speech 'blips')
audio_type_ui4Points to UI sound effects