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

Project1

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

战斗画面,敌人状态的窗口问题~

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
3 小时
注册时间
2007-12-22
帖子
73
跳转到指定楼层
1
发表于 2008-8-14 03:38:26 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
最近硬盘坏了,尝试修复数据~

结果导出后,发现原本正常的游戏出问题了~



在[战斗界面]中,当选择[攻击]时,会出现选择攻击对象~

当箭头指示向某个敌人时,画面上方会出现一个窗口,显示敌人的姓名和血量~

(战斗画面,使用的是默认的脚本)



问题就出在这里,这个窗口出现在左下方了,而且显示的内容也不完全~



请教,控制这个窗口的位置内容的脚本是哪一段呢?

如果要恢复原来的正常显示,该如何修改?


谢谢~

==================================

附加情况说明:

[情况一:]

进入战斗画面后,选择[攻击]~

则出现选择攻击对象,敌人的详细消息窗口不正常~
(显示在左边或右边,内容只有名字,无HP,无MP,状态为[/])


[情况二:]

进入战斗画面后,选择[特技]~

使用对友方释放的魔法,此时出现选择特技作用对象,详细信息窗口正常~
(显示在顶部,内容包括名字,HP,MP)

之后再选择[攻击],则窗口显示位置和内容都正常
(显示在顶部,内容包括名字,HP,MP)


感觉,似乎是[攻击]的窗口释放出现了问题~

请教,该如何修复,谢谢~
此贴于 2008-8-16 12:27:52 被版主darkten提醒,请楼主看到后对本贴做出回应。
版务信息:本贴由楼主自主结贴~

Lv5.捕梦者

梦石
0
星屑
39922
在线时间
5799 小时
注册时间
2006-11-10
帖子
6676
2
发表于 2008-8-14 04:53:46 | 只看该作者
1,首先,默认脚本HELP窗口(也就是画面上方长长的一条)是不会显示敌人HP的。只有名字和状态。

2,那个窗口在脚本里是@help_window = Window_Help.new
控制位置的是@help_window.x和@help_window.y 不过默认脚本这个是缺省的,为0,所以窗口显示在上方。

3,选择敌人的内容是def start_enemy_select 这段里调用help窗口@enemy_arrow.help_window = @help_window就是选择敌人显示的内容。

4,不理解什么叫攻击窗口释放~~~
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
3 小时
注册时间
2007-12-22
帖子
73
3
 楼主| 发表于 2008-8-14 16:59:18 | 只看该作者
哦,大致明白你的意思了~

尝试着找了一遍,不过依旧没有发现问题的缘故~


一气之下,我把脚本全部重新替换了一遍~

令人惊讶的是,问题依然存在??

难道说是程序,而不是脚本的原因?

费解~


可否....我的意思是,如果方便的话~

麻烦您给个邮箱,我把脚本程序发给你~ (删除大部分的素材,应该不会太大)

帮忙看一下,好么?


无论如何,还是要谢谢您的解答~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
3 小时
注册时间
2007-12-22
帖子
73
4
 楼主| 发表于 2008-8-17 00:37:03 | 只看该作者
非常感谢的 [灯笼菜刀王] 指点~

工程地址已经用站内短信发给您了~

还期待能早日得到回复~


辛苦拉~

先行认可你的答案~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
3 小时
注册时间
2007-12-22
帖子
73
5
 楼主| 发表于 2008-8-17 19:31:41 | 只看该作者
根据上面的指导,再次查看脚本~

发现是[帮助提示]脚本的问题~


  1. #==============================================================================
  2. # ■ Window_Help
  3. #------------------------------------------------------------------------------
  4. #  特技及物品的说明、角色的状态显示的窗口。
  5. #   若要更改属性,请搜索element_set={1=>"火",2=>"冰",3=>"光",4=>"暗"} 改成对应属性即可
  6. #   
  7. #   
  8. #   还有一点问题可能要到scene里去解决了……OJZ
  9. #   在Scene_File的开头把
  10. #   @help_window.set_text(@help_text)
  11. #   改成
  12. #   @help_window.set_text(@help_text,0)
  13. #   就可以
  14. #   另外,在商店里会出现窗口不会自动消失的问题,请参考以下方式更改:
  15. #   Scene_Shop里在update里(原版工程79行)插入
  16. #   @help_window.visible = !@number_window.active && !@dummy_window.visible
  17. #   即可~
  18. #==============================================================================

  19. UNSHOW_STATE=[1,2,3,4,5]#记录不显示的状态数组
  20. UNSHOW_ELEMENT=[1,2,3,4,5]#记录不显示的属性数组

  21. class Window_Help < Window_Base
  22.   #--------------------------------------------------------------------------
  23.   # ● 初始化对像
  24.   #--------------------------------------------------------------------------
  25.   def initialize
  26.     super(150,200, 180, 430)
  27.     self.opacity = 150
  28.     self.z=150
  29.     self.visible = false
  30.     self.contents = Bitmap.new(width - 32, height - 32)
  31.     description=""
  32.     @item=nil
  33.     @armor=nil
  34.     @weapon=nil
  35.   end
  36.   #--------------------------------------------------------------------------
  37.   # ● 设置文本
  38.   #     text  : 窗口显示的字符串
  39.   #     align : 对齐方式 (0..左对齐、1..中间对齐、2..右对齐)
  40.   #--------------------------------------------------------------------------
  41.   def set_text(data, align=nil)
  42.     # 如果文本和对齐方式的至少一方与上次的不同
  43.     if align != nil
  44.         # 再描绘窗口和文本
  45.       self.width = 640
  46.       self.height = 64
  47.       self.x=0
  48.       self.y=0
  49.       self.contents = Bitmap.new(width - 32, height - 32)
  50.       self.contents.clear
  51.       self.contents.font.color = normal_color
  52.       self.contents.font.size = 20
  53.       self.contents.draw_text(4, 0, self.width - 48, 32, data, align)
  54.       self.visible = true
  55.       return
  56.     end
  57.     if data == nil
  58.       self.visible=false
  59.       @data = nil
  60.     end
  61.     if data != nil && @data != data
  62.       @data=data
  63.       self.visible=true
  64.       self.width = 180
  65.       self.height = 200
  66.       self.x=180
  67.       self.y=430
  68.       self.contents = Bitmap.new(width - 32, height - 32)
  69.       case @data
  70.       when RPG::Item
  71.         set_item_text(@data)
  72.       when RPG::Weapon
  73.         set_weapon_text(@data)
  74.       when RPG::Armor
  75.         set_armor_text(@data)
  76.       when RPG::Skill
  77.         set_skill_text(@data)
  78.       end
  79.     else
  80.       return
  81.     end
  82.   end
  83.   #--------------------------------------------------------------------------
  84.   # ● 设置敌人
  85.   #     enemy : 要显示名字和状态的敌人
  86.   #--------------------------------------------------------------------------
  87.   def set_enemy(enemy)
  88.     text = enemy.name
  89.     state_text = make_battler_state_text(enemy, 0, false)
  90.     if state_text != ""
  91.       text += "  " + state_text
  92.     end
  93.     set_text(text, 1)
  94.     @data=nil
  95.   end
  96.   #--------------------------------------------------------------------------
  97.   # ● 设置角色
  98.   #     actor : 要显示状态的角色
  99.   #--------------------------------------------------------------------------
  100.   def set_actor(actor)
  101.     if actor != @actor
  102.         self.width = 640
  103.         self.height = 64
  104.         self.x=0
  105.         self.y=0
  106.         self.contents = Bitmap.new(width - 32, height - 32)
  107.         self.contents.clear
  108.         self.contents.font.size=20
  109.         self.contents.font.color = normal_color
  110.       draw_actor_name(actor, 4, 0)
  111.       draw_actor_state(actor, 140, 0)
  112.       draw_actor_hp(actor, 284, 0)
  113.       draw_actor_sp(actor, 460, 0)
  114.       @actor = actor
  115.       @text = nil
  116.       self.visible = true
  117.     end
  118.   end
  119.   #--------------------------------------------------------------------------
  120.   # ● 校正帮助窗口位置
  121.   #--------------------------------------------------------------------------
  122.   def set_pos(x,y,width,oy,index,column_max)
  123.     #光标坐标
  124.     cursor_width = width / column_max - 32
  125.     xx = index % column_max * (cursor_width + 32)
  126.     yy = index / column_max * 32 - oy
  127.     self.x=xx+x+150
  128.     self.y=yy+y+30
  129.     if self.x+self.width>640
  130.       self.x=640-self.width
  131.     end
  132.     if self.y+self.height>480
  133.       self.y=480-self.height
  134.     end
  135.   end
  136. end

  137. class Window_Help < Window_Base
  138.   #--------------------------------------------------------------------------
  139.   # ● 物品帮助窗口
  140.   #--------------------------------------------------------------------------
  141.   def set_item_text(item)
  142.     @item=item
  143.     description=""
  144.     [email protected]
  145.     x=0
  146.     y=0
  147.        # 取得屬性、附加狀態、解除狀態之副本
  148.    element_set = @item.element_set.clone
  149.    plus_state_set = @item.plus_state_set.clone
  150.    minus_state_set = @item.minus_state_set.clone
  151.    # 過濾不顯示的描述
  152.    element_set -= UNSHOW_ELEMENT
  153.    plus_state_set -= UNSHOW_STATE
  154.    minus_state_set -= UNSHOW_STATE
  155.     height=1     #依要显示的内容确定高
  156.     #由描叙确定高
  157.     height+=description.size/3/10
  158.     if description.size%10!=0
  159.       height+=1
  160.     end
  161.     height+=3  #空行,效果范围,价格
  162.     if @item.recover_hp_rate!=0 #HP 回复率。
  163.       height+=1
  164.     end  
  165.     if @item.recover_hp!=0 #HP 回复量。
  166.       height+=1
  167.     end
  168.     if @item.recover_sp_rate!=0 #SP 回复率。
  169.       height+=1
  170.     end
  171.     if @item.recover_sp!=0 #SP 回复量。
  172.       height+=1
  173.     end
  174.     if @item.parameter_type!=0 #增加能力值
  175.       height+=1
  176.     end     
  177.     if element_set.empty?!=true  #属性。为属性 ID 的数组
  178.       height+=1
  179.     end
  180.     if plus_state_set.empty?!=true  #附加状态。为状态 ID 的数组
  181.       height+=plus_state_set.size
  182.     end
  183.     if minus_state_set.empty?!=true  #解除状态。为状态 ID 的数组
  184.       height+=minus_state_set.size  
  185.     end   
  186.     self.height=height*15+40+15  
  187.     self.contents = Bitmap.new(self.width - 32,self.height - 32)
  188.     self.contents.clear
  189.     #描绘名字
  190.     [email protected]
  191.     self.contents.font.color =text_color(6)
  192.     self.contents.font.size=18
  193.     if text!=nil
  194.       self.visible = true
  195.       self.contents.draw_text(0,0, @item.name.size*7, 20, text, 0)
  196.     else
  197.       self.visible = false
  198.     end
  199.     x=0
  200.     y+=1
  201.     text=description
  202.     #描绘描叙
  203.     while ((text = description.slice!(/./m)) != nil)
  204.       self.contents.font.color = normal_color
  205.       self.contents.font.size=14
  206.       self.contents.draw_text(x*15, y*15+5, 14, 14, text, 0)
  207.       x+=1
  208.       if x==10#每行10个字
  209.         x=0
  210.         y+=1      
  211.       end
  212.     end
  213.     #由特技属性确定高
  214.     #效果范围
  215.     scope = {0=>"特殊物品",1=>"敌单体",2=>"敌全体",3=>"己方单体",4=>"己方全体",5=>"己方昏死单体",6=>"己方昏死全体",7=>"使用者"}#HASH表
  216.     text="范围:"+scope[@item.scope]
  217.     x=0
  218.     y+=2  #空一行
  219.     self.contents.font.color = normal_color
  220.     self.contents.font.size=14
  221.     self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  222.     #价格
  223.       x=0
  224.       y+=1     
  225.       text="价格:"[email protected]_s
  226.       self.contents.font.color = normal_color
  227.       self.contents.font.size=14  
  228.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  229.    
  230.     #HP 回复率  
  231.     if @item.recover_hp_rate!=0
  232.       x=0
  233.       y+=1     
  234.       text="回复HP:"[email protected]_hp_rate.to_s+"%"
  235.       self.contents.font.color = normal_color
  236.       self.contents.font.size=14  
  237.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)     
  238.     end
  239.     #HP回复量
  240.     if @item.recover_hp!=0
  241.       x=0
  242.       y+=1     
  243.       text="回复HP:"[email protected]_hp.to_s
  244.       self.contents.font.color = normal_color
  245.       self.contents.font.size=14  
  246.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  247.     end
  248.      #SP 回复率
  249.     if @item.recover_sp_rate!=0
  250.       x=0
  251.       y+=1     
  252.       text="回复SP:"[email protected]_sp_rate.to_s+"%"
  253.       self.contents.font.color = normal_color
  254.       self.contents.font.size=14  
  255.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  256.     end
  257.     #SP 回复量
  258.     if @item.recover_sp!=0
  259.       x=0
  260.       y+=1     
  261.       text="回复SP:"[email protected]_sp.to_s
  262.       self.contents.font.color = normal_color
  263.       self.contents.font.size=14  
  264.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  265.     end
  266.     #增加能力值
  267.     if @item.parameter_type!=0
  268.       parameter_type={1=>"MaxHP",2=>"MaxSP",3=>$data_system.words.str,4=>$data_system.words.dex,5=>$data_system.words.agi,6=>$data_system.words.int}
  269.       x=0
  270.       y+=1
  271.       if @item.parameter_points>0
  272.         text="增益:"+parameter_type[@item.parameter_type]+" +"[email protected]_points.to_s
  273.       else
  274.         text="减少:"+parameter_type[@item.parameter_type][email protected]_points.to_s
  275.       end
  276.       self.contents.font.color = normal_color
  277.       self.contents.font.size=14  
  278.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  279.     end     
  280.    
  281.     #物品属性   
  282.     if element_set.empty?!=true  #属性。为属性 ID 的数组
  283.       text="属性:"
  284.       for i in 0...element_set.size
  285.         text+=$data_system.elements[element_set[i]]+" "
  286.       end
  287.       x=0
  288.       y+=1
  289.       self.contents.font.color = normal_color
  290.       self.contents.font.size=14
  291.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  292.     end
  293.     #附加状态
  294.     if plus_state_set.empty?!=true  #附加状态。为状态 ID 的数组
  295.       text="附加状态:"
  296.       x=0
  297.       y+=1
  298.       self.contents.font.color = normal_color
  299.       self.contents.font.size=14
  300.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  301.       y-=1
  302.       x+=text.size*5     
  303.       for i in 0...plus_state_set.size
  304.         y+=1
  305.         text=$data_states[plus_state_set[i]].name      
  306.         self.contents.font.color = normal_color
  307.         self.contents.font.size=14
  308.         self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)      
  309.       end
  310.     end
  311.     #解除状态
  312.     if minus_state_set.empty?!=true  #解除状态。为状态 ID 的数组
  313.       text="解除状态:"
  314.       x=0
  315.       y+=1
  316.       self.contents.font.color = normal_color
  317.       self.contents.font.size=14
  318.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  319.       y-=1
  320.       x+=text.size*5     
  321.       for i in 0...minus_state_set.size
  322.         y+=1
  323.         text=$data_states[minus_state_set[i]].name      
  324.         self.contents.font.color = normal_color
  325.         self.contents.font.size=14
  326.         self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)      
  327.       end
  328.     end   
  329.   end
  330. end

  331. class Window_Help < Window_Base
  332.     #--------------------------------------------------------------------------
  333.   # ● 武器帮助窗口
  334.   #--------------------------------------------------------------------------

  335.   def set_weapon_text(weapon)
  336.     @weapon=weapon
  337.     description=""
  338.     [email protected]
  339.    # 取得屬性、附加狀態、解除狀態之副本
  340.    element_set = @weapon.element_set.clone
  341.    plus_state_set = @weapon.plus_state_set.clone
  342.    minus_state_set = @weapon.minus_state_set.clone
  343.    # 過濾不顯示的描述
  344.    element_set -= UNSHOW_ELEMENT
  345.    plus_state_set -= UNSHOW_STATE
  346.    minus_state_set -= UNSHOW_STATE

  347.     x=0
  348.     y=0
  349.     height=1     #依要显示的内容确定高
  350.     #由描叙确定高
  351.     height+=description.size/3/10
  352.     if description.size%10!=0
  353.       height+=1
  354.     end
  355.     height+=4  #2个空行,攻击,价格
  356.     if @weapon.pdef!=0 #物理防御
  357.       height+=1
  358.     end      
  359.     if @weapon.mdef!=0 #魔法防御
  360.       height+=1
  361.     end
  362.     if @weapon.str_plus!=0 #力量
  363.       height+=1
  364.     end
  365.     if @weapon.dex_plus!=0#体质
  366.       height+=1
  367.     end
  368.     if @weapon.agi_plus!=0#敏捷
  369.       height+=1
  370.     end
  371.     if @weapon.int_plus!=0 #智力
  372.       height+=1
  373.     end     
  374.     if element_set.empty?!=true  #属性。为属性 ID 的数组
  375.       height+=1
  376.     end
  377.     if plus_state_set.empty?!=true  #附加状态。为状态 ID 的数组
  378.       height+=plus_state_set.size
  379.     end
  380.     if minus_state_set.empty?!=true  #解除状态。为状态 ID 的数组
  381.       height+=minus_state_set.size  
  382.     end   
  383.     self.height=height*15+40+15  
  384.     self.contents = Bitmap.new(self.width - 32,self.height - 32)
  385.     self.contents.clear
  386.     #描绘名字
  387.     [email protected]
  388.     self.contents.font.color = text_color(6)#颜色脚本
  389.     self.contents.font.size=18
  390.     if text!=nil
  391.       self.visible = true
  392.       self.contents.draw_text(0,0, @weapon.name.size*7, 20, text, 0)
  393.     else
  394.       self.visible = false
  395.     end
  396.     x=0
  397.     y+=1
  398.     text=description
  399.     #描绘描叙
  400.     while ((text = description.slice!(/./m)) != nil)
  401.       self.contents.font.color = normal_color
  402.       self.contents.font.size=14
  403.       self.contents.draw_text(x*15, y*15+5, 14, 14, text, 0)
  404.       x+=1
  405.       if x==10#每行10个字
  406.         x=0
  407.         y+=1      
  408.       end
  409.     end
  410.     #由特技属性确定高
  411.     #攻击
  412.       x=0
  413.       y+=2 #空行   
  414.       text="攻击:"[email protected]_s
  415.       self.contents.font.color = text_color(6)#颜色脚本
  416.       self.contents.font.size=14  
  417.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)     
  418.     #价格
  419.       x=0
  420.       y+=1     
  421.       text="价格:"[email protected]_s
  422.       self.contents.font.color = normal_color
  423.       self.contents.font.size=14  
  424.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  425.     if @weapon.pdef!=0 #物理防御
  426.       x=0
  427.       y+=1     
  428.       text="物理防御:"[email protected]_s
  429.       self.contents.font.color = text_color(6)#颜色脚本
  430.       self.contents.font.size=14  
  431.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  432.     end      
  433.     if @weapon.mdef!=0 #魔法防御
  434.       x=0
  435.       y+=1     
  436.       text="魔法防御:"[email protected]_s
  437.       self.contents.font.color = text_color(6)#颜色脚本
  438.       self.contents.font.size=14  
  439.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  440.     end

  441.     #武器属性   
  442.     if element_set.empty? != true  #属性。为属性 ID 的数组
  443.       text="属性:"
  444.       for i in 0...element_set.size
  445.         text+=$data_system.elements[element_set[i]]+" "
  446.       end
  447.       x=0
  448.       y+=1
  449.       self.contents.font.color = normal_color
  450.       self.contents.font.size=14
  451.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  452.     end
  453.     #附加状态
  454.     if plus_state_set.empty? != true  #附加状态。为状态 ID 的数组
  455.       text="附加状态:"
  456.       x=0
  457.       y+=1
  458.       self.contents.font.color = normal_color
  459.       self.contents.font.size=14
  460.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  461.       y-=1
  462.       x+=text.size*5     
  463.       for i in 0...plus_state_set.size
  464.         y+=1
  465.         text=$data_states[plus_state_set[i]].name      
  466.         self.contents.font.color = normal_color
  467.         self.contents.font.size=14
  468.         self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)      
  469.       end
  470.     end
  471.     #解除状态
  472.     if minus_state_set.empty? != true  #解除状态。为状态 ID 的数组
  473.       text="解除状态:"
  474.       x=0
  475.       y+=1
  476.       self.contents.font.color = normal_color
  477.       self.contents.font.size=14
  478.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  479.       y-=1
  480.       x+=text.size*5     
  481.       for i in 0...minus_state_set.size
  482.         y+=1
  483.         text=$data_states[minus_state_set[i]].name      
  484.         self.contents.font.color = normal_color
  485.         self.contents.font.size=14
  486.         self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)      
  487.       end
  488.     end
  489.     y+=1 #空行
  490.     if @weapon.str_plus!=0 #力量
  491.       x=0
  492.       y+=1
  493.       if @weapon.str_plus > 0
  494.         text=$data_system.words.str+"  + "[email protected]_plus.to_s
  495.       else
  496.         [email protected]_plus
  497.         text=$data_system.words.str+"  - "+str_minus.to_s
  498.       end
  499.       self.contents.font.color = text_color(6)#颜色脚本
  500.       self.contents.font.size=14  
  501.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  502.     end
  503.     if @weapon.dex_plus!=0#体质
  504.       x=0
  505.       y+=1     
  506.       if @weapon.dex_plus > 0
  507.         text=$data_system.words.dex+"  + "[email protected]_plus.to_s
  508.       else
  509.         [email protected]_plus
  510.         text=$data_system.words.dex+"  - "+dex_minus.to_s
  511.       end
  512.       self.contents.font.color = text_color(6)#颜色脚本
  513.       self.contents.font.size=14  
  514.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  515.     end
  516.     if @weapon.agi_plus!=0#敏捷
  517.       x=0
  518.       y+=1     
  519.       if @weapon.agi_plus > 0
  520.         text=$data_system.words.agi+"  + "[email protected]_plus.to_s
  521.       else
  522.         [email protected]_plus
  523.         text=$data_system.words.agi+"  - "+agi_minus.to_s
  524.       end
  525.       self.contents.font.color = text_color(6)#颜色脚本
  526.       self.contents.font.size=14  
  527.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  528.     end
  529.     if @weapon.int_plus!=0 #智力
  530.       x=0
  531.       y+=1     
  532.       if @weapon.int_plus > 0
  533.         text=$data_system.words.int+"  + "[email protected]_plus.to_s
  534.       else
  535.         [email protected]_plus
  536.         text=$data_system.words.int+"  - "+int_minus.to_s
  537.       end
  538.       self.contents.font.color = text_color(6)#颜色脚本
  539.       self.contents.font.size=14  
  540.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  541.     end
  542.   end
  543. end

  544. class Window_Help < Window_Base
  545.     #--------------------------------------------------------------------------
  546.   # ● 防具帮助窗口
  547.   #--------------------------------------------------------------------------
  548.     def set_armor_text(armor)
  549.     @armor=armor
  550.     description=""
  551.     [email protected]
  552.    # 取得屬性、附加狀態、解除狀態之副本
  553.    element_set = @armor.guard_element_set.clone
  554.    guard_state_set = @armor.guard_state_set.clone
  555.    # 過濾不顯示的描述
  556.    element_set -= UNSHOW_ELEMENT
  557.    guard_state_set -= UNSHOW_STATE
  558.     x=0
  559.     y=0
  560.     height=1     #依要显示的内容确定高
  561.     #由描叙确定高
  562.     height+=description.size/3/10
  563.     if description.size%10 !=0
  564.       height+=1
  565.     end
  566.     height+=2  #2个空行,价格
  567.     if @armor.pdef !=0 #物理防御
  568.       height+=1
  569.     end      
  570.     if @armor.mdef !=0 #魔法防御
  571.       height+=1
  572.     end
  573.     if @armor.str_plus !=0 #力量
  574.       height+=1
  575.     end
  576.     if @armor.dex_plus !=0#体质
  577.       height+=1
  578.     end
  579.     if @armor.agi_plus !=0#敏捷
  580.       height+=1
  581.     end
  582.     if @armor.int_plus !=0 #智力
  583.       height+=1
  584.     end     
  585.     if element_set.empty? != true  #属性防御。为属性 ID 的数组
  586.       height+=1
  587.     end
  588.     if guard_state_set.empty? != true  #状态防御。为状态 ID 的数组
  589.       height+=guard_state_set.size
  590.     end   
  591.     self.height=height*16+70
  592.     self.contents = Bitmap.new(self.width - 32,self.height - 32)
  593.     self.contents.clear
  594.     #描绘名字
  595.     [email protected]
  596.     self.contents.font.color = text_color(6)#颜色脚本
  597.     self.contents.font.size=18
  598.     if text!=nil
  599.       self.visible = true
  600.       self.contents.draw_text(0,0, @armor.name.size*7, 20, text, 0)
  601.     else
  602.       self.visible = false
  603.     end
  604.     x=0
  605.     y+=1
  606.     text=description
  607.     #描绘描叙
  608.     while ((text = description.slice!(/./m)) != nil)
  609.       self.contents.font.color = normal_color
  610.       self.contents.font.size=14
  611.       self.contents.draw_text(x*15, y*15+5, 14, 14, text, 0)
  612.       x+=1
  613.       if x==10#每行10个字
  614.         x=0
  615.         y+=1      
  616.       end
  617.     end
  618.     #由特技属性确定高
  619.       x=0
  620.       y+=2#空行     
  621.       text="价格:"[email protected]_s
  622.       self.contents.font.color = normal_color
  623.       self.contents.font.size=14  
  624.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  625.       x=0
  626.       y+=1     
  627.     if @armor.pdef!=0 #物理防御
  628.       text="物理防御:"[email protected]_s
  629.       self.contents.font.color = text_color(6)#颜色脚本
  630.       self.contents.font.size=14  
  631.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  632.       x=0
  633.       y+=1     
  634.     end      
  635.     if @armor.mdef!=0 #魔法防御
  636.       text="魔法防御:"[email protected]_s
  637.       self.contents.font.color = text_color(6)#颜色脚本
  638.       self.contents.font.size=14  
  639.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  640.       x=0
  641.       y+=1     
  642.     end

  643.     #属性防御  
  644.     if element_set.empty? !=true  #属性。为属性 ID 的数组
  645.       text="属性防御:"
  646.       for i in 0...element_set.size
  647.         text+=$data_system.elements[element_set[i]]+" "
  648.       end
  649.       x=0
  650.       y+=1
  651.       self.contents.font.color = normal_color
  652.       self.contents.font.size=14
  653.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  654.     end
  655.     #状态防御
  656.     if guard_state_set.empty?!=true  #附加状态。为状态 ID 的数组
  657.       text="状态防御:"
  658.       x=0
  659.       y+=1
  660.       self.contents.font.color = normal_color
  661.       self.contents.font.size=14
  662.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  663.       y-=1
  664.       x+=text.size*5     
  665.       for i in 0...guard_state_set.size
  666.         y+=1
  667.         text=$data_states[guard_state_set[i]].name      
  668.         self.contents.font.color = normal_color
  669.         self.contents.font.size=14
  670.         self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)      
  671.       end
  672.     end

  673. #    y+=1 #空行
  674.     if @armor.str_plus!=0 #力量
  675.       x=0
  676.       y+=1
  677.       if @armor.str_plus > 0
  678.         text=$data_system.words.str+"  + "[email protected]_plus.to_s
  679.       else
  680.         [email protected]_plus
  681.         text=$data_system.words.str+"  - "+str_minus.to_s
  682.       end
  683.       self.contents.font.color = text_color(6)#颜色脚本
  684.       self.contents.font.size=14  
  685.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  686.     end
  687.     if @armor.dex_plus!=0#体质
  688.       x=0
  689.       y+=1     
  690.       if @armor.dex_plus > 0
  691.         text=$data_system.words.dex+"  + "[email protected]_plus.to_s
  692.       else
  693.         [email protected]_plus
  694.         text=$data_system.words.dex+"  - "+dex_minus.to_s
  695.       end
  696.       self.contents.font.color = text_color(6)#颜色脚本
  697.       self.contents.font.size=14  
  698.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  699.     end
  700.     if @armor.agi_plus!=0#敏捷
  701.       x=0
  702.       y+=1     
  703.       if @armor.agi_plus > 0
  704.         text=$data_system.words.agi+"  + "[email protected]_plus.to_s
  705.       else
  706.         [email protected]_plus
  707.         text=$data_system.words.agi+"  - "+agi_minus.to_s
  708.       end
  709.       self.contents.font.color = text_color(6)#颜色脚本
  710.       self.contents.font.size=14  
  711.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  712.     end
  713.     if @armor.int_plus!=0 #智力
  714.       x=0
  715.       y+=1     
  716.       if @armor.int_plus > 0
  717.         text=$data_system.words.int+"  + "[email protected]_plus.to_s
  718.       else
  719.         [email protected]_plus
  720.         text=$data_system.words.int+"  - "+int_minus.to_s
  721.       end
  722.       self.contents.font.color = text_color(6)#颜色脚本
  723.       self.contents.font.size=14  
  724.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  725.     end
  726.   end
  727. end

  728. class Window_Help < Window_Base
  729.     #--------------------------------------------------------------------------
  730.   # ● 技能帮助窗口
  731.   #--------------------------------------------------------------------------
  732.   def set_skill_text(skill)
  733.     @skill=skill
  734.     description=""
  735.     [email protected]
  736.    # 取得屬性、附加狀態、解除狀態之副本
  737.    element_set = @skill.element_set.clone
  738.    plus_state_set = @skill.plus_state_set.clone
  739.    minus_state_set = @skill.minus_state_set.clone
  740.    # 過濾不顯示的描述
  741.    element_set -= UNSHOW_ELEMENT
  742.    plus_state_set -= UNSHOW_STATE
  743.    minus_state_set -= UNSHOW_STATE
  744.     x=0
  745.     y=0
  746.     height=1     #依要显示的内容确定高
  747.     #由描叙确定高
  748.     height+=description.size/3/10
  749.     if description.size%10!=0
  750.       height+=1
  751.     end
  752.     height+=4  #空行,效果范围,消费SP,命中率
  753.     if @skill.power!=0  #威力,威力为0,则可能为状态魔法
  754.       height+=1
  755.     end
  756.     if element_set.empty?!=true  #属性。为属性 ID 的数组
  757.       height+=1
  758.     end
  759.     if plus_state_set.empty?!=true  #附加状态。为状态 ID 的数组
  760.       height+=plus_state_set.size
  761.     end
  762.     if minus_state_set.empty?!=true  #解除状态。为状态 ID 的数组
  763.       height+=minus_state_set.size  
  764.     end   
  765.     self.height=height*15+40+15  
  766.     self.contents = Bitmap.new(self.width - 32,self.height - 32)
  767.     self.contents.clear
  768.     #描绘名字
  769.     [email protected]
  770.     self.contents.font.color =text_color(6)
  771.     self.contents.font.size=18
  772.     if text!=nil
  773.       self.visible = true
  774.       self.contents.draw_text(0,0, @skill.name.size*7, 20, text, 0)
  775.     else
  776.       self.visible = false
  777.     end
  778.     x=0
  779.     y+=1
  780.     text=description
  781.     #描绘描叙
  782.     while ((text = description.slice!(/./m)) != nil)
  783.       self.contents.font.color = normal_color
  784.       self.contents.font.size=14
  785.       self.contents.draw_text(x*15, y*15+5, 14, 14, text, 0)
  786.       x+=1
  787.       text
  788.       if x==10#每行10个字
  789.         x=0
  790.         y+=1      
  791.       end
  792.     end
  793.     #由特技属性确定高
  794.     #效果范围
  795.    
  796.     scope = {0=>"特殊技能",1=>"敌单体",2=>"敌全体",3=>"己方单体",4=>"己方全体",5=>"己方昏死单体",6=>"己方昏死全体",7=>"使用者"}#HASH表
  797.     text="范围:"+scope[@skill.scope]
  798.     x=0
  799.     y+=2  #空一行
  800.     self.contents.font.color = normal_color
  801.     self.contents.font.size=14
  802.     self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  803.    
  804.     #威力
  805.     if @skill.power!=0
  806.       x=0
  807.       y+=1
  808.       [email protected] > 0 ? @skill.power : -1* @skill.power
  809.       text="威力:"+c.to_s
  810.       self.contents.font.color = normal_color
  811.       self.contents.font.size=14  
  812.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  813.     end
  814.     #描绘消费SP
  815.     x=0
  816.     y+=1
  817.     text="消耗SP:"[email protected]_cost.to_s
  818.     self.contents.font.color = normal_color
  819.     self.contents.font.size=14   
  820.     self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  821.     #命中率
  822.     x=0
  823.     y+=1
  824.     text="命中率:"[email protected]_s+"%"
  825.     self.contents.font.color = normal_color
  826.     self.contents.font.size=14
  827.     self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  828.     #攻击属性
  829.    
  830.     if element_set.empty? != true  #属性。为属性 ID 的数组
  831.       text="属性:"
  832.       for i in 0...element_set.size
  833.         text+=$data_system.elements[element_set[i]]+" "
  834.       end
  835.       x=0
  836.       y+=1
  837.       self.contents.font.color = normal_color
  838.       self.contents.font.size=14
  839.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  840.     end
  841.     #附加状态
  842.     if plus_state_set.empty? != true  #附加状态。为状态 ID 的数组
  843.       text="附加状态:"
  844.       x=0
  845.       y+=1
  846.       self.contents.font.color = normal_color
  847.       self.contents.font.size=14
  848.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  849.       y-=1
  850.       x+=text.size*5     
  851.       for i in 0...plus_state_set.size
  852.         y+=1
  853.         text=$data_states[plus_state_set[i]].name      
  854.         self.contents.font.color = normal_color
  855.         self.contents.font.size=14
  856.         self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)      
  857.       end
  858.     end
  859.     #解除状态
  860.     if minus_state_set.empty? != true  #解除状态。为状态 ID 的数组
  861.       text="解除状态:"
  862.       x=0
  863.       y+=1
  864.       self.contents.font.color = normal_color
  865.       self.contents.font.size=14
  866.       self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)
  867.       y-=1
  868.       x+=text.size*5     
  869.       for i in 0...minus_state_set.size
  870.         y+=1
  871.         text=$data_states[minus_state_set[i]].name      
  872.         self.contents.font.color = normal_color
  873.         self.contents.font.size=14
  874.         self.contents.draw_text(x, y*15+5, text.size*6, 14, text, 0)      
  875.       end
  876.     end   
  877.   end
  878. end

  879. class Window_Item < Window_Selectable
  880.   #--------------------------------------------------------------------------
  881.   # ● 刷新帮助文本
  882.   #--------------------------------------------------------------------------
  883.   def update_help
  884. #    @help_window.set_text(self.item == nil ? "" : self.item.description)
  885.     @help_window.set_text(item)
  886.     #校正帮助窗口位置
  887.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  888.   end
  889. end
  890. class Window_Skill < Window_Selectable
  891.   #--------------------------------------------------------------------------
  892.   # ● 刷新帮助文本
  893.   #--------------------------------------------------------------------------
  894.   def update_help
  895. #    @help_window.set_text(self.skill == nil ? "" : self.skill.description)
  896.     @help_window.set_text(skill)
  897.     #校正帮助窗口位置
  898.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  899.   end
  900. end
  901. class Window_EquipRight < Window_Selectable
  902.   def update_help
  903. #    @help_window.set_text(self.item == nil ? "" : self.item.description)
  904.     @help_window.set_text(item)
  905.     #校正帮助窗口位置
  906.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  907.   end
  908. end
  909. class Window_EquipItem < Window_Selectable
  910.   def update_help
  911. #    @help_window.set_text(self.item == nil ? "" : self.item.description)
  912.     @help_window.set_text(item)
  913.     #校正帮助窗口位置
  914.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  915.   end
  916. end
  917. class Window_ShopBuy < Window_Selectable
  918.   def update_help
  919.     @help_window.set_text(item)
  920.     #校正帮助窗口位置
  921.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  922.   end
  923. end
  924. class Window_ShopSell < Window_Selectable
  925.   def update_help
  926.     @help_window.set_text(item)
  927.     #校正帮助窗口位置
  928.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  929.   end
  930. end
复制代码


不过很遗憾的说,没有找到解决方法~

只好忍痛去掉此脚本,遗憾一下~
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-7-24 10:56

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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