State that forces user to move first in turn

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
292
Reaction score
87
First Language
Enlish
Hello,

I’m trying to make a state that forces the user to move first in the turn while the user is inflicted with it.

I know that there’s an attack speed trait, but it only seems to work with normal attacks. Is there a snippet that will cause the atk speed trait to work will all skills?
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
852
Reaction score
536
First Language
English
Primarily Uses
RMMV
Unless you're using another plugin already to mess with action order, that's what Agility is for. Attack Speed is basically just an Agi modifier that only applies to normal attacks.
 

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
292
Reaction score
87
First Language
Enlish
Unless you're using another plugin already to mess with action order, that's what Agility is for. Attack Speed is basically just an Agi modifier that only applies to normal attacks.
Yeah, that’s what I’m looking for. I’m looking for a state that modifies the attack speed, but for all attacks and not just normal attacks. I want to modifiy the skill/item invocation speed with a state.

I don’t want to just adjust agility stat itself, because I use some damage formula that take agility into account, and a simple agility boost kind of ruins the balance of some of them.

I know Hime has a speed formula script in vx Ace, but I haven’t found anything similar in MV.
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
852
Reaction score
536
First Language
English
Primarily Uses
RMMV
If you're certain Attack Speed won't be used elsewhere, you can override this function:
Code:
Game_Action.prototype.speed = function() {
    var agi = this.subject().agi;
    var speed = agi + Math.randomInt(Math.floor(5 + agi / 4));
    if (this.item()) {
        speed += this.item().speed;
    }
    if (this.isAttack()) {
        speed += this.subject().attackSpeed();
    }
    return speed;
};
To look something like this:
Code:
Game_Action.prototype.speed = function() {
    var agi = this.subject().agi;
    var speed = agi + Math.randomInt(Math.floor(5 + agi / 4));
    if (this.item()) {
        speed += this.item().speed;
    }
    speed += this.subject().attackSpeed(); // Speed now affects everything
    return speed;
};
You can see the default speed formula in there, so this will actually force it back to the default turn order calculation otherwise, but you can also just modify the initial "var speed = [...]" line with whatever you want, technically.
 

Lonewulf123

Veteran
Veteran
Joined
Oct 13, 2014
Messages
292
Reaction score
87
First Language
Enlish
Hello,

It looks like this didn't work. I'm not sure what happened, but maybe one of my scripts may be overwriting the turn order. The only one I can think of is Yanfly battle engine though.

Is it possible to turn this into a plugin to override the turn order?

EDIT: It's actually funny, because I also edited the attack times function so it worked with all skills and that worked. It's gotta be something messing with the turn order speed, but I'm not sure what haha.
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

Another plugin complete and ready for Wednesday!
Just for the record I have greatly enjoyed the past couple months of using RPG Maker MV - enough that I went ahead and bought MZ although it's going to be a bit before I seriously start a project with that.
I have a pretty reasonable alpha of one game that's got roughly 4 hours of content and some bits and pieces of others after only about 300 hours total time and about 2 1/2 months of owning RPG Maker.....
I completely forgot which forum had the personal blogs for members. :LZSlol: It was probably a forum for the Ace program. I was going to see about posting a blog post, but I'm too tired, and if its associated with Ace, then its a moot point. :LZSlol:

Forum statistics

Threads
102,971
Messages
996,381
Members
134,433
Latest member
just_herefortheplugins
Top