| 赞 | 11 |
| VIP | |
| 好人卡 | |
| 积分 | 3 |
| 经验 | |
| 最后登录 | 2020-2-5 |
| 在线时间 | 316 小时 |
- 梦石
- 0
- 星屑
- 254
- 在线时间
- 316 小时
- 注册时间
- 2015-7-2
- 回帖
- 1629

|
发表于 2016-1-30 19:57:05
|
显示全部楼层
本帖最后由 落雪鸦杀 于 2016-1-30 20:40 编辑
有2个已知的解决方案:
1.自行修改行走图,用PS等工具去掉一列后做成VA行走图格式,但是会有些麻烦。
2.使用VIPArcher大大的自行识别行走图帧数脚本(无需前置脚本,放在main前就好),需要用的行走图前加上$符号。缺点在于在存档的时候如果主角使用了XP行走图,会出现显示的Bug,虽然不影响游戏的正常运行……需要再插入cinderelmini的另一个脚本
注:以下脚本是直接从R考场第五期的考试工程中复制过来的……
这是VA大大的脚本
下载地址:https://github.com/VIPArcher/RGS ... «行走图帧数.rb
- #==============================================================================
- # ■ 自动识别行走图帧数
- # By :VIPArcher [email: [email]VIPArcher@sina.com[/email]]
- # -- 本脚本来自 [url]https://rpg.blue[/url] 使用或转载请保留以上信息。
- # 说明:
- # 使用这个脚本可以自动识别行走图的帧数,并且设置角色使用该行走图时的默认动作,使用
- # 方法是在行走图文件名里加上@帧数#默认动作的帧。事件的默认帧可以在事件里直接设置
- # 例如XP的素材就命名为: "$喵喵喵_@4#0.png"
- #==============================================================================
- $VIPArcherScript ||= {};$VIPArcherScript[:characters_frame] = 20150122
- #-------------------------------------------------------------------------------
- class Game_Player < Game_Character
- #--------------------------------------------------------------------------
- # ● 矫正姿势
- #--------------------------------------------------------------------------
- def straighten
- return super unless @fix
- @pattern = @fix if @walk_anime || @step_anime
- @anime_count = 0
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- alias characters_frame_refresh refresh
- def refresh
- characters_frame_refresh
- @original_pattern = @fix = $1.to_i if @character_name =~ /#(\d+)/
- @frame = $1.to_i if @character_name =~ /@(\d+)/
- end
- #--------------------------------------------------------------------------
- # ● 更新动画图案
- #--------------------------------------------------------------------------
- def update_anime_pattern
- return super unless @frame
- if !@step_anime && @stop_count > 0
- @pattern = @original_pattern
- else
- @pattern = (@pattern + 1) % @frame
- end
- end
- end
- #-------------------------------------------------------------------------------
- class Sprite_Character < Sprite_Base
- #--------------------------------------------------------------------------
- # ● 设置角色的位图
- #--------------------------------------------------------------------------
- alias characters_frame_set_character_bitmap set_character_bitmap
- def set_character_bitmap
- if @character_name =~ /@(\d+)/
- @frame = $1.to_i
- self.bitmap = Cache.character(@character_name)
- sign = @character_name[/^[\!\$]./]
- if sign && sign.include?('$')
- @cw = bitmap.width / @frame
- @ch = bitmap.height / 4
- else
- @cw = bitmap.width / @frame * 4
- @ch = bitmap.height / 8
- end
- self.ox = @cw / 2
- self.oy = @ch
- else
- characters_frame_set_character_bitmap
- end
- end
- #--------------------------------------------------------------------------
- # ● 更新源矩形
- #--------------------------------------------------------------------------
- alias characters_frame_update_src_rect update_src_rect
- def update_src_rect
- return characters_frame_update_src_rect unless @frame
- if @tile_id == 0
- index = @character.character_index
- pattern = @character.pattern < @frame ? @character.pattern : 1
- sx = (index % 4 * 3 + pattern) * @cw
- sy = (index / 4 * 4 + (@character.direction - 2) / 2) * @ch
- self.src_rect.set(sx, sy, @cw, @ch)
- end
- end
- end
复制代码
cinderelmini的脚本
并没有找到下载链接……
- # by - cinderelmini
- class Window_SaveFile < Window_Base
- #--------------------------------------------------------------------------
- # ● 绘制人物行走图
- #--------------------------------------------------------------------------
- alias sn_160124_draw_character draw_character
- def draw_character(character_name, character_index, x, y)
- return unless character_name
- if character_name =~ /@(\d+)/
- frame = $1.to_i
- bitmap = Cache.character(character_name)
- sign = character_name[/^[\!\$]./]
- if sign && sign.include?('$')
- cw = bitmap.width / frame
- ch = bitmap.height / 4
- else
- cw = bitmap.width / frame * 4
- ch = bitmap.height / 8
- end
- n = character_index
- src_rect = Rect.new((n%4*3+0)*cw, (n/4*4)*ch, cw, ch)
- contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
- else
- sn_160124_draw_character(character_name, character_index, x, y)
- end
- end
- end
复制代码 |
|