Most efficient way of changing skill animations with different weapons?

Shion Kreth

White Knight
Veteran
Joined
Jan 28, 2013
Messages
281
Reaction score
47
First Language
English
Primarily Uses
So if characters can equip, say, swords or hammers, obviously the animations for skills would need to be different; so I figured the easiest way to do this would be to have two versions of each skill.. then considered having the weapon seal the alternate weapon's skills, or even just having the weapons themselves grant the skills, but then started wondering if maybe this isn't the most efficient way of doing it. I'm curious what kinds of solutions have other people come up with.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,392
Reaction score
12,917
First Language
English
Primarily Uses
RMMV
Have you taken a look to see if there are any scripts that do this? I'm sure it's been requested before, and I have a feeling the answer is usually a pointer to a script.


What sort of "special moves"? Are you using some kind of animated battler script?
 
Last edited by a moderator:

Shion Kreth

White Knight
Veteran
Joined
Jan 28, 2013
Messages
281
Reaction score
47
First Language
English
Primarily Uses
Have you taken a look to see if there are any scripts that do this? I'm sure it's been requested before, and I have a feeling the answer is usually a pointer to a script.

What sort of "special moves"? Are you using some kind of animated battler script?
I did look and found posts with other people looking for the same but the only responses they ever got were ways to change to the basic attack, and I want skill animations(which is what I meant by special moves) so that, for example, if I use the skill 'power strike' it plays the animation slash special 1 if the character has a sword equipped, or plays blow special 1 if a hammer is equipped, but so far the only way I can find is changing the skill itself.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,392
Reaction score
12,917
First Language
English
Primarily Uses
RMMV
You really couldn't find any scripts that change the skill animation based on the weapon equipped?


I thought for sure they were out there. If I remember, I'll have a look tonight when I get home. I really don't think it'd be that difficult.


ARE you using any battle scripts? Or pure RTP?


Do you WANT a script to do it? Or do you prefer a non-scripting solution (I think what you've already done is probably the best you can get without scripts, but I do agree, it seems like a LOT of work to do)


edit: I found this, but I don't have time to take a good look at it and see if it suits your needs.
 
Last edited by a moderator:

Shion Kreth

White Knight
Veteran
Joined
Jan 28, 2013
Messages
281
Reaction score
47
First Language
English
Primarily Uses
You really couldn't find any scripts that change the skill animation based on the weapon equipped?

I thought for sure they were out there. If I remember, I'll have a look tonight when I get home. I really don't think it'd be that difficult.

ARE you using any battle scripts? Or pure RTP?

Do you WANT a script to do it? Or do you prefer a non-scripting solution (I think what you've already done is probably the best you can get without scripts, but I do agree, it seems like a LOT of work to do)

edit: I found this, but I don't have time to take a good look at it and see if it suits your needs.
-Yes I really couldn't find one, doesn't mean there isn't one, but I did go through the master script list.

-I'm using yanfly's battle engine.

-I am fine with whatever accomplishes it but if a script can simplify it so much the better.

-The one you presented from Tsukihime may work, if I can specify in the animation formula that it's when the user is using skill (id), but I'm not sure if that's doable.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,082
First Language
English
a.current_action.item.idwould return the ID of the current skill or item that's being used (if any).Note that this is "skill or item" so you would need to further add conditions if you want to limit it only to skills.
 

Shion Kreth

White Knight
Veteran
Joined
Jan 28, 2013
Messages
281
Reaction score
47
First Language
English
Primarily Uses
a.current_action.item.idwould return the ID of the current skill or item that's being used (if any).Note that this is "skill or item" so you would need to further add conditions if you want to limit it only to skills.
Haha, so when I go to use a healing potion on the next character they'd appear to be restored by being viciously shredded by a sword combo?

How would I go about adding these extra conditions? (though I suppose I could also just ensure no item id's line up with the weapon specific attack skill ids too?)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,392
Reaction score
12,917
First Language
English
Primarily Uses
RMMV
You'd have to do a test for a.current_action.item.is_a?(RPG::Skill)
 

Shion Kreth

White Knight
Veteran
Joined
Jan 28, 2013
Messages
281
Reaction score
47
First Language
English
Primarily Uses
a.current_action.item.idwould return the ID of the current skill or item that's being used (if any).

Note that this is "skill or item" so you would need to further add conditions if you want to limit it only to skills.
Alright, after embarrassingly long I was able to make this formula work:

Code:
<animation formula>if a.current_action.item.id == 1224else19end</animation formula>
It's quite a flexible script! Also, it looks like items of the same id aren't a concern in this instance as using the id 12 item played it's normal animation (I think because it has an animation set (38 in this case) rather than 'normal attack'?). Is that correct and I'm all good? If so thanks very much both of you and the thread can be closed.
 
Last edited by a moderator:

captainproton

Dangerously Nifty
Veteran
Joined
Dec 20, 2013
Messages
1,283
Reaction score
582
First Language
english
Primarily Uses
Maybe I'm misunderstanding, but would you need to use a script?

You can attribute whatever animation you want to a weapon or skill, and you can make skills require certain weapons.

Like, you have the sledgehammer weapon, and it plays the Blow Physical animation when used. The rapier weapon plays the Slash Physical animation. The frost blade weapon plays Slash Ice

Then, you have the Fury Blade skill, which you can only use with a sword. When used, it just plays the weapon's animation, whether it's Slash Physical or Slash Ice.

The Crash Hammer skill requires a hammer weapon, and plays a Rock Smash animation, no matter the weapon's individual attack animation.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,392
Reaction score
12,917
First Language
English
Primarily Uses
RMMV
Yes, the problem is, it's the SKILL animation he wants changed, based on the weapon that's equipped. So he'd need to have as many versions of the skill as he has weapons, and have each version of the skill attached to the weapon so it's learned/forgotten when the weapon is equipped/unequipped. In the first post, he says he started off that way, but wondered if there was a different/easier way to just have ONE skill and change its animation. This is where scripts entered the discussion :)


Either way would be acceptable - it's just up to preference.
 

captainproton

Dangerously Nifty
Veteran
Joined
Dec 20, 2013
Messages
1,283
Reaction score
582
First Language
english
Primarily Uses
I see. I guess I just misread the post. Oops!
 

Shion Kreth

White Knight
Veteran
Joined
Jan 28, 2013
Messages
281
Reaction score
47
First Language
English
Primarily Uses
Yes, and I've since realized that since multiple classes with different skills can equip some common weapons like swords and daggers it'd really have to be sealed, meaning on level up it'd be listing characters have learned the same skill up to 3 times over, and if they had no weapon equipped for whatever reason you'd have this big list of the same skills; just wouldn't look very clean. This is the way to go.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Chaos17 wrote on Poryg's profile.
Hi, I am following your videos tutorials serie about coding on MV and I am at the third video. Thank you for making it but's a bit hard to follow since you don't show the whole plugin at the end. I had to screenshot the lines between 110-159 because you scrolled so fast on them.
:rtear:
I'm not sure if I should be happy for MZ, or sad for MV.
Not going to lie.... The update's cool and all, but I immediately ran to Mog's site and was like, "Update! Update! Update!" while breathing on the page of his Star Ocean Battle System plugin. :kaoswt:
Ho boi. I can already see the storm of ugly actor faces RTP customizable facesets from MZ are gonna flood. XD
<-- Meet Seith. He begins the story as an apprentice druid, learning to survive in the wilderness by communing with nature and honing his herbalism. Seith has a deep desire to understand the world around him. When wells of chaotic energy begin erupting from the land,corrupting plant, animal and man alike, Seith finds himself on a journey to discover just what this means for the fate of his home, the land of Myarr.

Forum statistics

Threads
99,463
Messages
965,681
Members
131,073
Latest member
James1998
Top