MV Script Call to see if player is navigating particular menu

yeahchris

Veteran
Veteran
Joined
Apr 14, 2020
Messages
86
Reaction score
23
First Language
English
Primarily Uses
RMMV
I have a HUD of sorts that I've designed that I would like to show, if possible, specifically when the player is navigating the menu in combat for a particular skill type.

Is there a script call that can return the menu that the player is in during battle?

The idea being that I do a check to see if that returned value matches a static value, and, if so, turn on the switch to which the HUD is tied.
 

Cormorant42

Veteran
Veteran
Joined
Sep 17, 2019
Messages
74
Reaction score
39
First Language
English
Primarily Uses
RMMV
You're going to have to find this yourself, because I'm too tired to delv through rpg_scenes.js for the specific script call that you're looking for. But I can give you some pointers on where to look and what to look for:

- The file you want to look in is either rpg_scenes.js or rpg_windows.js, depending on if you want it to be open during a certain menu or a certain part of a certain menu
- After glancing through rpg_scenes.js, since I'm betting that's what you want, I see a script call for "Scene_Base.prototype.isActive();" which will return a boolean value depending on whether the scene is active or not. Since that's a call for Scene_Base, it will almost always return true if the game is running (that's a guesstimate, I haven't checked that so don't fact check me)
- You'll probably want to find a version of the above script call that is specific to the scene that you want your HUD to be visible during

And I'm tired so that's all I can give you rn, hope it helps
 

xabileug

Veteran
Veteran
Joined
Jul 1, 2014
Messages
113
Reaction score
23
There's a plugin flash active window, i think it was japanese. It makes the active window pulse.
 

yeahchris

Veteran
Veteran
Joined
Apr 14, 2020
Messages
86
Reaction score
23
First Language
English
Primarily Uses
RMMV
You're going to have to find this yourself, because I'm too tired to delv through rpg_scenes.js for the specific script call that you're looking for. But I can give you some pointers on where to look and what to look for:

- The file you want to look in is either rpg_scenes.js or rpg_windows.js, depending on if you want it to be open during a certain menu or a certain part of a certain menu
- After glancing through rpg_scenes.js, since I'm betting that's what you want, I see a script call for "Scene_Base.prototype.isActive();" which will return a boolean value depending on whether the scene is active or not. Since that's a call for Scene_Base, it will almost always return true if the game is running (that's a guesstimate, I haven't checked that so don't fact check me)
- You'll probably want to find a version of the above script call that is specific to the scene that you want your HUD to be visible during

And I'm tired so that's all I can give you rn, hope it helps
Thanks! It's a start. I'll give it a shot, but my ability to parse javascript is fairly limited. However, a boolean value would be perfect.

I'm hoping to have it return true anytime you access the menu for a skill type I have created -- not just specific parts of the menu.

Why? I have a spellcaster's magic set up to consume reagents. The HUD is the number of reagents she has remaining. I just think it would be slick it it were visible to the player without having to use an ability to bring up the HUD and without it needlessly floating the HUD in battle over everyone else's turn.
 

yeahchris

Veteran
Veteran
Joined
Apr 14, 2020
Messages
86
Reaction score
23
First Language
English
Primarily Uses
RMMV
So.... found this.


Scene_Battle.prototype.isAnyInputWindowActive = function() {
return (this._partyCommandWindow.active ||
this._actorCommandWindow.active ||
this._skillWindow.active ||
this._itemWindow.active ||
this._actorWindow.active ||
this._enemyWindow.active);

But not finding anything that suggest how I could target a particular skill window. Would it be easier to try to target the battler whose turn it is maybe?
 

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

Latest Threads

Latest Profile Posts

The nick "Toeuia" that I'm using comes from a, idk, you okay the chess game while chit chatting them. The first two are students. Then you know, finally, the champion, and then the champion's sensei. I played like this so many times until suddenly there's another chess master. Very naive but super smart. After he lost, he kinda advised me not to give up on chest. Because the next one was never seen beaten. Touya.
I'm currently playing Ara Fell - I can see why it's had generally good reviews. The exploration aspect is pretty strong and the writing is passable.

The game auto-saves and offers an option to turn back just before each major combat, and immediately brings the player back to the last position saved when there's a TPK. Convenient at the very least.
This is Krizzirk Toeuia Aeslan, I'm picking up transmission. Draftwingeds on, duty on, exhaust ready. 310 Immulicationsers approaching. I'll take the cake and----hold it!!! My Cosvere Radar detected 3001 of them!!
11 hours of programming... Only to add two more zoom levels.
Well, that's what happens when you decide between minimap and zoom too late.

It's my cute little ghost~

Forum statistics

Threads
99,374
Messages
964,608
Members
130,989
Latest member
FerdiPanther
Top