nintendowii111

Veteran
Veteran
Joined
Oct 12, 2019
Messages
50
Reaction score
5
First Language
English
Primarily Uses
RMMV
The attached file is the plugin I'm using. I want to add plugin logic so that i can show/hide or enable/disable the plugin with a plugin or script command. I have no knowledge of java and would love some help. Thanks!
 

Attachments

  • QuasiABSHudB.js
    11.8 KB · Views: 5

standardplayer

Keeper of Kitties
Veteran
Joined
Apr 6, 2016
Messages
699
Reaction score
3,452
First Language
English
Primarily Uses
N/A
To hide it, use the following script call
(In event commands, go to the last page, and the last group of commands for the 'Script' command.

SceneManager._scene.removeChild(SceneManager._scene._absKeys)

To add it back, use
SceneManager._scene.addChild(SceneManager._scene._absKeys)


With my tests, this does seem to disable/enable it as well
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,734
First Language
English
Primarily Uses
RMVXA
@nintendowii111 Please do not repost plugins, as most plugin writers prefer that people link back to the web page where the plugin is hosted.
Would you therefore please edit your post to remove the plugin and give the link instead. Thanks.
 

nintendowii111

Veteran
Veteran
Joined
Oct 12, 2019
Messages
50
Reaction score
5
First Language
English
Primarily Uses
RMMV
@nintendowii111 Please do not repost plugins, as most plugin writers prefer that people link back to the web page where the plugin is hosted.
Would you therefore please edit your post to remove the plugin and give the link instead. Thanks.
The reason I attached the plugin instead of referencing it is because first, it is no longer supported and second, because I edited some code from the original that makes it compatible with the newest version of QABS (which is also no longer supported) sorry for the inconvenience.

To hide it, use the following script call
(In event commands, go to the last page, and the last group of commands for the 'Script' command.

SceneManager._scene.removeChild(SceneManager._scene._absKeys)

To add it back, use
SceneManager._scene.addChild(SceneManager._scene._absKeys)


With my tests, this does seem to disable/enable it as well
I'll try this, thanks very much for the help!
 

standardplayer

Keeper of Kitties
Veteran
Joined
Apr 6, 2016
Messages
699
Reaction score
3,452
First Language
English
Primarily Uses
N/A
Np ^^ I only did a basic test, for TouchInput in the area where the Input pad originally appears.
Also, this is only going to remove it from the map temporarily.
I assume you know some JS, you'd have to alias something like Scene_Map.prototype.onMapLoaded, or something more suitable for what your needs are, in order to actually make the changes less temporary.

Just using that command, I'm willing to bet that opening the menu and closing it would bring the Touchpad back up on screen.

If you need help aliasing something or adding a bit more functionality to switch it on and off, let me know.
I'll be happy to write that if you need, but if you know how or think you might, it would be good to try

EDIT: I also just realized you already said you edited some of the script yourself, I suppose you could always just add the functionality directly to that. I usually like to leave stuff alone and change/alias stuff from it elsewhere if possible, but that's my personal preference
 

nintendowii111

Veteran
Veteran
Joined
Oct 12, 2019
Messages
50
Reaction score
5
First Language
English
Primarily Uses
RMMV
Np ^^ I only did a basic test, for TouchInput in the area where the Input pad originally appears.
Also, this is only going to remove it from the map temporarily.
I assume you know some JS, you'd have to alias something like Scene_Map.prototype.onMapLoaded, or something more suitable for what your needs are, in order to actually make the changes less temporary.

Just using that command, I'm willing to bet that opening the menu and closing it would bring the Touchpad back up on screen.

If you need help aliasing something or adding a bit more functionality to switch it on and off, let me know.
I'll be happy to write that if you need, but if you know how or think you might, it would be good to try

EDIT: I also just realized you already said you edited some of the script yourself, I suppose you could always just add the functionality directly to that. I usually like to leave stuff alone and change/alias stuff from it elsewhere if possible, but that's my personal preference
Thanks so much for the generous offer! I really don’t know java lol I just changed QuasiAbs to QABS anywhere in the code because that’s what’s in the new QABS code :)
 

nintendowii111

Veteran
Veteran
Joined
Oct 12, 2019
Messages
50
Reaction score
5
First Language
English
Primarily Uses
RMMV
To hide it, use the following script call
(In event commands, go to the last page, and the last group of commands for the 'Script' command.

SceneManager._scene.removeChild(SceneManager._scene._absKeys)

To add it back, use
SceneManager._scene.addChild(SceneManager._scene._absKeys)


With my tests, this does seem to disable/enable it as well
I just tested it and it works like a charm! Thanks so MUCH!
 

standardplayer

Keeper of Kitties
Veteran
Joined
Apr 6, 2016
Messages
699
Reaction score
3,452
First Language
English
Primarily Uses
N/A
Tell me this, though. When you disable it, if you open and close your menu, does it reappear on screen? Not at my computer atm so I can't test that part.
If it does reappear, I can look into fixing that when I'm at my computer again
 

nintendowii111

Veteran
Veteran
Joined
Oct 12, 2019
Messages
50
Reaction score
5
First Language
English
Primarily Uses
RMMV
I appreciate the help. I only disable it during messages so there isn’t a time when the player has it disabled and can open the menus. If you would still be interested in fixing it I’d greatly appreciate that! Never know if I will need it ;)
 

standardplayer

Keeper of Kitties
Veteran
Joined
Apr 6, 2016
Messages
699
Reaction score
3,452
First Language
English
Primarily Uses
N/A
You can either add this to the existing plugin (If you're sure editing is/was allowed), or you could add it to it's own document, save it as a .js file and add it to your plugin list beneath the Quasi Plugins.
To toggle the setting, you can now use
$gamePlayer.toggleABSHud(true) to show it and
$gamePlayer.toggleABSHUd() to remove it.

These settings should remain in place until you change them.
i.e. if you toggle it off once, it should stay off until you toggle it on again.
Let me know if there are any issues that you find

Code:
//This is a small plugin to add toggle functionality to QuasiABSHudB.js
Game_Player.prototype._absOn = false;
Game_Player.prototype.toggleABSHud = function(turnOn){
    this._absOn = turnOn ? true : false;
    if(this._absOn){
        SceneManager._scene.addChild(SceneManager._scene._absKeys)
    } else {
        SceneManager._scene.removeChild(SceneManager._scene._absKeys)
    }
}

let sp_alias_SceneMap_OnMapLoaded = Scene_Map.prototype.onMapLoaded;
Scene_Map.prototype.onMapLoaded = function(){
    sp_alias_SceneMap_OnMapLoaded.call(this);
    if($gamePlayer._absOn){
        this.addChild(this._absKeys)
    } else {
        this.removeChild(this._absKeys)
    }
}
 

nintendowii111

Veteran
Veteran
Joined
Oct 12, 2019
Messages
50
Reaction score
5
First Language
English
Primarily Uses
RMMV
You can either add this to the existing plugin (If you're sure editing is/was allowed), or you could add it to it's own document, save it as a .js file and add it to your plugin list beneath the Quasi Plugins.
To toggle the setting, you can now use
$gamePlayer.toggleABSHud(true) to show it and
$gamePlayer.toggleABSHUd() to remove it.

These settings should remain in place until you change them.
i.e. if you toggle it off once, it should stay off until you toggle it on again.
Let me know if there are any issues that you find

Code:
//This is a small plugin to add toggle functionality to QuasiABSHudB.js
Game_Player.prototype._absOn = false;
Game_Player.prototype.toggleABSHud = function(turnOn){
    this._absOn = turnOn ? true : false;
    if(this._absOn){
        SceneManager._scene.addChild(SceneManager._scene._absKeys)
    } else {
        SceneManager._scene.removeChild(SceneManager._scene._absKeys)
    }
}

let sp_alias_SceneMap_OnMapLoaded = Scene_Map.prototype.onMapLoaded;
Scene_Map.prototype.onMapLoaded = function(){
    sp_alias_SceneMap_OnMapLoaded.call(this);
    if($gamePlayer._absOn){
        this.addChild(this._absKeys)
    } else {
        this.removeChild(this._absKeys)
    }
}
I'll try it out. Thanks very much again!
 

Latest Threads

Latest Posts

Latest Profile Posts

Alisa: Prophecy of the Falling Stars. Join Alisa, a quiet girl with a heart filled with love and hope, on her journey to prevent a calamity. My next RPG Maker music pack is my largest and most focused pack yet. It's a musical story that focuses on a young heroine named Alisa who has been assigned the ultimate task to prevent a calamity.

SnJj_O.png
Alien Worlds, Minecraft Blocks, Extend Options, Fine Speed Control, Art by Muggu | RPG Maker News #33

Rest in Peace vlog gun...
vloggunsmallface.png
Another unnamed character, and probably last one for now.
She's a dragon girl inspired by fafnir dragon. as always, name suggestion is welcomed.
Dragon_Girl.jpg

Dragon_Girl_1.png

Forum statistics

Threads
111,164
Messages
1,058,883
Members
144,408
Latest member
Bretzel68440
Top