Increasing Action Time with AGI?

Feliaria

Good with Ideas, Bad with Execution
Veteran
Joined
Feb 4, 2016
Messages
364
Reaction score
50
First Language
English
Primarily Uses
So, I know next-to-nothing about JavaScript, so I don't even know if something like this would be possible, or if it would even need a plugin, but I'll ask it here anyway in the hopes that someone can make it one, if it does in fact need one.


My game has a single actor. I did it this way mainly because the way the story has evolved from where I was beginning... they're practically entirely new games. I could still make the original plan if I wanted to, that's how much the story has changed since I started. Anyway, because of this, I have the staples of single-actor games, i.e., single-actor HUD (thanks to other plug-ins), the character having a large range of skills (I have 6 classes of 15 to 20 skills each (I haven't decided between 15 or 20 skills a class yet: I'll figure that out when I actually start filling the abilities in more). The player can have the character learn all of them, theoretically, though they can only equip and use up to 15 at a time, depending on where they are in the game), etc. Though I had a thought.


Because of the plug-in I am using for my battle HUD (VictorSant's Battle Status Menu), I can't use Yanfly's ATB plug-in. I also can't get VictorSant's ATB to work the way that I wanted because it's... kind of weird (I have that issue on another post in one of the other forums on this site if anyone wants to see what I mean), so I had an idea: it's hopefully a different style of combat that keeps the importance of Agility (like ATB and CTB). My idea was to keep the standard turn battle (I know, ick. That's a no-no on a Single-Actor), but have the character's Agility give them a % chance to have multiple actions in a turn (I know in the base program this is the "Action Times +" parameter). My idea was, since the stats in my game are so small, that each point in Agility would add 1% to the character's Action Times and a second Action Times of 0.5%.


If that's confusing, this is what I mean: basically, a character with 50 Agility will give the character:


Action Times +.PNG


Anyway, would this be possible with (or even without) plug-ins, and if it would require a plug-in, would someone mind creating it for me?
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
You may want to try this snippet:

Game_Battler.prototype.makeActionTimes = function() { // Rewrite
// Rewritten to add agi into the first 2 Action Times +
var agiWeight = 0.015;
return this.actionPlusSet().reduce(function(r, p) {
if (agiWeight >= 0.005) agiWeight -= 0.005;
return Math.random() < p + this.agi * agiWeight ? r + 1 : r;
}, 1);
//
}; // Game_Battler.prototype.makeActionTimes



Off topic: Have you tried DoubleX RMMV Popularized ATB Core as well?
 
Last edited by a moderator:

Feliaria

Good with Ideas, Bad with Execution
Veteran
Joined
Feb 4, 2016
Messages
364
Reaction score
50
First Language
English
Primarily Uses
You may want to try this snippet:

Game_Battler.prototype.makeActionTimes = function() { // Rewrite
// Rewritten to add agi into the first 2 Action Times +
var agiWeight = 0.015;
return this.actionPlusSet().reduce(function(r, p) {
if (agiWeight >= 0.005) agiWeight -= 0.005;
return Math.random() < p + this.agi * agiWeight ? r + 1 : r;
}, 1);
//
}; // Game_Battler.prototype.makeActionTimes



Off topic: Have you tried DoubleX RMMV Popularized ATB Core as well?


I'd actually like to use an ATB system, but I have been unable to get any of them to work with VictorSant's Battle Status Window, including his own ATB. That's why I was asking for something like you made for me. Though, I am unsure of where to put this. Would it be put in as a plug-in, or would it be in something like in a notetag? Also, would I need to add two sets of Action Time+ on my character, or would the snippet function regardless?
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
You can put it as a plugin, or you can simply edit the relevant part of rpg_objects.js.


Even if you don't have any Action Times +, the plugin will still take agi into account.


Specifically, when there's no Action Times +, agi will be used this way:


Action Times + (agi)%


Action Times + (agi * 0.5)%
 

Feliaria

Good with Ideas, Bad with Execution
Veteran
Joined
Feb 4, 2016
Messages
364
Reaction score
50
First Language
English
Primarily Uses
You can put it as a plugin, or you can simply edit the relevant part of rpg_objects.js.


Even if you don't have any Action Times +, the plugin will still take agi into account.


Specifically, when there's no Action Times +, agi will be used this way:


Action Times + (agi)%


Action Times + (agi * 0.5)%


Okay, thank you, DoubleX! :)


EDIT: I put it in as its own .js file, and have it turned ON in my plug-in database, but it is still not working... Did I do something wrong?
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
It's possible that some other plugins have overwritten Game_Battler.prototype.makeActionTimes.


So you may want to change the plugin ordering and see if anything changes :)
 

Feliaria

Good with Ideas, Bad with Execution
Veteran
Joined
Feb 4, 2016
Messages
364
Reaction score
50
First Language
English
Primarily Uses
It's possible that some other plugins have overwritten Game_Battler.prototype.makeActionTimes.


So you may want to change the plugin ordering and see if anything changes :)


Hmm... actually, even when I put it in a blank project, it still isn't working...
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
Try this instead:

Code:
Game_Battler.prototype.makeActionTimes = function() { // Rewrite
    // Rewritten to add agi into the first 2 Action Times +
    var agi = this.agi, agiWeight = 0.015;
    return this.actionPlusSet().reduce(function(r, p) {
        if (agiWeight >= 0.005) agiWeight -= 0.005;
        return Math.random() < p + agi * agiWeight ? r + 1 : r;
    }, 1);
    //
}; // Game_Battler.prototype.makeActionTimes
 

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 working on a blank project, now, so that's good... Still having troubles getting it to work with my actual project, though I'll find the right placement/what plug-in is messing it up and try to fix it. Anyway, I have thought of something.


My stat cap is going to be either 35 or 50. Assuming I want to tweak the values for the Action Time+, would I be changing the agiWeight? From what I can guess (and correct me if I'm wrong), if I doubled the agiWeight to 0.030 and the reduce function to -= 0.010, that would double the Action Times? So 35 AGI would give a 70% chance and 35% chance? Or am I reading it wrong?


EDIT: I finally got it to work when I added two instances of "Action Time+: 0%" to the character's traits. Thank you so much, DoubleX! :)
 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

Getting work done in the hospital is a little tough :kaosigh:
Yet another custom skill animation, sometimes i waste too much time on details people will barely notice :kaocry:
Time flies by... already 1/6th of the calendar released :o

Forum statistics

Threads
105,823
Messages
1,016,721
Members
137,520
Latest member
KM_Dub
Top