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,940
Reaction score
14,557
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


No edits, just gameplay from one area to the next. Plus all my new shiny interface stuff... And I even remember to bolt down the portal so it won't escape this time. :kaopride:
You guys just freely offer up your Autonomy?
I don't know about you, but today the covid frustration is seriously getting to me. Haven't really seen many of my friends for two years, since i moved towns the year before this all started, and well, i miss them :(
so, here's a cute alpacaraptor sketch to heighten the mood:
W7Fhp9n.png
Whenever I start on a new chapter, it doesn't feel like the next episodes, but more like sequels :)
It can be frustrating that so many commercial games have used up titles that might otherwise be great for a project.

Forum statistics

Threads
110,657
Messages
1,055,002
Members
143,785
Latest member
Alessandroiejdhfj
Top