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

Project1

 找回密码
 注册会员
搜索
查看: 5361|回复: 13

[已经解决] 轩辕剑菜单装备能力描述窗口增强

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
18 小时
注册时间
2009-7-25
帖子
411
发表于 2009-8-31 11:52:14 | 显示全部楼层 |阅读模式
5星屑
本帖最后由 flzt5354 于 2009-9-1 21:16 编辑

1.jpg

如图我已经把窗口制作了出来

但是。却没有下图的效果
2.jpg

不解、、
请教解决办法

工程: ME菜单.rar (4.83 MB, 下载次数: 307)

Lv1.梦旅人

梦石
0
星屑
50
在线时间
7 小时
注册时间
2009-1-1
帖子
263
发表于 2009-8-31 12:04:12 | 显示全部楼层
很强大……
你可以参考合成窗口
合成窗口的原理就是在菜单上再创建一个窗口……
需要修改N多窗口的大小坐标
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
18 小时
注册时间
2009-7-25
帖子
411
 楼主| 发表于 2009-8-31 12:09:30 | 显示全部楼层
本帖最后由 flzt5354 于 2009-8-31 12:12 编辑

没时间再研究了。。要上学了。
所以才悬赏。。
另外我窗口已经创建了出来了;
脚本用的跟下面有对比的图的都一样的- -
估计是哪个环节出了点小问题
比如说C按下时。。少激活了点什么。。
回复

使用道具 举报

Lv1.梦旅人

~琉璃の雪~<

梦石
0
星屑
49
在线时间
36 小时
注册时间
2008-11-6
帖子
3678
发表于 2009-8-31 12:13:27 | 显示全部楼层
你只得是这个效果?
  1. #==============================================================================
  2. # 本脚本来自http://rpg.blue/web/,使用和转载请保留此信息
  3. #==============================================================================


  4. #==============================================================================
  5. # ■ Window_Base
  6. #------------------------------------------------------------------------------
  7. #  游戏中全部窗口的超级类。
  8. #==============================================================================

  9. class Window_Base < Window
  10.   def up_color
  11.     return Color.new(255, 0, 0)
  12.   end
  13.   def down_color
  14.     return Color.new(0, 255, 0)
  15.   end
  16.   #--------------------------------------------------------------------------
  17.   # ● 描绘能力值
  18.   #     actor : 角色
  19.   #     x     : 描画目标 X 坐标
  20.   #     y     : 描画目标 Y 坐标
  21.   #     type  : 能力值种类 (0~6)
  22.   #--------------------------------------------------------------------------
  23.   def draw_actor_parameter(actor, x, y, type)
  24.     case type
  25.     when 0
  26.       parameter_name = $data_system.words.atk
  27.       parameter_value = actor.atk
  28.     when 1
  29.       parameter_name = $data_system.words.pdef
  30.       parameter_value = actor.pdef
  31.     when 2
  32.       parameter_name = $data_system.words.mdef
  33.       parameter_value = actor.mdef
  34.     when 3
  35.       parameter_name = $data_system.words.str
  36.       parameter_value = actor.str
  37.     when 4
  38.       parameter_name = $data_system.words.dex
  39.       parameter_value = actor.dex
  40.     when 5
  41.       parameter_name = $data_system.words.agi
  42.       parameter_value = actor.agi
  43.     when 6
  44.       parameter_name = $data_system.words.int
  45.       parameter_value = actor.int
  46.     ###############################################################
  47.     when 7
  48.       parameter_name = "回避"
  49.       parameter_value = actor.eva
  50.     end
  51.     self.contents.font.color = system_color
  52.     self.contents.draw_text(x, y, 120, 32, parameter_name)
  53.     self.contents.font.color = normal_color
  54.     self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
  55.   end
  56. end

  57. #==============================================================================
  58. # ■ Window_EquipLeft
  59. #------------------------------------------------------------------------------
  60. #  装备画面的、显示角色能力值变化的窗口。
  61. #==============================================================================

  62. class Window_EquipLeft < Window_Base
  63.   UP_ICON = "048-Skill05"
  64.   DOWN_ICON = "047-Skill04"
  65.   #--------------------------------------------------------------------------
  66.   # ● 初始化对像
  67.   #     actor : 角色
  68.   #--------------------------------------------------------------------------
  69.   def initialize(actor)
  70.     super(0, 64, 272, 416)
  71.     self.contents = Bitmap.new(width - 32, height - 32)
  72.     @actor = actor
  73.     refresh
  74.   end
  75.   #--------------------------------------------------------------------------
  76.   # ● 刷新
  77.   #--------------------------------------------------------------------------
  78.   def refresh
  79.     self.contents.clear
  80.     draw_actor_name(@actor, 4, 0)
  81.     draw_actor_level(@actor, 4, 32)
  82.     ###############################################################
  83.     draw_actor_parameter(@actor, 4, 64, 0)
  84.     draw_actor_parameter(@actor, 4, 96, 1)
  85.     draw_actor_parameter(@actor, 4, 128, 2)
  86.     draw_actor_parameter(@actor, 4, 160, 7)
  87.     draw_actor_parameter(@actor, 4, 192, 3)
  88.     draw_actor_parameter(@actor, 4, 224, 4)
  89.     draw_actor_parameter(@actor, 4, 256, 5)
  90.     draw_actor_parameter(@actor, 4, 288, 6)
  91.     if @new_atk != nil
  92.       if @new_atk > @actor.atk
  93.         self.contents.blt(164, 64, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  94.       elsif @new_atk < @actor.atk
  95.         self.contents.blt(164, 64, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  96.       end
  97.       self.contents.font.color = @new_atk>@actor.atk ? up_color : down_color
  98.       self.contents.font.color = normal_color if @new_atk == @actor.atk
  99.       self.contents.draw_text(200, 64, 36, 32, @new_atk.to_s, 2)
  100.     end
  101.     if @new_pdef != nil
  102.       if @new_pdef > @actor.pdef
  103.         self.contents.blt(164, 96, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  104.       elsif @new_pdef < @actor.pdef
  105.         self.contents.blt(164, 96, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  106.       end
  107.       self.contents.font.color = @new_pdef>@actor.pdef ? up_color : down_color
  108.       self.contents.font.color = normal_color if @new_pdef == @actor.pdef
  109.       self.contents.draw_text(200, 96, 36, 32, @new_pdef.to_s, 2)
  110.     end
  111.     if @new_mdef != nil
  112.       if @new_mdef > @actor.mdef
  113.         self.contents.blt(164, 128, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  114.       elsif @new_mdef < @actor.mdef
  115.         self.contents.blt(164, 128, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  116.       end
  117.       self.contents.font.color = @new_mdef>@actor.mdef ? up_color : down_color
  118.       self.contents.font.color = normal_color if @new_mdef == @actor.mdef
  119.       self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
  120.     end
  121.     if @new_eva != nil
  122.       if @new_eva > @actor.eva
  123.         self.contents.blt(164, 160, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  124.       elsif @new_eva < @actor.eva
  125.         self.contents.blt(164, 160, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  126.       end
  127.       self.contents.font.color = @new_eva>@actor.eva ? up_color : down_color
  128.       self.contents.font.color = normal_color if @new_eva == @actor.eva
  129.       self.contents.draw_text(200, 160, 36, 32, @new_eva.to_s, 2)
  130.     end
  131.     if @new_str != nil
  132.       if @new_str > @actor.str
  133.         self.contents.blt(164, 192, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  134.       elsif @new_str < @actor.str
  135.         self.contents.blt(164, 192, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  136.       end
  137.       self.contents.font.color = @new_str>@actor.str ? up_color : down_color
  138.       self.contents.font.color = normal_color if @new_str == @actor.str
  139.       self.contents.draw_text(200, 192, 36, 32, @new_str.to_s, 2)
  140.     end
  141.     if @new_dex != nil
  142.       if @new_dex > @actor.dex
  143.         self.contents.blt(164, 224, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  144.       elsif @new_dex < @actor.dex
  145.         self.contents.blt(164, 224, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  146.       end
  147.       self.contents.font.color = @new_dex>@actor.dex ? up_color : down_color
  148.       self.contents.font.color = normal_color if @new_dex == @actor.dex
  149.       self.contents.draw_text(200, 224, 36, 32, @new_dex.to_s, 2)
  150.     end
  151.     if @new_agi != nil
  152.       if @new_agi > @actor.agi
  153.         self.contents.blt(164, 256, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  154.       elsif @new_agi < @actor.agi
  155.         self.contents.blt(164, 256, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  156.       end
  157.       self.contents.font.color = @new_agi>@actor.agi ? up_color : down_color
  158.       self.contents.font.color = normal_color if @new_agi == @actor.agi
  159.       self.contents.draw_text(200, 256, 36, 32, @new_agi.to_s, 2)
  160.     end
  161.     if @new_int != nil
  162.       if @new_int > @actor.int
  163.         self.contents.blt(164, 288, RPG::Cache.icon(UP_ICON), Rect.new(0, 0, 24, 24))
  164.       elsif @new_int < @actor.int
  165.         self.contents.blt(164, 288, RPG::Cache.icon(DOWN_ICON), Rect.new(0, 0, 24, 24))
  166.       end
  167.       self.contents.font.color = @new_int>@actor.int ? up_color : down_color
  168.       self.contents.font.color = normal_color if @new_int == @actor.int
  169.       self.contents.draw_text(200, 288, 36, 32, @new_int.to_s, 2)
  170.     end
  171.   end
  172.   #--------------------------------------------------------------------------
  173.   # ● 变更装备后的能力值设置
  174.   #     new_atk  : 变更装备后的攻击力
  175.   #     new_pdef : 变更装备后的物理防御
  176.   #     new_mdef : 变更装备后的魔法防御
  177.   #--------------------------------------------------------------------------
  178.     ###############################################################
  179.   def set_new_parameters(new_atk, new_pdef, new_mdef, new_eva, new_str, new_dex, new_agi, new_int)
  180.     if @new_atk != new_atk or @new_pdef !=new_pdef or @new_mdef != new_mdef or @new_eva != new_eva or @new_str != new_str or @new_dex !=new_dex or @new_agi != new_agi or @new_int != new_int
  181.       @new_atk = new_atk
  182.       @new_pdef = new_pdef
  183.       @new_mdef = new_mdef
  184.       @new_eva = new_eva
  185.       @new_str = new_str
  186.       @new_dex = new_dex
  187.       @new_agi = new_agi
  188.       @new_int = new_int
  189.       refresh
  190.     end
  191.   end
  192. end

  193. #==============================================================================
  194. # ■ Window_EquipItem
  195. #------------------------------------------------------------------------------
  196. #  装备画面、显示浏览变更装备的候补物品的窗口。
  197. #==============================================================================

  198. class Window_EquipItem < Window_Selectable
  199.   #--------------------------------------------------------------------------
  200.   # ● 初始化对像
  201.   #     actor      : 角色
  202.   #     equip_type : 装备部位 (0~3)
  203.   #--------------------------------------------------------------------------
  204.   def initialize(actor, equip_type)
  205.     ################改了改坐标和高度#################################
  206.     super(272, 256, 368, 224)
  207.     @actor = actor
  208.     @equip_type = equip_type
  209.     @column_max = 1
  210.     refresh
  211.     self.active = false
  212.     self.index = -1
  213.   end
  214.   #--------------------------------------------------------------------------
  215.   # ● 项目的描绘
  216.   #     index : 项目符号
  217.   #--------------------------------------------------------------------------
  218.   def draw_item(index)
  219.     item = @data[index]
  220.     ################改了改坐标#################################
  221.     x = 4
  222.     y = index * 32
  223.     case item
  224.     when RPG::Weapon
  225.       number = $game_party.weapon_number(item.id)
  226.     when RPG::Armor
  227.       number = $game_party.armor_number(item.id)
  228.     end
  229.     bitmap = RPG::Cache.icon(item.icon_name)
  230.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
  231.     self.contents.font.color = normal_color
  232.     self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
  233.     self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
  234.     self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  235.   end
  236. end

  237. #==============================================================================
  238. # ■ Scene_Equip
  239. #------------------------------------------------------------------------------
  240. #  处理装备画面的类。
  241. #==============================================================================

  242. class Scene_Equip
  243.   #--------------------------------------------------------------------------
  244.   # ● 刷新
  245.   #--------------------------------------------------------------------------
  246.   def refresh
  247.     # 设置物品窗口的可视状态
  248.     @item_window1.visible = (@right_window.index == 0)
  249.     @item_window2.visible = (@right_window.index == 1)
  250.     @item_window3.visible = (@right_window.index == 2)
  251.     @item_window4.visible = (@right_window.index == 3)
  252.     @item_window5.visible = (@right_window.index == 4)
  253.     # 获取当前装备中的物品
  254.     item1 = @right_window.item
  255.     # 设置当前的物品窗口到 @item_window
  256.     case @right_window.index
  257.     when 0
  258.       @item_window = @item_window1
  259.     when 1
  260.       @item_window = @item_window2
  261.     when 2
  262.       @item_window = @item_window3
  263.     when 3
  264.       @item_window = @item_window4
  265.     when 4
  266.       @item_window = @item_window5
  267.     end
  268.     # 右窗口被激活的情况下
  269.     if @right_window.active
  270.       # 删除变更装备后的能力
  271.     ###############################################################
  272.       @left_window.set_new_parameters(nil, nil, nil, nil, nil, nil, nil, nil)
  273.     end
  274.     # 物品窗口被激活的情况下
  275.     if @item_window.active
  276.       # 获取现在选中的物品
  277.       item2 = @item_window.item
  278.       # 变更装备
  279.       last_hp = @actor.hp
  280.       last_sp = @actor.sp
  281.       @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
  282.       # 获取变更装备后的能力值
  283.     ###############################################################
  284.       new_atk = @actor.atk
  285.       new_pdef = @actor.pdef
  286.       new_mdef = @actor.mdef
  287.       new_eva = @actor.eva
  288.       new_str = @actor.str
  289.       new_dex = @actor.dex
  290.       new_agi = @actor.agi
  291.       new_int = @actor.int
  292.       # 返回到装备
  293.       @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
  294.       @actor.hp = last_hp
  295.       @actor.sp = last_sp
  296.       # 描画左窗口
  297.     ###############################################################
  298.       @left_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_eva, new_str, new_dex, new_agi, new_int)
  299.     end
  300.   end
  301. end

  302. #==============================================================================
  303. # 本脚本来自http://rpg.blue/web/,使用和转载请保留此信息
  304. #==============================================================================
复制代码
~现在开始自绘头像~
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
18 小时
注册时间
2009-7-25
帖子
411
 楼主| 发表于 2009-8-31 12:43:37 | 显示全部楼层
嗯,是这种效果
怎么加入我的轩辕剑菜单里
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
18 小时
注册时间
2009-7-25
帖子
411
 楼主| 发表于 2009-8-31 17:24:01 | 显示全部楼层
顶起来
回复

使用道具 举报

Lv1.梦旅人

℃ake

梦石
0
星屑
50
在线时间
8 小时
注册时间
2009-6-6
帖子
787
发表于 2009-8-31 19:22:22 | 显示全部楼层
没搞懂,你的意思是说,你要那个半透明的飘在上面的说明描述窗口的效果??
我爱66RPG,但我讨厌66.
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
18 小时
注册时间
2009-7-25
帖子
411
 楼主| 发表于 2009-8-31 19:31:06 | 显示全部楼层
我要的是XXX→XXX的效果
2张图片有什么不同,一看就知道吧
回复

使用道具 举报

Lv2.观梦者

梦石
0
星屑
260
在线时间
1373 小时
注册时间
2005-10-16
帖子
5113

贵宾

发表于 2009-8-31 22:33:23 | 显示全部楼层
先获取当前的属性值,然后给角色装备当前指向的某件装备,之后再记录另一组属性值数据,接着把装备还原回去。
我只个搬答案的
叔叔我已经当爹了~
婚后闪人了……
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
18 小时
注册时间
2009-7-25
帖子
411
 楼主| 发表于 2009-9-1 18:03:53 | 显示全部楼层
本帖最后由 flzt5354 于 2009-9-1 18:25 编辑

但是我的脚本已经有这功能了- -
就是显示不出来
  1. #==============================================================================
  2. # ■ Window_nengli
  3. #------------------------------------------------------------------------------
  4. #  装备画面的、显示角色能力值变化的窗口。
  5. #==============================================================================

  6. class Window_nengli < Window_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #     actor : 角色
  10.   #--------------------------------------------------------------------------
  11.   def initialize(actor)
  12.     super(0, 64, 272, 416)
  13.     self.contents = Bitmap.new(width - 32, height - 32)
  14.     @actor = actor
  15.     refresh
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # ● 刷新
  19.   #--------------------------------------------------------------------------
  20.   def refresh
  21.     self.contents.clear
  22.     draw_actor_name(@actor, 4, 0)
  23.     draw_actor_level(@actor, 4, 32)

  24.     draw_actor_parameter(@actor, 4, 64, 0)
  25.     draw_actor_parameter(@actor, 4, 96, 1)
  26.     draw_actor_parameter(@actor, 4, 128, 2)
  27.     draw_actor_parameter(@actor, 4, 160, 7)
  28.     draw_actor_parameter(@actor, 4, 192, 3)
  29.     draw_actor_parameter(@actor, 4, 224, 4)
  30.     draw_actor_parameter(@actor, 4, 256, 5)
  31.     draw_actor_parameter(@actor, 4, 288, 6)
  32.     if @new_atk != nil
  33.       self.contents.font.color = system_color
  34.       self.contents.draw_text(160, 64, 40, 32, "→", 1)
  35.       self.contents.font.color = @new_atk>@actor.atk ? up_color : down_color
  36.       self.contents.font.color = normal_color if @new_atk == @actor.atk
  37.       self.contents.draw_text(200, 64, 36, 32, @new_atk.to_s, 2)
  38.     end
  39.     if @new_pdef != nil
  40.       self.contents.font.color = system_color
  41.       self.contents.draw_text(160, 96, 40, 32, "→", 1)
  42.       self.contents.font.color = @new_pdef>@actor.pdef ? up_color : down_color
  43.       self.contents.font.color = normal_color if @new_pdef == @actor.pdef
  44.       self.contents.draw_text(200, 96, 36, 32, @new_pdef.to_s, 2)
  45.     end
  46.     if @new_mdef != nil
  47.       self.contents.font.color = system_color
  48.       self.contents.draw_text(160, 128, 40, 32, "→", 1)
  49.       self.contents.font.color = @new_mdef>@actor.mdef ? up_color : down_color
  50.       self.contents.font.color = normal_color if @new_mdef == @actor.mdef
  51.       self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
  52.     end
  53.     if @new_eva != nil
  54.       self.contents.font.color = system_color
  55.       self.contents.draw_text(160, 160, 40, 32, "→", 1)
  56.       self.contents.font.color = @new_eva>@actor.eva ? up_color : down_color
  57.       self.contents.font.color = normal_color if @new_eva == @actor.eva
  58.       self.contents.draw_text(200, 160, 36, 32, @new_eva.to_s, 2)
  59.     end
  60.     if @new_str != nil
  61.       self.contents.font.color = system_color
  62.       self.contents.draw_text(160, 192, 40, 32, "→", 1)
  63.       self.contents.font.color = @new_str>@actor.str ? up_color : down_color
  64.       self.contents.font.color = normal_color if @new_str == @actor.str
  65.       self.contents.draw_text(200, 192, 36, 32, @new_str.to_s, 2)
  66.     end
  67.     if @new_dex != nil
  68.       self.contents.font.color = system_color
  69.       self.contents.draw_text(160, 224, 40, 32, "→", 1)
  70.       self.contents.font.color = @new_dex>@actor.dex ? up_color : down_color
  71.       self.contents.font.color = normal_color if @new_dex == @actor.dex
  72.       self.contents.draw_text(200, 224, 36, 32, @new_dex.to_s, 2)
  73.     end
  74.     if @new_agi != nil
  75.       self.contents.font.color = system_color
  76.       self.contents.draw_text(160, 256, 40, 32, "→", 1)
  77.       self.contents.font.color = @new_agi>@actor.agi ? up_color : down_color
  78.       self.contents.font.color = normal_color if @new_agi == @actor.agi
  79.       self.contents.draw_text(200, 256, 36, 32, @new_agi.to_s, 2)
  80.     end
  81.     if @new_int != nil
  82.       self.contents.font.color = system_color
  83.       self.contents.draw_text(160, 288, 40, 32, "→", 1)
  84.       self.contents.font.color = @new_int>@actor.int ? up_color : down_color
  85.       self.contents.font.color = normal_color if @new_int == @actor.int
  86.       self.contents.draw_text(200, 288, 36, 32, @new_int.to_s, 2)
  87.     end
  88.   end
  89.   #--------------------------------------------------------------------------
  90.   # ● 变更装备后的能力值设置
  91.   #     new_atk  : 变更装备后的攻击力
  92.   #     new_pdef : 变更装备后的物理防御
  93.   #     new_mdef : 变更装备后的魔法防御
  94.   #--------------------------------------------------------------------------
  95.   def set_new_parameters(new_atk, new_pdef, new_mdef, new_eva, new_str, new_dex, new_agi, new_int)
  96.     if @new_atk != new_atk or @new_pdef !=new_pdef or @new_mdef != new_mdef or @new_eva != new_eva or @new_str != new_str or @new_dex !=new_dex or @new_agi != new_agi or @new_int != new_int
  97.       @new_atk = new_atk
  98.       @new_pdef = new_pdef
  99.       @new_mdef = new_mdef
  100.       @new_eva = new_eva
  101.       @new_str = new_str
  102.       @new_dex = new_dex
  103.       @new_agi = new_agi
  104.       @new_int = new_int
  105.       refresh
  106.     end
  107.   end
  108. end
复制代码
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-3-29 01:35

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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