LordOfPotatos

Veteran
Veteran
Joined
Oct 9, 2015
Messages
141
Reaction score
121
First Language
english
Primarily Uses
The Ellye's ATB plugin has a CTB mode that can display the turn order on the top of the screen, like this...

Untitled-1.png

(please ignore any janky placeholder graphics)

And I was wondering if this feature could be turned into a shared ATB bar approximation by tying the X coordinates of the faces on the top to the ATB of each battler, into something like this...


Untitled-1 - Copy.png
(excuse my drawing, the position of the faces is the only thing that matters)

I took a look at the JS file and found the section that dictates the positions of those faces...

//We will add some new windows to Scene Battle: //We will have an array of Turn Order windows. _Scene_Battle_prototype_createAllWindows = Scene_Battle.prototype.createAllWindows; Scene_Battle.prototype.createAllWindows = function() { this._turnOrderWindows = []; var diff = Math.round((ctb_opacity_first - ctb_opacity_last) / (turns_to_predict - 1)); var opacity = (invert_turn_order_display !== 1) ? ctb_opacity_first : ctb_opacity_last; for (index = 0; index < turns_to_predict; index++) { this._turnOrderWindows.push(new Window_CTB(ctb_window_x_offset + index * ctb_window_width, opacity)); this.addWindow(this._turnOrderWindows[index]); opacity = (invert_turn_order_display !== 1) ? opacity - diff : opacity + diff; } BattleManager.setCTBWindowsArray(this._turnOrderWindows); _Scene_Battle_prototype_createAllWindows.call(this); };



the X coordinate of each face is "ctb_window_x_offset + index * ctb_window_width", so I think replacing that with some equation that includes each battler's ATB charge would be enough.

"ctb_window_x_offset" and "ctb_window_width" are simple constants declared somewhere else, I'm not sure what "index" is.
and I also don't know how to refer to each batler, since this index seems to be different from the index of all battlers.

I don't actually know coding beyond the ultra basics so maybe someone who actually knows what they're doing can help with this one?
you can get Ellye's ATB plugin Here

I know there's an ATB plugin out there that does this but Ellye's ATB is compatible with a couple of plugins I use that don't work with other ATB plugins (like YEP_X_ActorPartySwitch to switch party members in battle for example) and it's probably easier to figure this out than figure that kinda compatibility out.

Oh and I'm not sure where to post this so feel free to move it.
Thanks in advance :/
 

Latest Threads

Latest Profile Posts

WSQfuc8.gif

rawrrrr
Archery target and improved training dummy!
1656682912105.png
Map034.png
First try making a temple- looking thing.
Made this simple Training Dummy :D

obraz_2022-07-01_095700524.png

Forum statistics

Threads
123,225
Messages
1,155,074
Members
161,608
Latest member
SpicySalami
Top