Cryranos

Veteran
Veteran
Joined
Jun 24, 2012
Messages
64
Reaction score
32
First Language
English
Primarily Uses
RMMV
Toggle TP Display with Switch
by Cryranos​
Introduction
This is a tiny snippet that lets you designate a switch to determine whether TP is displayed or not. I made this because in my current project, the party doesn't gain access to anything related to TP until later in the game, and I don't want to clutter the battle status with useless information.

Features
- Lets you use a switch to control when TP appears in the battle status window instead of it always being on or off.

Screenshots
None

How to Use
Paste in the Materials section and designate a switch in the module. It may either conflict or become completely redundant when used with some battle systems besides the default. It also has the (intended) side-effect of making the "Show TP" box in the database editor completely useless.

Script

Code:
#===============================================================================
# RGSS3: Toggle TP Display Snippet
#===============================================================================
# by Cryranos/Metatron
#===============================================================================
# Instructions: Paste in the Materials section. Edit the module as needed.
# This script replaces Window_BattleStatus#draw_gauge_area, and by extension,
# removes functionality from the "Show TP" check box in the database.
#===============================================================================
module Cry
  module Show_TP
    TP_Show_Switch = 5
  end
end
class Window_BattleStatus
  def draw_gauge_area(rect, actor)
    if $game_switches[Cry::Show_TP::TP_Show_Switch]
      draw_gauge_area_with_tp(rect, actor)
    else 
      draw_gauge_area_without_tp(rect, actor)
    end
  end
end
Credit and Thanks
- Me.
 
Last edited:

tale

Volunteer
Veteran
Joined
Dec 16, 2016
Messages
816
Reaction score
1,422
First Language
English
Primarily Uses
N/A
Fixed script format, credit Cryranos/Metatron.
Code:
#===============================================================================
# RGSS3: Toggle TP Display Snippet
#===============================================================================
# by Cryranos/Metatron
#===============================================================================
# Instructions: Paste in the Materials section. Edit the module as needed.
# This script replaces Window_BattleStatus#draw_gauge_area, and by extension,
# removes functionality from the "Show TP" check box in the database.
#===============================================================================
module Cry
  module
    Show_TP TP_Show_Switch = 5
  end
end
class Window_BattleStatus
  def draw_gauge_area(rect, actor)
    if $game_switches[Cry::Show_TP::TP_Show_Switch]
      draw_gauge_area_with_tp(rect, actor)
    else draw_gauge_area_without_tp(rect, actor)
    end
  end
 end
 

Cryranos

Veteran
Veteran
Joined
Jun 24, 2012
Messages
64
Reaction score
32
First Language
English
Primarily Uses
RMMV
Hi, thanks for fixing it for me; I would have never noticed otherwise.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,137
Reaction score
709
First Language
English
Primarily Uses
RMVXA
fixing it for me
except it's not quite lined up.
Code:
module Cry
  module
    Show_TP TP_Show_Switch = 5
  end
Should be
Code:
module Cry
  module Show_TP
    TP_Show_Switch = 5
  end

and
Code:
    else draw_gauge_area_without_tp(rect, actor)
    end
needs to be
Code:
    else
      draw_gauge_area_without_tp(rect, actor)
    end
 

Cryranos

Veteran
Veteran
Joined
Jun 24, 2012
Messages
64
Reaction score
32
First Language
English
Primarily Uses
RMMV
Thanks for pointing that out. How embarrassing.
 

Latest Threads

Latest Profile Posts

Come join us while we play Pocket Mirror by Astral Shift! :LZSjoy: Starting at 2PM ET today!
Tried changing profile icon but...It just felt weird, you know? Who would even want to talk to me if I didn't have this fat yellow rodent thing....Or whatever it is as a mascot....No one, that's who! I am nothing without it. NOTHING!!..
I am having such a good hair day but because it's thunderstorms all day I don't go out and as such nobody will see my hair >.< It's not often my hair cooperates!
Pretty much stopped posting in the progress thread cuz it feels like talking to the void, lol, so I've just been posting on IG instead. But someone finally liked my post there, lol. Dunno if I'll continue tho. Probably not xD

My game's progressing quite well. Just kinda stuck on mapping right now. Decided to go the side, slightly top down view route. I'm drawing everything from scratch for a personal touch uwu
Stomach isn't feeling too good last time. Perhaps something I ate

Forum statistics

Threads
112,338
Messages
1,067,542
Members
145,979
Latest member
Sebasti4n2
Top