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,257
Reaction score
1,117
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
42,164
Reaction score
14,654
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

:kaojoy:I just saw 2 players reached 10 hours.
The game is totally not for cult recruitment. As of yet, we have not summoned Cthulhu.
Unfortunately, besides that, many issues still need to be fixed for more common fellows.
To at least pretend everything is normal here. :kaoswt2:
I don't even know if I'm going to USE all these maps in my game, I just like making maps...
Huh. A forum topic just pointed out to me one MV->MZ difference I hadn't registered previously: the skill/item use message in MZ doesn't have the actor name hardcoded at the beginning like MV did, so you have more control over having stuff come before it.
1620833447825.png
This is one of the most beautiful art styles I've seen... it's also the style I draw in... er.... what's this style called...?

Forum statistics

Threads
111,296
Messages
1,060,012
Members
144,611
Latest member
vinice
Top