查看: 1562|回复: 3

[已经解决] 右上角始终显示回合数

[复制链接]
梦石
0
星屑
50
在线时间
38 小时
注册时间
2013-3-3
回帖
28
发表于 2013-3-20 13:43:39 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
在战斗中显示回合数,坐标之类简单的我自己改了,但是其他方面,因为注释是英文所以看不懂了
这个现在就是攻击的时候或者使用技能的时候回合数的显示就会消失,现在我就是想让回合数始终显示要怎么改?

  1. =begin
  2.   
  3.   ** Battle Turn Count Window v1.1 **
  4.   by Mr. Bubble
  5.   
  6.   A simple script that creates a small window which displays the current turn
  7.   in battle.
  8.   
  9.   This script was made for keeping better track of the turn number for projects
  10.   in development.  Not very flashy for final products.
  11.   
  12.   Made compatible with the RPG Tankentai SBS and ATB.  Place this script below
  13.   those battle system scripts if you're using them.

  14. =end

  15. module Bubs
  16.   module BattleTurnCount
  17.    
  18. #--------------------------------------------------------------------------
  19. # Turn Count Window User Customization Module
  20. #--------------------------------------------------------------------------

  21.     # Text before turn value.
  22.     TURN_WINDOW_TEXT = "总回合数: "
  23.     # Text font size.  Default VX font size is 20.  Very large sizes will not
  24.     # fit well.
  25.     TURN_WINDOW_TEXTSIZE = 20
  26.     # Text font name(s).  Include an array of strings to specify multiple
  27.     # fonts to be used in a desired order.  If the higher priority font does
  28.     # not exist within the system, the second choice will be used instead and
  29.     # so on.
  30.     TURN_WINDOW_FONT = ["方正少儿简体"]

  31.     # X-coordinate position of turn count window.
  32.     TURN_COUNT_WINDOW_X = 410
  33.     # Y-coordinate position of turn count window.
  34.     TURN_COUNT_WINDOW_Y = 0
  35.         
  36.     # true: Show window skin  
  37.     # false: Hide window skin
  38.     # Only affects the Turn Count Window.  Text will still show.
  39.     USE_WINDOWSKIN = false
  40.    
  41.     # true: Always use default skin for Turn Count Window
  42.     # false: Use windowskin as defined for WINDOWSKIN_FILENAME
  43.     # If you use a separate window skin changer script, you may want to
  44.     # keep this true.
  45.     USE_DEFAULT_WINDOWSKIN = true
  46.     # File name of window skin in the Graphics/System folder.  
  47.     # Only affects the Turn Count Window
  48.     # USE_DEFAULT_WINDOWSKIN must be false for this to take effect
  49.     WINDOWSKIN_FILENAME = "1"

  50. #--------------------------------------------------------------------------
  51. # End of Turn Count Window User Customization Module
  52. #--------------------------------------------------------------------------
  53.   end
  54. end


  55. class Window_BattleTurnCount < Window_Base
  56.   #--------------------------------------------------------------------------
  57.   # * Object Initialization
  58.   #     x : window X coordinate
  59.   #     y : window Y coordinate
  60.   #--------------------------------------------------------------------------
  61.   def initialize(x, y)
  62.     super(x, y, 128, WLH + 32)
  63.     # Added to provide compatibility with windowskin changer scripts
  64.     if !Bubs::BattleTurnCount::USE_DEFAULT_WINDOWSKIN
  65.       self.windowskin = Cache.system(Bubs::BattleTurnCount::WINDOWSKIN_FILENAME)
  66.     end
  67.     # Set windowskin opacity to 0 (text still shows)
  68.     self.opacity = 0 if !Bubs::BattleTurnCount::USE_WINDOWSKIN
  69.     refresh
  70.   end
  71.   #--------------------------------------------------------------------------
  72.   # * Refresh
  73.   #--------------------------------------------------------------------------
  74.   def refresh
  75.     self.contents.clear
  76.     turn_num = $game_troop.turn_count + 1 # +1 because first turn value is 0.
  77.     self.contents.font.color = normal_color
  78.     # TCW Font Size
  79.     self.contents.font.size = Bubs::BattleTurnCount::TURN_WINDOW_TEXTSIZE
  80.     # TCW Font
  81.     self.contents.font.name = Bubs::BattleTurnCount::TURN_WINDOW_FONT
  82.     # unless Tankentai ATB is installed
  83.     self.contents.draw_text(4, 0, 128, WLH,
  84. Bubs::BattleTurnCount::TURN_WINDOW_TEXT + turn_num.to_s) unless defined?(::N02)
  85.   end
  86. end

  87. class Scene_Battle < Scene_Base
  88.   
  89.   #--------------------------------------------------------------------------
  90.   # * Create Information Display Viewport
  91.   #--------------------------------------------------------------------------
  92.   alias create_iv_bubs_tcw create_info_viewport
  93.   def create_info_viewport
  94.     # (x,y) coordinates of TCW
  95.     x = Bubs::BattleTurnCount::TURN_COUNT_WINDOW_X
  96.     y = Bubs::BattleTurnCount::TURN_COUNT_WINDOW_Y
  97.     @turn_count_window = Window_BattleTurnCount.new(x, y)
  98.     @turn_count_window.visible = true
  99.    
  100.     create_iv_bubs_tcw
  101.   end

  102.   #--------------------------------------------------------------------------
  103.   # * Start party command selection
  104.   #--------------------------------------------------------------------------
  105.   alias spcs_bubs_tcw start_party_command_selection
  106.   def start_party_command_selection
  107.     if $game_temp.in_battle
  108.       @turn_count_window.refresh
  109.       @turn_count_window.visible = true
  110.       
  111.       spcs_bubs_tcw
  112.     end
  113.   end
  114.   
  115.   #--------------------------------------------------------------------------
  116.   # * Dispose of Information Display Viewport
  117.   #--------------------------------------------------------------------------
  118.   alias terminate_bubs_tcw terminate
  119.   def terminate
  120.     @turn_count_window.dispose

  121.     terminate_bubs_tcw
  122.   end
  123.   
  124.   #--------------------------------------------------------------------------
  125.   # * Update Information Display Viewport
  126.   #--------------------------------------------------------------------------
  127.   alias update_iv_bubs_tcw update_info_viewport
  128.   def update_info_viewport
  129.     # if Tankentai ATB is installed
  130.     if defined?(::N02)
  131.       @turn_count_window.contents.clear
  132.       turn_num = $game_troop.turn_count + 1
  133.       @turn_count_window.contents.draw_text(4, 0, 128, 24,
  134. Bubs::BattleTurnCount::TURN_WINDOW_TEXT + turn_num.to_s)
  135.     end
  136.     @turn_count_window.update
  137.    
  138.     update_iv_bubs_tcw
  139.   end

  140.   #--------------------------------------------------------------------------
  141.   # * Victory Processing
  142.   #--------------------------------------------------------------------------
  143.   alias process_victory_bubs_tcw process_victory
  144.   def process_victory
  145.     # Hides TCW when winning a battle
  146.     @turn_count_window.visible = false
  147.    
  148.     process_victory_bubs_tcw
  149.   end
  150.   
  151.   #--------------------------------------------------------------------------
  152.   # * Escape Processing
  153.   #--------------------------------------------------------------------------
  154.   alias process_escape_bubs_tcw process_escape
  155.   def process_escape
  156.     # Hides TCW when escaping
  157.     @turn_count_window.visible = false

  158.     process_escape_bubs_tcw
  159.   end
  160.   
  161.   #--------------------------------------------------------------------------
  162.   # * Start Execution of Battle Processing
  163.   #--------------------------------------------------------------------------
  164.   alias start_main_atb_bubs_tcw start_main
  165.   def start_main(*args)
  166.     # unless Tankentai ATB is installed
  167.     @turn_count_window.visible = false unless defined?(::N02)
  168.    
  169.     start_main_atb_bubs_tcw(*args)
  170.   end
  171. end
复制代码
梦石
0
星屑
50
在线时间
38 小时
注册时间
2013-3-3
回帖
28
 楼主| 发表于 2013-3-20 15:20:41 | 显示全部楼层
回复

使用道具 举报

发表于 2013-3-20 19:13:42 | 显示全部楼层
测试好了,你搜索“@turn_count_window.visible = false”  意思是“显示=假”
全部改成“true” 或者直接删除都可以~
话说你也要自己试试啊,每次都提问- - 很难有进步的~

点评

刚大学毕业  发表于 2013-3-20 22:39
因为当时在上班嘛  发表于 2013-3-20 20:43

评分

参与人数 1星屑 +50 收起 理由
怪蜀黍 + 50 认可答案

查看全部评分

我想要到的是保护同伴的力量,能与同伴一起欢笑的未来的力量,如果无法做到的话,那就无需继承,如果是这样的彭格列的话,那我亲手毁掉它!
  
                       欢迎加入我们的家族~
回复

使用道具 举报

梦石
0
星屑
50
在线时间
38 小时
注册时间
2013-3-3
回帖
28
 楼主| 发表于 2013-3-20 19:33:44 | 显示全部楼层
彭格列第XI代 发表于 2013-3-20 19:13
测试好了,你搜索“@turn_count_window.visible = false”  意思是“显示=假”
{:5_166: ...

我研究了下,上面的部分我改了,因为看到后面的根据我的理解好像和我需要的效果没关系,但是改其他的好像又没起到作用,所以我就发帖了,主要还是因为这个贴是在公司发的,当时没太多时间测试来着

点评

大学毕业啊=w=  发表于 2013-3-20 22:48
你多大了0w0/  发表于 2013-3-20 22:10
公司- -?  发表于 2013-3-20 20:31
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部