Rigid Turn Order (Solved)

ginfubawuba

Villager
Member
Joined
Dec 1, 2017
Messages
12
Reaction score
3
First Language
English
Primarily Uses
RMMV
I want characters with a faster speed to always go before slower ones.

how do i remove the random element?
 

CrowStorm

Storm crow descending, Winter unending.
Veteran
Joined
Sep 7, 2018
Messages
315
Reaction score
281
First Language
English
Primarily Uses
RMMV
First off, let's use the correct jargon here: we're talking RPG Maker MV if we're on the Javascript boards so you mean you want characters with a higher AGI to always act before characters with a lower AGI. "Speed" means something different in RMMV terms and is attached to skills/items/weapons, not characters.

Also I think what you want is a FIXED turn order, not a rigid one (a "rigid" one would still allow for characters with lower AGI to act before characters with higher AGI, just extremely difficult/unlikely).

It's very hard or even impossible to answer your question as you haven't specified what battle system you're using: Default? STB? ATB? CTB? Having used Yanfly's CTB and ATB plugins (and currently USING said plugins), I can say that using either of those, if you simply set "Rubberband" to off in the config settings and ensure that your faster characters are, well, faster ENOUGH than your slower characters, they will VIRTUALLY always go first which should be good enough for your needs. HOWEVER, they will also act significantly MORE OFTEN than slower characters with either of these systems configured as described, which might or might not be what you want.

For the time being I'm assuming you're talking about the PLANKTON STANDARD VANILLA DEFAULT RMMV Battle System because you haven't specified otherwise. Let me delve into the .js files as much in an effort to learn anygoddamnthingatall about Javascript and the core mechanics of RMMV. Back in a flash/back with an edit.
 

ginfubawuba

Villager
Member
Joined
Dec 1, 2017
Messages
12
Reaction score
3
First Language
English
Primarily Uses
RMMV
First off, let's use the correct jargon here: we're talking RPG Maker MV if we're on the Javascript boards so you mean you want characters with a higher AGI to always act before characters with a lower AGI. "Speed" means something different in RMMV terms and is attached to skills/items/weapons, not characters.

Also I think what you want is a FIXED turn order, not a rigid one (a "rigid" one would still allow for characters with lower AGI to act before characters with higher AGI, just extremely difficult/unlikely).

It's very hard or even impossible to answer your question as you haven't specified what battle system you're using: Default? STB? ATB? CTB? Having used Yanfly's CTB and ATB plugins (and currently USING said plugins), I can say that using either of those, if you simply set "Rubberband" to off in the config settings and ensure that your faster characters are, well, faster ENOUGH than your slower characters, they will VIRTUALLY always go first which should be good enough for your needs. HOWEVER, they will also act significantly MORE OFTEN than slower characters with either of these systems configured as described, which might or might not be what you want.

For the time being I'm assuming you're talking about the PLANKTON STANDARD VANILLA DEFAULT RMMV Battle System because you haven't specified otherwise. Let me delve into the .js files as much in an effort to learn anygoddamnthingatall about Javascript and the core mechanics of RMMV. Back in a flash/back with an edit.
You're right, I meant AGI and Fixed, I edited my post to reflect that.

I am using the default turn-based battle system.
 
Last edited:

CrowStorm

Storm crow descending, Winter unending.
Veteran
Joined
Sep 7, 2018
Messages
315
Reaction score
281
First Language
English
Primarily Uses
RMMV
Okay, so, I'm going to go ahead and rip off/paraphrase some of the "standard Yanfly disclaimer" here: if anything you alter in a .js file based on my incompetent bumbling causes your game to crash, your CPU to melt, bad breath, your computer to explode, spontaneous human combustion, pregnancy, pregnancy even though you're male, your firstborn child to be born deformed 13 years from now, cholera, bubonic plague, your head to asplode, etc. IT AIN'T MY FAULT!

THAT SAID I did a little digging and I think I got this figured.
First off, you're going to want to download Notepad++. It's a relatively idiot proof script editor, I know because I can use it.
Secondly, the line you're looking for is line 1433 in rpg_objects.js.
Delete everything after agi on that line.


That SHOULD make your battle system's turn order entirely deterministic and not at all probabilistic.
Let me know if/how it works!

Oh, NOTE: this change makes the 'Speed' setting on skills and items and the 'Attack Speed' Trait on...anything that can have Traits, which is most types of entities in the Database, much more important as it is now added directly to (or subtracted from) Agility rather than "AGI + 1d(5+AGI/4)"...and yes, I am expressing the basic-ass JS function Math.randomInt in terms of a D&Dism, because that is how I was finally able to make myself understand it. Personally, I think having item/skill/weapon Speed impact action order more significantly is a good thing, but it's also a good thing to be aware of.
 
Last edited:

ginfubawuba

Villager
Member
Joined
Dec 1, 2017
Messages
12
Reaction score
3
First Language
English
Primarily Uses
RMMV
Okay, so, I'm going to go ahead and rip off/paraphrase some of the "standard Yanfly disclaimer" here: if anything you alter in a .js file based on my incompetent bumbling causes your game to crash, your CPU to melt, bad breath, your computer to explode, spontaneous human combustion, pregnancy, pregnancy even though you're male, your firstborn child to be born deformed 13 years from now, cholera, bubonic plague, your head to asplode, etc. IT AIN'T MY FAULT!

THAT SAID I did a little digging and I think I got this figured.
First off, you're going to want to download Notepad++. It's a relatively idiot proof script editor, I know because I can use it.
Secondly, the line you're looking for is line 1433 in rpg_objects.js.
Delete everything after agi on that line.


That SHOULD make your battle system's turn order entirely deterministic and not at all probabilistic.
Let me know if/how it works!
I deleted "+ Math.randomInt(Math.floor(5 + agi / 4)" and now it works. Thank you.
 

Another Fen

Veteran
Veteran
Joined
Jan 23, 2013
Messages
552
Reaction score
265
First Language
German
Primarily Uses
I'd generally recommend against modifying the original plugins. It's pretty unlikely you'll remember everything you changed in a few months time as features pile on, which might make future troubleshooting as well as transferring or removing those features later more tedious.

You can always make changes like that in your own plugin by copying the affected function into a new javascript file and make your modifications there. Since imported plugins are executed after the default ones, your changed function will take precedence over the original.

(Sorry, couldn't resist picking on that :) )
 
Last edited:

ginfubawuba

Villager
Member
Joined
Dec 1, 2017
Messages
12
Reaction score
3
First Language
English
Primarily Uses
RMMV
I'd generally recommend against modifying the original plugins. It's pretty unlikely you'll remember everything you changed in a few months time as features pile on, which might make future troubleshooting as well as transferring or removing those features later more tedious.

You can always make changes like that in your own plugin by copying the affected function into a new javascript file and make your modifications there. Since imported plugins are executed after the default ones, your changed function will take precedence over the original.

(Sorry, couldn't resist picking on that :) )
I did just that
 

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

Latest Threads

Latest Profile Posts

I've developed a habit of thanking cleaning ladies for their work.
Sorry Aerith... I will abandon your shoes... :guffaw:
Spent a whole bunch of time today reworking the area in the video because someone said it was too illusory. So I reworked it so it changes less, moved the grass up to the same level as the player.... And found enough extra resources to make the grass moves when the player touches it. Also lots more water, because it looks amazing. I'll probably put up a short updated video later today.
I never noticed how NOISY birds can be in the morning..
The worst part of writing the thesis is getting to a point where it's nearly done and you feel like an 8th-grader could've written something on that level.

Forum statistics

Threads
95,766
Messages
931,712
Members
126,169
Latest member
Stearen
Top