Conditional Attack Animations

Status
Not open for further replies.

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
653
Reaction score
391
First Language
English
Primarily Uses
N/A
There are very few scripts out there that can manipulate attack animations on weapons. 

Visually, it would make sense for a weapon that was enchanted with an element to have a different attack animation.

I'd like to see a script where the attack animation would change based on a script eval.

So for example, on a weapon notetag, we could put:

<atk ani eval: 13>

a.state?(2)

</atk ani eval>

Where 13 is the Animation ID that the weapon is being changed to, and 2 is the state that gives the actor the attack element.

The eval would give us the flexibility to base the attack animation off of multiple things like states, equips, who's in the party, and so on.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
How would you determine which one to use if there were several conditions that were met?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
I never wrote such a script due to compatibility issues.

Scene_Battle

def use_item item = @subject.current_action.item @log_window.display_use_item(@subject, item) @subject.use_item(item) refresh_status targets = @subject.current_action.make_targets.compact show_animation(targets, item.animation_id) targets.each {|target| item.repeats.times { invoke_item(target, item) } } endThere is absolutely zero flexibility in this method despite it being one of the critical elements of the battle system.If I could I would re-write the whole thing appropriately.
 
Last edited by a moderator:

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
653
Reaction score
391
First Language
English
Primarily Uses
N/A
How would you determine which one to use if there were several conditions that were met?
I envisioned using separate tags. The concept of my request is based off of Tsuki's Conditional Effects script, which functions similarly. I just wasn't sure if this effect could carry over to attack animations. Thanks anyway.

If anyone else happens to stumble on this topic, a post of a workaround would be greatly appreciated.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
A better way is to just use a weapon attack replace script... that changes attack skill depending on the weapon...


now if you want it based on other things, Hime's post explains why it's not too good of an idea...


you can also opt to just remove the attack animation and just use for example Hime's script for doing things when you use skills, and show the animation that way
 
Last edited by a moderator:

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
653
Reaction score
391
First Language
English
Primarily Uses
N/A
I thought of that, but in order to get the desired effect, I'd have to make elemental states for each individual equipment type. (Fire Slash, Fire Pierce, Fire Hit, Ice Slash, Ice Pierce, etc. etc.).

Then when it comes to actually applying the state... I would have to write a damage formula that checks the target's equipment type and apply different states accordingly. Not the workaround I had in mind. 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I understand you want separate tags. But what if more than one has conditions that are met?


Let's say tag 1 has the condition "Actor 1 in party"


Let's say tag 2 has the condition "Gold is > 50"


If gold > 50 AND actor 1 is in the party, they are both met. Which animation should play?
 

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
653
Reaction score
391
First Language
English
Primarily Uses
N/A
I understand you want separate tags. But what if more than one has conditions that are met?

Let's say tag 1 has the condition "Actor 1 in party"

Let's say tag 2 has the condition "Gold is > 50"

If gold > 50 AND actor 1 is in the party, they are both met. Which animation should play?
Ahh, I follow. Well if we keep it within the scope of states, there shouldn't be any conflicts. Ideally, the states that are used can only be applied one at a time. You can have multiple tags on one weapon, but applying one state should mean cancelling another.

To answer your question. I guess I would have it prioritize the first animation - or return an error or some sort. I see what you mean though. It wouldn't be a very efficient script based on the concept I outlined.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
I made it so that conflicting conditions are up to you to figure out.


This saves me lots of work because I'm not interested in hardcoding a specific prioritization scheme.


http://www.himeworks.com/2014/03/23/dynamic-weapon-animations/





This solution is a bit more compatible, but it still overwrites stuff.
 
Last edited by a moderator:

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
653
Reaction score
391
First Language
English
Primarily Uses
N/A
And once again Tsukihime pulls through. Gonna run a test as soon as I can, but this is exactly what I need. 

This topic can be closed. 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top