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.
#
MiscellaneousKeyword/Macro | Value | Description |
---|---|---|
true | 1 | Enables a behavior |
false | 0 | Disables a behavior |
auto | -1 | Defers to the engine to determine a value automatically |
previous | -1 | Does not change the current value from its previous definition |
inherit | -2 | Retrieves an automatically associated value stored in memory |
toggle | -2 | Alternates between enabled and disabled based on the previous value |
any | -3 | A general selector to apply a modification to one or more qualifying entities |
all | -3 | A general selector to apply a modification to all qualifying entities |
none | -4 | Disables a value from having any effect |
#
AnimationsKeyword/Macro | Value | Description |
---|---|---|
anim_zoom | anim_xscale | A perspective camera property used in keyframe animations. Same as anim_xscale to other entities. |
anim_strength | anim_yscale | A perspective camera property used in keyframe animations. Same as anim_yscale to other entities. |
input_zoom | input_xscale | A perspective camera property used in keyframe animations. Same as input_xscale to other entities. |
input_strength | input_yscale | A perspective camera property used in keyframe animations. Same as input_yscale to other entities. |
#
Easing/Tweeningnote
For a visual representation of ease modes, see https://easings.net/ and https://cubic-bezier.com/
Keyword/Macro | Value | Description |
---|---|---|
ease_none | -4 | Sets the animation ease mode to linear math, or no easing |
ease_sin | 1 | Sets the animation ease mode to sine math at the start and end |
ease_sin_in | 2 | Sets the animation ease mode to sine math at the start only |
ease_sin_out | 3 | Sets the animation ease mode to sine math at the end only |
ease_quad | 4 | Sets the animation ease mode to quadratic math at the start and end |
ease_quad_in | 5 | Sets the animation ease mode to quadratic math at the start only |
ease_quad_out | 6 | Sets the animation ease mode to quadratic math at the end only |
ease_cubic | 7 | Sets the animation ease mode to cubic math at the start and end |
ease_cubic_in | 8 | Sets the animation ease mode to cubic math at the start only |
ease_cubic_out | 9 | Sets the animation ease mode to cubic math at the end only |
ease_quart | 10 | Sets the animation ease mode to quartic math at the start and end |
ease_quart_in | 11 | Sets the animation ease mode to quartic math at the start only |
ease_quart_out | 12 | Sets the animation ease mode to quartic math at the end only |
ease_quint | 13 | Sets the animation ease mode to quintic math at the start and end |
ease_quint_in | 14 | Sets the animation ease mode to quintic math at the start only |
ease_quint_out | 15 | Sets the animation ease mode to quintic math at the end only |
ease_expo | 16 | Sets the animation ease mode to exponential math at the start and end |
ease_expo_in | 17 | Sets the animation ease mode to exponential math at the start only |
ease_expo_out | 18 | Sets the animation ease mode to exponential math at the end only |
ease_circ | 19 | Sets the animation ease mode to circular math at the start and end |
ease_circ_in | 20 | Sets the animation ease mode to circular math at the start only |
ease_circ_out | 21 | Sets the animation ease mode to circular math at the end only |
ease_rubber | 22 | Sets the animation ease mode to exceed values and smoothly fall back at the start and end |
ease_rubber_in | 23 | Sets the animation ease mode to exceed values and smoothly fall back at the start only |
ease_rubber_out | 24 | Sets the animation ease mode to exceed values and smoothly fall back at the end only |
ease_elastic | 25 | Sets the animation ease mode to exceed values and roughly fall back at the start and end |
ease_elastic_in | 26 | Sets the animation ease mode to exceed values and roughly fall back at the start only |
ease_elastic_out | 27 | Sets the animation ease mode to exceed values and roughly fall back at the end only |
ease_bounce | 28 | Sets the animation ease mode to bounce between values at the start and end |
ease_bounce_in | 29 | Sets the animation ease mode to bounce between values at the start only |
ease_bounce_out | 30 | Sets the animation ease mode to bounce between values at the end only |
ease_bezier | 31 | Sets the animation ease mode to a custom curve based on two pairs of X, Y coordinates |
#
OriginKeyword/Macro | Value | Description |
---|---|---|
orig_top | 0 | Triggers vertically aligning the current entity by the top edge |
orig_left | 0 | Triggers horizontally aligning the current entity by the left edge |
orig_center | -1 | Triggers horizontally or vertically aligning the current entity by the center |
orig_bottom | -2 | Triggers vertically aligning the current entity by the bottom edge |
orig_right | -2 | Triggers horizontally aligning the current entity by the right edge |
#
ScalingKeyword/Macro | Value | Description |
---|---|---|
scale_none | -4 | Disables automatic scaling |
scale_x_y | 1 | Triggers automatic scaling to fill the screen in both directions, maintaining aspect ratio |
scale_x | 2 | Triggers automatic scaling to fill the screen horizontally, maintaining aspect ratio |
scale_y | 3 | Triggers automatic scaling to fill the screen vertically, maintaining aspect ratio |
scale_stretch_x_y | 4 | Triggers automatic scaling to fill the screen in both directions, disregarding aspect ratio |
scale_stretch_x | 5 | Triggers automatic scaling to fill the screen horizontally, disregarding aspect ratio |
scale_stretch_y | 6 | Triggers automatic scaling to fill the screen vertically, disregarding aspect ratio |
scale_prop_x_y | 7 | Triggers automatic scaling relative to changes in screen resolution in both directions |
scale_prop_x | 8 | Triggers automatic scaling relative to changes in horizontal screen resolution only |
scale_prop_y | 9 | Triggers automatic scaling relative to changes in vertical screen resolution only |
#
TransitionsKeyword/Macro | Value | Description |
---|---|---|
trans_none | -4 | Disables scripted transition animations |
#
Entity TypesKeyword/Macro | Value | Description |
---|---|---|
vngen_type_perspective | 0 | Points to the global perspective camera |
vngen_type_scene | 1 | Points to scene entities |
vngen_type_char | 2 | Points to character entities |
vngen_type_attach | 3 | Points to character attachment entities |
vngen_type_emote | 4 | Points to emote entities |
vngen_type_textbox | 5 | Points to textbox entities |
vngen_type_text | 6 | Points to text entities |
vngen_type_label | 7 | Points to label entities |
vngen_type_prompt | 8 | Points to prompt entities |
vngen_type_option | 9 | Points to option entities |
vngen_type_audio | 10 | Points to regular audio entities |
vngen_type_vox | 11 | Points to speech synthesis audio entities |
vngen_type_effect | 12 | Points to scripted effect entities |
vngen_type_button | 13 | Points to button entities |
vngen_type_speaker | 14 | Points to the current active speaker(s) (Exception: not an entity) |
#
Audio TypesKeyword/Macro | Value | Description |
---|---|---|
audio_type_sound | 0 | Points to sound effects or looped sound effects |
audio_type_voice | 1 | Points to spoken dialog |
audio_type_music | 2 | Points to music |
audio_type_vox | 3 | Points to vox (speech 'blips') |
audio_type_ui | 4 | Points to UI sound effects |