[Custom Action] Image Replacement Plugin (PGMMV Style)


Replace the textures used in animations at any time
≪Image Replacement≫ Plugin release.

※This behaves similarly to image replacement in Actus MV (PGMMV).

■Contents
The following features will be added to execution actions:
≪Character Dress-up/TextureSwap≫
CA_TextureSwapAction.gd (36.2 KB)


※Installation Method
Open the above *.gd file with Action Game Tsukuru G2.0 (version 1.3.x or higher),
and drag and drop it into Asset Management → Scripts.

After installation, the feature will be added to Execution Actions.

The sample project is available for free on Itchio.
Please use it to help you understand how it works.
https://gotchagotchagames.itch.io/ca-textureswap

※Caution※
Since this plugin replaces images via a ≪replacement≫ mechanism,
you must prepare the replacement images yourself.

■Explanation of Contents
1.1_Preparation
Gather all the images used for the character you want to replace into a folder.


I created a folder named “player_N” under res://materials/graphics.

Even if you have separate images for each action, gather them all into the same folder.

※Important※
Images that are not identical in name to the original, or those not present in the folder, will not be replaced.

1.2_Prepare replacement images ※Most Important
This system specifies a folder name and replaces the ≪identically named data≫ within it.
As work outside of Actus G:
①Create an additional folder.
②Place the replacement files (images with different colors but identical names) into that folder.
③Drag and drop the entire folder into Asset Management to register the images.
In the sample, four color variations are shown.

2.1_Setup Action
image
It is recommended to control this using a management object.
Select the action “CA_TextureSwapAction” in the state.

2.2_Target


Specify the object (*.tscn) whose texture you want to change.
In the sample, [player_ninja], the controllable character, was specified.

2.3_Dress-up


Specify the folder created/registered in step 1.2.

2.4_Usage Examples
・Swap to palette-different images during invincibility frames
・Instantly swap to weapon-posing images

2 Likes