DoubleX RMMV Popularized ATB Core

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,470
Reaction score
545
First Language
Chinese
Primarily Uses
N/A
Can I reduce the target ATB gauge when hitting a skill? (Delay action)
I will use the following plugins in combination.
ATB Bar
ATB CTB
ATB Order

It is preferable to be able to set with skill note tag.
(Example: <delay: success rate (%), delay rate (%)>, <delay: 50, 20>)

Sorry, I'm using a translator.
You can use plugin calls in the damage formulae of skills reducing ATB gauge:
Code:
* 4. patb_val.atb = val
* - Set the battler's atb value as val
For instance:
Code:
if (Math.random() < 0.5) b.patb_val.atb = 0; originalDamageFormula
This should have 50% chance to completely empty the ATB gauge of the targets if those skills do hit them :)
 

wrap

Villager
Member
Joined
Sep 2, 2017
Messages
9
Reaction score
6
First Language
Japanese
Primarily Uses
RMMV
I could not understand this plugin at all.
It's a great plug-in, but it's very difficult.
Delay Action can be realized.
Thank you, DoubleX!
 

NiFo

?
Member
Joined
Jun 19, 2018
Messages
3
Reaction score
3
First Language
Italian
Primarily Uses
RMMV
Hello,after adding this plugin the HP and MP bars got as short as the ATB bar which made the numbers go over the letters.
Is there any way to fix this?Im sorry for asking such a simple question but im still learning how to use RMMV.Screenshot.png
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,470
Reaction score
545
First Language
Chinese
Primarily Uses
N/A
Hello,after adding this plugin the HP and MP bars got as short as the ATB bar which made the numbers go over the letters.
Is there any way to fix this?Im sorry for asking such a simple question but im still learning how to use RMMV.View attachment 92456
It seems to me that you're using some other plugins as well. Would you mind sending me your project or at least list all the other plugins(with their ordering preserved) used?
 

NiFo

?
Member
Joined
Jun 19, 2018
Messages
3
Reaction score
3
First Language
Italian
Primarily Uses
RMMV
Of course,here's the list of the plugins im using.
ice_screenshot_20180622-153415.png
 

NiFo

?
Member
Joined
Jun 19, 2018
Messages
3
Reaction score
3
First Language
Italian
Primarily Uses
RMMV
Oh uh,i think i broke something because for some reason the game will softlock when a character dies before selecting an enemy to attack.
Maybe some of the plugins im using are incompatible with each other?
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,470
Reaction score
545
First Language
Chinese
Primarily Uses
N/A
Oh uh,i think i broke something because for some reason the game will softlock when a character dies before selecting an enemy to attack.
Maybe some of the plugins im using are incompatible with each other?
Unfortunately, you will have to test this yourself or ask someone else to test it for you by giving him/her your project.
If you want to test this yourself, you can try to disable more and more plugins until the problems disappear. Then try to enable the disabled ones again until the problems reappear. Then you should at least have some ideas of what plugins are the possible culprits :)
 

Zemtax

Secret Open World Game Dev
Veteran
Joined
Jul 17, 2014
Messages
42
Reaction score
22
First Language
German
Primarily Uses
RMMV
How exactly does the "atb_rate_code" work? I can't seem to find the right balance.
I want to make it so a character with x AGI always has the same time to get a turn even when facing an enemy with much higher AGI, without making the enemy with much higher AGI having ridiculously fast turns. So I may be asking if there's a way to cap the ATB rate time both slowest and fastest.

Hopefully I'm not just missing something in your plugin, can't seem to wrap my head around the formulas.
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,470
Reaction score
545
First Language
Chinese
Primarily Uses
N/A
How exactly does the "atb_rate_code" work? I can't seem to find the right balance.
I want to make it so a character with x AGI always has the same time to get a turn even when facing an enemy with much higher AGI, without making the enemy with much higher AGI having ridiculously fast turns. So I may be asking if there's a way to cap the ATB rate time both slowest and fastest.

Hopefully I'm not just missing something in your plugin, can't seem to wrap my head around the formulas.
In this case, I'd actually wonder why you'll have enemies with very high agi to begin with :D

Anyway, you'll need the rate addon:
Code:
* # Actor/Class/Weapon/Armor/Enemy/State Notetags:
* State notetags take the highest priority, followed by enemy, weapon,
* armor, class and actor
* 1. <operator patb rate: rate>
* - Assigns rate to the battler's atb rate via operator
* - operator can be either =, +, -, *, / or %, meaning set to, add
* by, subtract by, multiply by, divide by or modulo by respectively
* - All instances of this notetag will be used sequentially
With this, you can then set atb_rate_code as abs_agi or agi, then in battle events of troops with enemies having much higher agi, you can add a hidden state(e.g.: a state without a icon) with that notetag(for instance, </ patb rate: 2> halves the atb rate) to each of them :)

Alternatively, you can try the following snippet in the related battle event that are run once upon battle start to lower the agi of those being too high:
Code:
// Use either one
var minActorAgi = $gameParty.members().sort(function(a, b) {
    return a - b;
})[0]; // The minimum agi among all actors
var avgActorAgi = $gameParty.agility(); // The average agi among all actors
//
// Replace x with the multiplier you want
var maxEnemyAgi = x * minActorAgi; // or x * avgActorAgi
//
$gameTroop.members().forEach(function(mem) {
    if (mem.agi <= maxEnemyAgi) return;
    mem.addParam(6, maxEnemyAgi - mem.agi);
});
P.S.: I actually wanted to add the atb rate cap feature, but it'll likely have very serious compatibility issues with the rate addon on the feature level, because while it's obviously pointless to let the rate addon break the cap, the whole PATB system will be either very complicated(this system also serves as a tutorial for those wanting to write their own ATB systems so I won't make things complicated here) or have very severe performance problems if the cap feature caps the rate addon as well ;)
 

Zemtax

Secret Open World Game Dev
Veteran
Joined
Jul 17, 2014
Messages
42
Reaction score
22
First Language
German
Primarily Uses
RMMV
Thanks for taking your time to write an extensive reply! I'm sure writing performant battle systems is very difficult already, especially with tick-based systems :D
 

Kenode

Veteran
Veteran
Joined
Jun 17, 2018
Messages
66
Reaction score
24
First Language
Spanish
Primarily Uses
RMMV
I'm glad you're still active, DoubleX. I haven't gotten to do battle parts yet because I'm still making maps and assets, but with the little I tried, this is the only ATB plugin that's worth it. All other ATB plugins freeze the time when you're in the decision making part, which breaks the whole point. Yours seems to be the only one that keeps going. It's very FF7 alike, which is a good thing.
 

ave36

Veteran
Veteran
Joined
Jun 23, 2019
Messages
92
Reaction score
35
First Language
Russian
Primarily Uses
RMMV
Hello DoubleX. I seem to have troubles with the ATB Charge sub-plugin. When an actor is hit by an action-preventing state such as Sleep while charging up an action and the state is then removed, I get a crash and error message. It is the following:

Type Error
Can't read property "item" of undefined

The console log is the following:

TypeError: Cannot read property 'item' of undefined at Game_Actor.Game_Battler.set_patb_charge_rate (DoubleX RMMV Popular…Charge v103a.js:491)
at Game_Actor.Game_Battler.get_patb_charge_rate (DoubleX RMMV Popular…Charge v103a.js:478)
at Game_Actor.Game_Battler.update_patb_charge (DoubleX RMMV Popular…Charge v103a.js:468)
at Game_Actor.Game_Battler.update_patb_val (DoubleX RMMV Popular…Charge v103a.js:388)
at Game_Actor.Game_Battler.update_patb (DoubleX RMMV Popular… Core v103a.js:1238)
at Game_Actor.update_patb (DoubleX RMMV Popular… Core v103a.js:1583)
at DoubleX RMMV Popular… Core v103a.js:1645 at Array.forEach (<anonymous>)
at Game_Party.Game_Unit.update_patb (DoubleX RMMV Popular… Core v103a.js:1645)
at Function.BattleManager.update_patb (DoubleX RMMV Popular…B Core v103a.js:815)
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,470
Reaction score
545
First Language
Chinese
Primarily Uses
N/A
Hello DoubleX. I seem to have troubles with the ATB Charge sub-plugin. When an actor is hit by an action-preventing state such as Sleep while charging up an action and the state is then removed, I get a crash and error message. It is the following:

Type Error
Can't read property "item" of undefined

The console log is the following:

TypeError: Cannot read property 'item' of undefined at Game_Actor.Game_Battler.set_patb_charge_rate (DoubleX RMMV Popular…Charge v103a.js:491)
at Game_Actor.Game_Battler.get_patb_charge_rate (DoubleX RMMV Popular…Charge v103a.js:478)
at Game_Actor.Game_Battler.update_patb_charge (DoubleX RMMV Popular…Charge v103a.js:468)
at Game_Actor.Game_Battler.update_patb_val (DoubleX RMMV Popular…Charge v103a.js:388)
at Game_Actor.Game_Battler.update_patb (DoubleX RMMV Popular… Core v103a.js:1238)
at Game_Actor.update_patb (DoubleX RMMV Popular… Core v103a.js:1583)
at DoubleX RMMV Popular… Core v103a.js:1645 at Array.forEach (<anonymous>)
at Game_Party.Game_Unit.update_patb (DoubleX RMMV Popular… Core v103a.js:1645)
at Function.BattleManager.update_patb (DoubleX RMMV Popular…B Core v103a.js:815)
I'm afraid that you'll have to give me your project so I can know what's really going on :)
 

ave36

Veteran
Veteran
Joined
Jun 23, 2019
Messages
92
Reaction score
35
First Language
Russian
Primarily Uses
RMMV
I tried to replicate this behavior in a clean new project and found out that it is not occurring. Therefore, some other plugin is likely interferring. Sorry for inconveniencing you, I'll try to find the culprit myself.
 

Oscar92player

Veteran
Veteran
Joined
Jul 26, 2012
Messages
456
Reaction score
199
First Language
Spanish
Primarily Uses
RMMV
@DoubleX I need some help with your plugin.

I'm trying to set up the ATB mode (full, act, target, item, or "nothing") in the middle of the map gameplay (not inside a battle) by using the plugin calls in the "# Configuration manipulation" part of your plugin. My idea was to make a menu on the save points to change the ATB mode, so the player can configurate it before entering a battle.

For example, trying to set the Full mode, I used this:
Code:
$gameSystem.patb.wait_cond_code = full
And the Item mode:
Code:
$gameSystem.patb.wait_cond_code = item
But none of them are working for me, the ATB is still working like in the default parameter in the plugin manager (is set to "item"). Do you have any idea on how to change it? Any help would be appreciated.

Thanks in advance!
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,470
Reaction score
545
First Language
Chinese
Primarily Uses
N/A
@DoubleX I need some help with your plugin.

I'm trying to set up the ATB mode (full, act, target, item, or "nothing") in the middle of the map gameplay (not inside a battle) by using the plugin calls in the "# Configuration manipulation" part of your plugin. My idea was to make a menu on the save points to change the ATB mode, so the player can configurate it before entering a battle.

For example, trying to set the Full mode, I used this:
Code:
$gameSystem.patb.wait_cond_code = full
And the Item mode:
Code:
$gameSystem.patb.wait_cond_code = item
But none of them are working for me, the ATB is still working like in the default parameter in the plugin manager (is set to "item"). Do you have any idea on how to change it? Any help would be appreciated.

Thanks in advance!
You may want to try these instead:
Code:
$gameSystem.patb.wait_cond_code = "full"
$gameSystem.patb.wait_cond_code = "item"
 

Oscar92player

Veteran
Veteran
Joined
Jul 26, 2012
Messages
456
Reaction score
199
First Language
Spanish
Primarily Uses
RMMV
You may want to try these instead:
Code:
$gameSystem.patb.wait_cond_code = "full"
$gameSystem.patb.wait_cond_code = "item"
I'm afraid those plugin calls are not working, either. Maybe I'm doing something wrong?

EDIT: My fault. They are not "plugin calls", but "script calls" instead xD
It seems to be working right now.

Thanks for all the help! I'll do some more tests to set a full battle mode selection!
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

This just in: RPGMaker 10 announced. We are pleased to release an engine that takes full advantage of the WIndows 10 platform. Also will have cross platform to TI calculators, Atari, the Ouya, and your toaster!
Posted a game thread. Then accidentally pressed x. Then found out rmweb saves drafts :D all is good
I also enjoy using the new RPG Maker 2.0 Beta
...
...
...
...
April Fools!
I have a character named "Corona". Her name are supposed to refer to sun light / aura. I guess I couldn't use that name anymore. Any suggestion?
Wow RPG Maker MV 2 is really good

Forum statistics

Threads
95,536
Messages
929,878
Members
125,812
Latest member
dulak14
Top