StypeId command?

So I'm trying to get something crazy going and I was wondering: how would I make a command that makes the game recognize what skill type the player currently selected in the battle menu?

Ex.

If (stypeId === 1) {
// do the thing
}

Just stypeId hasn't gotten me any results, since I want this to trigger when the player selects a skill type in their combat menu (like "Magic" or "Tech").
what do you want to trigger at that moment? are you trying to program your own user interface or what?
I was bored and tried it out. Got it working like this, by modifying the rpg_scenes (made it play a different sound effect depending on whether you selected magic or skills command menu). I'm not a programmer though LOL.

Scene_Battle.prototype.commandSkill = function() { this._skillWindow.setActor(BattleManager.actor()); this._skillWindow.setStypeId(this._actorCommandWindow.currentExt()); this._skillWindow.refresh(); this._skillWindow.show(); this._skillWindow.activate(); if (this._skillWindow._stypeId == 1){ // DO STUFF 1 } if (this._skillWindow._stypeId == 2){ // DO STUFF 2 } };
It could be
SceneManager._scene._actorWindow.currentExt();
what do you want to trigger at that moment? are you trying to program your own user interface or what?

I was trying to code a specific skill type menu during combat to have a different graphic than all the others.

Which, by the way:

I was bored and tried it out. Got it working like this, by modifying the rpg_scenes (made it play a different sound effect depending on whether you selected magic or skills command menu). I'm not a programmer though LOL.

Scene_Battle.prototype.commandSkill = function() { this._skillWindow.setActor(BattleManager.actor()); this._skillWindow.setStypeId(this._actorCommandWindow.currentExt()); this._skillWindow.refresh(); this._skillWindow.show(); this._skillWindow.activate(); if (this._skillWindow._stypeId == 1){ // DO STUFF 1 } if (this._skillWindow._stypeId == 2){ // DO STUFF 2 } };

@rpgLord69 wound up coming to the rescue with this, though. While I didn't need the full version since I was already working with a plugin (Mog_BattleHud), this:

this._skillWindow._stypeId === 1

wound up doing the trick! Thanks, dude.

This can be considered solved. 🙂
This thread is being closed due to being solved. If you do need it again, report it to let us know why. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/stypeid-command.162022/