じ☆ve冰风 发表于 2026-8-2 10:34:14

Toggle TP Display with Switch

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
      draw_gauge_area_with_tp(rect, actor)
    else
      draw_gauge_area_without_tp(rect, actor)
    end
end
end

Credit and Thanks
- Me.


本贴来自国际rpgmaker官方论坛作者:Cryranos处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/toggle-tp-display-with-switch.23446/
页: [1]
查看完整版本: Toggle TP Display with Switch