Project1

标题: XP的菜单界面行走图可以改成头像吗? [打印本页]

作者: PCPC_02    时间: 2014-1-14 23:16
标题: XP的菜单界面行走图可以改成头像吗?
XP的菜单界面角色的行走图可以改成头像吗?

就像VX这样的。

作者: 白魔导师宝儿    时间: 2014-1-15 13:19
http://rpg.blue/thread-238729-1-1.html
试试整合系统吧
作者: PCPC_02    时间: 2014-1-16 20:46
白魔导师宝儿 发表于 2014-1-15 13:19
http://rpg.blue/thread-238729-1-1.html
试试整合系统吧

请问修改了哪里?我没有找到。
作者: 白魔导师宝儿    时间: 2014-1-17 08:22
PCPC_02 发表于 2014-1-16 20:46
请问修改了哪里?我没有找到。

Window_MenuStatus
一般都在这里修改或者重定义
作者: PCPC_02    时间: 2014-1-17 11:57
白魔导师宝儿 发表于 2014-1-17 08:22
Window_MenuStatus
一般都在这里修改或者重定义

一打开菜单就报错了

作者: 天地有正气    时间: 2014-1-18 12:39
我在技术讨论区发布过这个东西~链接送上
使用时把我的几个脚本都复制到脚本编辑器里去,角色的头像是 放在行走图文件夹里的,名字为"角色名_Menu"(引号不要加)
作者: PCPC_02    时间: 2014-1-18 15:54
天地有正气 发表于 2014-1-18 12:39
我在技术讨论区发布过这个东西~链接送上
使用时把我的几个脚本都复制到脚本编辑器里去,角色的头像是 放在 ...

也报错:

作者: 天地有正气    时间: 2014-1-19 13:47
本帖最后由 天地有正气 于 2014-1-19 13:48 编辑
PCPC_02 发表于 2014-1-18 15:54
也报错:


论坛原因导致脚本变形,请把
  1. [url=home.php?mod=space&uid=370741]@Index[/url] = -1
复制代码
改为
@Index = -1,(i小写)
作者: PCPC_02    时间: 2014-1-19 22:50
本帖最后由 PCPC_02 于 2014-1-19 22:54 编辑
天地有正气 发表于 2014-1-19 13:47
论坛原因导致脚本变形,请把改为
@Index = -1,(i小写)


RUBY 代码复制
  1. [url=home.php?mod=space&uid=370741]@index= -1
是这样吗?   
作者: myownroc    时间: 2014-1-20 15:12
本帖最后由 myownroc 于 2014-1-20 15:13 编辑

@天地有正气
@Person

发代码前先@一下person(注意是小写的)
以下是结果
  1. @index= -1
复制代码

作者: PCPC_02    时间: 2014-1-20 23:04
天地有正气 发表于 2014-1-19 13:47
论坛原因导致脚本变形,请把改为
@Index = -1,(i小写)


恳请阁下发个工程,谢谢~~
作者: 天地有正气    时间: 2014-1-21 18:59
PCPC_02 发表于 2014-1-20 23:04
恳请阁下发个工程,谢谢~~

这样吧,你把出错的脚本换成这个。
@person
  1. #==============================================================================
  2. # ■ Window_MenuStatus
  3. #------------------------------------------------------------------------------
  4. #  显示菜单画面和同伴状态的窗口。
  5. #==============================================================================

  6. class Window_MenuStatus < Window_Menu_Selectable
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化目标
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     super(0, 0, 480, 480)
  12.     self.contents = Bitmap.new(width - 32, height - 32)
  13.     refresh
  14.     self.active = false
  15.     self.index = -1
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # ● 刷新
  19.   #--------------------------------------------------------------------------
  20.   def refresh
  21.     self.contents.clear
  22.     @item_max = $game_party.actors.size
  23.     for i in 0...$game_party.actors.size
  24.       x = 64
  25.       y = i * 116
  26.       actor = $game_party.actors[i]
  27.       draw_actor_graphic(actor, x - 40, y + 80)
  28.       draw_actor_name(actor, x, y)
  29.       draw_actor_class(actor, x + 144, y)
  30.       draw_actor_level(actor, x, y + 32)
  31.       draw_actor_state(actor, x + 90, y + 32)
  32.       draw_actor_exp(actor, x, y + 64)
  33.       draw_actor_hp(actor, x + 236, y + 32)
  34.       draw_actor_sp(actor, x + 236, y + 64)
  35.     end
  36.   end
  37.   #--------------------------------------------------------------------------
  38.   # ● 刷新光标矩形
  39.   #--------------------------------------------------------------------------
  40.   def update_cursor_rect
  41.     if [url=home.php?mod=space&uid=370741]@Index[/url] < 0
  42.       self.cursor_rect.empty
  43.     else
  44.       self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
  45.     end
  46.   end
  47. end
复制代码

作者: 天地有正气    时间: 2014-1-22 18:37
好吧......范例送上~不过范例没有带角色头像。 菜单头像显示.zip (206.09 KB, 下载次数: 65)
作者: PCPC_02    时间: 2014-1-23 13:27
天地有正气 发表于 2014-1-22 18:37
好吧......范例送上~不过范例没有带角色头像。

遇到了新问题:如果用名称输入处理的话就无法识别图片了。
作者: PCPC_02    时间: 2014-2-3 16:09
天地有正气 发表于 2014-1-22 18:37
好吧......范例送上~不过范例没有带角色头像。

不好意思,又来麻烦你了,请问你的脚本可以和这个一起使用吗?
  1. #==============================================================================
  2. class Game_Party
  3.   #--------------------------------------------------------------------------
  4.   def add_actor(actor_id)
  5.     # 获取角色
  6.     actor = $game_actors[actor_id]
  7.     # 同伴人数未满 4 人、本角色不在队伍中的情况下
  8.     if @actors.size < 6 and not @actors.include?(actor)
  9.       # 添加角色
  10.       @actors.push(actor)
  11.       # 还原主角
  12.       $game_player.refresh
  13.     end
  14.   end
  15. end
  16. #==============================================================================
  17. class Window_MenuStatus < Window_Selectable
  18.   #--------------------------------------------------------------------------
  19.   def initialize
  20.     super(0, 0, 480, 480)
  21.     self.contents = Bitmap.new(width - 32, height - 32)
  22.     @column_max = 2
  23.     refresh
  24.     self.active = false
  25.     self.index = -1
  26.   end
  27.   #--------------------------------------------------------------------------
  28.   def refresh
  29.     self.contents.clear
  30.     @item_max = $game_party.actors.size
  31.     for i in 0...$game_party.actors.size
  32.       x = i % 2 * 240 + 64
  33.       y = i / 2 * 160
  34.       actor = $game_party.actors[i]
  35.       draw_actor_graphic(actor, x - 40, y + 80)
  36.       draw_actor_name(actor, x, y)
  37.       draw_actor_level(actor, x, y + 32)
  38.       draw_actor_class(actor, x, y + 64)
  39.     end
  40.   end
  41.   #--------------------------------------------------------------------------
  42.   # ● 刷新光标矩形
  43.   #--------------------------------------------------------------------------
  44.   def update_cursor_rect
  45.     if [url=home.php?mod=space&uid=370741]@Index[/url] < 0
  46.       self.cursor_rect.empty
  47.     else
  48.       x = @index % 2 * 240
  49.       y = @index / 2 * 160
  50.       self.cursor_rect.set(x, y, 208, 120)
  51.     end
  52.   end
  53. end
  54. #=============================================================================
复制代码

作者: PCPC_02    时间: 2014-2-4 14:14
天地有正气 发表于 2014-1-22 18:37
好吧......范例送上~不过范例没有带角色头像。

这两个脚本一起插入后人物排列的脚本就无效了,请问可以通过修改使之兼容吗?




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1