[RMMZ] Spine 2D animation

The Util plugin for the full version should be: MardSilver_0_Utils
Oops, I didn't realize that I had to download the full version of Utils from another page.
I installed it and it works fine.
Thanks for your prompt support!

By the way, my question is, is it possible to dynamically change the actor's Spine itself from the plugin command?
I have a feeling that this is probably not implemented right now, but if it were, I would be happy to change the graphics when moving up and down (up and down requires changing the skeleton, which is difficult to do with animation changes) and use it in a top-down view game.
Meaning you want to change the actor's animation in combat using a plugin command?
Does this plugin support physics?
Does this plugin support physics?
I don't quite understand what you mean. Can you be more specific?
https://esotericsoftware.com/blog/Spine-4.2-The-physics-revolution
This is the feature.
Oh, I haven't tried it before. I need to learn about it and check it out. Thanks for the information you provided.
Thank you! If it works I'd like to buy it. Best regards!
Meaning you want to change the actor's animation in combat using a plugin command?
I want to change the graphics when moving up and down the field.
If possible, I would like a command to change the referenced spine data(means spineName).
Because it is difficult to make a sideways skeleton face front or back.

スクリーンショット-2024-10-19-091520.jpg
I want to change the graphics when moving up and down the field.
If possible, I would like a command to change the referenced spine data(means spineName).
Because it is difficult to make a sideways skeleton face front or back.

Oh, I see. I will update this function.
Oh, I see. I will update this function.
Really? Thank you!
I'll look for alternatives, but it would be helpful if there were any 🙂
I found a bug. When using JsonEx.stringify() or JsonEx.makeDeepCopy() on any object with _spineAnimation then it gives this error > uncaught typeError: cannot read property 'name' of undefined. I tested with new project as well and go to console and type in JsonEx.stringify($gamePlayer) then it gives this error. What i'm trying to do is stringify a char for later to be parsed by Json but I cant seem stringify anything with ._spineAnimation attached to any char with spine. Any thoughts on a work around?
I found a bug. When using JsonEx.stringify() or JsonEx.makeDeepCopy() on any object with _spineAnimation then it gives this error > uncaught typeError: cannot read property 'name' of undefined. I tested with new project as well and go to console and type in JsonEx.stringify($gamePlayer) then it gives this error. What i'm trying to do is stringify a char for later to be parsed by Json but I cant seem stringify anything with ._spineAnimation attached to any char with spine. Any thoughts on a work around?
You cannot stringify all the data of _spineAnimation because this object is quite large and contains events without constructors, so when you stringify, you will get an error about the name of the constructor being undefined. Even if you remove the error about the name of the constructor, you will still get the too deep error. Therefore, if you want to stringify, just ignore _spineAnimation.
Ex:
JSON.stringify($gamePlayer, (key, value) => {
if (key === "_spineAnimation") {
return undefined;
}
return value;
});
You cannot stringify all the data of _spineAnimation because this object is quite large and contains events without constructors, so when you stringify, you will get an error about the name of the constructor being undefined. Even if you remove the error about the name of the constructor, you will still get the too deep error. Therefore, if you want to stringify, just ignore _spineAnimation.
Ex:
JSON.stringify($gamePlayer, (key, value) => {
if (key === "_spineAnimation") {
return undefined;
}
return value;
});
I understand and thank u. But what I wanted to do was save a character's spine animation reference in one map to be able for reference later when returning back to that map. Like for example, I have this one character play animation before map transfer and when returning back to that map, the same character plays the same animation and at the key animation position where I left off from. How would you suggest I can make this work?
I understand and thank u. But what I wanted to do was save a character's spine animation reference in one map to be able for reference later when returning back to that map. Like for example, I have this one character play animation before map transfer and when returning back to that map, the same character plays the same animation and at the key animation position where I left off from. How would you suggest I can make this work?
So you want to use spine1 on one map and spine2 on another map for the player, right? If so, I'm working on adding a function to allow changing spine. I think this might make it easier for you.
So you want to use spine1 on one map and spine2 on another map for the player, right? If so, I'm working on adding a function to allow changing spine. I think this might make it easier for you.
Hmmm... sorry but you kinda lost me.

1.What did u mean about "So you want to use spine1 on one map and spine2 on another map"?
To my understanding, I thought each character was referencing a spine animation thru ._spineAnimation object it is attached with and deleted and recreated on each transfer including menu changes? So, im lost when u said spine1 and spine2 as if this plugin saves each character's spine animation data for each map? If thats the case, that would lag the game wont it?

2.What I am trying to achieve is for all characters on the map not just the player. So, to clarify how things work currently with this plugin is that on every transfer, the creation of ._spineAnimation on any character resets to their respective map settings?

If thats the case, the big picture of what I'm trying to achieve would be to save the animation name and key frame of a characters and reload it somehow when retransferring to same map. It sounds easy enough but I just dont know currently where in ._spineAnimation object or if its even there
or another, I can find the animation name and current key frame position value its on. For example info animation > "driving" "currentKeyFrame:0.5".
So where would I find this data for reference in the console? I tried playing with around with the keys in ._spineAnimation of a character and they don't do anything as far as adjusting a key frame of an animation currently playing.

Also, I've notice in the console that there is a .load() function. Is this how an animation is loaded for a character?
If so, how would I be able to load this saved data sample in command >>> character.load("driving", keyframestart: "0.5")?

I want to thank u for suggesting not to do the JsonEx.stringify(char) route to save an animation name and keyframe cuz that would probably be costly in the end.
Hmmm... sorry but you kinda lost me.

1.What did u mean about "So you want to use spine1 on one map and spine2 on another map"?
To my understanding, I thought each character was referencing a spine animation thru ._spineAnimation object it is attached with and deleted and recreated on each transfer including menu changes? So, im lost when u said spine1 and spine2 as if this plugin saves each character's spine animation data for each map? If thats the case, that would lag the game wont it?

2.What I am trying to achieve is for all characters on the map not just the player. So, to clarify how things work currently with this plugin is that on every transfer, the creation of ._spineAnimation on any character resets to their respective map settings?

If thats the case, the big picture of what I'm trying to achieve would be to save the animation name and key frame of a characters and reload it somehow when retransferring to same map. It sounds easy enough but I just dont know currently where in ._spineAnimation object or if its even there
or another, I can find the animation name and current key frame position value its on. For example info animation > "driving" "currentKeyFrame:0.5".
So where would I find this data for reference in the console? I tried playing with around with the keys in ._spineAnimation of a character and they don't do anything as far as adjusting a key frame of an animation currently playing.

Also, I've notice in the console that there is a .load() function. Is this how an animation is loaded for a character?
If so, how would I be able to load this saved data sample in command >>> character.load("driving", keyframestart: "0.5")?

I want to thank u for suggesting not to do the JsonEx.stringify(char) route to save an animation name and keyframe cuz that would probably be costly in the end.

ah, sorry for misunderstanding your meaning. So you want after a character changes animation, when returning to the map, that character will use the newly changed animation instead of using the default animation like now?
Hi mardsilver! I bought the plugin and noticed something strange. When we press "shift" to dash, the character already performs the dash animation even when standing still. The correct behavior would be for the dash animation to only happen when the character is moving. Could you please fix this?
Hi mardsilver! I bought the plugin and noticed something strange. When we press "shift" to dash, the character already performs the dash animation even when standing still. The correct behavior would be for the dash animation to only happen when the character is moving. Could you please fix this?
Let me check and fix it soon. Thanks
I updated and fix at version 1.0.1.
ChangeLog

version 1.0.1 Fedruary 25 2025
- Add command plugin for change angle for character
- Add command plugin Change Spine file for character
- Add command plugin Change Spine file for battler
- Fixed dashing.
Hi there,
This is an amazing plugin!
I tried the demo project, and I have a few questions.

When executing an event command to add Priscilla to the party, the Spine animation does not play, and only the sprite is shown.
Has this bug been fixed in the full version?
ss.png

Is there a plugin command in the full version that allows me to play specific Spine animations for actors, events, battlers, or enemies?
For example, I’d like to play the "shoot" or "death" animations for an actor (Spineboy) on the map, or play animations for battlers or enemies during a battle event.

It's not available for purchase on itch.io right now. Will it be available again soon?

Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/rmmz-spine-2d-animation.167212/