Dealing fixed damage with a state?

Feliaria

Good with Ideas, Bad with Execution
Veteran
Joined
Feb 4, 2016
Messages
364
Reaction score
50
First Language
English
Primarily Uses
Me again. Sorry guys XD


I'm trying to create a weapon type that deals less damage than normal weapons, but that has a chance to, on an attack, release an "Unstable Burst" that will deal additional damage to the enemy. The only way I can think of doing this is by creating a state and having the STATE deal the additional damage, but I'm running into a couple problems with it.


Obviously, the state will have no icon. The state will only last 1 Action so that the extra damage may be procced multiple times. The state will deal a flat 2 damage (my game uses small numbers, and this particular weapon type deals 1 less base damage than comparable weapons). The only real problem I'm running into, is how do I accomplish the extra damage? I'm using Yanfly's Buffs and States Core (http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/) and Ellye's State Damage (http://forums.rpgmakerweb.com/index.php?/topic/48631-ellyes-state-damage/), but they don't seem to work the way I want it to. Ellye's plugin would be exactly what I wanted if there were a way to make the Damage proc at the state's application, rather than the end of the turn, and while I know Yanfly's Buffs and States Core has the <Custom Apply Effect> notetag, I'm not sure what to put in it. When I tried:


<Custom Apply Effect>


b.gainHp(-2)


</Custom Apply Effect>


or "a.gainHp(-2), nothing happened. So my question is: Is it the command I'm trying to use, or is there something else that will work? Any help would be appreciated (and don't worry, I'm almost done with the parts I'll need help with, I promise XD)
 

kovak

Silverguard
Veteran
Joined
Apr 3, 2016
Messages
1,263
Reaction score
1,565
First Language
PT - EN
Primarily Uses
RMMV
Replace the "X" with what you need.
Make him add the state and them remove the state afterward on the same skill.
That's all i can do :/


<Custom Remove Effect>


// Declare the dispeller.


var dispeller = BattleManager._subject;


// Check to see if the effect is a leave effect or removal.


var notLeaveEffect = !$gameTemp._customLeaveEffectEval;


// Check the conditions to see if they're met.


if (dispeller && notLeaveEffect) {


// Get the element.


var elementId = x;


// Damage set to equal the origin's param.


var damage = origin.param;


// Play an animation on the target.


target.startAnimation(x);


// Deal damage to the dispeller.


target.gainHp(-damage);


// Start the damage popup for the target.


target.startDamagePopup();


// Check to see if the target is dead.


if (target.isDead()) {


// If the target is dead, perform its collapse.


target.performCollapse();


}


// Clear the dispeller's damage popup.


target.clearResult();


}


</Custom Remove Effect>
 
Last edited by a moderator:

Isaac The Red

RedMage
Veteran
Joined
Jan 3, 2016
Messages
207
Reaction score
117
First Language
Gibberish
Primarily Uses
You could also just use yanfly's weapon unleash plugin to do this... giving the weapon a % chance to do a more powerfull attack. Thus eliminating the need for a state all together. :/ But that's just my thought on it.
 

Feliaria

Good with Ideas, Bad with Execution
Veteran
Joined
Feb 4, 2016
Messages
364
Reaction score
50
First Language
English
Primarily Uses
You could also just use yanfly's weapon unleash plugin to do this... giving the weapon a % chance to do a more powerfull attack. Thus eliminating the need for a state all together. :/ But that's just my thought on it.


That could work, except the weapon unleash itself doesn't exactly do what I want it to. While the weapon is equipped, all attacks (not just the normal attack) have the Unleash effect (all my damaging skills have the Normal Attack thing, so Attack State works.) Sorry, I forgot to mention that, though mainly because I didn't think it would be necessary XD


Besides, I've actually used the Weapon Unleash plugin to replace Attack with something that doesn't deal damage, so it wouldn't really work that well...

Replace the "X" with what you need.
Make him add the state and them remove the state afterward on the same skill.
That's all i can do :/


<Custom Remove Effect>


// Declare the dispeller.


var dispeller = BattleManager._subject;


// Check to see if the effect is a leave effect or removal.


var notLeaveEffect = !$gameTemp._customLeaveEffectEval;


// Check the conditions to see if they're met.


if (dispeller && notLeaveEffect) {


// Get the element.


var elementId = x;


// Damage set to equal the origin's param.


var damage = origin.param;


// Play an animation on the target.


target.startAnimation(x);


// Deal damage to the dispeller.


target.gainHp(-damage);


// Start the damage popup for the target.


target.startDamagePopup();


// Check to see if the target is dead.


if (target.isDead()) {


// If the target is dead, perform its collapse.


target.performCollapse();


}


// Clear the dispeller's damage popup.


target.clearResult();


}


</Custom Remove Effect>


I will definitely be giving this a try next time I am able.


EDIT: This isn't working. The Custom Remove Effect doesn't do anything :(


Will do more tests when I have the time. I hope it's not another plugin...
 
Last edited by a moderator:

kovak

Silverguard
Veteran
Joined
Apr 3, 2016
Messages
1,263
Reaction score
1,565
First Language
PT - EN
Primarily Uses
RMMV
did you made the skill remove the state after aplying it?
 

Feliaria

Good with Ideas, Bad with Execution
Veteran
Joined
Feb 4, 2016
Messages
364
Reaction score
50
First Language
English
Primarily Uses
Well, it's not on a skill. It's on the weapon as an Attack State. But I did set a Custom Apply Effect to remove it that way, yes. Neither Apply or Remove worked.
 

kovak

Silverguard
Veteran
Joined
Apr 3, 2016
Messages
1,263
Reaction score
1,565
First Language
PT - EN
Primarily Uses
RMMV
Use Weapon Unleash along and let it roll with Attack Replace tag and see if it fits what you desire.
 
 

Feliaria

Good with Ideas, Bad with Execution
Veteran
Joined
Feb 4, 2016
Messages
364
Reaction score
50
First Language
English
Primarily Uses
As I mentioned before, the weapon unleash will not work for what I want it to. The unleash should be part of every damaging skill, hence why I'm trying to use a state. All of my damaging skills have the Normal Attack state so Attack State should proc on anything. As it is, I might just be stuck using Ellye's State Damage. It's not quite what I wanted, but then very few of Yanfly's notetag-based plugins seem to want to work for me since I updated them... -_-
 

Isaac The Red

RedMage
Veteran
Joined
Jan 3, 2016
Messages
207
Reaction score
117
First Language
Gibberish
Primarily Uses
Instead of making all this part of the weapons notetaggy goodness, how about using the base troop events plugin and setting up a base troop event that essentially checks if the character making the attack is equipped with said weapon? Or instead of applying a state, have the weapon on a chance, increace atk matk or whatever your calculating damage through increase, or have the weapon ignore defense for that attack.
 

Feliaria

Good with Ideas, Bad with Execution
Veteran
Joined
Feb 4, 2016
Messages
364
Reaction score
50
First Language
English
Primarily Uses
...Or instead of applying a state, have the weapon on a chance, increace atk matk or whatever your calculating damage through increase,...


...As a matter of fact, this is exactly what I was originally trying to accomplish, but I didn't know how to do so. I did know I could do something similar to it with a state, though, so I tried doing that, and obviously that idea didn't work... :/


How would I do it this way?
 

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

Latest Threads

Latest Profile Posts

YES! officially released my games soundtrack on Itunes, Spotify, and Amazon..... kinda cool!

Another old age version of Reid. Trying out different style.
Hey everyone! Not sure how many people know about Cafofo Music on Itch.io, but I highly recommend their Sound Effects! It is amazing quality AND quantity and best of all, they are having a 50% sale! I can't express how much I love sales.
Wow.... My last map GIF got 47 likes, 16 retweet and 2,105 views on Twitter in 24 hours. My game thread here's only got 3k views in 6-7 months. I guess building my Twitter was insanely worth it. :LZSexcite:

Forum statistics

Threads
105,594
Messages
1,014,883
Members
137,264
Latest member
ZeoValinferno
Top