Battle GUI Core - hide actor comand on enemy select

surunime

Villager
Member
Joined
Oct 17, 2019
Messages
15
Reaction score
1
First Language
indonesia
Primarily Uses
RMMV
hello, i was using this plugin http://sumrndm.site/battle-gui-core/

when actor select item or magic, actor command automaticaly hidden, but when actor select enemy actor command still there not hidden.

i try to read documentation about this plugin it can modify when actor command hide. so i try to change parameter 'Actor command Visible' on plugin manager to

!BattleManager._enemyWindow.visible && !BattleManager._helpWindow.visible && !BattleManager._skillWindow.visible && !BattleManager._itemWindow.visible && BattleManager.getCurrentActorSprite().x !== 0
but i got error

TypeError: Cannot read property 'visible' of undefined
at eval (eval at Window_ActorCommand.updatePlacement (SRD_BattleGUICore.js:1968), <anonymous>:1:29)
at Window_ActorCommand.updatePlacement (SRD_BattleGUICore.js:1968)
at Window_ActorCommand.update (SRD_BattleGUICore.js:1962)
at rpg_core.js:7035
at Array.forEach (<anonymous>)
at WindowLayer.update (rpg_core.js:7033)
at rpg_scenes.js:262
at Array.forEach (<anonymous>)
at Scene_Battle.Scene_Base.updateChildren (rpg_scenes.js:260)
at Scene_Battle.Scene_Base.update (rpg_scenes.js:113)
i dont know much bout javascript, and i need help if anyone can modify this plugin when actor select enemy actor command dissapear?

thank you very much..
 

Anyone

Veteran
Veteran
Joined
Aug 24, 2019
Messages
237
Reaction score
329
First Language
German
Primarily Uses
RMMV
A bit late, but probably better late than never?

I came across pretty much the same issue an hour ago, and at first was a bit dumbfounded, too.
The answer is that SRD's linked to a wrong or outdated entry.

EnemyList (which he links to) & enemyWindow (which he defines as his own "value holder" of EnemyList) both aren't terms used in the rpg_windows.js.
To find the correct terms, that's where you have to go.

So if you open rpg_windows.js (which is where the vanilla windows are handled) and scan through the lines, you'll come across this:
Code:
//-----------------------------------------------------------------------------
// Window_BattleEnemy
//
// The window for selecting a target enemy on the battle screen.

function Window_BattleEnemy() {
    this.initialize.apply(this, arguments);
And that's the window function you're looking for when targeting enemies: BattleEnemy.

In SRD's file, you'll find this entry:
Code:
//-----------------------------------------------------------------------------
// BattleManager
//-----------------------------------------------------------------------------
followed by lines like this one:

Code:
BattleManager.setEnemyListWindow = function(enemyList) {
    this._enemyList = enemyList;
This is where he tries to connect his script to the enemy target window - using an incorrect or outdated term.

So if we select "enemyList" and use ctrl + f to open the search function, we can search for that term. If you press on count (using Notepad++) you'll probably get about 20 entries. These are all incorrect, either directly or indirectly. While some are indirect links, at least the code shown directly above this defines where to aim at and is the one that'll definitely have to be adjusted.

Solution:
So switch to replace function and let ALL "enemyList" entries be replaced by "BattleEnemy" then use
Code:
!BattleManager._BattleEnemy.visible
in the plugin menu to mark this as something to hide.
The result: The Actor Window disappears when selecting the enemy.

If you follow the steps up above you can further find & fix other entries that don't point at the correct target file in the rpg_windows.js.
 

surunime

Villager
Member
Joined
Oct 17, 2019
Messages
15
Reaction score
1
First Language
indonesia
Primarily Uses
RMMV
wow thanks a lot sir, I really appreciate it :biggrin::biggrin::biggrin: but i already mix this battle gui core with mog battle hud and edit the js. but thanks again it might help on my future project when I doesnt use mog HUD
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top