Status
Not open for further replies.

VinegarDude

Villager
Member
Joined
Jan 4, 2023
Messages
18
Reaction score
77
First Language
Spanish
Primarily Uses
RMMV
figured id ask here since its very related to scripts themeselves.

ive been having trouble these past days trying to find the correct script calls to place in the condition box of SRD's HUD maker pluggin.

Been trying to have several pictures act as part of the UI of the battle screen depending on wich current option is being highlighted in the battle command window

aka, this one.
1678567747736.png
essentially what im trying to look for is the script call when the options Attack, Skills, Items, Guard or Run are being HIGHLIGHTED/hovered over.

ive already looked far and wide but nothing like this has been solved as far ive seen and also tried to mess with various script calls myself to see if they worked, including stuff like:

Window_ActorCommand
Yanfly.BEC.Scene_Battle_commandSkill
Scene_Battle.prototype.commandAttack.

with the only one that ive found to sorta work being this one in the excell spreadsheet of mv's and mz's script calls.
1678568243327.png
the only thing this does so far is just make the pictures disappear when the battle is being played out after choosing what actions to do, so it sorta works and i feel i may just be missing another bit of this to make it fully work.

if anyone knows the answer or can help in any way to find these id be really grateful, since its quite literally the only missing element to complete my battle HUD so i can move to work on other elements of the game.

thank you.
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
8,243
Reaction score
3,515
First Language
Dutch
Primarily Uses
RMMV
most command menu have "index" being top one is index 0.
if it has 5 indexes, it has 0, 1, 2, 3, 4 to use (some can modify this
to have more or less).

like actor 1 have 7 indexes where actor 2 only 4.
if each actor is equal in the indexes, it is a bit easier, specially if you have it
command based.

I believe MOGHunter has an images based on those battle commands,
but I cannot help you directly to look into it, but I might be later on.
 

VinegarDude

Villager
Member
Joined
Jan 4, 2023
Messages
18
Reaction score
77
First Language
Spanish
Primarily Uses
RMMV
most command menu have "index" being top one is index 0.
if it has 5 indexes, it has 0, 1, 2, 3, 4 to use (some can modify this
to have more or less).

like actor 1 have 7 indexes where actor 2 only 4.
if each actor is equal in the indexes, it is a bit easier, specially if you have it
command based.
yeah, luckly all of my actors will use the same 5 indexes, so hopefully it should easily apply to all of them, i tried including a number inside the script call but that hasnt worked out so far.

I believe MOGHunter has an images based on those battle commands,
but I cannot help you directly to look into it, but I might be later on.
ill look into it and see if i can find it, and if so ill put it in here, thanks.
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
8,243
Reaction score
3,515
First Language
Dutch
Primarily Uses
RMMV
you can also try to target the symbol of the command.
if you look into the menu command, it has "item", "equip" etc,
similair should be for the for battle command, but I got low time
to look into it for what could work or not, as I need to build it as well.

but for now, battle commands or the entire layout is on low priority.
otherwise, I already had the calls required.

I just got the mapHUD ready and polish it as well, but I think you
can figure out, maybe someone that knows the battle commands
can give you some more direct solution or a way to look into.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,268
Reaction score
4,754
First Language
EN
Primarily Uses
RMMZ
That's the actor command window, which can be fetched as:

SceneManager._scene._actorCommandWindow

To get the index of the selected command in that window:

SceneManager._scene._actorCommandWindow.index()
E.g. "is the first command (index 0) selected?"

SceneManager._scene._actorCommandWindow.index() === 0

To get the symbol of the selected command:

SceneManager._scene._actorCommandWindow.currentSymbol()
By default the actor command symbols are:
  • "attack"
  • "skill"
  • "guard"
  • "item"
So "is the Attack command selected right now" would be:

SceneManager._scene._actorCommandWindow.currentSymbol() === "attack"

For Skill commands, you can fetch the associated Skill Type ID like this:

SceneManager._scene._actorCommandWindow.currentExt()
E.g. is the command for Skill Type ID 3 selected?

SceneManager._scene._actorCommandWindow.currentSymbol() === "skill" && SceneManager._scene._actorCommandWindow.currentExt() === 3
 

VinegarDude

Villager
Member
Joined
Jan 4, 2023
Messages
18
Reaction score
77
First Language
Spanish
Primarily Uses
RMMV
That's the actor command window, which can be fetched as:

SceneManager._scene._actorCommandWindow


To get the index of the selected command in that window:

SceneManager._scene._actorCommandWindow.index()

E.g. "is the first command (index 0) selected?"

SceneManager._scene._actorCommandWindow.index() === 0


To get the symbol of the selected command:

SceneManager._scene._actorCommandWindow.currentSymbol()

By default the actor command symbols are:
  • "attack"
  • "skill"
  • "guard"
  • "item"
So "is the Attack command selected right now" would be:

SceneManager._scene._actorCommandWindow.currentSymbol() === "attack"


For Skill commands, you can fetch the associated Skill Type ID like this:

SceneManager._scene._actorCommandWindow.currentExt()

E.g. is the command for Skill Type ID 3 selected?

SceneManager._scene._actorCommandWindow.currentSymbol() === "skill" && SceneManager._scene._actorCommandWindow.currentExt() === 3

oh my god this worked, thank you so much!

i seriously cant even begin to thank you enough for this, been stumpt on it for quite long while, i really appreciate it, i can now begin workin on the other elements of the game.

YEAH.gif

not only that but the other code provided might help add some extra flair to some stuff.

seriously thank you.
 

L-U-X-Caelum

Villager
Member
Joined
Aug 25, 2020
Messages
12
Reaction score
3
First Language
French
Primarily Uses
RMMZ
That's the actor command window, which can be fetched as:

SceneManager._scene._actorCommandWindow


To get the index of the selected command in that window:

SceneManager._scene._actorCommandWindow.index()

E.g. "is the first command (index 0) selected?"

SceneManager._scene._actorCommandWindow.index() === 0


To get the symbol of the selected command:

SceneManager._scene._actorCommandWindow.currentSymbol()

By default the actor command symbols are:
  • "attack"
  • "skill"
  • "guard"
  • "item"
So "is the Attack command selected right now" would be:

SceneManager._scene._actorCommandWindow.currentSymbol() === "attack"


For Skill commands, you can fetch the associated Skill Type ID like this:

SceneManager._scene._actorCommandWindow.currentExt()

E.g. is the command for Skill Type ID 3 selected?

SceneManager._scene._actorCommandWindow.currentSymbol() === "skill" && SceneManager._scene._actorCommandWindow.currentExt() === 3


I'm having the exact same issue
how would you write the script as condition for this to work with RMMZ ?

Capture d’écran, le 2023-08-13 à 16.06.57.png

Thank you
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,755
Reaction score
11,367
First Language
English
Primarily Uses
RMMV
I'm having the exact same issue
how would you write the script as condition for this to work with RMMZ ?
Did you try it? It's not different.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,755
Reaction score
11,367
First Language
English
Primarily Uses
RMMV
Please paste exactly what you put into your script box and tell us exactly what you're trying to do.

caethyril provided the code to do several things, so you saying "I'm having the exact same issue" doesn't tell us much.
 

L-U-X-Caelum

Villager
Member
Joined
Aug 25, 2020
Messages
12
Reaction score
3
First Language
French
Primarily Uses
RMMZ
Please paste exactly what you put into your script box and tell us exactly what you're trying to do.

caethyril provided the code to do several things, so you saying "I'm having the exact same issue" doesn't tell us much.

so I'm having the same issue in that I'm also looking for a script call to act as condition in HUD Maker when options in the Actor Commands window are HIGHLIGHTED/hovered over

specifically I fail to get the index of the selected command in that window to work in code check ;

Capture d’écran, le 2023-08-13 à 19.48.25.png

= TypeError : Cannot read property 'index' of undefined
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,755
Reaction score
11,367
First Language
English
Primarily Uses
RMMV
It's probably crashing because you don't include any check for that window to even be on the screen, so the HUD is trying to check it as soon as you get into battle but it's not there.

Change it to:
Code:
return SceneManager._scene._actorCommandWindow?.index()==0;
 

L-U-X-Caelum

Villager
Member
Joined
Aug 25, 2020
Messages
12
Reaction score
3
First Language
French
Primarily Uses
RMMZ
It's probably crashing because you don't include any check for that window to even be on the screen, so the HUD is trying to check it as soon as you get into battle but it's not there.

Change it to:
Code:
return SceneManager._scene._actorCommandWindow?.index()==0;

That is exactly what I was looking for.

I truly appreciate the knowledge you guys are sharing here. Please forgive the poor phrasing of my original post and accept my gratitude.

Cheers.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,268
Reaction score
4,754
First Language
EN
Primarily Uses
RMMZ

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

So in my SRPG, when kill monsters, they leave an aura that grants +20% Crit, +20% PDMG MDMG. Aura lasts only for 1 turn, it forces players when and where to last hit.

1702177938686.png
So frustrating when you just wanna work on your game but people want to do stuff in RL... :p
Day #9 of Advent is all ready in one spot! Do you prefer doing your shopping way before Xmas, or…do you like the chaos? Are you done shopping and/or crafting for Xmas?
Fast test with Wagon and horse no animation. yes it looks strange horse is Ralph and wagon is follower xDDDD
Should first boss be easy or maybe little medium, I don't want to be overwhelmingly hard

Forum statistics

Threads
136,888
Messages
1,271,063
Members
180,663
Latest member
brendancamarillo
Top