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

Project1

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

[RMVX发布] [原创发布]动画数据库 RMXP -> RMVX,继续编辑制作

 关闭 [复制链接]

Lv1.梦旅人

66RPG站长

梦石
0
星屑
54
在线时间
615 小时
注册时间
2005-10-10
帖子
5734

RMVX自由创作大赛亚军第2届短篇游戏比赛亚军第5届短篇游戏比赛冠军

跳转到指定楼层
1
发表于 2008-1-15 18:41:15 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

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

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

x
XP时当年那么多的动画,浪费可惜。

转换方法如下:

1、RMXP中插入代码1并执行

2、生成一个animations2.xp_to_vx,复制到RMVX的工程下

3、RMVX中插入代码2并执行。关闭VX工程重开后就会发现动画已经正确添加完毕。




代码1:
  1. $data_animations    = load_data("Data/Animations.rxdata")

  2. module RPG
  3.   class Animation
  4.     class Timing
  5.       def initialize
  6.         @frame = 0
  7.         @se = RPG::AudioFile.new("", 80)
  8.         @flash_scope = 0
  9.         @flash_color = Color.new(255,255,255,255)
  10.         @flash_duration = 5
  11.         @condition = 0
  12.         @se_name = ""
  13.         @se_volume = 80
  14.         @se_pitch = 100
  15.       end
  16.       attr_accessor :frame
  17.       attr_accessor :se
  18.       attr_accessor :se_name
  19.       attr_accessor :se_volume
  20.       attr_accessor :se_pitch
  21.       attr_accessor :flash_scope
  22.       attr_accessor :flash_color
  23.       attr_accessor :flash_duration
  24.       attr_accessor :condition
  25.     end
  26.   end
  27. end

  28. module RPG
  29.   class Animation2
  30.     def initialize
  31.       @id = 0
  32.       @name = ""
  33.       @animation_name = ""
  34.       @animation_hue = 0
  35.       @position = 1
  36.       @frame_max = 1
  37.       @frames = [RPG::Animation::Frame.new]
  38.       @timings = []
  39.     end
  40.     attr_accessor :id
  41.     attr_accessor :name
  42.     attr_accessor :animation_name
  43.     attr_accessor :animation_hue
  44.     attr_accessor :position
  45.     attr_accessor :frame_max
  46.     attr_accessor :frames
  47.     attr_accessor :timings
  48.   end
  49. end

  50. module RPG
  51.   class Animation2
  52.     class Timing
  53.       def initialize
  54.         @frame = 0
  55.         @flash_scope = 0
  56.         @flash_color = Color.new(255,255,255,255)
  57.         @flash_duration = 5
  58.         @condition = 0
  59.         @se_name = ""
  60.         @se_volume = 80
  61.         @se_pitch = 100
  62.       end
  63.       attr_accessor :frame
  64.       attr_accessor :se
  65.       attr_accessor :se_name
  66.       attr_accessor :se_volume
  67.       attr_accessor :se_pitch
  68.       attr_accessor :flash_scope
  69.       attr_accessor :flash_color
  70.       attr_accessor :flash_duration
  71.       attr_accessor :condition
  72.     end
  73.   end
  74. end

  75. $ani = []
  76. for ani in $data_animations
  77.   next if ani == nil
  78.   temp_ani = RPG::Animation2.new
  79.   temp_ani.id = ani.id
  80.   temp_ani.name = ani.name
  81.   temp_ani.animation_name = ani.animation_name
  82.   temp_ani.animation_hue = ani.animation_hue
  83.   temp_ani.position = ani.position
  84.   temp_ani.frame_max = ani.frame_max
  85.   temp_ani.frames = ani.frames
  86.   temp_ani.timings = []
  87.   for timing in ani.timings
  88.     if timing.se != nil
  89.       timing.se_name = timing.se.name
  90.       timing.se_volume = timing.se.volume
  91.       timing.se_pitch = timing.se.pitch
  92.       timing.se = nil
  93.     end
  94.     temp_timings = RPG::Animation2::Timing.new
  95.     temp_timings.frame = timing.frame
  96.     temp_timings.se_name = timing.se_name
  97.     temp_timings.se_volume = timing.se_volume
  98.     temp_timings.se_pitch = timing.se_pitch
  99.     temp_timings.flash_scope = timing.flash_scope
  100.     temp_timings.flash_color = timing.flash_color
  101.     temp_timings.flash_duration = timing.flash_duration
  102.     temp_timings.condition = timing.condition
  103.     temp_ani.timings.push(temp_timings)
  104.   end
  105.   $ani.push(temp_ani)
  106. end


  107. save_data($ani, "animations2.xp_to_vx")
  108. p "ready~~~~go!"
  109. exit
复制代码


代码2:
  1. module RPG
  2.   class Animation2
  3.     def initialize
  4.       @id = 0
  5.       @name = ""
  6.       @animation_name = ""
  7.       @animation_hue = 0
  8.       @position = 1
  9.       @frame_max = 1
  10.       @frames = [RPG::Animation::Frame.new]
  11.       @timings = []
  12.     end
  13.     attr_accessor :id
  14.     attr_accessor :name
  15.     attr_accessor :animation_name
  16.     attr_accessor :animation_hue
  17.     attr_accessor :position
  18.     attr_accessor :frame_max
  19.     attr_accessor :frames
  20.     attr_accessor :timings
  21.   end
  22. end

  23. module RPG
  24.   class Animation2
  25.     class Timing
  26.       def initialize
  27.         @frame = 0
  28.         @flash_scope = 0
  29.         @flash_color = Color.new(255,255,255,255)
  30.         @flash_duration = 5
  31.         @condition = 0
  32.         @se_name = ""
  33.         @se_volume = 80
  34.         @se_pitch = 100
  35.       end
  36.       attr_accessor :frame
  37.       attr_accessor :se_name
  38.       attr_accessor :se_volume
  39.       attr_accessor :se_pitch
  40.       attr_accessor :flash_scope
  41.       attr_accessor :flash_color
  42.       attr_accessor :flash_duration
  43.       attr_accessor :condition
  44.     end
  45.   end
  46. end

  47. $data_animations_xpvx    = load_data("animations2.xp_to_vx")
  48. $data_animations    = load_data("Data/Animations.rvdata")

  49. for ani in $data_animations_xpvx
  50.   new_ani = RPG::Animation.new
  51.   new_ani.id = ani.id
  52.   new_ani.name = ani.name
  53.   new_ani.animation1_name = ani.animation_name
  54.   new_ani.animation1_hue = ani.animation_hue
  55.   new_ani.animation2_name = ""
  56.   new_ani.animation2_hue = 0
  57.   new_ani.position = ani.position
  58.   new_ani.frame_max = ani.frame_max
  59.   new_ani.frames = ani.frames
  60.   for timings in ani.timings
  61.     temp_timings = RPG::Animation::Timing.new
  62.     temp_timings.frame = timings.frame
  63.     temp_timings.se = RPG::SE.new(timings.se_name, timings.se_volume, timings.se_pitch)
  64.     temp_timings.flash_scope = timings.flash_scope
  65.     temp_timings.flash_color = timings.flash_color
  66.     temp_timings.flash_duration = timings.flash_duration
  67.     new_ani.timings.push(temp_timings)
  68.   end
  69.   $data_animations.push(new_ani)
  70. end

  71. save_data($data_animations, "Data/Animations.rvdata")
  72. p "大家好,今天66RPG的网速似乎不错啊。"
  73. exit
复制代码


Lv2.观梦者

梦石
0
星屑
602
在线时间
559 小时
注册时间
2006-3-30
帖子
39
53
发表于 2010-9-20 17:12:56 | 只看该作者
这脚本应该插入在哪儿呢?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
129 小时
注册时间
2009-3-29
帖子
432
52
发表于 2009-5-11 03:15:14 | 只看该作者
别抱怨啦,用VIP做限制是为了不让新人看了脑晕!!!! 不然新人看了会崩溃的..{/kuk}
做一个游戏也用这么长时间........
PS:说我自己呢
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
15 小时
注册时间
2008-9-5
帖子
55
51
发表于 2009-5-11 02:27:05 | 只看该作者
我想要啊`````VIP``VIP{/dk}{/dk}
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
0 小时
注册时间
2006-5-28
帖子
9
50
发表于 2009-5-8 23:27:29 | 只看该作者
...
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2009-2-8
帖子
142
49
发表于 2009-2-13 09:26:45 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2008-8-20
帖子
159
48
发表于 2009-2-13 00:35:35 | 只看该作者
还好我有12VIP
XP的动画文件改了名放到VX里应该也能用吧
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2009-2-9
帖子
14
47
发表于 2009-2-12 21:01:18 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2009-2-9
帖子
14
46
发表于 2009-2-12 20:45:51 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2009-2-9
帖子
14
45
发表于 2009-2-9 20:55:35 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-8 10:22

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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