Status
Not open for further replies.

Nectar

Bees love me.
Veteran
Joined
Jul 7, 2017
Messages
245
Reaction score
41
First Language
English
Primarily Uses
RMMV
Eh, this may be ugly but try adding this as a plugin:

(function() { var variableId = 0; // change var id var stateId = 0; // change state id var animationId = 0; //change animation id var AG_EvasionState_Game_Actor_performEvasion = Game_Actor.prototype.performEvasion; Game_Actor.prototype.performEvasion = function() { AG_EvasionState_Game_Actor_performEvasion.call(this); if($gameVariables.value(variableId) === 1){ this.addState(stateId); this.startAnimation(animationId); } }; })();

I haven't tested this code ingame but you do for me x)
Make the State in database have 100% chance to be removed upon taking damage and you can use some other plugin that allows stackable states? I don't know, I'm too lazy to do with Buffs, sorry. Good luck lol.
I figured out how I am going to approach increasing attack power by using a variety states so the player loses states and gains a better one, however, how do I check if the evading actor is affected by a state? I tried using this.isStateAffected(1) != 1) to check if we don't have that state, if not then it'll apply it, but it doesn't even apply the state at all anymore.

Once that's figured out, I can just add else and more checks to see if other states are applied that way a state is removed and the better one is applied after every successful evade. I just also wish there was a way to hide the pop-up text when you gain a state so the player won't have to see "+Stylish Evasion Lv1/Lv2/Lv3/MAX" throughout the entire battle.

Code:
(function() {
   var variableId = 307;  // change var id
   var stateId = 63;      // change state id
   var stateLvl2= 64;      // change state id
   var stateLv3 = 65;      // change state id
   var stateLvMax = 66;      // change state id
   var animationId = 340;    //change animation id

   var AG_EvasionState_Game_Actor_performEvasion = Game_Actor.prototype.performEvasion;
   Game_Actor.prototype.performEvasion = function() {
       AG_EvasionState_Game_Actor_performEvasion.call(this);
       if($gameVariables.value(variableId) === 1 && this.isStateAffected(1) != 1){
              this.addState(stateId);
              this.startAnimation(animationId);
       }
   };
})();
 

Kyuukon

主人公
Veteran
Joined
Aug 22, 2013
Messages
2,256
Reaction score
1,116
First Language
Spanish
Primarily Uses
RMMV
this.isStateAffected(stateId) != 1
to
!this.isStateAffected(stateId)
 

Nectar

Bees love me.
Veteran
Joined
Jul 7, 2017
Messages
245
Reaction score
41
First Language
English
Primarily Uses
RMMV
So I'm using this right now, and it doesn't seem to work.

Code:
(function() {
   var variableId = 307;  // change var id
   var KOstate = 1;
   var stateId = 63;      // change state id
   var Lvl2= 64;      // change state id
   var Lv3 = 65;      // change state id
   var LvMax = 66;      // change state id
   var animationId = 340;    //change animation id

   var AG_EvasionState_Game_Actor_performEvasion = Game_Actor.prototype.performEvasion;
   Game_Actor.prototype.performEvasion = function() {
       AG_EvasionState_Game_Actor_performEvasion.call(this);
       if($gameVariables.value(variableId) === 1 && !this.isStateAffected(KOstate)) && !this.isStateAffected(stateId)){
              this.addState(stateId);
              this.startAnimation(animationId);
       }
   };
})();

Edit:
Once I remove my state condition checks, it works again...

Edit 2:
Removed extra ")", works now.

Edit 3:
The topic can be closed now, I'll start learning JavaScript lmao... Thanks for the help everyone.
 
Last edited:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,867
Reaction score
14,522
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.

Latest Threads

Latest Posts

Latest Profile Posts


Livestreaming again.
I managed to review my previous lessons on Learn MV and fixed a lot of things. Yay! :kaopride:
I've decided "Attack on Equestria" should be released first... hence this new ARG channel! https://www.youtube.com/channel/UClKiUI8xOVx9dsF4kRXUmxw
Check it out, and subscribe! The ARG will lead up to the video game. It's not a creepy game, but I just thought it should follow ARG standards.
For anyone interested in my project M - i finally made a gamethread about it :D

Yay. I turned 39 today. Another year older, another year closer to the grave.

Forum statistics

Threads
110,407
Messages
1,053,068
Members
143,470
Latest member
AttilaHU1990
Top