Mz TP question

I would to remove TP from the menu but not in battle. Is there a small plugin command or a way i can change in the game's scripts. I don't want any Visu or other peoples full command plugins, i don't want them to intefere with my other plugins. I only want a easy way to do it.

Thank you 🙂
Paste the below into a text editor, save as a *.js file, include as a plugin.

Code:
Window_MenuStatus.prototype.placeBasicGauges = function(actor, x, y) {
    this.placeGauge(actor, "hp", x, y);
    this.placeGauge(actor, "mp", x, y + this.gaugeLineHeight());
};
Paste the below into a text editor, save as a *.js file, include as a plugin.

Code:
Window_MenuStatus.prototype.placeBasicGauges = function(actor, x, y) {
    this.placeGauge(actor, "hp", x, y);
    this.placeGauge(actor, "mp", x, y + this.gaugeLineHeight());
};
It works fine thank you but it still appears in the skill and status menu.
Okay, then try this instead:
Code:
Window_StatusBase.prototype.placeBasicGauges = function(actor, x, y) {
    this.placeGauge(actor, "hp", x, y);
    this.placeGauge(actor, "mp", x, y + this.gaugeLineHeight());
    if ($dataSystem.optDisplayTp && !(SceneManager._scene instanceof Scene_Menu)) {
        this.placeGauge(actor, "tp", x, y + this.gaugeLineHeight() * 2);
    }
};
Okay, then try this instead:
Code:
Window_StatusBase.prototype.placeBasicGauges = function(actor, x, y) {
    this.placeGauge(actor, "hp", x, y);
    this.placeGauge(actor, "mp", x, y + this.gaugeLineHeight());
    if ($dataSystem.optDisplayTp && !(SceneManager._scene instanceof Scene_Menu)) {
        this.placeGauge(actor, "tp", x, y + this.gaugeLineHeight() * 2);
    }
};
This didn't change anything sorry
Oh...dur...status is its own scene 🤣

So just flip it.

Code:
Window_StatusBase.prototype.placeBasicGauges = function(actor, x, y) {
    this.placeGauge(actor, "hp", x, y);
    this.placeGauge(actor, "mp", x, y + this.gaugeLineHeight());
    if ($dataSystem.optDisplayTp && SceneManager._scene instanceof Scene_Battle) {
        this.placeGauge(actor, "tp", x, y + this.gaugeLineHeight() * 2);
    }
};
Oh...dur...status is its own scene 🤣

So just flip it.

Code:
Window_StatusBase.prototype.placeBasicGauges = function(actor, x, y) {
    this.placeGauge(actor, "hp", x, y);
    this.placeGauge(actor, "mp", x, y + this.gaugeLineHeight());
    if ($dataSystem.optDisplayTp && SceneManager._scene instanceof Scene_Battle) {
        this.placeGauge(actor, "tp", x, y + this.gaugeLineHeight() * 2);
    }
};
What do you mean flip it?
I mean I flipped the condition in the code I wrote and it should do exactly what you want now.

...did you try it?
I mean I flipped the condition in the code I wrote and it should do exactly what you want now.

...did you try it?
I don't know what you mean in flipping the condition, I'm new to this and still learning... so no I did not try it, i don't know what it means :/

Window_StatusBase.prototype.placeBasicGauges = function(actor, x, y) {
this.placeGauge(actor, "hp", x, y);
this.placeGauge(actor, "mp", x, y + this.gaugeLineHeight());

// Check if in a battle scene before placing the "tp" gauge
if (SceneManager._scene instanceof Scene_Battle) {
this.placeGauge(actor, "tp", x, y + this.gaugeLineHeight() * 2);
}
};

.Chatjpt gave me the right formula, now it works. Thank you for your time friend 🙂
you didnt try the updated code in post 6?
he had flipped it for you. all you had to do was try it.

Code:
if ($dataSystem.optDisplayTp && !(SceneManager._scene instanceof Scene_Menu)) {
--->
Code:
 if ($dataSystem.optDisplayTp && SceneManager._scene instanceof Scene_Battle) {
you didnt try the updated code in post 6?
he had flipped it for you. all you had to do was try it.

Code:
if ($dataSystem.optDisplayTp && !(SceneManager._scene instanceof Scene_Menu)) {
--->
Code:
 if ($dataSystem.optDisplayTp && SceneManager._scene instanceof Scene_Battle) {
He didn't say he flipped it. He said flip it.
I wasn't aware he already flipped it. Anyways you're right, it works just fine thank you.
I asked chat to flip it, so of course it didn't work then i asked an alternative and that's what it came up with, ho well.
He didn't say he flipped it. He said flip it.
I mean I flipped the condition in the code I wrote and it should do exactly what you want now.

...did you try it?
He did say say that he flipped it after you had asked. You had even responded to the post where he said he did. And the post before that when he said "flip it" he provided code, but there wouldnt be a point in doing so if it were the same code that already wasnt working.

Not attacking or anything, but you could have had your solution earlier
you didnt try the updated code in post 6?
he had flipped it for you. all you had to do was try it.

Code:
if ($dataSystem.optDisplayTp && !(SceneManager._scene instanceof Scene_Menu)) {
--->
Code:
 if ($dataSystem.optDisplayTp && SceneManager._scene instanceof Scene_Battle) {
I see i really got confuse there!
I looked at the code he sent me and didn't see a difference(there was one but so subtle) so i assumed he meant he flipped it in is head and wanted me to do it. So yeah i overthought that one, my bad guys 🤣 With all the learning these days and working on my game my brain is kind of melting 😛
I don't know what you mean in flipping the condition, I'm new to this and still learning...
I stated what I was doing differently from my previous post. That is a pretty normal use of English.

so no I did not try it
Why? I provided code in post #6 that was visually different from what I had given you before. Why did you think I put it there, if not for you to use?

Anyway, good luck with your project.
I stated what I was doing differently from my previous post. That is a pretty normal use of English.


Why? I provided code in post #6 that was visually different from what I had given you before. Why did you think I put it there, if not for you to use?

Anyway, good luck with your project.
I don't know man, I got confuse, lack of sleep and so much to do, my brain is so tired!
Anyways thank you for the code i use it know 🙂

Original thread: https://forums.rpgmakerweb.com/threads/mz-tp-question.163253/