The "vngen_char_replace_ext" Function
#
SyntaxArgument | Type | Description |
---|---|---|
name | string | The ID of the character to replace |
newname | string/macro | The new ID for the character being replaced (or keyword previous for no change) |
spr_body | sprite | The new sprite to display as a character body |
spr_face_idle | sprite | The new sprite to display as an idle face (or keyword none for none) |
spr_face_talk | sprite | The new sprite to display as a talking face (or keyword none for none) |
xorig | real/macro | The new horizontal body sprite offset, or origin point, relative to the top-left corner |
yorig | real/macro | The new vertical body sprite offset, or origin point, relative to the top-left corner |
face_x | real | The horizontal position to display the face, relative to the body sprite top-left corner (or keyword previous for no change) |
face_y | real | The vertical position to display the face, relative to the body sprite top-left corner (or keyword previous for no change) |
scaling | integer/macro | Sets the new automatic scaling mode for the character |
flip | boolean | Enables or disables horizontally flipping the character |
idle | real | Sets the delay in seconds between loops of the idle face sprite animation, where 3 is default |
duration | real | Sets the duration of the fade transition, in seconds |
ease | integer/macro | Sets the ease mode to perform the fade transition in |
#
DescriptionReplaces the input entity ID with a new set of sprites and extra sprite properties and fades the old character to the new one over the input duration.
As with other types of modifications, replacements made with this script are permanent and will persist until another replacement is performed. This script cannot be performed simultaneously with other replacement actions operating on the same entity ID.
Unlike other modifications, this script allows changing the character's name, which doubles as its entity ID. As such, be aware that changing a character's ID will require further modification actions to use the new ID instead of the old one in the future.
See Macros & Keywords for a list of available origin points, scaling modes, and ease modes.