Animation: Change Source File

Hi guys, I need your help!


I use animations for an abs that includes many different swords.


The swords are 30 and each sword has 4 animations, one for each direction (down, left, right, up).


This means 120 different animations!


From this madness comes my request:


There is way to change the source file (image) of an animation in game?


In this way I could keep only 4 animations and where necessary change the source file according to the equipped sword.


I don't know if this requires a plugin or simply a call script, but I hope in your help!


Thank you :3


Animations.json:


animation.png

Spoiler
I'm trying to learn English well ^^
In order to change the animation1Name of an Animation in the middle of the game, you would use the script call:


$dataAnimations[x].animation1Name = "Animation-Name"


Replace 'x' with the ID of the Animation and replace 'Animation-Name' with the name of the Animation file.


For example:


$dataAnimations[1].animation1Name = "Atk1";


You can change any of the variables would within the Data files using this method.


Now, something to keep in mind is that if you change information from within a $data variable, it will not be saved if someone saves and loads the game.


So a simple solution to this that would also allow the data to be updated based off of the user's weapon would be a Parallel Process Common Event like:


Capture.PNG


Of course, this wouldn't be the most optimal way to do things, but it would work.


A Plugin would probably be the best thing possible, but this can work as a decent substitute if you can't find anything else.
Of course, this wouldn't be the most optimal way to do things, but it would work.


A Plugin would probably be the best thing possible, but this can work as a decent substitute if you can't find anything else.

Wooo! Thanks a lot Sum!


I'm going to try immediately this method! 🙂


EDIT: it works! :3 thank you!!!

Original thread: https://forums.rpgmakerweb.com/threads/animation-change-source-file.68514/