设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1927|回复: 4
打印 上一主题 下一主题

[已经解决] 如何在战斗界面中添加回合数显示

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
136
在线时间
72 小时
注册时间
2009-12-24
帖子
25
跳转到指定楼层
1
发表于 2011-7-19 23:41:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
如何在战斗界面中添加回合数的显示框

Lv1.梦旅人

梦石
0
星屑
50
在线时间
1071 小时
注册时间
2011-5-12
帖子
2317

贵宾

2
发表于 2011-7-20 06:18:02 | 只看该作者
找我请找芙蕾娅
顺带一提,完全看得懂我头像请捡起你自己的节操哟(自重
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
136
在线时间
72 小时
注册时间
2009-12-24
帖子
25
3
 楼主| 发表于 2011-7-20 13:04:10 | 只看该作者
月夜神音 发表于 2011-7-20 06:18
脚本:
http://download941.mediafire.com/gciccsl68utg/tm4ytmjwyhn/turn_count_window_1.1.txt

没有可以显示的页面
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
1071 小时
注册时间
2011-5-12
帖子
2317

贵宾

4
发表于 2011-7-20 13:09:06 | 只看该作者
qwe6301913 发表于 2011-7-20 13:04
没有可以显示的页面

是下载它而不是打开它……
脚本:

  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 = "Turn: "
  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 = ["Verdana", "Arial","Courier New" ]

  31.     # X-coordinate position of turn count window.
  32.     TURN_COUNT_WINDOW_X = 0
  33.     # Y-coordinate position of turn count window.
  34.     TURN_COUNT_WINDOW_Y = 232
  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 = true
  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 = "Window"

  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 = false
  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
复制代码
找我请找芙蕾娅
顺带一提,完全看得懂我头像请捡起你自己的节操哟(自重
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
107 小时
注册时间
2011-6-29
帖子
18
5
发表于 2011-7-21 17:49:08 | 只看该作者
第95行显示找不到Scene_Base
回复

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-1-11 00:50

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表